Explorar o código

Add missing files

Yentl Van Tendeloo %!s(int64=8) %!d(string=hai) anos
pai
achega
449357beeb

+ 27 - 0
integration/code/pn_print_MR.mvc

@@ -0,0 +1,27 @@
+RAM_PN_R print {
+    Composite schedule {
+        {Contains} Success success {}
+        {Contains} ForAll print_tokens {
+            LHS {
+                Pre_PetriNets_Place {
+                    label = "0"
+                }
+            }
+            RHS {
+                Post_PetriNets_Place {
+                    label = "0"
+                    action = $
+                        include "primitives.alh"
+                        include "modelling.alh"
+                        Void function action(host_model : Element, name : String, mapping : Element):
+                            output((cast_v2s(read_attribute(host_model, name, "name")) + " --> ") + cast_v2s(read_attribute(host_model, name, "tokens")))
+                            return!
+                        $
+                }
+            }
+        }
+    }
+    OnSuccess (print_tokens, success) {}
+    OnFailure (print_tokens, success) {}
+    Initial (schedule, print_tokens) {}
+}

+ 19 - 0
integration/code/pn_runtime_MR.mvc

@@ -0,0 +1,19 @@
+SimpleClassDiagrams PetriNets_Runtime{
+    Class Natural {}
+    Class Boolean {}
+    Class String {}
+
+    Class Place {
+        tokens : Natural
+        name : String
+    }
+    Class Transition {
+        executing : Boolean
+    }
+    Association P2T (Place, Transition) {
+        weight : Natural
+    }
+    Association T2P (Transition, Place) {
+        weight : Natural
+    }
+}

+ 26 - 0
integration/code/pn_runtime_model_MR.mvc

@@ -0,0 +1,26 @@
+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
+	}
+	P2T (p1, t1) {
+		weight = 1
+	}
+	P2T (p2, t1) {
+		weight = 1
+	}
+	T2P (t1, p3) {
+		weight = 2
+	}
+}