Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ESProjects
SDE
Commits
ec450e6c
Commit
ec450e6c
authored
Mar 14, 2022
by
Luca Cristoforetti
Browse files
Update OCRA grammar to support behaviours and add test files
parent
8d708cf4
Changes
6
Hide whitespace changes
Inline
Side-by-side
eu.fbk.tools.editor/eu.fbk.tools.editor.oss.tests/resources/OSS_OK/test_behavior_init.oss
0 → 100644
View file @
ec450e6c
COMPONENT system
INTERFACE
INPUT PORT inp : boolean;
INPUT PORT ev : event;
PARAMETER k : real;
CONTRACT foo
assume: true;
guarantee: G inp or in the future inp or (!inp U X inp);
REFINEMENT
SUB t : Test;
INIT fall(inp);
CONTRACT foo REFINEDBY t.a;
COMPONENT Test
INTERFACE
CONTRACT a
assume: true;
guarantee: true;
eu.fbk.tools.editor/eu.fbk.tools.editor.oss.tests/resources/OSS_OK/test_behavior_invar.oss
0 → 100644
View file @
ec450e6c
COMPONENT system
INTERFACE
INPUT PORT inp : boolean;
INPUT PORT ev : event;
PARAMETER k : real;
CONTRACT foo
assume: true;
guarantee: G inp or in the future inp or (!inp U X inp);
REFINEMENT
SUB t : Test;
INVAR fall(inp);
CONTRACT foo REFINEDBY t.a;
COMPONENT Test
INTERFACE
CONTRACT a
assume: true;
guarantee: true;
eu.fbk.tools.editor/eu.fbk.tools.editor.oss.tests/resources/OSS_OK/test_behavior_trans.oss
0 → 100644
View file @
ec450e6c
COMPONENT system
INTERFACE
INPUT PORT inp : boolean;
INPUT PORT ev : event;
PARAMETER k : real;
CONTRACT foo
assume: true;
guarantee: G inp or in the future inp or (!inp U X inp);
REFINEMENT
SUB t : Test;
TRANS inp or next(inp);
CONTRACT foo REFINEDBY t.a;
COMPONENT Test
INTERFACE
CONTRACT a
assume: true;
guarantee: true;
eu.fbk.tools.editor/eu.fbk.tools.editor.oss.tests/resources/OSS_OK/test_behavior_var.oss
0 → 100644
View file @
ec450e6c
COMPONENT system
INTERFACE
INPUT PORT inp : boolean;
INPUT PORT ev : event;
PARAMETER k : real;
CONTRACT foo
assume: true;
guarantee: G inp or in the future inp or (!inp U X inp);
REFINEMENT
SUB t : Test;
VAR test : boolean;
CONTRACT foo REFINEDBY t.a;
COMPONENT Test
INTERFACE
CONTRACT a
assume: true;
guarantee: true;
eu.fbk.tools.editor/eu.fbk.tools.editor.oss.tests/resources/OSS_OK/test_behaviour_urgent.oss
0 → 100644
View file @
ec450e6c
COMPONENT system
INTERFACE
INPUT PORT inp : boolean;
INPUT PORT ev : event;
PARAMETER k : real;
CONTRACT foo
assume: true;
guarantee: G inp or in the future inp or (!inp U X inp);
REFINEMENT
SUB t : Test;
URGENT inp or next(inp);
CONTRACT foo REFINEDBY t.a;
URGENT fall(inp);
COMPONENT Test
INTERFACE
CONTRACT a
assume: true;
guarantee: true;
eu.fbk.tools.editor/eu.fbk.tools.editor.oss/src/eu/fbk/tools/editor/oss/Oss.xtext
View file @
ec450e6c
...
...
@@ -53,7 +53,8 @@ RefinementInstance:
refinedby=RefinedBy |
formula=FormulaConstraint |
prop=ValidProp |
assertion=Assertion;
assertion=Assertion |
behaviour=Behaviour;
Variable:
(Port | Parameter | Operation);
...
...
@@ -93,6 +94,13 @@ Assertion:
ParameterAssumptions:
'PARAMETER' 'ASSUMPTIONS' constraint=Expression SEMICOLON;
Behaviour:
'INIT' constraint=Expression SEMICOLON |
'VAR' name=ID COLON type=SimpleType SEMICOLON |
'INVAR' constraint=Expression SEMICOLON |
'TRANS' constraint=Expression SEMICOLON |
'URGENT' constraint=Expression SEMICOLON;
Connection:
('CONNECTION' | 'DEFINE') variable=(FullPortId | FullParameterId ) AssignementOp constraint=Expression
(iterativeCondition=IterativeCondition)? SEMICOLON;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment