potassco / clingo

🤔 A grounder and solver for logic programs.
https://potassco.org/clingo
MIT License
601 stars 79 forks source link

Sign lost for Comparison in AST #402

Closed alviano closed 1 year ago

alviano commented 1 year ago

Dear Roland,

Could you have a look at the following test cases?

$ python -c 'import clingo.ast; clingo.ast.parse_string(":- not 1 == 1.", print)'

program base.

false :- 1 = 1.

$ python -c 'import clingo.ast; clingo.ast.parse_string(":- not not 1 == 1.", print)'

program base.

false :- 1 = 1

Unrelated to the above issue, the empty show directive is printed in a form that cannot be parsed back (not sure if it is wanted):

$ python -c 'import clingo.ast; clingo.ast.parse_string("#show.", print)'

program base.

show /0.

Many thanks for your hard work!

All the best, Mario

rkaminsk commented 1 year ago

Thanks Mario! Already created a PR. Now will wait for the tests to finish and then deploy dev packages.