TimeSquare is using Xtext to provide an easy to use CCSL editor. To start, just create a file with "extendedCCSL" for extension. Then you can open it with the appropriate editor.
The full grammar is described here but simple examples are provided in the following
An empty CCSL specification looks like that:
/*
* empty CCSL specification
* @author: Julien DeAntoni
* date : Wed Feb 9th 2011
*/
ClockConstraintSystem MySpec {
imports {
import "ccsl:kernel" as kernelLib ; //add the kernel constraints to your specification
import "ccsl:lib" as CCSL; //add convenient constraints like Alternates or filterBy
}
entryBlock main
Block main {
//add your CCSL specification here...
}
}
The previous specification can be used as an empty template. You can add clocks and constraints to the specification in order to simulate it:
/*
* simple CCSL specification with two alternating clocks
* @author: Julien DeAntoni
* date : Wed Feb 9th 2011
*/
ClockConstraintSystem MySpec {
imports {
import "ccsl:kernel" as kernelLib ; //add the kernel constraints to your specification
import "ccsl:lib" as CCSL; //add convenient constraints like Alternates or filterBy
}
entryBlock main
Block main {
Clock c1
Clock c2
Relation r1[Alternates](AlternatesLeftClock -> c1, AlternatesRightClock -> c2 )
}
}
To simulate such a specification, right click on the file in the package explorer and run as -> CCSL simulation (for details go to the run configuration section)