libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
triton::engines::synthesis::OpEncoding< N > Class Template Reference

This class is used to encode operators and variables ordering. More...

#include <oracleEntry.hpp>

Public Member Functions

 OpEncoding (std::array< triton::ast::ast_e, N > ops, std::array< triton::uint8, N+1 > vars)
 Constructor.
 

Public Attributes

std::array< triton::ast::ast_e, N > ops
 Ordering of operators.
 
std::array< triton::uint8, N+1 > vars
 Ordering of variables.
 

Detailed Description

template<std::size_t N>
class triton::engines::synthesis::OpEncoding< N >

This class is used to encode operators and variables ordering.

 Example 1: ((a + b) * a)     -> OpEncoding<2>({BVADD, BVMUL}, {0, 1, 0})
 Example 2: (a + (b * a))     -> OpEncoding<2>({BVMUL, BVADD}, {1, 0, 0})
 Example 3: (a + b) * (a - b) -> OpEncoding<3>({BVMUL, BVADD, BVSUB}, {0, 1, 0, 1})

 Example for a trinary operator like bvadd(bvmul(x, x), y):
 {
   OpEncoding<2>({triton::ast::BVADD_NODE, triton::ast::BVMUL_NODE}, {0, 0, 1}), {
     BinaryEntry(8, 0x74, 0xe7, 0x77), BinaryEntry(16, 0x04c3, 0xd4d4, 0x815d), ...
     BinaryEntry(8, 0x98, 0x13, 0x53), BinaryEntry(16, 0x46dd, 0xc2dd, 0x5da6), ...
     BinaryEntry(8, 0x3f, 0xf4, 0x75), BinaryEntry(16, 0xa6b7, 0xac75, 0x8346), ...
     BinaryEntry(8, 0x26, 0xf0, 0x94), BinaryEntry(16, 0x31cd, 0x33c5, 0x51ee), ...
     BinaryEntry(8, 0x8e, 0x5e, 0x22), BinaryEntry(16, 0x77b8, 0xbba1, 0x4fe1), ...
     BinaryEntry(8, 0x48, 0x7c, 0xbc), BinaryEntry(16, 0x1c89, 0xed45, 0x2e96), ...
     BinaryEntry(8, 0x9f, 0x7b, 0x3c), BinaryEntry(16, 0xbfcc, 0xd906, 0xe396), ...
     BinaryEntry(8, 0x45, 0xe3, 0x7c), BinaryEntry(16, 0xd200, 0xb90c, 0xb90c), ...
     BinaryEntry(8, 0x16, 0x0a, 0xee), BinaryEntry(16, 0xd946, 0x9d22, 0x5c46), ...
     BinaryEntry(8, 0xed, 0x59, 0xc2), BinaryEntry(16, 0x1c7b, 0x810c, 0xa425), ...
   }
 }
 

Definition at line 129 of file oracleEntry.hpp.

Constructor & Destructor Documentation

◆ OpEncoding()

template<std::size_t N>
triton::engines::synthesis::OpEncoding< N >::OpEncoding ( std::array< triton::ast::ast_e, N > ops,
std::array< triton::uint8, N+1 > vars )
inline

Constructor.

Definition at line 154 of file oracleEntry.hpp.

Member Data Documentation

◆ ops

template<std::size_t N>
std::array<triton::ast::ast_e, N> triton::engines::synthesis::OpEncoding< N >::ops

Ordering of operators.

Example 1: ((a + b) * a) -> {BVADD, BVMUL}
Example 2: (a + (b * a)) -> {BVMUL, BVADD}
Example 3: (a + (b + a)) -> {BVADD, BVADD}

Definition at line 139 of file oracleEntry.hpp.

◆ vars

template<std::size_t N>
std::array<triton::uint8, N + 1> triton::engines::synthesis::OpEncoding< N >::vars

Ordering of variables.

Example 1: ((a + b) * a) -> {0, 1, 0}
Example 2: ((a + a) * a) -> {0, 0, 0}
Example 3: ((b + b) * a) -> {1, 1, 0}
Example 4: ((b + a) * b) -> {1, 0, 1}
Example 4: (b + (a * b)) -> {0, 1, 1}

Definition at line 151 of file oracleEntry.hpp.


The documentation for this class was generated from the following file: