1 //! \file 2 /* 3 ** Copyright (C) - Triton 4 ** 5 ** This program is under the terms of the Apache License 2.0. 6 */ 7 8 #ifndef TRITON_MODES_HPP 9 #define TRITON_MODES_HPP 10 11 12 13 //! The Triton namespace 14 namespace triton { 15 /*! 16 * \addtogroup triton 17 * @{ 18 */ 19 20 //! The Modes namespace 21 namespace modes { 22 /*! 23 * \ingroup triton 24 * \addtogroup modes 25 * @{ 26 */ 27 28 //! Enumerates all kinds of mode. 29 enum mode_e { 30 ALIGNED_MEMORY, //!< [symbolic] Keep a map of aligned memory. 31 AST_OPTIMIZATIONS, //!< [AST] Classical arithmetic optimisations to reduce the depth of the trees. 32 CONCRETIZE_UNDEFINED_REGISTERS, //!< [symbolic] Concretize every registers tagged as undefined (see #750). 33 CONSTANT_FOLDING, //!< [symbolic] Perform a constant folding optimization of sub ASTs which do not contain symbolic variables. 34 ONLY_ON_SYMBOLIZED, //!< [symbolic] Perform symbolic execution only on symbolized expressions. 35 ONLY_ON_TAINTED, //!< [symbolic] Perform symbolic execution only on tainted instructions. 36 PC_TRACKING_SYMBOLIC, //!< [symbolic] Track path constraints only if they are symbolized. 37 SYMBOLIZE_INDEX_ROTATION, //!< [symbolic] Symbolize index rotation for bvrol and bvror (see #751). This mode increases the complexity of solving. 38 TAINT_THROUGH_POINTERS, //!< [taint] Spread the taint if an index pointer is already tainted (see #725). 39 }; 40 41 /*! @} End of modes namespace */ 42 }; 43 /*! @} End of triton namespace */ 44 }; 45 46 namespace std { 47 //! Define the hash function for mode_e to be use in stl containers like unordered_set 48 template <> struct hash<triton::modes::mode_e> : public hash<uint64_t> { 49 }; 50 }; 51 52 #endif /* TRITON_MODES_HPP */ 53