diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-02 17:59:13 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-02 17:59:13 +0000 |
commit | f4cdc443fb86f715ab93f3528aff23452a5bb3a3 (patch) | |
tree | ffab5077611d32a8b95c9d9b4f96b47703190e82 /utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py | |
parent | bae2fa50234b0a575a18a119019e5d96f7ff7ecf (diff) | |
download | klee-f4cdc443fb86f715ab93f3528aff23452a5bb3a3.tar.gz |
Add a little hack for visualizing KLEE branching.
- This consumes the treestream files produced with --write-paths or --write-sym-paths, and renders out the tree in a very ad-hoc funky way. Your mileage may vary! :) Example image: http://klee.llvm.org/data/treegraph_example.jpg Example movie: http://klee.llvm.org/data/treegraph_example.avi git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@102869 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py')
-rw-r--r-- | utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py b/utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py new file mode 100644 index 00000000..05320d5e --- /dev/null +++ b/utils/hacks/TreeGraphs/Graphics/Geometry/mat2.py @@ -0,0 +1,20 @@ +import vec2 + +def det(m): + ((m00,m01),(m10,m11))= m + + return m00*m11 - m01*m10 + +def mul(a,b): + b_trans= zip(* b) + return tuple([transmulvec2(b_trans, a_r) for a_r in a]) + + # multiple vector v by a transposed matrix +def transmulvec2(m_trans,v): + return tuple([vec2.dot(v, m_c) for m_c in m_trans]) + +def mulvec2(m,v): + return transmulvec2(zip(* m), v) + +def mulN(m,N): + return tuple([vec2.mulN(v,N) for v in m]) |