PandA-2024.02
Functions
bit_lattice.cpp File Reference
#include "bit_lattice.hpp"
#include "Parameter.hpp"
#include <string>
#include <algorithm>
#include <vector>
#include "tree_helper.hpp"
#include "tree_manager.hpp"
#include "tree_node.hpp"
#include "tree_reindex.hpp"
#include "dbgPrintHelper.hpp"
#include "string_manipulation.hpp"
#include "utility.hpp"
Include dependency graph for bit_lattice.cpp:

Go to the source code of this file.

Functions

std::deque< bit_latticecreate_u_bitstring (size_t lenght)
 Creates a bitstring containing bits initialized at <U> More...
 
std::deque< bit_latticecreate_x_bitstring (size_t lenght)
 Create a bitstring containing bits initialized at <X> More...
 
std::deque< bit_latticecreate_bitstring_from_constant (integer_cst_t value, unsigned long long len, bool signed_value)
 Creates a bitstring from a constant input. More...
 
std::string bitstring_to_string (const std::deque< bit_lattice > &bitstring)
 Translates a bitstring ( expressed as an std::deque of bit_lattice ) into a string of characters. More...
 
std::deque< bit_latticestring_to_bitstring (const std::string &s)
 inverse of bitstring_to_string More...
 
bool bitstring_constant (const std::deque< bit_lattice > &a)
 Checks if a bitstring is constant. More...
 

Detailed Description

Author
Pietro Fezzardi pietr.nosp@m.ofez.nosp@m.zardi.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Fabrizio Ferrandi fabri.nosp@m.zio..nosp@m.ferra.nosp@m.ndi@.nosp@m.polim.nosp@m.i.it

Definition in file bit_lattice.cpp.

Function Documentation

◆ bitstring_constant()

bool bitstring_constant ( const std::deque< bit_lattice > &  a)

Checks if a bitstring is constant.

Parameters
athe bitstring to be checked
Returns
TRUE if the bitstring contains only 1, 0 or X but not U values

Definition at line 656 of file bit_lattice.cpp.

References U, and X.

Referenced by Bit_Value::backward(), Bit_Value::backward_transfer(), and BitLatticeManipulator::update_current().

Here is the caller graph for this function:

◆ bitstring_to_string()

std::string bitstring_to_string ( const std::deque< bit_lattice > &  bitstring)

Translates a bitstring ( expressed as an std::deque of bit_lattice ) into a string of characters.

Definition at line 602 of file bit_lattice.cpp.

References ONE, THROW_ERROR, U, X, and ZERO.

Referenced by Bit_Value::backward(), Bit_Value::backward_chain(), Bit_Value::backward_transfer(), BinaryOpNode::eval(), BitValueIPA::Exec(), Bit_Value::forward(), Bit_Value::forward_transfer(), Bit_Value::initialize(), BitLatticeManipulator::mix(), Bit_Value::print_bitstring_map(), BitLatticeManipulator::sup(), Bit_Value::update_IR(), and VarNode::updateIR().

Here is the caller graph for this function:

◆ create_bitstring_from_constant()

std::deque<bit_lattice> create_bitstring_from_constant ( integer_cst_t  value_int,
unsigned long long  length,
bool  signed_value 
)

Creates a bitstring from a constant input.

Parameters
value_intinteger constant
lengththe length of the bitstring to be generated
signed_valuespecified if this bitstring can have negative values
Returns
bitstring generated from the integer constant

Definition at line 582 of file bit_lattice.cpp.

References ONE, and ZERO.

Referenced by BitLatticeManipulator::constructor_bitstring(), BitValueIPA::Exec(), Bit_Value::forward(), Range::getBitValues(), Bit_Value::initialize(), and BitLatticeManipulator::string_cst_bitstring().

Here is the caller graph for this function:

◆ create_u_bitstring()

std::deque<bit_lattice> create_u_bitstring ( size_t  lenght)

Creates a bitstring containing bits initialized at <U>

Parameters
lenghtthe lenght of the bitstring
Returns
a bitstring of the specified length containing <U> values.

Definition at line 572 of file bit_lattice.cpp.

References U.

Referenced by Bit_Value::backward_chain(), Bit_Value::backward_transfer(), BitLatticeManipulator::constructor_bitstring(), BitValueIPA::Exec(), Bit_Value::forward_transfer(), Range::getBitValues(), and Bit_Value::initialize().

Here is the caller graph for this function:

◆ create_x_bitstring()

std::deque<bit_lattice> create_x_bitstring ( size_t  lenght)

Create a bitstring containing bits initialized at <X>

Parameters
lenghtthe lenght of the bitstring
Returns
a bitstring of the specified length containing <X> values.

Definition at line 577 of file bit_lattice.cpp.

References X.

Referenced by Bit_Value::backward_chain(), BitValueIPA::Exec(), Bit_Value::forward(), and Bit_Value::initialize().

Here is the caller graph for this function:

◆ string_to_bitstring()

std::deque<bit_lattice> string_to_bitstring ( const std::string &  s)

Generated on Mon Feb 12 2024 13:03:17 for PandA-2024.02 by doxygen 1.8.13