cprover
irep_hash.h File Reference

irep hash functions More...

#include <cstddef>
#include <stdint.h>
Include dependency graph for irep_hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IREP_HASH_BASIC
 
#define FORCE_INLINE   inline __attribute__((always_inline))
 
#define BIG_CONSTANT(x)   (x##LLU)
 
#define hash_combine(h1, h2)   basic_hash_combine<sizeof(std::size_t)*8>(h1, h2)
 
#define hash_finalize(h1, len)   basic_hash_finalize(h1, len)
 

Functions

static __attribute__ ((always_inline)) uint32_t ROTL32(uint32_t x
 
template<int >
std::size_t basic_hash_combine (std::size_t h1, std::size_t h2)
 
template<>
std::size_t basic_hash_combine< 32 > (std::size_t h1, std::size_t h2)
 
template<>
std::size_t basic_hash_combine< 64 > (std::size_t h1, std::size_t h2)
 
std::size_t basic_hash_finalize (std::size_t h1, std::size_t len)
 

Variables

static int8_t r
 

Detailed Description

irep hash functions

Definition in file irep_hash.h.

Macro Definition Documentation

◆ BIG_CONSTANT

#define BIG_CONSTANT (   x)    (x##LLU)

Definition at line 68 of file irep_hash.h.

◆ FORCE_INLINE

#define FORCE_INLINE   inline __attribute__((always_inline))

Definition at line 54 of file irep_hash.h.

◆ hash_combine

#define hash_combine (   h1,
  h2 
)    basic_hash_combine<sizeof(std::size_t)*8>(h1, h2)

◆ hash_finalize

#define hash_finalize (   h1,
  len 
)    basic_hash_finalize(h1, len)

Definition at line 122 of file irep_hash.h.

Referenced by irept::full_hash(), to_be_merged_irept::hash(), and irept::hash().

◆ IREP_HASH_BASIC

#define IREP_HASH_BASIC

Definition at line 17 of file irep_hash.h.

Function Documentation

◆ __attribute__()

static __attribute__ ( (always_inline)  )
inlinestatic

◆ basic_hash_combine()

template<int >
std::size_t basic_hash_combine ( std::size_t  h1,
std::size_t  h2 
)

◆ basic_hash_combine< 32 >()

template<>
std::size_t basic_hash_combine< 32 > ( std::size_t  h1,
std::size_t  h2 
)
inline

Definition at line 81 of file irep_hash.h.

◆ basic_hash_combine< 64 >()

template<>
std::size_t basic_hash_combine< 64 > ( std::size_t  h1,
std::size_t  h2 
)
inline

Definition at line 89 of file irep_hash.h.

◆ basic_hash_finalize()

std::size_t basic_hash_finalize ( std::size_t  h1,
std::size_t  len 
)
inline

Definition at line 109 of file irep_hash.h.

Variable Documentation

◆ r

static int8_t r
Initial value:
{
return (x << r) | (x >> (32-r))
static int8_t r
Definition: irep_hash.h:59

Definition at line 59 of file irep_hash.h.

Referenced by __CPROVER_jsa_assume_valid_heap(), code_contractst::add_contract_check(), invariant_sett::add_eq(), bdd_exprt::as_expr(), sharing_mapt< keyT, valueT, hashT, equalT >::at(), bv_refinementt::check_SAT(), irept::compare(), compilet::compile(), convert(), goto_program2codet::convert_assign_varargs(), java_bytecode_convert_methodt::convert_instructions(), detect_file_type(), flow_insensitive_analysis_baset::do_function_call(), from_integer(), memory_model_sct::from_read(), string_containert::get(), get_base_name(), invariant_sett::get_constant(), value_set_fit::get_entry(), value_set_fivrnst::get_entry(), value_set_fivrt::get_entry(), value_sett::get_entry(), symex_slice_by_tracet::implied_guards(), invariant_sett::implies_rec(), goto_unwindt::unwind_logt::insert(), instrument_preconditions(), unsigned_union_find::isolate(), satcheck_booleforce_baset::l_get(), cnf_clause_list_assignmentt::l_get(), mz_zip_filename_compare(), mz_zip_reader_filename_less(), narrow(), satcheck_minisat1_coret::prop_solve(), unsigned_union_find::re_root(), memory_model_baset::read_from(), irep_serializationt::read_irep(), _rw_set_loct::read_write_rec(), sharing_node_innert< key_type, mapped_type >::remove_child(), goto_program2codet::scan_for_varargs(), simplify_exprt::simplify_typecast(), simplify_exprt::simplify_unary_minus(), goto_symext::symex_atomic_end(), tinfl_decompress(), ieee_floatt::to_string_decimal(), jsil_declarationt::to_symbol(), and widen().