Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit node visitor and simplification #553

Closed
JonathanSalwan opened this issue Jun 1, 2017 · 1 comment
Closed

Implicit node visitor and simplification #553

JonathanSalwan opened this issue Jun 1, 2017 · 1 comment

Comments

@JonathanSalwan
Copy link
Owner

JonathanSalwan commented Jun 1, 2017

diff --git a/src/libtriton/engines/symbolic/symbolicSimplification.cpp b/src/libtriton/engines/symbolic/symbolicSimplification.cpp
index 960c7994..c45d0f4d 100644
--- a/src/libtriton/engines/symbolic/symbolicSimplification.cpp
+++ b/src/libtriton/engines/symbolic/symbolicSimplification.cpp
@@ -181,8 +181,12 @@ namespace triton {
           throw triton::exceptions::SymbolicSimplification("SymbolicSimplification::processSimplification(): node cannot be null.");
 
         /* process recorded callback about symbolic simplifications */
-        if (this->callbacks)
-          node = this->callbacks->processCallbacks(triton::callbacks::SYMBOLIC_SIMPLIFICATION, node);
+        if (this->callbacks) {
+          for (triton::uint32 index = 0; index < node->getChildren().size(); index++)
+            node->setChild(index, this->processSimplification(node->getChildren()[index]));
+
+          if (node->getBitvectorSize())
+            node = this->callbacks->processCallbacks(triton::callbacks::SYMBOLIC_SIMPLIFICATION, node);
+        }
 
         return node;
       }

This patch need to be tested in several ways before merging.

@JonathanSalwan JonathanSalwan added this to the v0.x milestone Jun 1, 2017
@JonathanSalwan JonathanSalwan self-assigned this Jun 1, 2017
@JonathanSalwan JonathanSalwan modified the milestones: v0.6, v0.x Jun 27, 2017
JonathanSalwan added a commit that referenced this issue Sep 6, 2018
Fix #553: Implicit node visitor and simplification
@JonathanSalwan
Copy link
Owner Author

merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant