Intersection:
This is a synchronous temporal expression. It creates an implicit clock that is the result of the expression. The implicit clock ticks each time the two clocks provided as parameters tick simultaneously. To ease the reading we have added a coincidence relation between the implicit result clock and an explicit clock named c3.
the CCSL specification:
/*
* c3 = c1 inter c2
* @author: Julien DeAntoni
* date : Wed jul 11th 2011
*/
ClockConstraintSystem MySpec {
imports {
import "ccsl:kernel" as kernelLib ; //add the kernel constraints to your specification
}
entryBlock main
Block main {
Clock c1
Clock c2
Clock c3
Expression c1Ic2 = Intersection( Clock1 -> c1, Clock2 -> c2 )
Relation r1[Coincides](Clock1 -> c3, Clock2 -> c1Ic2 )
}
}
Simulation results:
The Intersection expression simulation is represented on the next picture.
On the bottom right, the clock domain is represented; here, the resulting clock is a subClock of the two clocks provided as parameters of the expression
The resulting clock is named IC7 (ImplicitClock and an unique number for the simulation). Its actual name can be shown in a message when the mouse moves over the state (as shown on the picture)
This expression provides a solution that is partially ordered as shown in the following picture where the instant relations are displayed.
However, for readability reasons, we decided to not represent the exclusion relation that holds between C1 and C2 when C3 does not tick