The language supports strong typing paradigm, where type consistency of
program entities is checked on compile-type. This enables much higher program
reliability comparatively with dynamically typed languages.
Strong typing in the ERRIC language is a bit harder than in many other languages: it prohibits any kinds of implicit-type conversions; only a limited set of
explicitly specified-type conversions are allowed. Such a restriction also improves
program reliability.
• No error-prone “pointer” types still with flexible and safe access to data and
code (routines). Null-safety design: uninitialized variables cannot appear in
ERRIC programs.
Both features actually serve the same purpose as strong typing: they make
programs much more reliable preventing unexpected program behavior on
runtime.
• Support for direct access to some hardware components.
In general, the entire assembly language as a subset of the ERRIC language.
That is, the construct “assembly statement” is the legal kind of the ERRIC’s
“statement” notion. Also, there are means for specifying special lower level
conditions for some program components. In particular, it is possible to specify
registers as return values.
The features mentioned above can be illustrated by the following schematic
example:
routine Example(a, b, c: integer): R9, R10 do
// Routine local declarations and statements
// performing some calculations
...
asm
R9 := someResult1
R10 := someResult2
end
end
The routine from this code snippet states that the call to it will (or can) update the
registers, whose names were mentioned after the colon delimiter. The body of the
routine contains two assembly statements explicitly accessing registers (assigning
some values to them).
• The language introduces a limited number of statements: assignments, routine
calls, control statements (conditionals and loops), and simple expression syntax
supporting all kinds of machine instructions.
• Basic support for multitasking and interprocessor communication with the
synchronization mechanism.
172
11 Programming Languages for Safety-Critical Systems
program entities is checked on compile-type. This enables much higher program
reliability comparatively with dynamically typed languages.
Strong typing in the ERRIC language is a bit harder than in many other languages: it prohibits any kinds of implicit-type conversions; only a limited set of
explicitly specified-type conversions are allowed. Such a restriction also improves
program reliability.
• No error-prone “pointer” types still with flexible and safe access to data and
code (routines). Null-safety design: uninitialized variables cannot appear in
ERRIC programs.
Both features actually serve the same purpose as strong typing: they make
programs much more reliable preventing unexpected program behavior on
runtime.
• Support for direct access to some hardware components.
In general, the entire assembly language as a subset of the ERRIC language.
That is, the construct “assembly statement” is the legal kind of the ERRIC’s
“statement” notion. Also, there are means for specifying special lower level
conditions for some program components. In particular, it is possible to specify
registers as return values.
The features mentioned above can be illustrated by the following schematic
example:
routine Example(a, b, c: integer): R9, R10 do
// Routine local declarations and statements
// performing some calculations
...
asm
R9 := someResult1
R10 := someResult2
end
end
The routine from this code snippet states that the call to it will (or can) update the
registers, whose names were mentioned after the colon delimiter. The body of the
routine contains two assembly statements explicitly accessing registers (assigning
some values to them).
• The language introduces a limited number of statements: assignments, routine
calls, control statements (conditionals and loops), and simple expression syntax
supporting all kinds of machine instructions.
• Basic support for multitasking and interprocessor communication with the
synchronization mechanism.
172
11 Programming Languages for Safety-Critical Systems
