浏览代码

Modify some leftover files

Yentl Van Tendeloo 8 年之前
父节点
当前提交
a3922711ad

+ 47 - 52
integration/code/cbd_design.mvc

@@ -1,61 +1,56 @@
-import models/SimpleClassDiagrams as SCD
 include "primitives.alh"
 
-SCD CausalBlockDiagrams_Design{
-    SimpleAttribute Float {
-        constraint = $
-            String function constraint(model : Element, name : String):
-                if (bool_not(is_physical_float(model["model"][name]))):
-                    return "Float has no float value"!
-                else:
-                    return "OK"!
-            $
-    }
-
-    SimpleAttribute String {
-        constraint = $
-            String function constraint(model : Element, name : String):
-                if (bool_not(is_physical_string(model["model"][name]))):
-                    return "String has no string value"!
-                else:
-                    return "OK"!
-            $
-    }
+SimpleAttribute Float {
+    constraint = $
+        String function constraint(model : Element, name : String):
+            if (bool_not(is_physical_float(model["model"][name]))):
+                return "Float has no float value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class Block{}
-    Class ICBlock{}
+SimpleAttribute String {
+    constraint = $
+        String function constraint(model : Element, name : String):
+            if (bool_not(is_physical_string(model["model"][name]))):
+                return "String has no string value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class ConstantBlock{
-        value : Float
-    }
+Class Block{}
+Class ICBlock{}
 
-    Class AdditionBlock{}
-    Class NegatorBlock{}
-    Class MultiplyBlock{}
-    Class InverseBlock{}
-    Class DelayBlock{}
-    Class IntegratorBlock{}
-    Class DerivatorBlock{}
-    Class ProbeBlock{
-        name : String
-    }
+Class ConstantBlock{
+    value : Float
+}
 
-    Association Link(Block, Block){}
-    Association InitialCondition(Block, ICBlock){
-        source_lower_cardinality = 1
-        source_upper_cardinality = 1
-    }
+Class AdditionBlock{}
+Class NegatorBlock{}
+Class MultiplyBlock{}
+Class InverseBlock{}
+Class DelayBlock{}
+Class IntegratorBlock{}
+Class DerivatorBlock{}
+Class ProbeBlock{
+    name : String
+}
 
-    Inheritance (ConstantBlock, Block){}
-    Inheritance (AdditionBlock, Block){}
-    Inheritance (NegatorBlock, Block){}
-    Inheritance (MultiplyBlock, Block){}
-    Inheritance (InverseBlock, Block){}
-    Inheritance (ProbeBlock, Block){}
-    Inheritance (ICBlock, Block){}
-    Inheritance (DelayBlock, ICBlock){}
-    Inheritance (IntegratorBlock, ICBlock){}
-    Inheritance (DerivatorBlock, ICBlock){}
+Association Link(Block, Block){}
+Association InitialCondition(Block, ICBlock){
+    source_lower_cardinality = 1
+    source_upper_cardinality = 1
 }
 
-export CausalBlockDiagrams_Design to models/CausalBlockDiagrams_Design
+Inheritance (ConstantBlock, Block){}
+Inheritance (AdditionBlock, Block){}
+Inheritance (NegatorBlock, Block){}
+Inheritance (MultiplyBlock, Block){}
+Inheritance (InverseBlock, Block){}
+Inheritance (ProbeBlock, Block){}
+Inheritance (ICBlock, Block){}
+Inheritance (DelayBlock, ICBlock){}
+Inheritance (IntegratorBlock, ICBlock){}
+Inheritance (DerivatorBlock, ICBlock){}

+ 60 - 65
integration/code/cbd_runtime.mvc

@@ -1,77 +1,72 @@
-import models/SimpleClassDiagrams as SCD
 include "primitives.alh"
 
-SCD CausalBlockDiagrams_Runtime{
-    AttributeValue Float {
-        constraint = $
-            String constraint(model : Element, name : String):
-                if (bool_not(is_physical_float(model["model"][name]))):
-                    return "Float has no float value"!
-                else:
-                    return "OK"!
-            $
-    }
-
-    AttributeValue String {
-        constraint = $
-            String constraint(model : Element, name : String):
-                if (bool_not(is_physical_string(model["model"][name]))):
-                    return "String has no string value"!
-                else:
-                    return "OK"!
-            $
-    }
+AttributeValue Float {
+    constraint = $
+        String constraint(model : Element, name : String):
+            if (bool_not(is_physical_float(model["model"][name]))):
+                return "Float has no float value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class Block{
-        signal : Float
-    }
-    Class ICBlock{
-        last_in : Float
-    }
+AttributeValue String {
+    constraint = $
+        String constraint(model : Element, name : String):
+            if (bool_not(is_physical_string(model["model"][name]))):
+                return "String has no string value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class ConstantBlock{
-        value : Float
-    }
+Class Block{
+    signal : Float
+}
+Class ICBlock{
+    last_in : Float
+}
 
-    Class ProbeBlock{
-        name : String
-    }
+Class ConstantBlock{
+    value : Float
+}
 
-    Class AdditionBlock{}
-    Class NegatorBlock{}
-    Class MultiplyBlock{}
-    Class InverseBlock{}
-    Class DelayBlock{}
-    Class IntegratorBlock{
-        last_out? : Float
-    }
+Class ProbeBlock{
+    name : String
+}
 
-    Class DerivatorBlock{}
-    Class Time{
-        lower_cardinality = 1
-        upper_cardinality = 1
+Class AdditionBlock{}
+Class NegatorBlock{}
+Class MultiplyBlock{}
+Class InverseBlock{}
+Class DelayBlock{}
+Class IntegratorBlock{
+    last_out? : Float
+}
 
-        start_time : Float
-        current_time : Float
-    }
+Class DerivatorBlock{}
+Class Time{
+    lower_cardinality = 1
+    upper_cardinality = 1
 
-    Association Link(Block, Block){
-    }
-    Association InitialCondition(Block, ICBlock){
-        source_lower_cardinality = 0
-        source_upper_cardinality = 1
-    }
+    start_time : Float
+    current_time : Float
+}
 
-    Inheritance (ConstantBlock, Block){}
-    Inheritance (AdditionBlock, Block){}
-    Inheritance (NegatorBlock, Block){}
-    Inheritance (MultiplyBlock, Block){}
-    Inheritance (InverseBlock, Block){}
-    Inheritance (ICBlock, Block){}
-    Inheritance (DelayBlock, ICBlock){}
-    Inheritance (DerivatorBlock, ICBlock){}
-    Inheritance (IntegratorBlock, ICBlock){}
-    Inheritance (ProbeBlock, Block){}
+Association Link(Block, Block){
+}
+Association InitialCondition(Block, ICBlock){
+    source_lower_cardinality = 0
+    source_upper_cardinality = 1
 }
 
-export CausalBlockDiagrams_Runtime to models/CausalBlockDiagrams_Runtime
+Inheritance (ConstantBlock, Block){}
+Inheritance (AdditionBlock, Block){}
+Inheritance (NegatorBlock, Block){}
+Inheritance (MultiplyBlock, Block){}
+Inheritance (InverseBlock, Block){}
+Inheritance (ICBlock, Block){}
+Inheritance (DelayBlock, ICBlock){}
+Inheritance (DerivatorBlock, ICBlock){}
+Inheritance (IntegratorBlock, ICBlock){}
+Inheritance (ProbeBlock, Block){}

+ 20 - 25
integration/code/fsa_design.mvc

@@ -1,32 +1,27 @@
-import models/SimpleClassDiagrams as SCD
 include "primitives.alh"
 
-SCD FiniteStateAutomata_Design{
-    AttributeValue String {
-        constraint = $
-            String constraint(model : Element, name : String):
-                if (bool_not(is_physical_string(model["model"][name]))):
-                    return "String has no string value"!
-                else:
-                    return "OK"!
-            $
-    }
-
-    Class State {
-        name : String
-    }
+AttributeValue String {
+    constraint = $
+        String constraint(model : Element, name : String):
+            if (bool_not(is_physical_string(model["model"][name]))):
+                return "String has no string value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class InitialState {
-        lower_cardinality = 1
-        upper_cardinality = 1
-    }
+Class State {
+    name : String
+}
 
-    Association Transition (State, State) {
-        event : String
-        raise? : String
-    }
+Class InitialState {
+    lower_cardinality = 1
+    upper_cardinality = 1
+}
 
-    Inheritance (InitialState, State){}
+Association Transition (State, State) {
+    event : String
+    raise? : String
 }
 
-export FiniteStateAutomata_Design to models/FiniteStateAutomata_Design
+Inheritance (InitialState, State){}

+ 28 - 33
integration/code/fsa_runtime.mvc

@@ -1,42 +1,37 @@
-import models/SimpleClassDiagrams as SCD
 include "primitives.alh"
 
-SCD FiniteStateAutomata_Runtime{
-    AttributeValue String {
-        constraint = $
-            String constraint(model : Element, name : String):
-                if (bool_not(is_physical_string(model["model"][name]))):
-                    return "String has no string value"!
-                else:
-                    return "OK"!
-            $
-    }
-
-    Class State {
-        name : String
-    }
+AttributeValue String {
+    constraint = $
+        String constraint(model : Element, name : String):
+            if (bool_not(is_physical_string(model["model"][name]))):
+                return "String has no string value"!
+            else:
+                return "OK"!
+        $
+}
 
-    Class InitialState {
-        lower_cardinality = 1
-        upper_cardinality = 1
-    }
+Class State {
+    name : String
+}
 
-    Association Transition (State, State){
-        event : String
-        raise? : String
-    }
+Class InitialState {
+    lower_cardinality = 1
+    upper_cardinality = 1
+}
 
-    Inheritance (InitialState, State){}
+Association Transition (State, State){
+    event : String
+    raise? : String
+}
 
-    Class CurrentState{
-        lower_cardinality = 1
-        upper_cardinality = 1
-    }
+Inheritance (InitialState, State){}
 
-    Association CurrentStateLink{
-        lower_cardinality = 1
-        upper_cardinality = 1
-    }
+Class CurrentState{
+    lower_cardinality = 1
+    upper_cardinality = 1
 }
 
-export FiniteStateAutomata_Runtime to models/FiniteStateAutomata_Runtime
+Association CurrentStateLink{
+    lower_cardinality = 1
+    upper_cardinality = 1
+}

+ 5 - 11
integration/code/ftg.mvc

@@ -1,12 +1,6 @@
-import models/SimpleClassDiagrams as SimpleClassDiagrams
-
-SimpleClassDiagrams FormalismTransformationGraph{
-    Class Formalism {
-        location : String
-    }
-    Association Transformation (Formalism, Formalism) {
-        location : String
-    }
+Class Formalism {
+    location : String
+}
+Association Transformation (Formalism, Formalism) {
+    location : String
 }
-
-export FormalismTransformationGraph to models/FTG

+ 2 - 8
integration/code/graph.mvc

@@ -1,8 +1,2 @@
-import models/SimpleClassDiagrams as SimpleClassDiagrams
-
-SimpleClassDiagrams Graph{
-    Class Node {}
-    Association Edge (Node, Node) {}
-}
-
-export Graph to models/Graph
+Class Node {}
+Association Edge (Node, Node) {}

+ 3 - 5
integration/code/initialize_PN.mvc

@@ -1,6 +1,4 @@
-PetriNets_RAM initialize_PN {
-    Composite schedule {
-        {Contains} Success success {}
-    }
-    Initial (schedule, success) {}
+Composite schedule {
+    {Contains} Success success {}
 }
+Initial (schedule, success) {}

+ 13 - 15
integration/code/my_cbd.mvc

@@ -1,16 +1,14 @@
-CBD my_CBD {
-    AdditionBlock c {}
-    ConstantBlock a {
-        value = 1.0
-    }
-    ConstantBlock b {
-        value = 2.0
-    }
-    ProbeBlock d {
-        name = "result"
-    }
-
-    Link (a, c) {}
-    Link (b, c) {}
-    Link (c, d) {}
+AdditionBlock c {}
+ConstantBlock a {
+    value = 1.0
+}
+ConstantBlock b {
+    value = 2.0
 }
+ProbeBlock d {
+    name = "result"
+}
+
+Link (a, c) {}
+Link (b, c) {}
+Link (c, d) {}

+ 12 - 18
integration/code/my_petrinet.mvc

@@ -1,19 +1,13 @@
-import models/PetriNets as PetriNets
-
-PetriNets my_petrinet {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
+Place p1 {
+    tokens = 1
+}
+Place p2 {
+    tokens = 3
+}
+Transition t1 {}
+P2T (p1, t1) {
+    weight = 1
+}
+T2P (t1, p2) {
+    weight = 2
 }
-
-export my_petrinet to models/my_petrinet

+ 0 - 33
integration/code/my_petrinet_with_MM.mvc

@@ -1,33 +0,0 @@
-import models/SimpleClassDiagrams as SCD
-
-SCD PetriNets{
-    AttributeValue Natural {}
-    Class Place{
-        tokens : Natural
-    }
-    Class Transition{}
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
-}
-
-PetriNets my_petrinet {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-export my_petrinet to models/my_petrinet

+ 0 - 48
integration/code/my_petrinet_with_MM_and_constraints.mvc

@@ -1,48 +0,0 @@
-import models/SimpleClassDiagrams as SCD
-include "primitives.alh"
-
-SCD PetriNets{
-    SimpleAttribute Natural {
-        constraint =
-            $
-            String function constraint_Natural(model : Element, name : String):
-                Element self
-                self = model["model"][name]
-                if (is_physical_int(self)):
-                    if (integer_gte(self, 0)):
-                        return "OK"!
-                    else:
-                        return "Natural number not larger than or equal to zero"!
-                else:
-                    return "Natural number not larger than or equal to zero"!
-            $
-    }
-    Class Place{
-        tokens : Natural
-    }
-    Class Transition{}
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
-}
-
-PetriNets my_petrinet {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-export my_petrinet to models/my_petrinet

+ 10 - 16
integration/code/petrinets.mvc

@@ -1,18 +1,12 @@
-import models/SimpleClassDiagrams as SimpleClassDiagrams
+SimpleAttribute Natural {}
 
-SimpleClassDiagrams PetriNets{
-    SimpleAttribute Natural {}
-
-    Class Place{
-        tokens : Natural
-    }
-    Class Transition{}
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
+Class Place{
+    tokens : Natural
+}
+Class Transition{}
+Association P2T (Place, Transition) {
+    weight : Natural
+}
+Association T2P (Transition, Place) {
+    weight : Natural
 }
-
-export PetriNets to models/PetriNets

+ 22 - 27
integration/code/petrinets_constraints.mvc

@@ -1,36 +1,31 @@
-import models/SimpleClassDiagrams as SCD
 include "primitives.alh"
 
-SCD PetriNets{
-    SimpleAttribute Natural {
-        constraint =
-            $
-            String function constraint_Natural(model : Element, name : String):
-                Element self
-                self = model["model"][name]
-                if (is_physical_int(self)):
-                    if (integer_gte(self, 0)):
-                        return "OK"!
-                    else:
-                        return "Natural number not larger than or equal to zero"!
+SimpleAttribute Natural {
+    constraint =
+        $
+        String function constraint_Natural(model : Element, name : String):
+            Element self
+            self = model["model"][name]
+            if (is_physical_int(self)):
+                if (integer_gte(self, 0)):
+                    return "OK"!
                 else:
                     return "Natural number not larger than or equal to zero"!
-            $
-    }
-
-    Class Place{
-        tokens : Natural
-    }
+            else:
+                return "Natural number not larger than or equal to zero"!
+        $
+}
 
-    Class Transition{}
+Class Place{
+    tokens : Natural
+}
 
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
+Class Transition{}
 
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
+Association P2T (Place, Transition) {
+    weight : Natural
 }
 
-export PetriNets to models/PetriNets
+Association T2P (Transition, Place) {
+    weight : Natural
+}

+ 36 - 38
integration/code/pm_pn_reachability.mvc

@@ -1,41 +1,39 @@
-ProcessModel combo_reach {
-    Start start {}
-    Finish finish {}
-    Exec initializePN {
-        name = "initialize_PN"
-    }
-    Exec refinePN {
-        name = "refine_PN"
-    }
-    Exec reachability {
-        name = "reachability"
-    }
-    Exec reachability_print{
-        name = "reachability_print"
-    }
-    
-    Data pn {
-        name = "pn"
-        type = "PetriNet"
-    }
-    Data reachability_graph {
-        name = "reachability"
-        type = "ReachabilityGraph"
-    }
+Start start {}
+Finish finish {}
+Exec initializePN {
+    name = "initialize_PN"
+}
+Exec refinePN {
+    name = "refine_PN"
+}
+Exec reachability {
+    name = "reachability"
+}
+Exec reachability_print{
+    name = "reachability_print"
+}
 
-    Next (start, initializePN) {}
-    Next (initializePN, refinePN) {}
-    Next (refinePN, reachability) {}
-    Next (reachability, reachability_print) {}
-    Next (reachability_print, finish) {}
+Data pn {
+    name = "pn"
+    type = "PetriNet"
+}
+Data reachability_graph {
+    name = "reachability"
+    type = "ReachabilityGraph"
+}
+
+Next (start, initializePN) {}
+Next (initializePN, refinePN) {}
+Next (refinePN, reachability) {}
+Next (reachability, reachability_print) {}
+Next (reachability_print, finish) {}
 
-    Produces (initializePN, pn) {}
-    Consumes (refinePN, pn) {
-    }
-    Produces (refinePN, pn) {}
-    Consumes (reachability, pn) {
-    }
-    Produces (reachability, reachability_graph) {}
-    Consumes (reachability_print, reachability_graph) {
-    }
+Produces (initializePN, pn) {}
+Consumes (refinePN, pn) {
+}
+Produces (refinePN, pn) {}
+Consumes (reachability, pn) {
+}
+Produces (reachability, reachability_graph) {}
+Consumes (reachability_print, reachability_graph) {
 }

+ 11 - 13
integration/code/pn_critical_section.mvc

@@ -1,16 +1,14 @@
-PetriNets critical_section{
-    Place crit_1{
-        name = "CS1"
-        tokens = 0
-    }
+Place crit_1{
+    name = "CS1"
+    tokens = 0
+}
 
-    Place crit_2{
-        name = "CS2"
-        tokens = 0
-    }
+Place crit_2{
+    name = "CS2"
+    tokens = 0
+}
 
-    Place available{
-        name = "available"
-        tokens = 1
-    }
+Place available{
+    name = "available"
+    tokens = 1
 }

+ 14 - 20
integration/code/pn_design.mvc

@@ -1,22 +1,16 @@
-import models/SimpleClassDiagrams as SimpleClassDiagrams
+SimpleAttribute Natural {}
+SimpleAttribute String {}
 
-SimpleClassDiagrams PetriNets_Design{
-    SimpleAttribute Natural {}
-    SimpleAttribute String {}
-
-    Class Place {
-        tokens : Natural
-        name : String
-    }
-    Class Transition {
-        name : String
-    }
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
+Class Place {
+    tokens : Natural
+    name : String
+}
+Class Transition {
+    name : String
+}
+Association P2T (Place, Transition) {
+    weight : Natural
+}
+Association T2P (Transition, Place) {
+    weight : Natural
 }
-
-export PetriNets_Design to models/PetriNets_Design

+ 23 - 29
integration/code/pn_design_model.mvc

@@ -1,30 +1,24 @@
-import models/PetriNets_Design as PetriNets
-
-PetriNets pn {
-    Place p1 {
-        tokens = 1
-        name = "p1"
-    }
-    Place p2 {
-        tokens = 2
-        name = "p2"
-    }
-    Place p3 {
-        tokens = 3
-        name = "p3"
-    }
-    Transition t1 {
-        name = "t1"
-    }
-    P2T (p1, t1) {
-        weight = 1
-    }
-    P2T (p2, t1) {
-        weight = 1
-    }
-    T2P (t1, p3) {
-        weight = 2
-    }
+Place p1 {
+    tokens = 1
+    name = "p1"
+}
+Place p2 {
+    tokens = 2
+    name = "p2"
+}
+Place p3 {
+    tokens = 3
+    name = "p3"
+}
+Transition t1 {
+    name = "t1"
+}
+P2T (p1, t1) {
+    weight = 1
+}
+P2T (p2, t1) {
+    weight = 1
+}
+T2P (t1, p3) {
+    weight = 2
 }
-
-export pn to models/pn

+ 57 - 63
integration/code/pn_design_model_larger.mvc

@@ -1,63 +1,57 @@
-import models/PetriNets_Design as PetriNets
-
-PetriNets pn {
-    Place critical_section_1 {
-        tokens = 0
-        name = "critical_section_1"
-    }
-    Place critical_section_2 {
-        tokens = 0
-        name = "critical_section_2"
-    }
-    Place lock_available {
-        tokens = 1
-        name = "lock_available"
-    }
-
-    Transition release_section_1 {
-        name = "release_section_1"
-    }
-    Transition release_section_2 {
-        name = "release_section_2"
-    }
-    Transition acquire_section_1 {
-        name = "acquire_section_1"
-    }
-    Transition acquire_section_2 {
-        name = "acquire_section_2"
-    }
-
-    P2T (critical_section_1, release_section_1) {
-        weight = 1
-    }
-
-    P2T (critical_section_2, release_section_2) {
-        weight = 1
-    }
-
-    P2T (lock_available, acquire_section_1) {
-        weight = 1
-    }
-
-    P2T (lock_available, acquire_section_2) {
-        weight = 1
-    }
-
-    T2P (release_section_1, lock_available) {
-        weight = 1
-    }
-
-    T2P (release_section_2, lock_available) {
-        weight = 1
-    }
-
-    T2P (acquire_section_1, critical_section_1) {
-        weight = 1
-    }
-
-    T2P (acquire_section_2, critical_section_2) {
-        weight = 1
-    }
-}
-
-export pn to models/pn
+Place critical_section_1 {
+    tokens = 0
+    name = "critical_section_1"
+}
+Place critical_section_2 {
+    tokens = 0
+    name = "critical_section_2"
+}
+Place lock_available {
+    tokens = 1
+    name = "lock_available"
+}
+
+Transition release_section_1 {
+    name = "release_section_1"
+}
+Transition release_section_2 {
+    name = "release_section_2"
+}
+Transition acquire_section_1 {
+    name = "acquire_section_1"
+}
+Transition acquire_section_2 {
+    name = "acquire_section_2"
+}
+
+P2T (critical_section_1, release_section_1) {
+    weight = 1
+}
+
+P2T (critical_section_2, release_section_2) {
+    weight = 1
+}
+
+P2T (lock_available, acquire_section_1) {
+    weight = 1
+}
+
+P2T (lock_available, acquire_section_2) {
+    weight = 1
+}
+
+T2P (release_section_1, lock_available) {
+    weight = 1
+}
+
+T2P (release_section_2, lock_available) {
+    weight = 1
+}
+
+T2P (acquire_section_1, critical_section_1) {
+    weight = 1
+}
+
+T2P (acquire_section_2, critical_section_2) {
+    weight = 1
+}

+ 165 - 170
integration/code/pn_design_to_runtime.mvc

@@ -1,183 +1,178 @@
-import models/RAM_PetriNet_Design_Runtime as RAM_PN_DR
 include "primitives.alh"
 include "modelling.alh"
 
-RAM_PN_DR annotate {
-    Composite schedule {
-        {Contains} Failure failure {}
-        {Contains} Success success {}
-        {Contains} ForAll copy_transitions {
-            LHS {
-                Pre_PetriNet/Transition {
-                    label = "0"
-                }
-            }
-            RHS {
-                Post_PetriNet/Transition ct1 {
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Transition ct2 {
-                    label = "1"
-                    value_executing = $
-                        Boolean function value(model : Element, name : String, mapping : Element):
-                            return True!
-                        $
-                    value_name = $
-                        Integer function value(model : Element, name : String, mapping : Element):
-                            return read_attribute(model, mapping["0"], "name")!
-                        $
-                }
-                Post_D2R_TransitionLink (ct1, ct2){
-                    label = "2"
-                }
+Composite schedule {
+    {Contains} Failure failure {}
+    {Contains} Success success {}
+    {Contains} ForAll copy_transitions {
+        LHS {
+            Pre_PetriNet/Transition {
+                label = "0"
             }
         }
-        {Contains} ForAll copy_places {
-            LHS {
-                Pre_PetriNet/Place {
-                    label = "0"
-                }
-            }
-            RHS {
-                Post_PetriNet/Place cp1 {
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Place cp2 {
-                    label = "1"
-                    value_tokens = $
-                        Integer function value(model : Element, name : String, mapping : Element):
-                            return read_attribute(model, mapping["0"], "tokens")!
-                        $
-                    value_name = $
-                        Integer function value(model : Element, name : String, mapping : Element):
-                            return read_attribute(model, mapping["0"], "name")!
-                        $
-                }
-                Post_D2R_PlaceLink (cp1, cp2){
-                    label = "2"
-                }
+        RHS {
+            Post_PetriNet/Transition ct1 {
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Transition ct2 {
+                label = "1"
+                value_executing = $
+                    Boolean function value(model : Element, name : String, mapping : Element):
+                        return True!
+                    $
+                value_name = $
+                    Integer function value(model : Element, name : String, mapping : Element):
+                        return read_attribute(model, mapping["0"], "name")!
+                    $
+            }
+            Post_D2R_TransitionLink (ct1, ct2){
+                label = "2"
+            }
+        }
+    }
+    {Contains} ForAll copy_places {
+        LHS {
+            Pre_PetriNet/Place {
+                label = "0"
+            }
+        }
+        RHS {
+            Post_PetriNet/Place cp1 {
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Place cp2 {
+                label = "1"
+                value_tokens = $
+                    Integer function value(model : Element, name : String, mapping : Element):
+                        return read_attribute(model, mapping["0"], "tokens")!
+                    $
+                value_name = $
+                    Integer function value(model : Element, name : String, mapping : Element):
+                        return read_attribute(model, mapping["0"], "name")!
+                    $
+            }
+            Post_D2R_PlaceLink (cp1, cp2){
+                label = "2"
+            }
+        }
+    }
+    {Contains} ForAll copy_P2T {
+        LHS {
+            Pre_PetriNet/Place cp2t_p{
+                label = "0"
+            }
+            Pre_PetriNet/Transition cp2t_t{
+                label = "1"
+            }
+            Pre_PetriNet/P2T (cp2t_p, cp2t_t){
+                label = "2"
+            }
+            Pre_PetriNet_Runtime/Place cp2t_p2{
+                label = "3"
+            }
+            Pre_PetriNet_Runtime/Transition cp2t_t2{
+                label = "4"
+            }
+            Pre_D2R_PlaceLink (cp2t_p, cp2t_p2){
+                label = "5"
+            }
+            Pre_D2R_TransitionLink (cp2t_t, cp2t_t2){
+                label = "6"
+            }
+        }
+        RHS {
+            Post_PetriNet/Place rhs_cp2t_p{
+                label = "0"
+            }
+            Post_PetriNet/Transition rhs_cp2t_t{
+                label = "1"
+            }
+            Post_PetriNet/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
+                label = "2"
+            }
+            Post_PetriNet_Runtime/Place rhs_cp2t_p2 {
+                label = "3"
+            }
+            Post_PetriNet_Runtime/Transition rhs_cp2t_t2 {
+                label = "4"
+            }
+            Post_D2R_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
+                label = "5"
+            }
+            Post_D2R_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
+                label = "6"
+            }
+            Post_PetriNet_Runtime/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
+                label = "7"
+                value_weight = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["2"], "weight")!
+                    $
             }
         }
-        {Contains} ForAll copy_P2T {
-            LHS {
-                Pre_PetriNet/Place cp2t_p{
-                    label = "0"
-                }
-                Pre_PetriNet/Transition cp2t_t{
-                    label = "1"
-                }
-                Pre_PetriNet/P2T (cp2t_p, cp2t_t){
-                    label = "2"
-                }
-                Pre_PetriNet_Runtime/Place cp2t_p2{
-                    label = "3"
-                }
-                Pre_PetriNet_Runtime/Transition cp2t_t2{
-                    label = "4"
-                }
-                Pre_D2R_PlaceLink (cp2t_p, cp2t_p2){
-                    label = "5"
-                }
-                Pre_D2R_TransitionLink (cp2t_t, cp2t_t2){
-                    label = "6"
-                }
-            }
-            RHS {
-                Post_PetriNet/Place rhs_cp2t_p{
-                    label = "0"
-                }
-                Post_PetriNet/Transition rhs_cp2t_t{
-                    label = "1"
-                }
-                Post_PetriNet/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
-                    label = "2"
-                }
-                Post_PetriNet_Runtime/Place rhs_cp2t_p2 {
-                    label = "3"
-                }
-                Post_PetriNet_Runtime/Transition rhs_cp2t_t2 {
-                    label = "4"
-                }
-                Post_D2R_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
-                    label = "5"
-                }
-                Post_D2R_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
-                    label = "6"
-                }
-                Post_PetriNet_Runtime/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
-                    label = "7"
-                    value_weight = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["2"], "weight")!
-                        $
-                }
+    }
+    {Contains} ForAll copy_T2P {
+        LHS {
+            Pre_PetriNet/Place ct2p_p{
+                label = "0"
+            }
+            Pre_PetriNet/Transition ct2p_t{
+                label = "1"
+            }
+            Pre_PetriNet/T2P (ct2p_t, ct2p_p){
+                label = "2"
+            }
+            Pre_PetriNet_Runtime/Place ct2p_p2{
+                label = "3"
+            }
+            Pre_PetriNet_Runtime/Transition ct2p_t2{
+                label = "4"
+            }
+            Pre_D2R_PlaceLink (ct2p_p, ct2p_p2){
+                label = "5"
+            }
+            Pre_D2R_TransitionLink (ct2p_t, ct2p_t2){
+                label = "6"
             }
         }
-        {Contains} ForAll copy_T2P {
-            LHS {
-                Pre_PetriNet/Place ct2p_p{
-                    label = "0"
-                }
-                Pre_PetriNet/Transition ct2p_t{
-                    label = "1"
-                }
-                Pre_PetriNet/T2P (ct2p_t, ct2p_p){
-                    label = "2"
-                }
-                Pre_PetriNet_Runtime/Place ct2p_p2{
-                    label = "3"
-                }
-                Pre_PetriNet_Runtime/Transition ct2p_t2{
-                    label = "4"
-                }
-                Pre_D2R_PlaceLink (ct2p_p, ct2p_p2){
-                    label = "5"
-                }
-                Pre_D2R_TransitionLink (ct2p_t, ct2p_t2){
-                    label = "6"
-                }
-            }
-            RHS {
-                Post_PetriNet/Place rhs_ct2p_p{
-                    label = "0"
-                }
-                Post_PetriNet/Transition rhs_ct2p_t{
-                    label = "1"
-                }
-                Post_PetriNet/T2P (rhs_ct2p_t, rhs_ct2p_p){
-                    label = "2"
-                }
-                Post_PetriNet_Runtime/Place rhs_ct2p_p2 {
-                    label = "3"
-                }
-                Post_PetriNet_Runtime/Transition rhs_ct2p_t2 {
-                    label = "4"
-                }
-                Post_D2R_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
-                    label = "5"
-                }
-                Post_D2R_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
-                    label = "6"
-                }
-                Post_PetriNet_Runtime/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
-                    label = "7"
-                    value_weight = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["2"], "weight")!
-                        $
-                }
+        RHS {
+            Post_PetriNet/Place rhs_ct2p_p{
+                label = "0"
+            }
+            Post_PetriNet/Transition rhs_ct2p_t{
+                label = "1"
+            }
+            Post_PetriNet/T2P (rhs_ct2p_t, rhs_ct2p_p){
+                label = "2"
+            }
+            Post_PetriNet_Runtime/Place rhs_ct2p_p2 {
+                label = "3"
+            }
+            Post_PetriNet_Runtime/Transition rhs_ct2p_t2 {
+                label = "4"
+            }
+            Post_D2R_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
+                label = "5"
+            }
+            Post_D2R_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
+                label = "6"
+            }
+            Post_PetriNet_Runtime/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
+                label = "7"
+                value_weight = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["2"], "weight")!
+                    $
             }
         }
     }
-    OnSuccess (copy_places, copy_transitions) {}
-    OnSuccess (copy_transitions, copy_P2T) {}
-    OnSuccess (copy_P2T, copy_T2P) {}
-    OnSuccess (copy_T2P, success) {}
-    OnFailure (copy_places, copy_transitions) {}
-    OnFailure (copy_transitions, copy_P2T) {}
-    OnFailure (copy_P2T, copy_T2P) {}
-    OnFailure (copy_T2P, success) {}
-    Initial (schedule, copy_places) {}
 }
-
-export annotate to models/pn_annotate
+OnSuccess (copy_places, copy_transitions) {}
+OnSuccess (copy_transitions, copy_P2T) {}
+OnSuccess (copy_P2T, copy_T2P) {}
+OnSuccess (copy_T2P, success) {}
+OnFailure (copy_places, copy_transitions) {}
+OnFailure (copy_transitions, copy_P2T) {}
+OnFailure (copy_P2T, copy_T2P) {}
+OnFailure (copy_T2P, success) {}
+Initial (schedule, copy_places) {}

+ 18 - 23
integration/code/pn_print.mvc

@@ -1,31 +1,26 @@
-import models/RAM_PetriNets_Runtime as RAM_PN_R
 include "primitives.alh"
 include "modelling.alh"
 
-RAM_PN_R print {
-    Composite schedule {
-        {Contains} Success success {}
-        {Contains} ForAll print_tokens {
-            LHS {
-                Pre_PetriNet/Place {
-                    label = "0"
-                }
+Composite schedule {
+    {Contains} Success success {}
+    {Contains} ForAll print_tokens {
+        LHS {
+            Pre_PetriNet/Place {
+                label = "0"
             }
-            RHS {
-                Post_PetriNet/Place {
-                    label = "0"
-                    action = $
-                        Void function action(model : Element, name : String, mapping : Element):
-                            output((cast_v2s(read_attribute(model, name, "name")) + " --> ") + cast_v2s(read_attribute(model, name, "tokens")))
-                            return!
-                        $
-                }
+        }
+        RHS {
+            Post_PetriNet/Place {
+                label = "0"
+                action = $
+                    Void function action(model : Element, name : String, mapping : Element):
+                        output((cast_v2s(read_attribute(model, name, "name")) + " --> ") + cast_v2s(read_attribute(model, name, "tokens")))
+                        return!
+                    $
             }
         }
     }
-    OnSuccess (print_tokens, success) {}
-    OnFailure (print_tokens, success) {}
-    Initial (schedule, print_tokens) {}
 }
-
-export print to models/pn_print
+OnSuccess (print_tokens, success) {}
+OnFailure (print_tokens, success) {}
+Initial (schedule, print_tokens) {}

+ 16 - 22
integration/code/pn_runtime.mvc

@@ -1,24 +1,18 @@
-import models/SimpleClassDiagrams as SimpleClassDiagrams
+SimpleAttribute Natural {}
+SimpleAttribute Boolean {}
+SimpleAttribute String {}
 
-SimpleClassDiagrams PetriNets_Runtime{
-    SimpleAttribute Natural {}
-    SimpleAttribute Boolean {}
-    SimpleAttribute String {}
-
-    Class Place {
-        name : String
-        tokens : Natural
-    }
-    Class Transition {
-        name : String
-        executing : Boolean
-    }
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
+Class Place {
+    name : String
+    tokens : Natural
+}
+Class Transition {
+    name : String
+    executing : Boolean
+}
+Association P2T (Place, Transition) {
+    weight : Natural
+}
+Association T2P (Transition, Place) {
+    weight : Natural
 }
-
-export PetriNets_Runtime to models/PetriNets_Runtime

+ 24 - 30
integration/code/pn_runtime_model.mvc

@@ -1,31 +1,25 @@
-import models/PetriNets_Runtime as PetriNets_Runtime
-
-PetriNets_Runtime pn {
-	Place p1 {
-		tokens = 1
-        name = "p1"
-	}
-	Place p2 {
-		tokens = 2
-        name = "p2"
-	}
-	Place p3 {
-		tokens = 3
-        name = "p3"
-	}
-	Transition t1 {
-		executing = False
-        name = "t1"
-	}
-	P2T (p1, t1) {
-		weight = 1
-	}
-	P2T (p2, t1) {
-		weight = 1
-	}
-	T2P (t1, p3) {
-		weight = 2
-	}
+Place p1 {
+	tokens = 1
+name = "p1"
+}
+Place p2 {
+	tokens = 2
+name = "p2"
+}
+Place p3 {
+	tokens = 3
+name = "p3"
+}
+Transition t1 {
+	executing = False
+name = "t1"
+}
+P2T (p1, t1) {
+	weight = 1
+}
+P2T (p2, t1) {
+	weight = 1
+}
+T2P (t1, p3) {
+	weight = 2
 }
-
-export pn to models/pn

+ 161 - 166
integration/code/pn_runtime_to_design.mvc

@@ -1,179 +1,174 @@
-import models/RAM_PetriNet_Design_Runtime as RAM_PN_DR
 include "primitives.alh"
 include "modelling.alh"
 
-RAM_PN_DR annotate {
-    Composite schedule {
-        {Contains} Failure failure {}
-        {Contains} Success success {}
-        {Contains} ForAll copy_transitions {
-            LHS {
-                Pre_PetriNet_Runtime/Transition {
-                    label = "0"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Transition ct1 {
-                    label = "0"
-                }
-                Post_PetriNet/Transition ct2 {
-                    label = "1"
-                    value_name = $
-                        Integer function value(model : Element, name : String, mapping : Element):
-                            return read_attribute(model, mapping["0"], "name")!
-                        $
-                }
-                Post_R2D_TransitionLink (ct1, ct2){
-                    label = "2"
-                }
+Composite schedule {
+    {Contains} Failure failure {}
+    {Contains} Success success {}
+    {Contains} ForAll copy_transitions {
+        LHS {
+            Pre_PetriNet_Runtime/Transition {
+                label = "0"
             }
         }
-        {Contains} ForAll copy_places {
-            LHS {
-                Pre_PetriNet_Runtime/Place {
-                    label = "0"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Place cp1 {
-                    label = "0"
-                }
-                Post_PetriNet/Place cp2 {
-                    label = "1"
-                    value_tokens = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["0"], "tokens")!
-                        $
-                    value_name = $
-                        String function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["0"], "name")!
-                        $
-                }
-                Post_R2D_PlaceLink (cp1, cp2){
-                    label = "2"
-                }
+        RHS {
+            Post_PetriNet_Runtime/Transition ct1 {
+                label = "0"
+            }
+            Post_PetriNet/Transition ct2 {
+                label = "1"
+                value_name = $
+                    Integer function value(model : Element, name : String, mapping : Element):
+                        return read_attribute(model, mapping["0"], "name")!
+                    $
+            }
+            Post_R2D_TransitionLink (ct1, ct2){
+                label = "2"
+            }
+        }
+    }
+    {Contains} ForAll copy_places {
+        LHS {
+            Pre_PetriNet_Runtime/Place {
+                label = "0"
+            }
+        }
+        RHS {
+            Post_PetriNet_Runtime/Place cp1 {
+                label = "0"
+            }
+            Post_PetriNet/Place cp2 {
+                label = "1"
+                value_tokens = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["0"], "tokens")!
+                    $
+                value_name = $
+                    String function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["0"], "name")!
+                    $
+            }
+            Post_R2D_PlaceLink (cp1, cp2){
+                label = "2"
+            }
+        }
+    }
+    {Contains} ForAll copy_P2T {
+        LHS {
+            Pre_PetriNet_Runtime/Place cp2t_p{
+                label = "0"
+            }
+            Pre_PetriNet_Runtime/Transition cp2t_t{
+                label = "1"
+            }
+            Pre_PetriNet_Runtime/P2T (cp2t_p, cp2t_t){
+                label = "2"
+            }
+            Pre_PetriNet/Place cp2t_p2{
+                label = "3"
+            }
+            Pre_PetriNet/Transition cp2t_t2{
+                label = "4"
+            }
+            Pre_R2D_PlaceLink (cp2t_p, cp2t_p2){
+                label = "5"
+            }
+            Pre_R2D_TransitionLink (cp2t_t, cp2t_t2){
+                label = "6"
+            }
+        }
+        RHS {
+            Post_PetriNet_Runtime/Place rhs_cp2t_p{
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Transition rhs_cp2t_t{
+                label = "1"
+            }
+            Post_PetriNet_Runtime/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
+                label = "2"
+            }
+            Post_PetriNet/Place rhs_cp2t_p2 {
+                label = "3"
+            }
+            Post_PetriNet/Transition rhs_cp2t_t2 {
+                label = "4"
+            }
+            Post_R2D_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
+                label = "5"
+            }
+            Post_R2D_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
+                label = "6"
+            }
+            Post_PetriNet/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
+                label = "7"
+                value_weight = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["2"], "weight")!
+                    $
             }
         }
-        {Contains} ForAll copy_P2T {
-            LHS {
-                Pre_PetriNet_Runtime/Place cp2t_p{
-                    label = "0"
-                }
-                Pre_PetriNet_Runtime/Transition cp2t_t{
-                    label = "1"
-                }
-                Pre_PetriNet_Runtime/P2T (cp2t_p, cp2t_t){
-                    label = "2"
-                }
-                Pre_PetriNet/Place cp2t_p2{
-                    label = "3"
-                }
-                Pre_PetriNet/Transition cp2t_t2{
-                    label = "4"
-                }
-                Pre_R2D_PlaceLink (cp2t_p, cp2t_p2){
-                    label = "5"
-                }
-                Pre_R2D_TransitionLink (cp2t_t, cp2t_t2){
-                    label = "6"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Place rhs_cp2t_p{
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Transition rhs_cp2t_t{
-                    label = "1"
-                }
-                Post_PetriNet_Runtime/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
-                    label = "2"
-                }
-                Post_PetriNet/Place rhs_cp2t_p2 {
-                    label = "3"
-                }
-                Post_PetriNet/Transition rhs_cp2t_t2 {
-                    label = "4"
-                }
-                Post_R2D_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
-                    label = "5"
-                }
-                Post_R2D_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
-                    label = "6"
-                }
-                Post_PetriNet/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
-                    label = "7"
-                    value_weight = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["2"], "weight")!
-                        $
-                }
+    }
+    {Contains} ForAll copy_T2P {
+        LHS {
+            Pre_PetriNet_Runtime/Place ct2p_p{
+                label = "0"
+            }
+            Pre_PetriNet_Runtime/Transition ct2p_t{
+                label = "1"
+            }
+            Pre_PetriNet_Runtime/T2P (ct2p_t, ct2p_p){
+                label = "2"
+            }
+            Pre_PetriNet/Place ct2p_p2{
+                label = "3"
+            }
+            Pre_PetriNet/Transition ct2p_t2{
+                label = "4"
+            }
+            Pre_R2D_PlaceLink (ct2p_p, ct2p_p2){
+                label = "5"
+            }
+            Pre_R2D_TransitionLink (ct2p_t, ct2p_t2){
+                label = "6"
             }
         }
-        {Contains} ForAll copy_T2P {
-            LHS {
-                Pre_PetriNet_Runtime/Place ct2p_p{
-                    label = "0"
-                }
-                Pre_PetriNet_Runtime/Transition ct2p_t{
-                    label = "1"
-                }
-                Pre_PetriNet_Runtime/T2P (ct2p_t, ct2p_p){
-                    label = "2"
-                }
-                Pre_PetriNet/Place ct2p_p2{
-                    label = "3"
-                }
-                Pre_PetriNet/Transition ct2p_t2{
-                    label = "4"
-                }
-                Pre_R2D_PlaceLink (ct2p_p, ct2p_p2){
-                    label = "5"
-                }
-                Pre_R2D_TransitionLink (ct2p_t, ct2p_t2){
-                    label = "6"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Place rhs_ct2p_p{
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Transition rhs_ct2p_t{
-                    label = "1"
-                }
-                Post_PetriNet_Runtime/T2P (rhs_ct2p_t, rhs_ct2p_p){
-                    label = "2"
-                }
-                Post_PetriNet/Place rhs_ct2p_p2 {
-                    label = "3"
-                }
-                Post_PetriNet/Transition rhs_ct2p_t2 {
-                    label = "4"
-                }
-                Post_R2D_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
-                    label = "5"
-                }
-                Post_R2D_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
-                    label = "6"
-                }
-                Post_PetriNet/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
-                    label = "7"
-                    value_weight = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return read_attribute(host_model, mapping["2"], "weight")!
-                        $
-                }
+        RHS {
+            Post_PetriNet_Runtime/Place rhs_ct2p_p{
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Transition rhs_ct2p_t{
+                label = "1"
+            }
+            Post_PetriNet_Runtime/T2P (rhs_ct2p_t, rhs_ct2p_p){
+                label = "2"
+            }
+            Post_PetriNet/Place rhs_ct2p_p2 {
+                label = "3"
+            }
+            Post_PetriNet/Transition rhs_ct2p_t2 {
+                label = "4"
+            }
+            Post_R2D_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
+                label = "5"
+            }
+            Post_R2D_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
+                label = "6"
+            }
+            Post_PetriNet/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
+                label = "7"
+                value_weight = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return read_attribute(host_model, mapping["2"], "weight")!
+                    $
             }
         }
     }
-    OnSuccess (copy_places, copy_transitions) {}
-    OnSuccess (copy_transitions, copy_P2T) {}
-    OnSuccess (copy_P2T, copy_T2P) {}
-    OnSuccess (copy_T2P, success) {}
-    OnFailure (copy_places, copy_transitions) {}
-    OnFailure (copy_transitions, copy_P2T) {}
-    OnFailure (copy_P2T, copy_T2P) {}
-    OnFailure (copy_T2P, success) {}
-    Initial (schedule, copy_places) {}
 }
-
-export annotate to models/pn_annotate
+OnSuccess (copy_places, copy_transitions) {}
+OnSuccess (copy_transitions, copy_P2T) {}
+OnSuccess (copy_P2T, copy_T2P) {}
+OnSuccess (copy_T2P, success) {}
+OnFailure (copy_places, copy_transitions) {}
+OnFailure (copy_transitions, copy_P2T) {}
+OnFailure (copy_P2T, copy_T2P) {}
+OnFailure (copy_T2P, success) {}
+Initial (schedule, copy_places) {}

+ 122 - 127
integration/code/pn_simulate.mvc

@@ -1,140 +1,135 @@
-import models/RAM_PetriNet_Runtime_Runtime as RAM_PN_R
 include "primitives.alh"
 include "modelling.alh"
 
-RAM_PN_R s {
-    Composite schedule {
-        {Contains} Failure failure {}
-        {Contains} Success success {}
-        {Contains} Atomic mark {
-            LHS {
-                Pre_PetriNet_Runtime/Transition {
-                    label = "1"
-                }
-            }
-            NAC {
-				Pre_PetriNet_Runtime/Transition mark_nac_t {
-					label = "1"
-				}
-				Pre_PetriNet_Runtime/Place mark_nac_p{
-					label = "10"
-				}
-				Pre_PetriNet_Runtime/P2T (mark_nac_p, mark_nac_t){
-					label = "11"
-				}
-				constraint = $
-					Boolean function constraint(host_model : Element, mapping : Element):
-						Integer tokens
-						Integer weight
-						tokens = read_attribute(host_model, mapping["10"], "tokens")
-						weight = read_attribute(host_model, mapping["11"], "weight")
-                        return (tokens < weight)!
-					$
-            }
-            RHS {
-                Post_PetriNet_Runtime/Transition {
-                    label = "1"
-                    value_executing = $
-                        Boolean function value(host_model : Element, name : String, mapping : Element):
-                            return True!
-                        $
-                }
+Composite schedule {
+    {Contains} Failure failure {}
+    {Contains} Success success {}
+    {Contains} Atomic mark {
+        LHS {
+            Pre_PetriNet_Runtime/Transition {
+                label = "1"
             }
         }
-        {Contains} ForAll consume {
-            LHS {
-                Pre_PetriNet_Runtime/Transition lhs_consume_t{
-                    label = "0"
-                    constraint_executing = $
-                        Boolean function constraint(value : Boolean):
-                            return value!
-                        $
-                }
-                Pre_PetriNet_Runtime/Place lhs_consume_p{
-                    label = "1"
-                }
-                Pre_PetriNet_Runtime/P2T lhs_consume_p2t(lhs_consume_p, lhs_consume_t){
-                    label = "2"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Transition rhs_consume_t {
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Place rhs_consume_p {
-                    label = "1"
-                    value_tokens = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return integer_subtraction(read_attribute(host_model, name, "tokens"), read_attribute(host_model, mapping["2"], "weight"))!
-                        $
-                }
-                Post_PetriNet_Runtime/P2T (rhs_consume_p, rhs_consume_t){
-                    label = "2"
-                }
+        NAC {
+    			Pre_PetriNet_Runtime/Transition mark_nac_t {
+    				label = "1"
+    			}
+    			Pre_PetriNet_Runtime/Place mark_nac_p{
+    				label = "10"
+    			}
+    			Pre_PetriNet_Runtime/P2T (mark_nac_p, mark_nac_t){
+    				label = "11"
+    			}
+    			constraint = $
+    				Boolean function constraint(host_model : Element, mapping : Element):
+    					Integer tokens
+    					Integer weight
+    					tokens = read_attribute(host_model, mapping["10"], "tokens")
+    					weight = read_attribute(host_model, mapping["11"], "weight")
+                    return (tokens < weight)!
+    				$
+        }
+        RHS {
+            Post_PetriNet_Runtime/Transition {
+                label = "1"
+                value_executing = $
+                    Boolean function value(host_model : Element, name : String, mapping : Element):
+                        return True!
+                    $
             }
         }
-        {Contains} ForAll produce {
-            LHS {
-                Pre_PetriNet_Runtime/Transition lhs_produce_t{
-                    label = "0"
-                    constraint_executing = $
-                        Boolean function constraint(value : Boolean):
-                            return value!
-                        $
-                }
-                Pre_PetriNet_Runtime/Place lhs_produce_p{
-                    label = "1"
-                }
-                Pre_PetriNet_Runtime/T2P (lhs_produce_t, lhs_produce_p){
-                    label = "2"
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Transition rhs_produce_t{
-                    label = "0"
-                }
-                Post_PetriNet_Runtime/Place rhs_produce_p{
-                    label = "1"
-                    value_tokens = $
-                        Integer function value(host_model : Element, name : String, mapping : Element):
-                            return integer_addition(read_attribute(host_model, name, "tokens"), read_attribute(host_model, mapping["2"], "weight"))!
-                        $
-                }
-                Post_PetriNet_Runtime/T2P (rhs_produce_t, rhs_produce_p){
-                    label = "2"
-                }
+    }
+    {Contains} ForAll consume {
+        LHS {
+            Pre_PetriNet_Runtime/Transition lhs_consume_t{
+                label = "0"
+                constraint_executing = $
+                    Boolean function constraint(value : Boolean):
+                        return value!
+                    $
+            }
+            Pre_PetriNet_Runtime/Place lhs_consume_p{
+                label = "1"
+            }
+            Pre_PetriNet_Runtime/P2T lhs_consume_p2t(lhs_consume_p, lhs_consume_t){
+                label = "2"
             }
         }
-        {Contains} Atomic unmark_transition {
-            LHS {
-                Pre_PetriNet_Runtime/Transition {
-                    label = "0"
-                    constraint_executing = $
-                        Boolean function constraint(value : Boolean):
-                            return value!
-                        $
-                }
-            }
-            RHS {
-                Post_PetriNet_Runtime/Transition {
-                    label = "0"
-                    value_executing = $
-                        Boolean function value(host_model : Element, name : String, mapping : Element):
-                            return False!
-                        $
-                }
+        RHS {
+            Post_PetriNet_Runtime/Transition rhs_consume_t {
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Place rhs_consume_p {
+                label = "1"
+                value_tokens = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return integer_subtraction(read_attribute(host_model, name, "tokens"), read_attribute(host_model, mapping["2"], "weight"))!
+                    $
+            }
+            Post_PetriNet_Runtime/P2T (rhs_consume_p, rhs_consume_t){
+                label = "2"
+            }
+        }
+    }
+    {Contains} ForAll produce {
+        LHS {
+            Pre_PetriNet_Runtime/Transition lhs_produce_t{
+                label = "0"
+                constraint_executing = $
+                    Boolean function constraint(value : Boolean):
+                        return value!
+                    $
+            }
+            Pre_PetriNet_Runtime/Place lhs_produce_p{
+                label = "1"
+            }
+            Pre_PetriNet_Runtime/T2P (lhs_produce_t, lhs_produce_p){
+                label = "2"
+            }
+        }
+        RHS {
+            Post_PetriNet_Runtime/Transition rhs_produce_t{
+                label = "0"
+            }
+            Post_PetriNet_Runtime/Place rhs_produce_p{
+                label = "1"
+                value_tokens = $
+                    Integer function value(host_model : Element, name : String, mapping : Element):
+                        return integer_addition(read_attribute(host_model, name, "tokens"), read_attribute(host_model, mapping["2"], "weight"))!
+                    $
+            }
+            Post_PetriNet_Runtime/T2P (rhs_produce_t, rhs_produce_p){
+                label = "2"
+            }
+        }
+    }
+    {Contains} Atomic unmark_transition {
+        LHS {
+            Pre_PetriNet_Runtime/Transition {
+                label = "0"
+                constraint_executing = $
+                    Boolean function constraint(value : Boolean):
+                        return value!
+                    $
+            }
+        }
+        RHS {
+            Post_PetriNet_Runtime/Transition {
+                label = "0"
+                value_executing = $
+                    Boolean function value(host_model : Element, name : String, mapping : Element):
+                        return False!
+                    $
             }
         }
     }
-    OnSuccess (mark, consume) {}
-    OnFailure (mark, failure) {}
-    OnSuccess (consume, produce) {}
-    OnFailure (consume, produce) {}
-    OnSuccess (produce, unmark_transition) {}
-    OnFailure (produce, unmark_transition) {}
-    OnSuccess (unmark_transition, success) {}
-    OnFailure (unmark_transition, failure) {}
-    Initial (schedule, mark) {}
 }
-
-export s to models/pn_simulate
+OnSuccess (mark, consume) {}
+OnFailure (mark, failure) {}
+OnSuccess (consume, produce) {}
+OnFailure (consume, produce) {}
+OnSuccess (produce, unmark_transition) {}
+OnFailure (produce, unmark_transition) {}
+OnSuccess (unmark_transition, success) {}
+OnFailure (unmark_transition, failure) {}
+Initial (schedule, mark) {}

+ 73 - 77
integration/code/ramified_petrinets.mvc

@@ -1,91 +1,87 @@
-SCD Pre_PetriNets {
-    // Add AL MM
-
-    Class LHS{
-        constraint? : Expression
-        upper_cardinality = 1
-        lower_cardinality = 1
-    }
-    Class NAC{}
-    Class Pre_Element{
-        label : String
-        constraint? : Expression
-    }
-    Association (LHS, Pre_Element)
-    Association (NAC, Pre_Element){
-        target_lower_cardinality = 1
-    }
-
-    Class Pre_Place{}
-    Class Pre_Transition{}
-    Class Pre_Natural{}
+Class LHS{
+    constraint? : Expression
+    upper_cardinality = 1
+    lower_cardinality = 1
+}
+Class NAC{}
+Class Pre_Element{
+    label : String
+    constraint? : Expression
+}
+Association (LHS, Pre_Element)
+Association (NAC, Pre_Element){
+    target_lower_cardinality = 1
+}
 
-    Association Pre_P2T(Pre_Place, Pre_Transition) {}
-    Association Pre_T2P(Pre_Transition, Pre_Place) {}
+Class Pre_Place{}
+Class Pre_Transition{}
+Class Pre_Natural{}
 
-    Association Pre_Place_tokens(Pre_Place, Pre_Natural) {
-        name = "Pre_tokens"
-        target_upper_cardinality = 1
-    }
-    Association Pre_P2T_weight(Pre_P2T, Pre_Natural) {
-        name = "Pre_weight"
-        target_upper_cardinality = 1
-    }
-    Association Pre_T2P_weight(Pre_T2P, Pre_Natural) {
-        name = "Pre_weight"
-        target_upper_cardinality = 1
-    }
+Association Pre_P2T(Pre_Place, Pre_Transition) {}
+Association Pre_T2P(Pre_Transition, Pre_Place) {}
 
-    Inheritance (Pre_Place, Pre_Element) {}
-    Inheritance (Pre_Natural, Pre_Element) {}
-    Inheritance (Pre_Transition, Pre_Element) {}
-    Inheritance (Pre_P2T, Pre_Element) {}
-    Inheritance (Pre_Place_tokens, Pre_Element) {}
-    Inheritance (Pre_P2T_weight, Pre_Element) {}
-    Inheritance (Pre_T2P_weight, Pre_Element) {}
+Association Pre_Place_tokens(Pre_Place, Pre_Natural) {
+    name = "Pre_tokens"
+    target_upper_cardinality = 1
+}
+Association Pre_P2T_weight(Pre_P2T, Pre_Natural) {
+    name = "Pre_weight"
+    target_upper_cardinality = 1
+}
+Association Pre_T2P_weight(Pre_T2P, Pre_Natural) {
+    name = "Pre_weight"
+    target_upper_cardinality = 1
 }
 
-SCD Post_PetriNets{
-    // Add AL MM
+Inheritance (Pre_Place, Pre_Element) {}
+Inheritance (Pre_Natural, Pre_Element) {}
+Inheritance (Pre_Transition, Pre_Element) {}
+Inheritance (Pre_P2T, Pre_Element) {}
+Inheritance (Pre_Place_tokens, Pre_Element) {}
+Inheritance (Pre_P2T_weight, Pre_Element) {}
+Inheritance (Pre_T2P_weight, Pre_Element) {}
 
-    Class RHS{
-        action : FunctionDefinition
-        upper_cardinality = 1
-        lower_cardinality = 1
-    }
 
-    Class Post_Element {
-        label : String
-        value? : Expression
-    }
+Post_PetriNets{
+// Add AL MM
 
-    Class Post_Place{}
-    Class Post_Transitions{}
-    Class Post_Natural{}
+Class RHS{
+    action : FunctionDefinition
+    upper_cardinality = 1
+    lower_cardinality = 1
+}
+
+Class Post_Element {
+    label : String
+    value? : Expression
+}
 
-    Association Post_P2T(Post_Place, Post_Transition) {}
-    Association Post_T2P(Post_Transition, Post_Place) {}
+Class Post_Place{}
+Class Post_Transitions{}
+Class Post_Natural{}
 
-    Association (Post_Place, Post_Natural) {
-        name = "Post_tokens"
-        target_upper_cardinality = 1
-    }
+Association Post_P2T(Post_Place, Post_Transition) {}
+Association Post_T2P(Post_Transition, Post_Place) {}
 
-    Association (Post_P2T, Post_Natural) {
-        name = "Post_weight"
-        target_upper_cardinality = 1
-    }
+Association (Post_Place, Post_Natural) {
+    name = "Post_tokens"
+    target_upper_cardinality = 1
+}
 
-    Association (Post_T2P, Post_Natural) {
-        name = "Post_weight"
-        target_upper_cardinality = 1
-    }
+Association (Post_P2T, Post_Natural) {
+    name = "Post_weight"
+    target_upper_cardinality = 1
+}
 
-    Inheritance (Post_Place, Post_Element) {}
-    Inheritance (Post_Natural, Post_Element) {}
-    Inheritance (Post_Transition, Post_Element) {}
-    Inheritance (Post_P2T, Post_Element) {}
-    Inheritance (Post_Place_tokens, Post_Element) {}
-    Inheritance (Post_P2T_weight, Post_Element) {}
-    Inheritance (Post_T2P_weight, Post_Element) {}
+Association (Post_T2P, Post_Natural) {
+    name = "Post_weight"
+    target_upper_cardinality = 1
 }
+
+Inheritance (Post_Place, Post_Element) {}
+Inheritance (Post_Natural, Post_Element) {}
+Inheritance (Post_Transition, Post_Element) {}
+Inheritance (Post_P2T, Post_Element) {}
+Inheritance (Post_Place_tokens, Post_Element) {}
+Inheritance (Post_P2T_weight, Post_Element) {}
+Inheritance (Post_T2P_weight, Post_Element) {}

+ 51 - 53
integration/code/reachability_graph.mvc

@@ -2,63 +2,61 @@ include "primitives.alh"
 include "object_operations.alh"
 include "modelling.alh"
 
-SimpleClassDiagrams ReachabilityGraph {
-    SimpleAttribute String {}
-    SimpleAttribute Natural {}
-    SimpleAttribute Boolean {}
+SimpleAttribute String {}
+SimpleAttribute Natural {}
+SimpleAttribute Boolean {}
 
-    Class State {
-        name : String
-        error : Boolean
-    }
-    Class InitialState : State {
-        lower_cardinality = 1
-        upper_cardinality = 1
-    }
-
-    Class Place {
-        name : String
-        tokens : Natural
-    }
-    Association Transition (State, State) {
-        name : String
-    }
-    Association Contains (State, Place) {}
+Class State {
+    name : String
+    error : Boolean
+}
+Class InitialState : State {
+    lower_cardinality = 1
+    upper_cardinality = 1
+}
 
-    GlobalConstraint {
-        global_constraint = $
-            String function constraint(model : Element):
-                Element states
-                Element places
-                String state
-                String place
-                Element expected
-                Element got
+Class Place {
+    name : String
+    tokens : Natural
+}
+Association Transition (State, State) {
+    name : String
+}
+Association Contains (State, Place) {}
 
-                states = allInstances(model, "State")
+GlobalConstraint {
+    global_constraint = $
+        String function constraint(model : Element):
+            Element states
+            Element places
+            String state
+            String place
+            Element expected
+            Element got
 
-                if (read_nr_out(states) > 0):
-                    expected = create_node()
-                    state = set_pop(states)
-                    places = allAssociationDestinations(model, state, "Contains")
-                    while (read_nr_out(places)):
-                        place = set_pop(places)
-                        set_add(expected, read_attribute(model, place, "name"))
-                else:
-                    return "OK"!
-                
-                while (read_nr_out(states) > 0):
-                    got = create_node()
-                    state = set_pop(states)
-                    places = allAssociationDestinations(model, state, "Contains")
-                    while (read_nr_out(places)):
-                        place = set_pop(places)
-                        set_add(got, read_attribute(model, place, "name"))
+            states = allInstances(model, "State")
 
-                    if (bool_not(set_equality(got, expected))):
-                        return "States don't all agree on the set of places"!
-                
+            if (read_nr_out(states) > 0):
+                expected = create_node()
+                state = set_pop(states)
+                places = allAssociationDestinations(model, state, "Contains")
+                while (read_nr_out(places)):
+                    place = set_pop(places)
+                    set_add(expected, read_attribute(model, place, "name"))
+            else:
                 return "OK"!
-            $
-    }
+            
+            while (read_nr_out(states) > 0):
+                got = create_node()
+                state = set_pop(states)
+                places = allAssociationDestinations(model, state, "Contains")
+                while (read_nr_out(places)):
+                    place = set_pop(places)
+                    set_add(got, read_attribute(model, place, "name"))
+
+                if (bool_not(set_equality(got, expected))):
+                    return "States don't all agree on the set of places"!
+            
+            return "OK"!
+        $
 }

+ 58 - 60
integration/code/reachabilitygraph_print.mvc

@@ -2,72 +2,70 @@ include "primitives.alh"
 include "modelling.alh"
 include "object_operations.alh"
 
-ReachabilityGraph_RAM reachabilitygraph_print {
-    Composite schedule {
-        {Contains} Success success {}
-        {Contains} Failure failure {}
-        {Contains} ForAll print_states {
-            LHS {
-                Pre_ReachabilityGraph/State {
-                    label = "0"
-                }
+Composite schedule {
+    {Contains} Success success {}
+    {Contains} Failure failure {}
+    {Contains} ForAll print_states {
+        LHS {
+            Pre_ReachabilityGraph/State {
+                label = "0"
             }
-            RHS {
-                Post_ReachabilityGraph/State {
-                    label = "0"
-                    action = $
-                        Void function action(model : Element, name : String, mapping : Element):
-                            Element dict_values
-                            Element all_values
-                            String place
-                            dict_values = create_node()
-                            all_values = allAssociationDestinations(model, name, "ReachabilityGraph/Contains")
-                            while (read_nr_out(all_values) > 0):
-                                place = set_pop(all_values)
-                                dict_add(dict_values, read_attribute(model, place, "name"), read_attribute(model, place, "tokens"))
-                            log((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
-                            output((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
-                            return!
-                        $
-                }
+        }
+        RHS {
+            Post_ReachabilityGraph/State {
+                label = "0"
+                action = $
+                    Void function action(model : Element, name : String, mapping : Element):
+                        Element dict_values
+                        Element all_values
+                        String place
+                        dict_values = create_node()
+                        all_values = allAssociationDestinations(model, name, "ReachabilityGraph/Contains")
+                        while (read_nr_out(all_values) > 0):
+                            place = set_pop(all_values)
+                            dict_add(dict_values, read_attribute(model, place, "name"), read_attribute(model, place, "tokens"))
+                        log((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
+                        output((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
+                        return!
+                    $
             }
         }
+    }
 
-        {Contains} ForAll print_transitions {
-            LHS {
-                Pre_ReachabilityGraph/State pre_s1 {
-                    label = "0"
-                }
-                Pre_ReachabilityGraph/State pre_s2 {
-                    label = "1"
-                }
-                Pre_ReachabilityGraph/Transition (pre_s1, pre_s2){
-                    label = "2"
-                }
+    {Contains} ForAll print_transitions {
+        LHS {
+            Pre_ReachabilityGraph/State pre_s1 {
+                label = "0"
+            }
+            Pre_ReachabilityGraph/State pre_s2 {
+                label = "1"
             }
-            RHS {
-                Post_ReachabilityGraph/State post_s1 {
-                    label = "0"
-                }
-                Post_ReachabilityGraph/State post_s2 {
-                    label = "1"
-                }
-                Post_ReachabilityGraph/Transition (post_s1, post_s2) {
-                    label = "2"
-                    action = $
-                        Void function action(model : Element, name : String, mapping : Element):
-                            log((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
-                            output((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
-                            return!
-                        $
-                }
+            Pre_ReachabilityGraph/Transition (pre_s1, pre_s2){
+                label = "2"
+            }
+        }
+        RHS {
+            Post_ReachabilityGraph/State post_s1 {
+                label = "0"
+            }
+            Post_ReachabilityGraph/State post_s2 {
+                label = "1"
+            }
+            Post_ReachabilityGraph/Transition (post_s1, post_s2) {
+                label = "2"
+                action = $
+                    Void function action(model : Element, name : String, mapping : Element):
+                        log((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
+                        output((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
+                        return!
+                    $
             }
         }
     }
-
-    Initial (schedule, print_states) {}
-    OnSuccess (print_states, print_transitions) {}
-    OnFailure (print_states, failure) {}
-    OnSuccess (print_transitions, success) {}
-    OnFailure (print_transitions, success) {}
 }
+
+Initial (schedule, print_states) {}
+OnSuccess (print_states, print_transitions) {}
+OnFailure (print_states, failure) {}
+OnSuccess (print_transitions, success) {}
+OnFailure (print_transitions, success) {}

+ 0 - 166
integration/code/several_petrinets.mvc

@@ -1,166 +0,0 @@
-import models/SimpleClassDiagrams as SCD
-include "primitives.alh"
-include "modelling.alh"
-
-SCD PetriNets{
-    SimpleAttribute Natural {
-        constraint =
-            $
-            String function constraint_Natural(model : Element, name : String):
-                Element self
-                self = model["model"][name]
-                if (is_physical_int(self)):
-                    if (integer_gte(self, 0)):
-                        return "OK"!
-                    else:
-                        return ("Natural does not have a positive or zero value at " + name)!
-                else:
-                    return ("Natural has no integer value at " + name)!
-            $
-    }
-
-    Class Place{
-        tokens : Natural
-    }
-    Class Transition{}
-    Association P2T (Place, Transition) {
-        weight : Natural
-    }
-    Association T2P (Transition, Place) {
-        weight : Natural
-    }
-}
-
-PetriNets valid_petrinet {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_1 {
-    Place p1 {
-        tokens = -1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_2 {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T p2t(p1, t1) {
-        weight = -1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_3 {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T wrong_p2t (p1, p2) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_4 {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P wrong_t2p(p1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_5 {
-    Place p1 {}
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_6 {
-    Place p1 {
-        tokens = 1
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T p2t (p1, t1) {}
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-PetriNets invalid_petrinet_7 {
-    Place p1 {
-        tokens = "abc"
-    }
-    Place p2 {
-        tokens = 3
-    }
-    Transition t1 {}
-    P2T (p1, t1) {
-        weight = 1
-    }
-    T2P (t1, p2) {
-        weight = 2
-    }
-}
-
-export PetriNets to models/PetriNets
-export valid_petrinet to models/valid_petrinet
-export invalid_petrinet_1 to models/invalid_petrinet_1
-export invalid_petrinet_2 to models/invalid_petrinet_2
-export invalid_petrinet_3 to models/invalid_petrinet_3
-export invalid_petrinet_4 to models/invalid_petrinet_4
-export invalid_petrinet_5 to models/invalid_petrinet_5
-export invalid_petrinet_6 to models/invalid_petrinet_6
-export invalid_petrinet_7 to models/invalid_petrinet_7

+ 23 - 27
integration/code/simpleclassdiagrams.mvc

@@ -1,31 +1,27 @@
-import /formalisms/SimpleClassDiagrams as SCD
+SimpleAttribute Natural {}
+SimpleAttribute String {}
+SimpleAttribute Boolean {}
 
-SCD SimpleClassDiagrams{
-    SimpleAttribute Natural {}
-    SimpleAttribute String {}
-    SimpleAttribute Boolean {}
-
-    Class Element {}
-    Class Class{
-        lower_cardinality? : Natural
-        upper_cardinality? : Natural
-    }
-
-    Association Association (Element, Element){
-        source_lower_cardinality? : Natural
-        source_upper_cardinality? : Natural
-        target_lower_cardinality? : Natural
-        target_upper_cardinality? : Natural
-    }
+Class Element {}
+Class Class{
+    lower_cardinality? : Natural
+    upper_cardinality? : Natural
+}
 
-    Association Attribute (Element, AttributeValue) {
-        optional : Boolean
-        name : String
-    }
+Association Association (Element, Element){
+    source_lower_cardinality? : Natural
+    source_upper_cardinality? : Natural
+    target_lower_cardinality? : Natural
+    target_upper_cardinality? : Natural
+}
 
-    Class AttributeValue {}
-    Association Inheritance (Element, Element){}
-    Inheritance assoc_inh_class (Association, Class) {}
-    Inheritance class_inh_element (Class, Element) {}
-    Inheritance attributevalue_inh_element (AttributeValue, Element) {}
+Association Attribute (Element, AttributeValue) {
+    optional : Boolean
+    name : String
 }
+
+Class AttributeValue {}
+Association Inheritance (Element, Element){}
+Inheritance assoc_inh_class (Association, Class) {}
+Inheritance class_inh_element (Class, Element) {}
+Inheritance attributevalue_inh_element (AttributeValue, Element) {}