Support for Boolean Operations and Relations
This MR adds support for boolean operations and relations to the backend.
-
AST Nodes: Introduce AST nodes for boolean operators and relations -
Freeze: Add freeze support for sp.Rel
s andsp.logic.boolalg.BooleanFunction
s -
Typifier: Add typifier support for relations and booleans -
Printing: Add printing support for boolean operators and relations -
Constant Folding: Extend EliminateConstants
to fold booleans and relations -
Branch Elimination: Add a pass to eliminate branches
Condition analysis w.r.t loop counters is reserved for future work.
Changes on the side:
- Add traits
PsNumericOpTrait
,PsIntOpTrait
andPsBoolOpTrait
to simplify typification of unary and binary operators - Fix behaviour of
EliminateConstants
on unary negation - Refactor the printer's precedence table to exactly reflect cppreference.com
Edited by Frederik Hennig