Closed jorgefandinno closed 1 year ago
It seems that the < operator does not define an order among AST objects. This can be checked with the following python code.
from clingox.testing.ast import parse_statement rule1 = parse_statement(":- b.") rule2 = parse_statement(":- not a.") print(f"rule1: {rule1}") print(f"rule2: {rule2}") print("="*40) print(f"rule1 < rule2: {rule1 < rule2}") print(f"rule2 < rule1: {rule2 < rule1}")
which produces the following result.
clingo.__version__='5.6.0' ======================================== rule1: #false :- b. rule2: #false :- not a. ======================================== rule1 < rule2: True rule2 < rule1: True
The expected result is that either rule1 < rule2 or rule2 < rule1, but not both.
rule1 < rule2
rule2 < rule1
We checked with version 5.5.2 and we got the same result.
5.5.2
It seems that the < operator does not define an order among AST objects. This can be checked with the following python code.
which produces the following result.
The expected result is that either
rule1 < rule2
orrule2 < rule1
, but not both.We checked with version
5.5.2
and we got the same result.