(while a supporting proof tool is still in its infancy). However, there are some language glitches
which make the use of the system somewhat cumbersome [27]: for instance, it is not possible to
introduce named predicates in invariants; furthermore, invariants can be only used to constrain
global state changes but not individual loops.
The language WhyML of the program verification environment Why3 environment [6, 37],
while being a real programming language, can due its high-level also be considered as an algo-
rithm language supporting pre- and postconditions, assertions, loop invariants, and termination
measures. However, due to its actual nature as a programming language, WhyML does not
support nondeterministic constructions like TLA+/PlusCal, VDM, or RISCAL. WhyML pro-
grams can be executed via translation to the language OCaml and verified by various external
theorem provers; runtime assertion checking and model checking are not supported. Similarly
Dafny [20, 11] is a high-level programming language developed at Microsoft with built-in spec-
ification constructs. A program can be compiled to executable .NET code and verified via the
SMT solver Z3. Also Dafny does not support nondeterministic constructions, runtime assertion
checking or model checking.
Also for various more wide-spread programming languages such as C, Ada, Java, C#, exten-
sions for specifications do exist. Considering only the Java world, around the Java Modeling
Language (JML) [9, 17] an ecosystem of supporting tools have been developed, including run-
time assertion checkers, extended static checkers, and full-fledged verifiers. However, all of
these tools have to struggle with the complex semantics of an “industrial” programming lan-
guage which is only partially covered by JML respectively the corresponding tools, partially also
with the complexity of JML itself. For instance, the runtime assertion checking supported by
the old “Common JML Tools” or the newer “OpenJML” toolset has to deal with the fact that
not all quantified formulas expressible in JML are easily executable such that not all parts of a
specification are necessarily considered in checks.
The thesis [27] has compared some of the languages/tools mentioned above (notably JML,
TLA+/PlusCal, Alloy, VDM/Overture, Event-B/Rodin) and their suitability for modeling and
verifying mathematical algorithms; in a nutshell, while none was considered as ideal, the system
TLA+/PlusCal was judged as the best on for model checking (with VDM as an alternative for
recursive algorithms, which are not supported by PlusCal).
5 Conclusions and Future Work
Since Version 1, the RISCAL software has allowed to validate the correctness of mathematical
algorithms and their formal annotations by executing respectively evaluating them on finite
subsets of the generally infinite domains. Thus it can be e.g. detected that a loop invariant is
too strong, i.e., does not hold for all inputs and loop iterations. However, this is only a first step
towards an environment for the general verification of mathematical algorithms. Version 2 of the
software now also includes a verification condition generator for the specification language. The
conditions are parameterized over the unspecified domain bounds; for concrete values of these
bounds, the resulting model is finite and conditions are decidable by evaluation in that model.
If such concrete instances are invalid, also the general condition is invalid and a proof need not
be attempted. Thus we are also able to detect that a loop invariant is too weak, i.e., that it does
56