فهرست منبع

Some documentation on the MvC operations

Yentl Van Tendeloo 8 سال پیش
والد
کامیت
cada57dcad

+ 4 - 2
core/core_algorithm.alc

@@ -485,8 +485,6 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 	output_mms = create_node()
 	types = create_node()
 
-	// TODO use the prefix for data locations (in model write/read in MvC)
-
 	// Read out the referenced element from the MvC
 	transformation_id = get_model_id(read_attribute(pm, element, "name"))
 
@@ -499,6 +497,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 		value = read_attribute(pm, readAssociationDestination(pm, consumes_link), "name")
 		dict_add(inputs, name, prefix + value)
 		dict_add(types, name, read_attribute(pm, readAssociationDestination(pm, consumes_link), "type"))
+		log("Added inputs: " + cast_v2s(prefix + value))
 
 	// Find all outputs and their types (i.e., key)
 	lst = allAssociationDestinations(pm, element, "Produces")
@@ -548,6 +547,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 			input_keys = dict_keys(inputs)
 			while (read_nr_out(input_keys) > 0):
 				key = set_pop(input_keys)
+				log("READ model with name " + cast_v2s(inputs[key]))
 				model_join(merged_model, get_full_model(get_model_id(inputs[key])), string_join(types[key], "/"))
 
 			// 3) Transform
@@ -564,6 +564,8 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 				desired_metamodel_id = get_model_id(key)
 				split_off_model = model_split(merged_model, get_full_model(desired_metamodel_id), key + "/")
 
+				log("Wrote model to " + cast_v2s(outputs[key]))
+
 				// Check if the destination model already exists
 				if (get_model_id(outputs[key]) == ""):
 					// New model

BIN
doc/_build/doctrees/index.doctree


BIN
doc/_build/doctrees/modellanguage.doctree


+ 2 - 0
doc/_build/html/_sources/index.txt

@@ -18,6 +18,8 @@ Contents:
    Modelling Language <modellanguage>
    Examples <examples>
    Advanced examples <advanced>
+   Modelverse core <mvc>
+   Mini modify <mini_modify>
    Common problems and solutions <problems>
    Internal workings <internal>
    Interface <interface>

+ 2 - 2
doc/_build/html/_sources/modellanguage.txt

@@ -95,7 +95,7 @@ This looks like this::
     import models/SimpleClassDiagrams as SCD
 
     SCD PetriNets{
-        Class Natural {}
+        SimpleAttribute Natural {}
         Class Place{
             tokens : Natural
         }
@@ -119,7 +119,7 @@ Such constraints are written in the action language, surrounded by dollar signs:
     include "primitives.alh"
 
     SCD PetriNets{
-        Class Natural {
+        SimpleAttribute Natural {
             $
                 if (bool_not(is_physical_int(self))):
                     return "Natural has no integer value at " + name!

+ 10 - 0
doc/_build/html/index.html

@@ -102,6 +102,16 @@
 <li class="toctree-l2"><a class="reference internal" href="advanced.html#conformance-semantics">Conformance Semantics</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="mvc.html">Modelverse core</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#model-operations">Model operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#transformation-specific-operations">Transformation-specific operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#process-operations">Process operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#model-permission-operations">Model permission operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#group-operations">Group operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#admin-operations">Admin operations</a></li>
+<li class="toctree-l2"><a class="reference internal" href="mvc.html#general-operations">General operations</a></li>
+</ul>
+</li>
 <li class="toctree-l1"><a class="reference internal" href="problems.html">Common problems and solutions</a></li>
 <li class="toctree-l1"><a class="reference internal" href="internal.html">Internal workings</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="internal.html#modelverse-state">Modelverse State</a></li>

+ 2 - 2
doc/_build/html/modellanguage.html

@@ -128,7 +128,7 @@ This looks like this:</p>
 <div class="highlight-default"><div class="highlight"><pre><span class="kn">import</span> <span class="nn">models</span><span class="o">/</span><span class="n">SimpleClassDiagrams</span> <span class="k">as</span> <span class="n">SCD</span>
 
 <span class="n">SCD</span> <span class="n">PetriNets</span><span class="p">{</span>
-    <span class="n">Class</span> <span class="n">Natural</span> <span class="p">{}</span>
+    <span class="n">SimpleAttribute</span> <span class="n">Natural</span> <span class="p">{}</span>
     <span class="n">Class</span> <span class="n">Place</span><span class="p">{</span>
         <span class="n">tokens</span> <span class="p">:</span> <span class="n">Natural</span>
     <span class="p">}</span>
@@ -152,7 +152,7 @@ Such constraints are written in the action language, surrounded by dollar signs:
 include &quot;primitives.alh&quot;
 
 SCD PetriNets{
-    Class Natural {
+    SimpleAttribute Natural {
         $
             if (bool_not(is_physical_int(self))):
                 return &quot;Natural has no integer value at &quot; + name!

BIN
doc/_build/html/objects.inv


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
doc/_build/html/searchindex.js


+ 2 - 0
doc/index.rst

@@ -18,6 +18,8 @@ Contents:
    Modelling Language <modellanguage>
    Examples <examples>
    Advanced examples <advanced>
+   Modelverse core <mvc>
+   Mini modify <mini_modify>
    Common problems and solutions <problems>
    Internal workings <internal>
    Interface <interface>

+ 2 - 2
doc/modellanguage.rst

@@ -95,7 +95,7 @@ This looks like this::
     import models/SimpleClassDiagrams as SCD
 
     SCD PetriNets{
-        Class Natural {}
+        SimpleAttribute Natural {}
         Class Place{
             tokens : Natural
         }
@@ -119,7 +119,7 @@ Such constraints are written in the action language, surrounded by dollar signs:
     include "primitives.alh"
 
     SCD PetriNets{
-        Class Natural {
+        SimpleAttribute Natural {
             $
                 if (bool_not(is_physical_int(self))):
                     return "Natural has no integer value at " + name!

+ 3 - 3
integration/code/pm_pn_reachability.mvc

@@ -30,9 +30,9 @@ ProcessModel combo_reach {
     Next (reachability_print, finish) {}
 
     Produces (initializePN, pn) {}
-    Consumes (pn, refinePN) {}
+    Consumes (refinePN, pn) {}
     Produces (refinePN, pn) {}
-    Consumes (pn, reachability) {}
+    Consumes (reachability, pn) {}
     Produces (reachability, reachability_graph) {}
-    Consumes (reachability_graph, reachability_print) {}
+    Consumes (reachability_print, reachability_graph) {}
 }

+ 0 - 1
integration/code/reachability.alc

@@ -40,7 +40,6 @@ Element function reachability_graph(params : Element, output_mms : Element):
 	result = create_node()
 	out_model = instantiate_model(output_mms["ReachabilityGraph"])
 	in_model = params["pn"]
-	log("In model: " + cast_e2s(in_model))
 
 	// Create a dictionary representation for each transition
 	transition_vectors_produce = create_node()