PandA-2024.02
Data Structures | Enumerations | Functions
bit_lattice.hpp File Reference
#include <string>
#include "custom_map.hpp"
#include "custom_set.hpp"
#include <deque>
#include "panda_types.hpp"
#include "refcount.hpp"
Include dependency graph for bit_lattice.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  BitLatticeManipulator
 

Enumerations

enum  bit_lattice { bit_lattice::U, bit_lattice::ZERO, bit_lattice::ONE, bit_lattice::X }
 

Functions

 CONSTREF_FORWARD_DECL (Parameter)
 STD include. More...
 
 CONSTREF_FORWARD_DECL (tree_manager)
 
 REF_FORWARD_DECL (tree_node)
 
 CONSTREF_FORWARD_DECL (tree_node)
 
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_int, unsigned long long length, 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.hpp.

Enumeration Type Documentation

◆ bit_lattice

enum bit_lattice
strong
Enumerator
ZERO 
ONE 

Definition at line 60 of file bit_lattice.hpp.

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:

◆ CONSTREF_FORWARD_DECL() [1/3]

CONSTREF_FORWARD_DECL ( Parameter  )

STD include.

STL includes

◆ CONSTREF_FORWARD_DECL() [2/3]

CONSTREF_FORWARD_DECL ( tree_manager  )

◆ CONSTREF_FORWARD_DECL() [3/3]

CONSTREF_FORWARD_DECL ( tree_node  )

◆ 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:

◆ REF_FORWARD_DECL()

REF_FORWARD_DECL ( tree_node  )

◆ 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