Browse Source

Fixed debug info for make_all.py script and make --debug default (cannot be disabled!)

Yentl Van Tendeloo 8 years ago
parent
commit
7d99e9b640

+ 1 - 1
bootstrap/bootstrap.py

@@ -239,7 +239,7 @@ def bootstrap():
                         f.close()
                         f.close()
                     else:
                     else:
                         filename = code
                         filename = code
-                    code = compile_code(filename, "interface/HUTN/grammars/actionlanguage.g", "BS", ["--debug", "--prepend:%s" % prepend, "--main" if main else "--not-main"], symbols=symbols)
+                    code = compile_code(filename, "interface/HUTN/grammars/actionlanguage.g", "BS", ["--prepend:%s" % prepend, "--main" if main else "--not-main"], symbols=symbols)
                     return code.replace("auto_initial_IP", target)
                     return code.replace("auto_initial_IP", target)
 
 
                 # Create all library code
                 # Create all library code

+ 1 - 5
interface/HUTN/hutn_compiler/primitives_visitor.py

@@ -12,13 +12,9 @@ class PrimitivesVisitor(Visitor):
         self.output = []
         self.output = []
         self.free_id = 0
         self.free_id = 0
         self.function_values = dict()
         self.function_values = dict()
-        self.debug_symbols = "--debug" in args
 
 
     def debug(self, node, tree, msg=""):
     def debug(self, node, tree, msg=""):
-        if self.debug_symbols:
-            if ".alc" not in tree.get_reference_line():
-                self.debug_symbols = False
-            self.dict(node, "__debug", self.value("[%s] %s" % (tree.get_reference_line(), msg)))
+        self.dict(node, "__debug", self.value("[%s] %s" % (tree.get_reference_line(), msg)))
 
 
     def node(self):
     def node(self):
         self.output.append(("N", self.free_id))
         self.output.append(("N", self.free_id))

+ 1 - 1
kernel/mvk_server/server.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)
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
 
-Date:   Thu Feb  9 16:38:23 2017
+Date:   Thu Feb  9 16:49:58 2017
 
 
 Model author: Yentl Van Tendeloo
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server
 Model name:   MvK Server

+ 1 - 1
scripts/execute_model.py

@@ -41,7 +41,7 @@ def initialize_SCD():
     print("Initialized!")
     print("Initialized!")
 
 
 def do_compile_wrapper(filename, mode, grammar):
 def do_compile_wrapper(filename, mode, grammar):
-    do_compile(address, filename, str(random.random()), filename, mode, ["--debug"], grammar=grammar)
+    do_compile(address, filename, str(random.random()), filename, mode, [], grammar=grammar)
 
 
 # Parse all models and upload them
 # Parse all models and upload them
 initialize_SCD()
 initialize_SCD()

+ 1 - 1
scripts/make_all.py

@@ -17,6 +17,6 @@ if __name__ == "__main__":
 
 
         new_files = to_recompile(address, files)
         new_files = to_recompile(address, files)
         for f in new_files:
         for f in new_files:
-            do_compile(address, f, str(random.random()), f, "CO")
+            do_compile(address, f, str(random.random()), f, "PO")
 
 
         link_and_load(address, username, files)
         link_and_load(address, username, files)

+ 1 - 1
scripts/make_parallel.py

@@ -9,7 +9,7 @@ import glob
 
 
 def main(address, username, files):
 def main(address, username, files):
     def do_compile_wrapper(filename):
     def do_compile_wrapper(filename):
-        do_compile(address, filename, str(random.random()), filename, "PO", ["--debug"])
+        do_compile(address, filename, str(random.random()), filename, "PO")
 
 
     p = multiprocessing.Pool(multiprocessing.cpu_count() * 2)
     p = multiprocessing.Pool(multiprocessing.cpu_count() * 2)
     new_files = to_recompile(address, files)
     new_files = to_recompile(address, files)