diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-11-09 14:27:16 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-11-09 14:27:16 +0100 |
| commit | 29a00f31d46e49333df450b85580af152aae2668 (patch) | |
| tree | 5179bbaae19f3d8fe6a2398ca6d0e09b5d923c19 /example/expression | |
| parent | 7681a432c7c98df9d075701a172df0d5f311f753 (diff) | |
| parent | 4140fa4725a31d7b1f8856c2da30a87a17c80c67 (diff) | |
| download | miasm-29a00f31d46e49333df450b85580af152aae2668.tar.gz miasm-29a00f31d46e49333df450b85580af152aae2668.zip | |
Merge pull request #258 from commial/extension-dot
Extension dot
Diffstat (limited to 'example/expression')
| -rw-r--r-- | example/expression/asm_to_ir.py | 4 | ||||
| -rw-r--r-- | example/expression/get_read_write.py | 2 | ||||
| -rw-r--r-- | example/expression/graph_dataflow.py | 6 | ||||
| -rw-r--r-- | example/expression/solve_condition_stp.py | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py index ee8a481a..3ed59ffe 100644 --- a/example/expression/asm_to_ir.py +++ b/example/expression/asm_to_ir.py @@ -47,11 +47,11 @@ for lbl, b in ir_arch.blocs.items(): # Dead propagation ir_arch.gen_graph() out = ir_arch.graph() -open('graph.txt', 'w').write(out) +open('graph.dot', 'w').write(out) print '*' * 80 ir_arch.dead_simp() out2 = ir_arch.graph() -open('graph2.txt', 'w').write(out2) +open('graph2.dot', 'w').write(out2) # Display new IR print 'new ir blocs' diff --git a/example/expression/get_read_write.py b/example/expression/get_read_write.py index faa3f9df..f0f48015 100644 --- a/example/expression/get_read_write.py +++ b/example/expression/get_read_write.py @@ -23,4 +23,4 @@ for lbl, b in ir_arch.blocs.items(): print ir_arch.gen_graph() g = ir_arch.graph() -open('graph_instr.txt', 'w').write(g) +open('graph_instr.dot', 'w').write(g) diff --git a/example/expression/graph_dataflow.py b/example/expression/graph_dataflow.py index 1450b33b..e263a40e 100644 --- a/example/expression/graph_dataflow.py +++ b/example/expression/graph_dataflow.py @@ -139,7 +139,7 @@ def gen_bloc_data_flow_graph(ir_arch, ad, block_flow_cb): # from graph_qt import graph_qt # graph_qt(flow_graph) - open('data.txt', 'w').write(flow_graph.dot()) + open('data.dot', 'w').write(flow_graph.dot()) data = open(args.filename).read() @@ -175,8 +175,8 @@ gen_bloc_data_flow_graph(ir_arch, ad, block_flow_cb) print '*' * 40 print """ View with: -dotty dataflow.txt +dotty dataflow.dot or Generate ps with pdf: -dot -Tps dataflow_xx.txt -o graph.ps +dot -Tps dataflow_xx.dot -o graph.ps """ diff --git a/example/expression/solve_condition_stp.py b/example/expression/solve_condition_stp.py index 8c65c83c..034a115f 100644 --- a/example/expression/solve_condition_stp.py +++ b/example/expression/solve_condition_stp.py @@ -228,11 +228,11 @@ if __name__ == '__main__': rez = " AND ".join(all_csts) out.append("QUERY(NOT (%s));" % rez) end = "\n".join(out) - open('out.txt', 'w').write(end) + open('out.dot', 'w').write(end) try: cases = subprocess.check_output(["/home/serpilliere/tools/stp/stp", "-p", - "out.txt"]) + "out.dot"]) except OSError: print "ERF, cannot find stp" break |