The Opal Property Language

The Opal Property Language allows to include algebraic laws into the signature or the implementation part. The laws are checked for syntax errors but have no further effect. (We hope that this changes in future versions of Opal.)

The syntax of algebraic laws is

LAW [ name == ] formula

The name is a normal Opal identifier, which is used for identification and documentation purposes. formula is a first-order predicate formula. We distinguish between formulas and boolean expressions: A boolean expression is true, false or undefined; a formula is either valid or not valid.

An example formula is the associativity law of addition:

LAW +_assoc == ALL a b c. a + (b + c) === (a + b) + c

Formulas consist of

Further information is given in Appendix A.7 of the Opal Report.


The Opal Group
Last modified: Fri Sep 10 21:48:34 MEST 1999