The input languages of ProTL is PrCCSL specifications, i.e., the textual encodings that follow the PrCCSL format. We first describe the character set that are supported in the PrCCSL specifications. Then, how the specifications can be formed by tokens is introduced. Finally, the usage a set of keywords (including declaration, expression and relations) to encode the specifications is demonstrated.
A subset of the ASCII character set is utilized in the PrCCSL specifications:
1. Digits: 0,1,2,3,4,5,6,7,8,9.
2. Letters: 'a' -'z' and 'A' -'Z'.
3. Punctuation characters: '+', '*', '=', '#', '(', ')', '.', '[', ']', '-'.
4. Whitespace characters: space, tab, newline, and carriage-return.
5. Line terminators: ';'.
ProTL can recognize various tokens. A summary of token types is provided as follows:
Regular Expression: 0|([1-9][0-9]*)
Example: 0, 10, 33
Regular expression: (Int+).(Int+)
Example: 32.7, 0.001
Regular expression: (a..z|A..Z|0..9|[|]|_)+
Example: trig, c1, c2, c_3
Regular expression: Int|( Int (+ Int )* ) )
Example: (A+B), 22+13
We introduce the keywords in PrCCSL and their syntax and semantics. Keywords in PrCCSL can be categorized into three types, i.e., clock declaration, expressions and relations.
1. Clock Declaration
Clock c1, c2, c3;
DenseClockType cost{
reference idealClk,
factor 10,
offsent {(event1, 1.8), (event2, 0.2)},
reset {event3, event4}
};
2. Expressions
Clock c;
Clock base;
c is periodicOn base period 50;
Clock c, c1, c2;
c is c1 inf c2 ;
Clock c, c1, c2;
c is c1 sup c2 ;
Clock c;
Clock base, ref;
c is ref delayFor 50 on base;
Clock c, c1, c2;
c is c1 clockInter c2 ;
Clock c, c1, c2;
c clockDef c1 clockUnion c2 ;
Clock c, c1;
c is c1 filterBy B10(B1);
Clock c, c1, c2;
c is if b then c1 else c2;
3. Clock Actions
The clock action relates a logical clock c with a set of oper ations that are performed to change the system behaviors, e.g., assignments, functions/operations on variables.
Clock c;
```C
int a;
```;
c action {a=1};
4. Probabilistic Clock Actions
Probabilistic clock action is used to describe the situation where an event can be associated with multiple actions under uncertainty, i.e., it is uncertain which action out of a set of actions the system will take when the event occurs.
Clock c;
```C
int a;
```;
c pAction {(0.10, {a=1}), (0.20, {a=2}), (0.70, a=3)};
5. Clock Relations
Clock c1, c2;
c1 subclock(p=0.95) c2 ;
Clock c1, c2;
c1 coincides(p=0.95) c2 ;
Clock c1, c2;
c1 excludes(p=0.95) c2 ;
Clock c1, c2
c1 precedes(p=0.95) c2 ;
Clock c1, c2;
c1 causes(p=0.95) c2 ;
6. N-ary Clock Relation
To describe the complex requirements associated with multiple events, we extend the binary relations into n-ary relations, which allow to de scribe the dependencies among a set of events.
Clock c1, c2, c3, c4;
coincides(p=0.95, c1, c2, c3, c4);
Clock c1, c2, c3, c4;
subclock(p=0.95, c1, c2, c3, c4);
Clock c1, c2, c3, c4;
excludes(p=0.95, c1, c2, c3, c4);
Clock c1, c2, c3, c4;
precedes(p=0.95, c1, c2, c3, c4);
Clock c1, c2, c3, c4;
causes(p=0.95, c1, c2, c3, c4);
Note that the following keywords should not be used as identifier or names when editing PrCCSL encodings/specifications: Clock, is, DenseClockType, idealClk, IdealClock, factor, offset, reference, reset, coincides, excludes, causes, precedes, periodicOn, period, if, then, else, inf, sup, on, clockInter, clockUnion, delayFor, filterBy.