about summary refs log tree commit diff stats
path: root/example/expression
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-11-09 14:49:51 +0100
committerAjax <commial@gmail.com>2015-11-09 15:01:12 +0100
commitb4114c3e786cf9c90b9c81cb4594d7775a266f5d (patch)
tree55e86387c9e1ee9b2b0c7fed92d8cf6cffde9160 /example/expression
parent7681a432c7c98df9d075701a172df0d5f311f753 (diff)
downloadmiasm-b4114c3e786cf9c90b9c81cb4594d7775a266f5d.tar.gz
miasm-b4114c3e786cf9c90b9c81cb4594d7775a266f5d.zip
Example: move output .txt to .dot
Diffstat (limited to 'example/expression')
-rw-r--r--example/expression/asm_to_ir.py4
-rw-r--r--example/expression/get_read_write.py2
-rw-r--r--example/expression/graph_dataflow.py6
-rw-r--r--example/expression/solve_condition_stp.py4
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