From 81dd0dfadd530fda86e70aee8912945d215786bc Mon Sep 17 00:00:00 2001 From: "Arne Nordmann (CR/AEA2)" Date: Mon, 19 Oct 2020 13:47:09 +0200 Subject: [PATCH] Disallowusage of OCRA constraints outside OCRA To not pollute nusmv language models with OCRA expression/constraint concepts, additional MPS constrants are introduced. All OCRA expressions now extend the interface IOcraExpression, which is only allowed ('can be child of') inside OCRA contracts. https://github.com/mbeddr/mbeddr.formal/issues/54 Signed-off-by: Arne Nordmann (CR/AEA2) --- .../com.mbeddr.formal.ocra.mpl | 45 ++++++++++++ .../com.mbeddr.formal.ocra.mpl | 5 ++ .../com.mbeddr.formal.ocra.behavior.mps | 2 - .../com.mbeddr.formal.ocra.constraints.mps | 34 +++++++++ .../com.mbeddr.formal.ocra.structure.mps | 71 ++++++++++++++++++- 5 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 code/languages/com.mbeddr.formal.nusmv/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl diff --git a/code/languages/com.mbeddr.formal.nusmv/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl b/code/languages/com.mbeddr.formal.nusmv/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl new file mode 100644 index 000000000..7abe1eb77 --- /dev/null +++ b/code/languages/com.mbeddr.formal.nusmv/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 001b2375-3bd5-4d5e-9958-6b3f62dc8548(com.mbeddr.formal.nusmv) + f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage) + b0b65429-cd22-4e2a-83e7-cd58bc6dd72f(com.mbeddr.formal.base.expressions) + + + diff --git a/code/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl b/code/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl index a95b0a189..f374c69e5 100644 --- a/code/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl +++ b/code/languages/com.mbeddr.formal.ocra/com.mbeddr.formal.ocra.mpl @@ -17,6 +17,8 @@ 83ed2dfe-f724-46cc-852a-dce086daee3f(com.mbeddr.formal.base) 2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel) 6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK) + c72da2b9-7cce-4447-8389-f407dc1158b7(jetbrains.mps.lang.structure) + 001b2375-3bd5-4d5e-9958-6b3f62dc8548(com.mbeddr.formal.nusmv) @@ -70,9 +72,12 @@ + + + diff --git a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.behavior.mps b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.behavior.mps index ce500b181..8f6235862 100644 --- a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.behavior.mps +++ b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.behavior.mps @@ -5,7 +5,6 @@ - @@ -13,7 +12,6 @@ - diff --git a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.constraints.mps b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.constraints.mps index ea7e194e0..ce6dffef8 100644 --- a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.constraints.mps +++ b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.constraints.mps @@ -11,12 +11,14 @@ + + @@ -76,10 +78,12 @@ + + @@ -90,6 +94,7 @@ + @@ -108,6 +113,7 @@ + @@ -145,6 +151,9 @@ + + + @@ -154,6 +163,7 @@ + @@ -564,5 +574,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.structure.mps b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.structure.mps index a1e1ab351..bb3448689 100644 --- a/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.structure.mps +++ b/code/languages/com.mbeddr.formal.ocra/models/com.mbeddr.formal.ocra.structure.mps @@ -9,8 +9,8 @@ + - @@ -36,7 +36,9 @@ - + + + @@ -922,6 +924,9 @@ + + + @@ -930,6 +935,9 @@ + + + @@ -938,6 +946,9 @@ + + + @@ -946,6 +957,9 @@ + + + @@ -954,6 +968,9 @@ + + + @@ -962,6 +979,9 @@ + + + @@ -970,6 +990,9 @@ + + + @@ -978,6 +1001,9 @@ + + + @@ -986,6 +1012,9 @@ + + + @@ -994,6 +1023,9 @@ + + + @@ -1002,6 +1034,9 @@ + + + @@ -1010,6 +1045,9 @@ + + + @@ -1018,6 +1056,9 @@ + + + @@ -1026,6 +1067,9 @@ + + + @@ -1034,6 +1078,9 @@ + + + @@ -1042,6 +1089,9 @@ + + + @@ -1057,6 +1107,9 @@ + + + @@ -1072,6 +1125,9 @@ + + + @@ -1098,6 +1154,9 @@ + + + @@ -1169,6 +1228,9 @@ + + + @@ -1198,5 +1260,10 @@ + + + + +