Browse Source

Fixed tests again

Yentl Van Tendeloo 9 years ago
parent
commit
adbf8c30f0

+ 2 - 2
integration/code/several_petrinets.mvc

@@ -5,9 +5,9 @@ SCD PetriNets{
     Class Natural {
     Class Natural {
         $
         $
             if (bool_not(is_physical_int(self))):
             if (bool_not(is_physical_int(self))):
-                return "Natural has no integer value at " + element
+                return "Natural has no integer value at " + name
             elif (integer_lt(self, 0)):
             elif (integer_lt(self, 0)):
-                return "Natural does not have a positive or zero value at " + element
+                return "Natural does not have a positive or zero value at " + name
             else:
             else:
                 return "OK"
                 return "OK"
          $
          $

+ 1 - 1
integration/utils.py

@@ -127,7 +127,7 @@ def run_file(files, parameters, expected, mode):
                 compile_file(address, mod_filename, filename, mode, proc)
                 compile_file(address, mod_filename, filename, mode, proc)
 
 
             # After the first file, which can be whatever we want, we just have to compile dependencies, all of which are PO for efficiency
             # After the first file, which can be whatever we want, we just have to compile dependencies, all of which are PO for efficiency
-            #mode = "PO"
+            mode = "PO"
 
 
         if parallel_push:
         if parallel_push:
             for t in threads:
             for t in threads:

+ 3 - 1
interface/HUTN/hutn_compiler/bootstrap_visitor.py

@@ -6,6 +6,7 @@ class BootstrapVisitor(PrimitivesVisitor):
         PrimitivesVisitor.__init__(self, args)
         PrimitivesVisitor.__init__(self, args)
 
 
     def dump(self):
     def dump(self):
+        link_id = 0
         call = self.value("call")
         call = self.value("call")
         access = self.value("access")
         access = self.value("access")
         resolve = self.value("resolve")
         resolve = self.value("resolve")
@@ -31,7 +32,8 @@ class BootstrapVisitor(PrimitivesVisitor):
                 source = "auto_%s" % source if isinstance(source, int) else source
                 source = "auto_%s" % source if isinstance(source, int) else source
                 target = "auto_%s" % target if isinstance(target, int) else target
                 target = "auto_%s" % target if isinstance(target, int) else target
                 # output.append("D %s,%s,%s\n" % (source, value, target))
                 # output.append("D %s,%s,%s\n" % (source, value, target))
-                linkname = "%s_%s_%s" % (source, abs(hash(value)), target)
+                linkname = "%s_%s_%s" % (source, link_id, target)
+                link_id += 1
                 output.append("Edge _%s_0(%s, %s)\n" % (linkname, source, target))
                 output.append("Edge _%s_0(%s, %s)\n" % (linkname, source, target))
                 output.append("Node _%s_2(%s)\n" % (linkname, value))
                 output.append("Node _%s_2(%s)\n" % (linkname, value))
                 output.append("Edge _%s_1(_%s_0, _%s_2)\n" % (linkname, linkname, linkname))
                 output.append("Edge _%s_1(_%s_0, _%s_2)\n" % (linkname, linkname, linkname))