A simple example of the affine clock calculus

This example is defined in the directory: /home/lbesnard/Polychrony/V4.19/Linux/Examples/affines.

This directory contains the description in SIGNAL of a simple example of the affine clock calculus.

The affine clock calculus (See chapter VIII-3 of the SIGNAL reference manual) is partly integrated in Polychrony. It is an extension of the boolean clock calculus based on free boolean conditions. The affine relations allow to express that successive values of some signal are provided at specific micro-instants between any two successive macro-instants in a regular manner.

A complete description of the affine clock calculus can be found in Irina smarandache 's PhD (ftp://ftp.irisa.fr/techreports/theses/1998/smarandache.ps.gz).

SIGNAL programs

process example_affine_sample =
  { integer n1, n2, n3, phi1, phi2, phi3; }
  ( ? integer e;
    ! integer s;
      )
  pragmas COMMENT " parameters : n1=6, n2=2, n3=3, phi1=4, phi2=2, phi3=1 "
                  ""
                  "    e1 e2  e3 e4   e5  e6 e7  e8 e9 e10  e11 e12"
                  "e  -|---|--|---|---|----|--|--|---|--|----|---|----"
                  "s1 ----------------|----------------------|--------"
                  "s2 --------|-------|-------|------|-------|--------"
                  "s3 ----------------|----------------------|--------"
                  "s  ----------------|----------------------|--------" 
                  ""
                  "s1 starts at the 5th value(phi1=4), e5 of e, then takes the e11, e17,...values of e (period= 6)"
                  "s2 starts at the 3th value(phi2=2), e3 of e, then takes the e5, e7,...values of e (period= 2)"
                  "s3 starts at the 2th value(phi3=1) of s2, then takes the 5th, 8th,...values of s2 (period= 3)"
                  "With such values for the parameters, s1 and s3 are synchronous signals."
  end pragmas

  (| s1 := affine_sample {phi1, n1} (e)
   | s2 := affine_sample {phi2, n2} (e)
   | s3 := affine_sample {phi3, n3} (s2)
   | s := s1 + s3
   |)
  where
    integer s1, s2, s3;
  end;
    

compiling:

signal -tra -c example_affine_sample.SIG -par=example_affine_sample.PAR

 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 )