Yentl Van Tendeloo пре 7 година
родитељ
комит
f16f2c6d9e
2 измењених фајлова са 3 додато и 3 уклоњено
  1. 2 2
      kernel/modelverse_kernel/main.py
  2. 1 1
      wrappers/modelverse_SCCD.py

+ 2 - 2
kernel/modelverse_kernel/main.py

@@ -389,7 +389,7 @@ class ModelverseKernel(object):
         printed = prev + printed
         print("Total printed function: ")
         if params:
-            func = "def " + suggested_name + "(" + ", ".join(["var_%s" % param for param in params]) + ", **kwargs):\n" + printed
+            func = "def " + suggested_name + "(" + ", ".join([chr(ord('a') + i) for i in range(len(params))]) + ", **kwargs):\n" + "".join(["  var_%s = %s\n" % (param, chr(ord('a') + i)) for i, param in enumerate(params)]) + printed
         else:
             func = "def " + suggested_name + "(**kwargs):\n" + printed
         print(func)
@@ -445,6 +445,7 @@ class ModelverseKernel(object):
         # Have the JIT compile the function.
         compiled_func, = yield [("CALL_ARGS", [self.jit_compile, (task_root, inst)])]
         # Run the compiled function.
+        print("Calling function %s with parameters: " % str(compiled_func) + str(parameters))
         results = yield [("CALL_KWARGS", [compiled_func, parameters])]
         if results is None:
             raise Exception("%s: primitive finished without returning a value!" % (self.debug_info[taskname]))
@@ -461,7 +462,6 @@ class ModelverseKernel(object):
             #if self.debug_info[self.taskname]:
             #    self.debug_info[self.taskname].pop()
 
-            print("Exception return: " + str(exception_return))
             if exception_return is not None:
                 # The caller has requested that we throw an exception instead of injecting
                 # the return value into the caller's frame. Read the comment at

+ 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:   Tue Apr 10 11:41:06 2018
+Date:   Tue Apr 10 11:53:13 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server