KCL-Planning / SMTPlan

PDDL+ planning through compilation to SMT
44 stars 19 forks source link

Fix LHS vs RHS in arithmetic expressions. #21

Open neighthan opened 1 year ago

neighthan commented 1 year ago

Fixes #19.

visit_div_expression already had the correct method of popping the RHS first then the LHS. However, plus, minus and mul all switched the order and called the first thing popped from the stack the LHS. For plus and mul, this doesn't affect the correctness, but it lead to minus being interpreted backwards (see the linked issue). I think this should fix that issue, but I'm not familiar with the code base, so please let me know if there are other places this change would need to be made too.