CozySynthesizer / cozy

The collection synthesizer
https://cozy.uwplse.org
Apache License 2.0
209 stars 18 forks source link

Sorted implementation is still buggy #92

Closed izgzhen closed 5 years ago

izgzhen commented 5 years ago
Generating code for extension types...
Traceback (most recent call last):
  File "/home/zgzhen/projects/cozy/.venv/bin/cozy", line 11, in <module>
    load_entry_point('cozy', 'console_scripts', 'cozy')()
  File "/home/zgzhen/projects/cozy/cozy/main.py", line 158, in run
    code, state_map = rewriting.rewrite_extensions(code, ast.concretization_functions)
  File "/home/zgzhen/projects/cozy/cozy/structures/rewriting.py", line 62, in rewrite_extensions
    new_spec = _Rewriter(concretization_functions).visit(spec)
  File "/home/zgzhen/projects/cozy/cozy/common.py", line 281, in visit
    return f(x, *args, **kwargs)
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in visit_ADT
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in <genexpr>
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/common.py", line 281, in visit
    return f(x, *args, **kwargs)
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 73, in visit_tuple
    return self.join(l, tuple(self.visit(x) for x in l))
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 73, in <genexpr>
    return self.join(l, tuple(self.visit(x) for x in l))
  File "/home/zgzhen/projects/cozy/cozy/common.py", line 281, in visit
    return f(x, *args, **kwargs)
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in visit_ADT
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in <genexpr>
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/common.py", line 281, in visit
    return f(x, *args, **kwargs)
  File "/home/zgzhen/projects/cozy/cozy/structures/rewriting.py", line 32, in visit_Exp
    e = self.visit_ADT(e)
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in visit_ADT
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/syntax_tools.py", line 68, in <genexpr>
    new_children = tuple(self.visit(child) for child in x.children())
  File "/home/zgzhen/projects/cozy/cozy/common.py", line 281, in visit
    return f(x, *args, **kwargs)
  File "/home/zgzhen/projects/cozy/cozy/structures/rewriting.py", line 30, in visit_Exp
    new_stm = h.codegen(e, self.concretization_functions, out=v)
  File "/home/zgzhen/projects/cozy/cozy/structures/treemultiset.py", line 179, in codegen
    xs = shallow_copy(e.e).with_type(e.type)
  File "/home/zgzhen/projects/cozy/cozy/syntax.py", line 79, in with_type
    raise ValueError("The type of expression {} was changed from {} to {}. The type of an expression should only be assigned once!".format(self, self.type, t))
ValueError: The type of expression EVar('_var764').with_type(TMinTreeMultiset(TFloat())) was changed from TMinTreeMultiset(TFloat()) to TList(TFloat()). The type of an expression should only be assigned once!

I should add this to CI..