Parcourir la source

Fixed some broken primitives and added slightly better stack tracing

Yentl Van Tendeloo il y a 7 ans
Parent
commit
2853bbfdb0

+ 3 - 0
hybrid_server/classes/task.xml

@@ -44,6 +44,9 @@
                 raise
             except:
                 import traceback
+                print("Error on requests: " + str(commands))
+                print("For taskname " + str(taskname))
+                print("Stack @ MvK: " + str(mvk.request_handlers[taskname][operation].generator_stack))
                 print(traceback.format_exc())
                 return (float('inf'), False)
             ]]>

+ 0 - 4
kernel/modelverse_kernel/main.py

@@ -70,10 +70,6 @@ class ModelverseKernel(object):
             if self.phase_v == "finish":
                 gen = self.helper_init(task_root)
             elif self.inst is None:
-                print("No instruction pointer found...")
-                print(locals())
-                print("Phase: " + str(self.phase_v))
-                print("Debug: " + str(self.debug_info[taskname]))
                 raise Exception("Instruction pointer could not be found!")
             elif isinstance(self.phase_v, string_types):
                 if self.phase_v == "init" and self.jit.is_jittable_entry_point(self.inst):

+ 3 - 3
kernel/modelverse_kernel/primitives.py

@@ -333,7 +333,7 @@ def create_edge(a, b, **remainder):
 
 def create_value(a, **remainder):
     if "value" not in a:
-        a['value'], = yield [("RV", [a])]
+        a['value'], = yield [("RV", [a['id']])]
     raise PrimitiveFinished({'value': a['value']})
 
 def read_nr_out(a, **remainder):
@@ -422,9 +422,9 @@ def hash(a, **remainder):
 
 def __sleep(a, b, **remainder):
     if "value" not in a:
-        a['value'], = yield [("RV", [a])]
+        a['value'], = yield [("RV", [a['id']])]
     if "value" not in b:
-        b['value'], = yield [("RV", [b])]
+        b['value'], = yield [("RV", [b['id']])]
     timeout = a['value']
     interruptable = b['value']
     yield [("SLEEP", [timeout, interruptable])]

+ 1 - 1
wrappers/modelverse.py

@@ -192,7 +192,7 @@ def OUTPUT():
             except NameError:
                 raise UnknownError(response.parameters[1:])
 
-def init(address_param="127.0.0.1:8001", timeout=20.0, taskname=None):
+def init(address_param="127.0.0.1:8001", timeout=60.0, taskname=None):
     global controller
     global ID
     global responses

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Thu Apr 26 08:14:17 2018
+Date:   Thu Apr 26 09:48:48 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server