Review Textual Syntax for SyncCharts - II
- Please refer to the first part of this discussion to learn about the decisions, made so far.
Open Questions
- States
According to our meta-model, our states have two boolean flags initial, final and a state type, which can be set to pseudo, textual or reference. We have not yet decided about- whether or not to make the keyword state obligatory
- the order of the keywords (state before or between the modifiers?)
- make the keyword state obligatory and place it before the state modifier(s)
state init final reference power_off "P_OFF"
- make the keyword state obligatory and place it between the flags and the state kind
init final state reference power_off "P_OFF"
- make the keyword state optional
init final reference power_off "P_OFF"
Question: If we would make the keyword state optional, then how would we be able to differentiate between the two possible semantics of the following statement (Is B is a reference to a state, declared elsewhere, or is it a new state declaration?) Do we have to differentiate between them anyway?
A --> B
- ID scopes for states (global?)
- path-notation with dot (macroStateName.myState)
- unique names in parallel regions?
- Regions
- Do regions have names???
Example
reincarnation{
input c,d
output v:=1:combine integer with *
extern init innermacro[A/a, B/b]
--> innermacro with c/v(7)
--> with #d/v(11)
}
// ----------------------------------------------------------
innermacro{
input a,b
init {
onentry v:=2
}
o-> with a/v(3)
o-> nameMe with #b/v(5)
}
- referencing and renaming
renamingstates{
input d
output w:=0 combine integer with +
inner1 @ extern innermacro [A1/a,A2/b]
o-> inner2 with #d/w(1)
||
inner2 @ extern innermacro[A2/a,A2/b]
o-> innermacro with #d/w(1)
||
extern innermacro
}
// ----------------------------------------------------------
innermacro{
input a,b
output v:=1:combine integer with *
init {
onentry v:=2
}
o-> with a/v(3)
o-> nameMe with #b/v(5)
}
- suspension could look like this? how to differentiate the last two finals?
interruption{ output susp extern init aTask o- # susp || init o-> extern interruptHandler with #irq >-> } //--------------------------------- aTask { // has some complex task to do } //--------------------------------- interruptHandler{ output resume init{ onentry susp } o-> final with resume || init ISR >-> final with resume }
- do we allow not unique state identifiers?
Attachments
-
andre_chart.png
(24.7 KB) -
added by oba 3 years ago.
-
suspension.png
(23.6 KB) -
added by oba 3 years ago.
suspension

