Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PysmtTypeError: Trying to redefine symbol 'A' with a new type. Previous type was 'S{Bool}' new type is 'Bool' #633

Closed
PatrickTrentin88 opened this issue Apr 11, 2020 · 1 comment · Fixed by #637
Assignees
Labels
Milestone

Comments

@PatrickTrentin88
Copy link

There appears to be a problem with the Unit Test pysmt.test.smtlib.test_parser_extensibility.TestParserExtensibility:

~$  ./run_tests.sh 
test_griggio (pysmt.test.smtlib.test_griggio.TestSmtLibParserGriggio) ... ok
test_basic (pysmt.test.smtlib.test_parser_extensibility.TestParserExtensibility) ... ERROR

======================================================================
ERROR: test_basic (pysmt.test.smtlib.test_parser_extensibility.TestParserExtensibility)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/qian/dev.work/github.com/pysmt/pysmt/test/smtlib/test_parser_extensibility.py", line 109, in test_basic
    self.smt_parser.get_script(cStringIO(txt))
  File "/data/qian/dev.work/github.com/pysmt/pysmt/smtlib/parser/parser.py", line 855, in get_script
    for cmd in self.get_command_generator(script):
  File "/data/qian/dev.work/github.com/pysmt/pysmt/smtlib/parser/parser.py", line 869, in get_command_generator
    for cmd in self.get_command(tokens):
  File "/data/qian/dev.work/github.com/pysmt/pysmt/smtlib/parser/parser.py", line 1108, in get_command
    yield fun(current, tokens)
  File "/data/qian/dev.work/github.com/pysmt/pysmt/smtlib/parser/parser.py", line 1194, in _cmd_declare_fun
    v = self._get_var(var, typename)
  File "/data/qian/dev.work/github.com/pysmt/pysmt/smtlib/parser/parser.py", line 621, in _get_var
    typename=type_name)
  File "/data/qian/dev.work/github.com/pysmt/pysmt/formula.py", line 143, in Symbol
    return self.get_or_create_symbol(name, typename)
  File "/data/qian/dev.work/github.com/pysmt/pysmt/formula.py", line 137, in get_or_create_symbol
    (name, s.symbol_type(), typename))
PysmtTypeError: Trying to redefine symbol 'A' with a new type. Previous type was 'S{Bool}' new type is 'Bool'

----------------------------------------------------------------------
Ran 2 tests in 0.082s

FAILED (errors=1)
@marcogario marcogario added this to the 0.8.1 milestone Apr 12, 2020
@marcogario marcogario added the bug label Apr 12, 2020
@mikand mikand self-assigned this Apr 14, 2020
@mikand
Copy link
Contributor

mikand commented Apr 14, 2020

@PatrickTrentin88 The issue is due to multiprocessing in nosetests. Have a look at #637 for a fix.

@mikand mikand closed this as completed Apr 14, 2020
@marcogario marcogario linked a pull request Apr 15, 2020 that will close this issue
cespio pushed a commit to cespio/pysmt that referenced this issue Apr 27, 2020
cespio pushed a commit to cespio/pysmt that referenced this issue May 1, 2020
nbailluet pushed a commit to nbailluet/pysmt that referenced this issue Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants