Guards in a nutshell

This chapter presents succinctly the different kinds of guards that are available to write mathematical rules (for further details, see Appendix C). For each guard, the following elements are presented:

  • syntax,

  • possibly its semantics,

  • a textual description of its behaviour.

It must be noted that certain guards have a mathematical semantics only under special circumstances (e.g. the bsearch guard).

The following guards may be employed to obtain one or several hypothesis from the stack, by processing first the most recently inserted hypothesis.

The following guard checks if s is an element of STRING.

The following guard checks if P is a conjunction.

The bsearch guard has a mathematic semantics when the list in which the search is performed is the argument list of an associative and commutative operator. This is the case for the operators &, or, / and /. This is also the case of the operator , (comma) for a list of quantified variables. One must thus check that the application of the rule remains within such cases.

The following guard succeeds if t is true and has the form a op b.

The following guard checks if n is a numeric value both positive and smaller or equal to maxint.

The following guard succeeds if both arguments succeed.

The role of the following guards is to verify the relationship between wildcards representing variables and wildcards representing expressions.

Last updated