about summary refs log tree commit diff stats
path: root/example/symbol_exec/depgraph.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-04-28 08:21:52 +0200
committerAjax <commial@gmail.com>2015-04-28 08:21:52 +0200
commit2a9ef019bc17c712c8e18a4704c69ef9f5875402 (patch)
treeea20b66ff500f8f2ae3a2ad957604dfd9e175d02 /example/symbol_exec/depgraph.py
parent9615e4fea41bd6d4bf73529e9007b47a7ac849be (diff)
downloadmiasm-2a9ef019bc17c712c8e18a4704c69ef9f5875402.tar.gz
miasm-2a9ef019bc17c712c8e18a4704c69ef9f5875402.zip
DepGraph: Introduce implicit result management, with constraint solving API
Diffstat (limited to 'example/symbol_exec/depgraph.py')
-rw-r--r--example/symbol_exec/depgraph.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py
index 802d4fca..0a406b0b 100644
--- a/example/symbol_exec/depgraph.py
+++ b/example/symbol_exec/depgraph.py
@@ -75,3 +75,11 @@ for sol_nb, sol in enumerate(dg.get(current_block.label, elements, line_nb, set(
 	print "Solution %d: %s -> %s" % (sol_nb,
 					 result,
 					 fname)
+        if args.implicit:
+            sat = sol.is_satisfiable
+            constraints = ""
+            if sat:
+                constraints = {}
+                for element in sol.constraints:
+                    constraints[element] = sol.constraints[element]
+            print "\tSatisfiability: %s %s" % (sat, constraints)