<commit_before>//! \file
/*
**  Copyright (C) - Triton
**
**  This program is under the terms of the LGPLv3 License.
*/

#ifdef TRITON_PYTHON_BINDINGS

#include <operandInterface.hpp>
#include <pythonBindings.hpp>
#include <pythonUtils.hpp>
#include <symbolicOptimization.hpp>

#ifdef __unix__
  #include <python2.7/Python.h>
#elif _WIN32
  #include <Python.h>
#endif



/*! \page py_OPTIMIZATION_page OPTIMIZATION
    \brief [**python api**] All information about the OPTIMIZATION python namespace.

\tableofcontents

\section OPTIMIZATION_py_description Description
<hr>

The OPTIMIZATION namespace contains all kinds of symbolic optimization.

\section OPTIMIZATION_py_api Python API - Items of the OPTIMIZATION namespace
<hr>

- **OPTIMIZATION.ALIGNED_MEMORY**<br>
Enabled, Triton will keep a map of aligned memory to avoid symbolic memory explosion of LOAD/STORE acceess.

- **OPTIMIZATION.AST_SUMMARIES**<br>
Enabled, Triton will record all AST nodes into several maps and try to return node already allocated instead of allocate twice the same node.

- **OPTIMIZATION.ONLY_ON_TAINTED**<br>
Enabled, Triton will perform symbolic execution only on tainted instructions.

*/



namespace triton {
  namespace bindings {
    namespace python {

      void initSymOptiNamespace(PyObject* symOptiDict) {
        PyDict_SetItemString(symOptiDict, "ALIGNED_MEMORY",   PyLong_FromUint(triton::engines::symbolic::ALIGNED_MEMORY));
        PyDict_SetItemString(symOptiDict, "AST_SUMMARIES",    PyLong_FromUint(triton::engines::symbolic::AST_SUMMARIES));
        PyDict_SetItemString(symOptiDict, "ONLY_ON_TAINTED",  PyLong_FromUint(triton::engines::symbolic::ONLY_ON_TAINTED));
      }

    }; /* python namespace */
  }; /* bindings namespace */
}; /* triton namespace */

#endif /* TRITON_PYTHON_BINDINGS */
<commit_msg>Update doc<commit_after>//! \file
/*
**  Copyright (C) - Triton
**
**  This program is under the terms of the LGPLv3 License.
*/

#ifdef TRITON_PYTHON_BINDINGS

#include <operandInterface.hpp>
#include <pythonBindings.hpp>
#include <pythonUtils.hpp>
#include <symbolicOptimization.hpp>

#ifdef __unix__
  #include <python2.7/Python.h>
#elif _WIN32
  #include <Python.h>
#endif



/*! \page py_OPTIMIZATION_page OPTIMIZATION
    \brief [**python api**] All information about the OPTIMIZATION python namespace.

\tableofcontents

\section OPTIMIZATION_py_description Description
<hr>

The OPTIMIZATION namespace contains all kinds of symbolic optimization.

\section OPTIMIZATION_py_api Python API - Items of the OPTIMIZATION namespace
<hr>

- **OPTIMIZATION.ALIGNED_MEMORY**<br>
Enabled, Triton will keep a map of aligned memory to avoid symbolic memory explosion of `LOAD` and `STORE` acceess.

- **OPTIMIZATION.AST_SUMMARIES**<br>
Enabled, Triton will record all AST nodes into several maps and try to return node already allocated instead of allocate twice the same node.

- **OPTIMIZATION.ONLY_ON_TAINTED**<br>
Enabled, Triton will perform symbolic execution only on tainted instructions.

*/



namespace triton {
  namespace bindings {
    namespace python {

      void initSymOptiNamespace(PyObject* symOptiDict) {
        PyDict_SetItemString(symOptiDict, "ALIGNED_MEMORY",   PyLong_FromUint(triton::engines::symbolic::ALIGNED_MEMORY));
        PyDict_SetItemString(symOptiDict, "AST_SUMMARIES",    PyLong_FromUint(triton::engines::symbolic::AST_SUMMARIES));
        PyDict_SetItemString(symOptiDict, "ONLY_ON_TAINTED",  PyLong_FromUint(triton::engines::symbolic::ONLY_ON_TAINTED));
      }

    }; /* python namespace */
  }; /* bindings namespace */
}; /* triton namespace */

#endif /* TRITON_PYTHON_BINDINGS */

{'fraction_non_alphanumeric': 0.10024718483932986, 'fraction_numerical': 0.0027464982147761604, 'mean_word_length': 4.921951219512195, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1088172', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1164, 'n_words': 305}