Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
712758 | IFAC-PapersOnLine | 2015 | 6 Pages |
Physical quantities are only insufficiently mapped into software. Software components, that interpret the same variable with different physical units, bear a risk for human beings, the environment and assets, that depend on the correct functioning of safety-related devices in embedded systems. Programmers can only define atomic types and restrict their range, but physical units like metres or seconds are not attached. This prevents more profound static analyses by compilers, which could detect software errors like physical formulae with false operands or procedure invocations with different units in callers and callees. This paper addresses physical unit checking within the real-time programming language PEARL. Therefore, our contribution is two-fold: On one hand, we define additional PEARL syntax for physical units and implement a static analyser for the procedural variant of PEARL. On the other hand, we define classes for the object-oriented variant of PEARL in order to check the units statically without the need for adapting compilers.