Property type

Requirements.Types.Property  ยท source

Enumeration defining literals for four-valued logic (ETL): Undefined = not applicable, the neutral element of and/or

Defined as enumeration

Enumeration defining literals for four-valued logic to model properties and requirements (a requirement is a property that should be Satisfied). The second column (Integer value) defines the (Modelica) value of the enumeration that is, for example, used when storing a value in a result file.

LiteralInteger valueDescription
Violated= 1The property is violated.
Undecided= 2The property is applicable, but neither satisfied nor violated yet (a window not yet full, a count still below its minimum, an FFT with too few periods).
Satisfied= 3The property is satisfied.
Undefined= 4The property is not applicable: its condition (time locator, scope) is false, or the component it is stated for is absent. Its value must not affect a logical combination, so it is the neutral element of and4 and or4.

Four-valued logic

The four values and their operators follow the extended temporal logic (ETL) of EDF's ReqSysPro and the CRML language (Bouskela et al., Formal requirements modeling for cyber-physical systems in CRML, Modelica Conference 2023). In CRML's names, true4 is Satisfied, false4 is Violated, undecided is Undecided and undefined is Undefined; CRML.Blocks.Logical4.and4/or4/not4 correspond to LogicalFunctions.and4, or4 and not4, whose documentation holds the tables. Three rules generate every table entry: Undefined is a neutral element of every logical operation (Undefined op x = x); an Undecided operand gives Violated for and when the other operand is Violated and Undecided otherwise, and Satisfied for or when the other operand is Satisfied and Undecided otherwise; negation fixes both Undecided and Undefined; on {Satisfied, Violated} the operators are classical.

Undefined is appended as the fourth literal (Integer value 4): the three earlier values keep their Integer values in every stored result, and a consumer that only knows three values fails on a 4 instead of misreading it. The value order carries no meaning: the algebra has two different orders (Undefined is the top of the and-order and the bottom of the or-order), so a logical combination is never a min or max over the Integer values.

The algebra is not a lattice. De Morgan's laws, involution, commutativity, associativity and idempotence hold; the complements law (a and not a = Violated), absorption (a and (a or b) = a) and distributivity fail whenever Undefined is involved (Undefined and (Undefined or Satisfied) = Satisfied). Do not apply Boolean simplification to expressions over Property values: the block diagram or expression must be evaluated as written. Examples.Elementary.LogicalBlocks.PropertyTable4 asserts every table entry and documents the failed laws with counterexamples.

At the boundary of a simulation, the four values collapse to three: a Requirement whose property was Undefined or Undecided throughout is untested (the log records the number of attempts, the times the property became applicable, beside it); one that was Violated at any instant is violated; otherwise it is satisfied.