Ada enumerations are sometimes functions

In Ada, you declare a new enumeration type by providing a list of literals: type Position is ( Left, Middle, Right );Ada also lets you use character literals in an enumeration: type Calc_Op is ( '*', '/', '+', '-' );or even: type DNACode is ( 'A', 'C', 'G', 'T', Unknown );Once you have an enumeration type, you can use these literals just as you would other literals:
Read More

What happened first? Handling timer wraparound

Suppose you had to determine which of two timestamps occurred first. Clearly the “obvious“ approach is to use a simple numerical comparison, for example:
Read More

Conditional code without branches

The difficulty of showing that real-time software safely executes within an allotted time budget arises from the variability of code execution time. Some of this variation arises from hardware effects but a great deal arises from different paths through software. We can reduce and even eliminate this variation at the expense of increased code size and average-case performance.
Read More

How do I demonstrate the safe use of instrumented source code analysis?

In the second of two related blog posts, I describe one method to present a certification argument for the use of instrumentation in source code coverage analysis.
Read More