Using assertions

These examples are in the directory: /home/lbesnard/Polychrony/V4.19/Linux/Examples/assertions.

The three Signal programs affine_relations.SIG, affine_relations2.SIG and two_oversampling.SIG gives examples of assertions. Without assertion the compiler returns "clock constraints": it cannot prove some equivalence of clock relations. Assertions are used for adding some hypothesis.

To compile and produce C code; use the following commands :

      signal -tra -c affine_relations.SIG  -par=affine_relations.PAR
      signal -tra -c affine_relations2.SIG  -par=affine_relations.PAR
      signal -tra -c two_oversampling.SIG

Assumptions are assumed to be satisfied for code generating. The C code is generated in the sub-directory affine_relations (resp. in two_oversampling).

If you add the -check option, the C code will contain code for testing dynamicaly the assertion.

affine_relations.SIG and affine_relations2.SIG are similar. In the first one, the assertion is describe using a boolean assert(C) specifiing that C is always true when it is present. In the second one, the second form of the assertion specification is used: a clock relation is used (assert (| x ^= y |)).

 All Files

Generated on Mon Jul 25 16:55:00 2011 for Polychrony, by  doxygen 1.6.1. This page has been designed by the Espresso team ( contact )