Gymbo
Public Member Functions | Public Attributes | List of all members
gymbo::SymState Struct Reference

Struct representing the symbolic state of the symbolic execution. More...

#include <type.h>

Collaboration diagram for gymbo::SymState:
Collaboration graph
[legend]

Public Member Functions

 SymState ()
 Default constructor for symbolic state. More...
 
 SymState (int pc, int var_cnt, Mem &mem, SMem &smem, Linkedlist< Sym > &symbolic_stack, std::vector< Sym > &path_constraints, SymProb *p, SymProb *cond_p, bool has_observed_p_cond)
 Constructor for symbolic state with specified values. More...
 
SymStatecopy ()
 Create a copy object. More...
 
void set_concrete_val (int var_id, float val)
 Sets a concrete value for a variable in the symbolic state. More...
 
std::string toString (bool include_memory=true) const
 Returns the human-redable string representation of concrete memory, symbolic memory and path constraints. More...
 
void print () const
 Prints a human-readable representation of the symbolic state. More...
 

Public Attributes

int pc
 
int var_cnt
 
Mem mem
 
SMem smem
 
Linkedlist< Symsymbolic_stack
 
std::vector< Sympath_constraints
 
SymProbp
 
SymProbcond_p
 
bool has_observed_p_cond
 

Detailed Description

Struct representing the symbolic state of the symbolic execution.

Constructor & Destructor Documentation

◆ SymState() [1/2]

gymbo::SymState::SymState ( )
inline

Default constructor for symbolic state.

◆ SymState() [2/2]

gymbo::SymState::SymState ( int  pc,
int  var_cnt,
Mem mem,
SMem smem,
Linkedlist< Sym > &  symbolic_stack,
std::vector< Sym > &  path_constraints,
SymProb p,
SymProb cond_p,
bool  has_observed_p_cond 
)
inline

Constructor for symbolic state with specified values.

Parameters
pcProgram counter.
var_cntVariable count.
memConcrete memory.
smemSymbolic memory.
symbolic_stackSymbolic stack.
path_constraintsVector of symbolic path constraints.
pSymbolic probability of the state being reached.
cond_pSymbolic conditional probability of the state being reached.
has_observed_p_condFlag indicating whether path_constraints contains probabilistic path conditions.

Member Function Documentation

◆ copy()

SymState* gymbo::SymState::copy ( )
inline

Create a copy object.

◆ print()

void gymbo::SymState::print ( ) const
inline

Prints a human-readable representation of the symbolic state.

◆ set_concrete_val()

void gymbo::SymState::set_concrete_val ( int  var_id,
float  val 
)
inline

Sets a concrete value for a variable in the symbolic state.

Parameters
var_idIndex of the variable.
valConcrete value to set.

◆ toString()

std::string gymbo::SymState::toString ( bool  include_memory = true) const
inline

Returns the human-redable string representation of concrete memory, symbolic memory and path constraints.

Parameters
include_memoryIf set to true, add the concrete and symbolic memories (default true).

Member Data Documentation

◆ cond_p

SymProb* gymbo::SymState::cond_p

Symbolic conditional probability of the state being reached

◆ has_observed_p_cond

bool gymbo::SymState::has_observed_p_cond

< Flag indicating whether path_constraints contains probabilistic path conditions.

◆ mem

Mem gymbo::SymState::mem

Concrete memory.

◆ p

SymProb* gymbo::SymState::p

Symbolic probability of the state being reached

◆ path_constraints

std::vector<Sym> gymbo::SymState::path_constraints

Vector of symbolic path constraints.

◆ pc

int gymbo::SymState::pc

Program counter.

◆ smem

SMem gymbo::SymState::smem

Symbolic memory.

◆ symbolic_stack

Linkedlist<Sym> gymbo::SymState::symbolic_stack

Symbolic stack.

◆ var_cnt

int gymbo::SymState::var_cnt

Variable count.


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