Commit Graph

35 Commits

Author SHA1 Message Date
Fabrice Desclaux 319c5da396 Expression: use __hash__ function instead of property 2015-02-23 13:26:43 +01:00
Fabrice Desclaux 6f931cb489 Expression: use private attributes in expression 2015-02-23 12:52:49 +01:00
Fabrice Desclaux 835582686b Expression: Exprcompose are now ordered by default; add sanitycheck for contiguous slices 2015-02-23 12:52:43 +01:00
Fabrice Desclaux 63f1875a12 Expression: fix autopep indentation 2015-02-23 12:52:38 +01:00
serpilliere dd2da246f6 Expression: remove code which uses expression modifications 2015-02-22 01:48:27 +01:00
serpilliere f26427471f Expression/Simplification: avoid code modifications 2015-02-22 01:48:27 +01:00
serpilliere 8cc3484036 Expression: Make expressions really immutable. 2015-02-22 01:48:13 +01:00
Camille Mougey d2cc082ba5 PyLint: Import errors, pointless statements (fds), bad indentation 2015-02-18 20:42:54 +01:00
Camille Mougey 8d581fe43c PyLint: Remove unused-imports
miasm2/jitter/jitload.py:4: [W0611(unused-import), ] Unused import asmbloc
miasm2/jitter/jitload.py:3: [W0611(unused-import), ] Unused import os
miasm2/jitter/loader/elf.py:4: [W0611(unused-import), ] Unused import pe
miasm2/ir/ir.py:27: [W0611(unused-import), ] Unused import DiGraph
miasm2/ir/translators/z3_ir.py:6: [W0611(unused-import), ] Unused import m2_expr
miasm2/core/parse_asm.py:5: [W0611(unused-import), ] Unused import struct
miasm2/analysis/sandbox.py:8: [W0611(unused-import), ] Unused import libimp
miasm2/analysis/sandbox.py:1: [W0611(unused-import), ] Unused import os
miasm2/analysis/sandbox.py:5: [W0611(unused-import), ] Unused import win_api_x86_32
miasm2/analysis/sandbox.py:1: [W0611(unused-import), ] Unused import sys
miasm2/expression/simplifications_cond.py:17: [W0611(unused-import), ] Unused import itertools
miasm2/arch/arm/arch.py:5: [W0611(unused-import), ] Unused import pm
miasm2/arch/x86/sem.py:23: [W0611(unused-import), ] Unused import expr_is_int_or_label
miasm2/arch/mips32/arch.py:12: [W0611(unused-import), ] Unused import pm
miasm2/arch/mips32/disasm.py:1: [W0611(unused-import), ] Unused import asm_constraint
2015-02-16 12:21:18 +01:00
Fabrice Desclaux 35b5007249 Expression/Simplification: add op/compose simplification 2015-02-13 13:26:24 +01:00
Fabrice Desclaux 4a10bea860 Expression/Simplification: add shift/compose simplification 2015-02-13 13:20:09 +01:00
Camille Mougey 388b74c92f VariablesIdentifier: Handle corner cases (using var ident on already computed eq) 2015-02-10 10:53:38 +01:00
Camille Mougey 33189681bf VariableIdentifier: Less hacky way to identify sub vars, add a prefix feature 2015-02-10 09:57:50 +01:00
Fabrice Desclaux 2f2366654c Expression: fix ExprCond output 2015-01-13 10:10:19 +01:00
Fabrice Desclaux 57c355814b Merge branch 'feature-exprrandom' of https://github.com/commial/miasm into commial-feature-exprrandom
Conflicts:
	miasm2/expression/expression_helper.py
2014-12-11 11:10:45 +01:00
serpilliere 847ba7b469 Merge pull request #18 from commial/feature-vars-ident
Feature vars ident
2014-12-11 10:44:58 +01:00
Camille Mougey 40f926bf7b ExpressionHelper: Introduce ExprRandom, an expression generation feature
ExprRandom is a customisable (by extending it) class for generating
random expression.
2014-12-10 17:24:59 +01:00
Camille Mougey d743b6cb0a VariablesIdentifier: Use iterators (credits Pierre Lalet) 2014-12-10 10:46:09 +01:00
Camille Mougey 2633d9387d ExpressionHelper: Introduce Variables_Identifier
Variables_Identifier provides a way to identify redundant pattern
(ie. variables) in an expression, replace them and obtain the
variables list in a dependencies compliant order.
2014-12-09 17:57:26 +01:00
Camille Mougey 4bcb677830 Expression: Fix ExprCompose:get_w (wrong copy/paste ?) 2014-12-09 17:22:34 +01:00
Fabrice Desclaux 80cfb30b72 Expression: fix umod/udiv in expression simplification 2014-10-31 10:41:18 +01:00
Fabrice Desclaux 79f4d605ed expr_simpl: add shift simplification 2014-09-11 13:01:36 +02:00
Camille Mougey 962a44eafc Simplifications commons: Fix assert (avoid division by zero) 2014-09-05 15:06:16 +02:00
serpilliere 8cbb7db586 x86 arch: fix some mnemonic 2014-08-05 16:23:19 +02:00
ajax c33451c9e1 Simplification: Fix 'A op 0' with op == '-' bug, add corresponding test case 2014-07-30 15:47:55 +02:00
serpilliere 70e7237106 Fix operand unify irem/imod 2014-06-24 15:00:33 +02:00
serpilliere f406319ae9 Simplification: fix bug in simplification (tx to Florent Monjalet) 2014-06-13 16:31:10 +02:00
serpilliere b2f02006df Simplification: detect and handle == condition
Add corresponding regression tests
2014-06-13 09:36:58 +02:00
serpilliere 24b677448d merge; fix x86 ror/rol
rol ror mask shifter in semantic instead of in expr_simpl
2014-06-12 22:14:26 +02:00
ajax a635b0185b Simplifications: Add symetric cond catching + corresponding tests 2014-06-12 18:51:59 +02:00
ajax 0698cd3820 Simplifications_cond: Fix size issue, add constructor
I could have use a child class of ExprOp specific for conditions, but
I prefer to keep a better modularity by just using "<s", "<u" as a new op

I don't add the size issue in expression/expression.py (such as 'parity')
because we don't want dependencies from this file to
expression/simplifications_cond (for TOK_*)
2014-06-12 18:40:55 +02:00
ajax 82f6759b48 Simplifications: Add basic conditions detection 2014-06-12 17:34:24 +02:00
serpilliere 56774f174d expression: fix rol/ror simplifications (fix by fperigaud) 2014-06-12 13:09:48 +02:00
ajax ad7b0f5d48 Simplifications: Export common simplifications to an extern file 2014-06-09 14:54:02 +02:00
serpilliere ed5c3668cc Miasm v2
* API has changed, so old scripts need updates
* See example for API usage
* Use tcc or llvm for jit emulation
* Go to test and run test_all.py to check install

Enjoy !
2014-06-03 10:27:56 +02:00