1 #ifndef __HORN_HPP_DEFINED__ 2 #define __HORN_HPP_DEFINED__ 35 std::map<std::string, hvptr_t>
_ins;
53 const unsigned&
getId()
const;
55 const std::string&
getName()
const;
57 const std::string&
getType()
const;
59 const std::set<std::string>&
getExec()
const;
63 std::string
getRel()
const;
95 const std::map<std::string, hvptr_t>&
getInSet()
const;
97 const std::set<hvptr_t>&
getOutSet()
const;
103 void setNd(
const std::string& nd);
105 const std::string&
getNd()
const;
130 std::set<std::string>
getExec()
const;
161 void print(std::ostream& out);
193 std::string
rewrite(
char inType,
int inSuff,
char outType,
int outSuff);
204 std::map<std::string, hvptr_t>
_vars;
234 void print(std::ostream& out);
290 void addNext(
const std::string& i,
const std::string& s,
NodeRef* n);
321 std::map<std::string, struct Instr_t*>
_instrs;
323 std::map<std::string, struct Instr_t*>
_childs;
422 const std::string& addr,
int addrWidth,
426 const std::string& addr,
int addrWidth,
427 int idx,
int num)
const;
430 const std::string& addr,
431 const std::string& data,
int chunkSize,
432 int chunkNum,
int addrWidth,
int idx)
const;
435 const std::string& addr,
436 const std::string& data,
int chunkSize,
437 int chunkNum,
int addrWidth,
int idx)
const;
441 std::string
bvToString(
int val,
int width)
const;
448 std::string
addSuffix(
const std::string& name,
const int& idx)
const;
bool isITE(nptr_t n) const
Definition: bitvec.hpp:83
std::string getPred() const
void initMemOp(const MemOp *n, hvptr_t v)
std::map< std::string, struct Instr_t * > _instrs
Definition: horn.hpp:321
hcptr_t _curHc
Definition: horn.hpp:308
void addClause(hcptr_t c)
std::set< hvptr_t > _outs
Definition: horn.hpp:37
hvptr_t _var
Definition: horn.hpp:114
void addBvOp(const BitvectorOp *n, hvptr_t v)
std::set< std::string > _exec
Definition: horn.hpp:33
void initVarBv(hvptr_t v, nptr_t n)
void exportHorn(const std::string &fileName)
hvptr_t getEqVar(hvptr_t a, hvptr_t b)
std::set< hlptr_t > _body
Definition: horn.hpp:143
const std::set< hvptr_t > & getOutSet() const
hvptr_t _decodeFunc
Definition: horn.hpp:313
void mergeOutVars(hvptr_t v)
bool isLongBv(const int &w) const
void initBvVarInt(const BitvectorVar *n, hvptr_t v)
std::set< hcptr_t > _wrapClauses
Definition: horn.hpp:210
void declareRel(std::ostream &out)
std::map< std::string, struct Instr_t * > _childs
Definition: horn.hpp:323
void addMemOp(const MemOp *n, hvptr_t v)
void print(std::ostream &out)
std::string genStoreMemBlkExecBig(const std::string &mem, const std::string &addr, const std::string &data, int chunkSize, int chunkNum, int addrWidth, int idx) const
void initBoolConstInt(const BoolConst *n, hvptr_t v)
void initVarInt(hvptr_t v, nptr_t n)
void hornifyAll(const std::string &fileName)
HornLiteral(hvptr_t v, bool r=false, bool s=true)
std::string bvToString(mp_int_t val, int width) const
void genMemConstRules(const MemConst *n, hvptr_t v)
std::map< nptr_t, hvptr_t > _nVarMap
Definition: horn.hpp:304
void initBoolConst(const BoolConst *n, hvptr_t v)
HornTranslator(Abstraction *abs, const std::string &name)
void initBvConstInt(const BitvectorConst *n, hvptr_t v)
void addRewriteRule(hcptr_t C, char aType, int aSuff, char bType, int bSuff)
bool _rel
Definition: horn.hpp:118
std::string _name
Definition: horn.hpp:254
void initMemConst(const MemConst *n, hvptr_t v)
HornTranslator * _tr
Definition: horn.hpp:168
HornClause * hcptr_t
Definition: horn.hpp:21
void addBoolOp(const BoolOp *n, hvptr_t v)
bool _bvAsInt
Definition: horn.hpp:262
void update(const std::string &state, hvptr_t inArg, hvptr_t outArg)
void operator()(nptr_t n)
std::string genReadMemBlkExecLit(const std::string &mem, const std::string &addr, int addrWidth, int idx) const
std::map< hvptr_t, std::string > _mapIS
Definition: horn.hpp:172
void setExec(std::string s)
boost::multiprecision::cpp_int mp_int_t
Definition: common.hpp:9
void generateInterleaveMapping()
std::string _nd
Definition: horn.hpp:43
HornVar(const unsigned &id)
std::string genStoreMemBlkExecLit(const std::string &mem, const std::string &addr, const std::string &data, int chunkSize, int chunkNum, int addrWidth, int idx) const
void declareVar(std::ostream &out)
Definition: abstraction.hpp:31
void addBoolConst(const BoolConst *n, hvptr_t v)
void declareClause(std::ostream &out)
const std::string & getName() const
hvptr_t getConVar(hvptr_t c)
void configOutput(const std::string &state, hvptr_t arg)
std::map< std::string, hvptr_t > _mapSI
Definition: horn.hpp:176
std::set< hvptr_t > _dupls
Definition: horn.hpp:247
boost::shared_ptr< Node > nptr_t
Definition: node.hpp:24
std::string getRel() const
void depthFirstTraverse(nptr_t n)
std::map< std::string, hvptr_t > _mapSO
Definition: horn.hpp:178
void initBvOp(const BitvectorOp *n, hvptr_t v)
const std::set< std::string > & getExec() const
void setNd(const std::string &nd)
void addMemVar(const MemVar *n, hvptr_t v)
void addBvConst(const BitvectorConst *n, hvptr_t v)
void declareWrapClause(std::ostream &out)
std::set< std::string > _childInstrs
Definition: horn.hpp:315
unsigned _id
Definition: horn.hpp:27
void addInstr(const std::string &i, NodeRef *d)
void print(std::ostream &out)
void initMemVar(const MemVar *n, hvptr_t v)
void initBvVar(const BitvectorVar *n, hvptr_t v)
void allInterleaveMapping()
std::string _name
Definition: horn.hpp:29
hvptr_t hornifyNode(NodeRef *node, const std::string &ruleName)
HornDB * _db
Definition: horn.hpp:258
const std::map< std::string, hvptr_t > & getInSet() const
Definition: abstraction.hpp:21
void addWrapClause(hcptr_t c)
hcptr_t addClause(hvptr_t v=NULL)
int _bvMaxSize
Definition: horn.hpp:264
void initBoolOpInt(const BoolOp *n, hvptr_t v)
bool _sign
Definition: horn.hpp:116
HornRewriter(HornTranslator *tr, hvptr_t p)
Definition: bitvec.hpp:38
HornLiteral * hlptr_t
Definition: horn.hpp:20
void initVar(hvptr_t v, nptr_t n)
virtual ~HornTranslator()
std::map< std::string, hvptr_t > _nxtFuncs
Definition: horn.hpp:314
bool _const
Definition: horn.hpp:39
void initMemConstInt(const MemConst *n, hvptr_t v)
void setType(std::string s)
std::map< hvptr_t, std::string > _mapOS
Definition: horn.hpp:174
hvptr_t getOutVar() const
std::string addSuffix(const std::string &name, const int &idx) const
unsigned _varCnt
Definition: horn.hpp:302
void initMemVarInt(const MemVar *n, hvptr_t v)
void generateBlockingMapping()
void setName(std::string s)
hlptr_t _head
Definition: horn.hpp:145
std::string rewrite(char inType, int inSuff, char outType, int outSuff)
void setBvAsInt(bool bvAsInt)
void initBoolOp(const BoolOp *n, hvptr_t v)
bool _iteAsNode
Definition: horn.hpp:260
void initBoolVarInt(const BoolVar *n, hvptr_t v)
void addNext(const std::string &i, const std::string &s, NodeRef *n)
hvptr_t getRewriteVar(char inTy, int inSu, char outTy, int outSu)
const std::string & getNd() const
std::string genReadMemBlkExecBig(const std::string &mem, const std::string &addr, int addrWidth, int idx, int num) const
void initFuncVar(const FuncVar *n, hvptr_t v)
Abstraction * _abs
Definition: horn.hpp:256
void addOutVar(hvptr_t v)
void initBvConst(const BitvectorConst *n, hvptr_t v)
const std::string & getType() const
std::set< hvptr_t > _rels
Definition: horn.hpp:206
int _lvl
Definition: horn.hpp:41
Definition: bitvec.hpp:54
void initBoolVar(const BoolVar *n, hvptr_t v)
std::set< std::string > _states
Definition: horn.hpp:319
std::set< std::string > getExec() const
void initBvOpInt(const BitvectorOp *n, hvptr_t v)
std::string _name
Definition: horn.hpp:312
void addChildInstr(const std::string &c, const std::string &i, NodeRef *d)
hvptr_t copyVar(hvptr_t v, const int &idx)
void addMemConst(const MemConst *n, hvptr_t v)
const unsigned & getId() const
std::map< std::string, hvptr_t > _vars
Definition: horn.hpp:204
void mergeInVars(hvptr_t v)
std::set< hcptr_t > _clauses
Definition: horn.hpp:208
void initFuncVarInt(const FuncVar *n, hvptr_t v)
void generateMapping(const std::string &type)
std::map< std::string, hvptr_t > _ins
Definition: horn.hpp:35
void initMemOpInt(const MemOp *n, hvptr_t v)
const int & getLevel() const
void addBvVar(const BitvectorVar *n, hvptr_t v)
std::string getPred() const
std::string _type
Definition: horn.hpp:31
HornRewriter * generateLoopPredicate()
HornVar * hvptr_t
Definition: horn.hpp:17
std::map< std::string, hvptr_t > _sVarMap
Definition: horn.hpp:306
void addFuncVar(const FuncVar *n, hvptr_t v)
void setIteAsNode(bool iteAsNode)
void removeRel(hvptr_t v)
void removeVar(const std::string &n)
void setLevel(const int &lvl)
hvptr_t _pred
Definition: horn.hpp:170
void addBoolVar(const BoolVar *n, hvptr_t v)