AMulet 2.0
AIG Multiplier Verification Tool
variable.h
Go to the documentation of this file.
1 /*------------------------------------------------------------------------*/
8 /*------------------------------------------------------------------------*/
9 #ifndef _var_H
10 #define _var_H
11 /*------------------------------------------------------------------------*/
12 #include "hash_val.h"
13 /*------------------------------------------------------------------------*/
14 
20 class Var {
22  const std::string name;
23 
25  int hash;
26 
28  const int level;
29 
31  const int num;
32 
33 public:
34 
42  Var(std::string name_, int level_, int num_ = 0):
43  name(name_), level(level_), num(num_){
44  hash = hash_string(name_);
45  };
46 
51  const char * get_name() const {return name.c_str();};
52 
57  int get_hash() const {return hash;};
58 
63  int get_level() const {return level;};
64 
69  int get_num() const {return num;};
70 };
71 
72 
73 #endif
int hash
Hash value of variables, used for storing terms.
Definition: variable.h:25
Definition: variable.h:20
int get_level() const
Definition: variable.h:63
const char * get_name() const
Definition: variable.h:51
const std::string name
name of variable
Definition: variable.h:22
uint64_t hash_string(const std::string &str)
Definition: hash_val.cpp:54
int get_hash() const
Definition: variable.h:57
contains functions used to compute hash values for variables
const int num
corresponding value used to relate AIG gates to Gate class
Definition: variable.h:31
Var(std::string name_, int level_, int num_=0)
Definition: variable.h:42
int get_num() const
Definition: variable.h:69
const int level
Increasing value that indicates the order of the variable.
Definition: variable.h:28