AMulet 2.0
AIG Multiplier Verification Tool
term.cpp File Reference

contains the class Term and further functions to manipulate terms More...

#include "term.h"
Include dependency graph for term.cpp:

Functions

uint64_t compute_hash_term (const Var *variable, const Term *rest)
 
void enlarge_terms ()
 
Termnew_term (const Var *variable, Term *rest)
 
void deallocate_term (Term *t)
 
void deallocate_terms ()
 
void add_to_vstack (const Var *v)
 
Termbuild_term_from_stack ()
 
Termmultiply_term (Term *t1, Term *t2)
 
Termremainder (const Term *t, const Var *v)
 

Variables

uint64_t size_terms
 
uint64_t current_terms
 
Term ** term_table
 
static std::stack< const Var * > vstack
 used to build a term More...
 

Detailed Description

contains the class Term and further functions to manipulate terms

Part of AMulet2.0 : AIG Multiplier Verification Tool. Copyright (C) 2020 Daniela Kaufmann, Johannes Kepler University Linz

Function Documentation

void add_to_vstack ( const Var v)

Pushes a variable to the variable stack, thus variables have to be pushed in order

Parameters
vVar*
Term* build_term_from_stack ( )

Generates a term from the variable stack

Returns
Term* generated from the variable stack
uint64_t compute_hash_term ( const Var variable,
const Term rest 
)

Compute hash_values

Parameters
variableVariable*
restTerm*
Returns
computed hash value for the term (variable, rest)
void deallocate_term ( Term t)

Decrements the reference count of a term, and actually deletes a term if its reference count goes to zero. In this case it also removes it from the hash table and applies the same procedure to the suffix 'rest'.

Parameters
tTerm*
void deallocate_terms ( )

Deallocates the hash table "term_table"

void enlarge_terms ( )

Enlarges the hash table

Term* multiply_term ( Term t1,
Term t2 
)

Multiplies two terms

Parameters
t1Term*
t2Term*
Returns
Term* which is product of t1*t2
Term* new_term ( const Var variable,
Term rest 
)

Builds a term, where variable is added at the front of rest

Parameters
variableVariable*
restTerm*
Returns
Term*
Term* remainder ( const Term t,
const Var v 
)

Remainder of t divided by v

Parameters
tTerm*
vVar*
Returns
Term* where v is removed from t

Variable Documentation

uint64_t current_terms
uint64_t size_terms
Term** term_table
std::stack<const Var*> vstack
static

used to build a term