Atj-post-translation-simplify-conds
Post-translation step:
simplify conditional expressions.
The translation step may produce Java conditional expressions
... ? ... : ... whose condition is a Java boolean literal,
i.e. either true or false.
In either case, the expression may be always replaced with
the appropriate branch, making the code more readable and efficient.
This kind of Java conditional expressions arise, in particular,
when the quoted constants t and nil in ACL2,
which are translated to the Java's literals true and false,
are used as symbols (not as booleans),
thus generating Java code to convert them to
Acl2Symbol.T and Acl2Symbol.NIL.
This post-translation step carries out this simplification.
Subtopics
- Atj-simplify-conds-in-jstatems+jblocks
- Simplify conditional expressions
whose condition is a boolean literal,
in statements and blocks.
- Atj-simplify-conds-in-jexpr
- Simplify conditional expressions
whose condition is a boolean literal,
in expressions.