From 1c065287cb5bb6e38db3a96ce6a09b79c338a585 Mon Sep 17 00:00:00 2001 From: Rihi <19492038+rihi@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:37:06 +0200 Subject: [PATCH] Improve documentation of TermOrder Co-authored-by: Manuel Blatt <45859907+blattm@users.noreply.github.com> --- .../expression_simplification/rules/term_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/decompiler/pipeline/controlflowanalysis/expression_simplification/rules/term_order.py b/decompiler/pipeline/controlflowanalysis/expression_simplification/rules/term_order.py index 0c5721a28..638f4d08a 100644 --- a/decompiler/pipeline/controlflowanalysis/expression_simplification/rules/term_order.py +++ b/decompiler/pipeline/controlflowanalysis/expression_simplification/rules/term_order.py @@ -6,6 +6,8 @@ class TermOrder(SimplificationRule): """ Swap constants of commutative operations to the right. + This stage is important because other stages expect constants to be on the right side. + Associativity is not exploited, i.e. nested operations of the same type are not considered. - `c + e -> e + c` - `c * e -> e * c`