aic-sri-international / aic-expresso

SRI International's AIC Symbolic Manipulation and Evaluation Library (for Java 1.8+)
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

R_simplified_if_then_else - else part not simplifying correctly. #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Note: Ensure new R_simplify logic is capable of handling this.

Note: R_simplified_if_then_else currently delegates to R_basic for its 
functionality.

If you attempt to simplify the following conditional:

if C = true then or(C, B) else and(C, B)

it is getting returned as:

if C = true then true else C and B

However, should this not be:

if C = true then true else false

as we know that C != true in the else branch?

In addition, the pseudo-code for R_simplified_if_then_else has been updated 
from:

E2 <- R_constrained_simplification(C, E2)

to:

E2 <- R_constrained_simplification(not C, E2)

in order to specify the context correctly for the constrained simplification of 
the else portion of the branch.

Original issue reported on code.google.com by ctjoreilly@gmail.com on 11 Apr 2013 at 12:37