ilasynth
1.0
ILASynth: Template-based ILA Synthesis Engine
|
#include <abstraction.hpp>
Classes | |
struct | assump_collector_t |
struct | uabstraction_t |
Public Types | |
enum | state_t { INP, REG, BIT, MEM, FUN } |
typedef std::map< std::string, uabstraction_t > | uabs_map_t |
Public Member Functions | |
Abstraction (const std::string &name) | |
Abstraction (Abstraction *parent, const std::string &name) | |
~Abstraction () | |
const std::string & | getName () const |
NodeRef * | addInp (const std::string &name, int width) |
NodeRef * | addBit (const std::string &name) |
NodeRef * | addReg (const std::string &name, int width) |
NodeRef * | addMem (const std::string &name, int addrW, int dataW) |
NodeRef * | addFun (const std::string &name, int retW, const py::list &l) |
NodeRef * | getInp (const std::string &name) |
NodeRef * | getBit (const std::string &name) |
NodeRef * | getReg (const std::string &name) |
NodeRef * | getMem (const std::string &name) |
NodeRef * | getFun (const std::string &name) |
NodeRef * | getStage (const std::string &name) |
void | addVar (nptr_t &nref) |
void | setInit (const std::string &name, NodeRef *n) |
NodeRef * | getInit (const std::string &name) const |
void | setIpred (const std::string &name, NodeRef *n) |
NodeRef * | getIpred (const std::string &name) const |
void | setNext (const std::string &name, NodeRef *n) |
NodeRef * | getNext (const std::string &name) const |
NodeRef * | getNextI (const std::string &name, int i) const |
AbstractionWrapper * | addUAbs (const std::string &name, NodeRef *valid) |
AbstractionWrapper * | getUAbs (const std::string &name) |
void | connectUInst (const std::string &name, const abstraction_ptr_t &uabs) |
NodeRef * | getFetchExpr () const |
void | setFetchExpr (NodeRef *expr) |
NodeRef * | getFetchValid () const |
nptr_t | getFetchValidNode () const |
void | setFetchValid (NodeRef *expr) |
void | setDecodeExpressions (const py::list &l) |
py::list | getDecodeExpressions () const |
const nptr_vec_t & | getDecodeNodes () const |
void | addAssumption (NodeRef *expr) |
py::list | getAllAssumptions () const |
void | synthesizeAll (PyObject *fun) |
void | synthesizeReg (const std::string &name, PyObject *fun) |
NodeRef * | synthesizeElement (const std::string &name, NodeRef *expr, PyObject *fun) |
void | exportOneToFile (NodeRef *node, const std::string &fileName) const |
void | exportListToFile (const py::list &l, const std::string &fileName) const |
void | exportAllToFile (const std::string &fileName) const |
void | exportAllToStream (std::ofstream &out) const |
void | generateVerilogToFile (const std::string &fileName) const |
void | generateVerilogToFile (const std::string &fileName, const std::string &topModName) const |
NodeRef * | importOneFromFile (const std::string &fileName) |
py::list | importListFromFile (const std::string &fileName) |
void | importAllFromFile (const std::string &fileName) |
void | importAllFromStream (std::ifstream &in, bool Clear) |
void | generateSimToFile (const std::string &fileName) const |
void | generateSimToDir (const std::string &dirName) const |
void | generateCbmcCtoFile (const std::string &fileName) const |
void | generateCbmcCtoDir (const std::string &dirName) const |
bool | areEqual (NodeRef *left, NodeRef *right) const |
bool | areEqualAssump (NodeRef *assump, NodeRef *left, NodeRef *right) |
bool | areEqualUnrolled (unsigned n, NodeRef *reg, NodeRef *exp) |
void | toBoogie (const std::string &filename) |
void | hornifyAll (const std::string &fileName) |
void | hornifyNode (NodeRef *node, const std::string &ruleName) |
void | generateHornMapping (const std::string &type) |
void | exportHornToFile (const std::string &fileName) |
void | hornifyIteAsNode (bool iteAsNode) |
void | hornifyBvAsInt (bool bvAsInt) |
void | addHornInstr (const std::string &i, NodeRef *d) |
void | addHornNext (const std::string &i, const std::string &s, NodeRef *n) |
void | addHornChild (const std::string &c, const std::string &i, NodeRef *d) |
const nmap_t & | getMems () const |
const nmap_t & | getInps () const |
const nmap_t & | getRegs () const |
const nmap_t & | getBits () const |
const nmap_t & | getFuns () const |
void | forEachAssump (assump_visitor_i &i) const |
void | getAllAssumptions (nptr_vec_t &assump_vec) const |
nptr_t | getFetchExprRef () const |
nptr_t | getFetchValidRef () const |
nptr_vec_t | getDecodeExprs () const |
const npair_t * | getMapEntry (const std::string &name) const |
bool | isInput (const std::string &name) const |
Static Public Member Functions | |
static int | getObjId () |
static NodeRef * | bvConstLong (py::long_ l, int width) |
static NodeRef * | bvConstInt (unsigned int l, int width) |
static NodeRef * | boolConstB (bool b) |
static NodeRef * | boolConstI (int b) |
static NodeRef * | boolConstL (py::long_ b) |
static NodeRef * | memConst (const MemValues &mv) |
static bool | bmc (unsigned n, Abstraction *a, NodeRef *r, bool init, NodeRef *initAssump) |
static bool | bmc (unsigned n1, Abstraction *a1, NodeRef *r1, unsigned n2, Abstraction *a2, NodeRef *r2) |
static bool | EQcheckSimple (Abstraction *a1, Abstraction *a2) |
Public Attributes | |
int | paramSyn |
int | reduceWhenImport |
VlgExportConfig | vlgExpConfig |
Protected Member Functions | |
void | initMap (nmap_t &from_m, nmap_t &to_m) |
void | extractModelValues (Z3ExprAdapter &c, z3::model &m, py::dict &result) |
NodeRef * | getVar (const nmap_t &m, const std::string &name) |
void | addVar (state_t st, nmap_t &m, nptr_t &n) |
nptr_t | _synthesize (const std::string &name, const nptr_vec_t &assumps, const nptr_t &expr, PyObject *pyfun) |
bool | checkAndInsertName (state_t st, const std::string &name) |
bool | doesNextExist (const nmap_t &m) const |
nmap_t * | getMap (const std::string &name, NodeRef *n) |
nmap_t * | getMap (const std::string &name) |
nmap_t::const_iterator | findInMap (const std::string &name) const |
nmap_t::iterator | findInMap (const std::string &name) |
nmap_t::const_iterator | findInMapNoExcept (const std::string &name) const |
nmap_t::iterator | findInMapNoExcept (const std::string &name) |
nmap_t::const_iterator | MapEnd () const |
nmap_t::iterator | MapEnd () |
Protected Attributes | |
Abstraction * | parent |
const std::string | name |
std::map< std::string, state_t > | names |
nmap_t | inps |
nmap_t | regs |
nmap_t | bits |
nmap_t | mems |
nmap_t | funs |
nptr_t | fetchExpr |
nptr_t | fetchValid |
nptr_vec_t | decodeExprs |
nptr_vec_t | assumps |
uabs_map_t | uabs |
Private Member Functions | |
CppSimGen * | generateSim (bool hier) const |
CVerifGen * | generateCBMCC (bool hier) const |
void | addVarToSimulator (CppSimGen *gen) const |
void | setUpdateToFunction (CppSimGen *gen, CppFun *fun, nptr_t valid, bool doHier=false) const |
Private Attributes | |
int | MAX_SYN_ITER |
FuncReduction | funcReducer |
HornTranslator * | _ht |
Static Private Attributes | |
static int | objCnt |
Friends | |
class | Synthesizer |
class | BoogieTranslator |
class | MicroUnroller |
class | AbstractionWrapper |
unsigned | DetermineUnrollBound (Abstraction *pAbs, const std::string &nodeName) |
typedef std::map<std::string, uabstraction_t> ilasynth::Abstraction::uabs_map_t |
ilasynth::Abstraction::Abstraction | ( | const std::string & | name | ) |
ilasynth::Abstraction::Abstraction | ( | Abstraction * | parent, |
const std::string & | name | ||
) |
ilasynth::Abstraction::~Abstraction | ( | ) |
|
protected |
void ilasynth::Abstraction::addAssumption | ( | NodeRef * | expr | ) |
NodeRef* ilasynth::Abstraction::addBit | ( | const std::string & | name | ) |
NodeRef* ilasynth::Abstraction::addFun | ( | const std::string & | name, |
int | retW, | ||
const py::list & | l | ||
) |
void ilasynth::Abstraction::addHornChild | ( | const std::string & | c, |
const std::string & | i, | ||
NodeRef * | d | ||
) |
void ilasynth::Abstraction::addHornInstr | ( | const std::string & | i, |
NodeRef * | d | ||
) |
void ilasynth::Abstraction::addHornNext | ( | const std::string & | i, |
const std::string & | s, | ||
NodeRef * | n | ||
) |
NodeRef* ilasynth::Abstraction::addInp | ( | const std::string & | name, |
int | width | ||
) |
NodeRef* ilasynth::Abstraction::addMem | ( | const std::string & | name, |
int | addrW, | ||
int | dataW | ||
) |
NodeRef* ilasynth::Abstraction::addReg | ( | const std::string & | name, |
int | width | ||
) |
AbstractionWrapper* ilasynth::Abstraction::addUAbs | ( | const std::string & | name, |
NodeRef * | valid | ||
) |
void ilasynth::Abstraction::addVar | ( | nptr_t & | nref | ) |
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
protected |
void ilasynth::Abstraction::connectUInst | ( | const std::string & | name, |
const abstraction_ptr_t & | uabs | ||
) |
|
protected |
|
static |
void ilasynth::Abstraction::exportAllToFile | ( | const std::string & | fileName | ) | const |
void ilasynth::Abstraction::exportAllToStream | ( | std::ofstream & | out | ) | const |
void ilasynth::Abstraction::exportHornToFile | ( | const std::string & | fileName | ) |
void ilasynth::Abstraction::exportListToFile | ( | const py::list & | l, |
const std::string & | fileName | ||
) | const |
void ilasynth::Abstraction::exportOneToFile | ( | NodeRef * | node, |
const std::string & | fileName | ||
) | const |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void ilasynth::Abstraction::forEachAssump | ( | assump_visitor_i & | i | ) | const |
|
private |
void ilasynth::Abstraction::generateCbmcCtoDir | ( | const std::string & | dirName | ) | const |
void ilasynth::Abstraction::generateCbmcCtoFile | ( | const std::string & | fileName | ) | const |
void ilasynth::Abstraction::generateHornMapping | ( | const std::string & | type | ) |
|
private |
void ilasynth::Abstraction::generateSimToDir | ( | const std::string & | dirName | ) | const |
void ilasynth::Abstraction::generateSimToFile | ( | const std::string & | fileName | ) | const |
void ilasynth::Abstraction::generateVerilogToFile | ( | const std::string & | fileName | ) | const |
void ilasynth::Abstraction::generateVerilogToFile | ( | const std::string & | fileName, |
const std::string & | topModName | ||
) | const |
py::list ilasynth::Abstraction::getAllAssumptions | ( | ) | const |
void ilasynth::Abstraction::getAllAssumptions | ( | nptr_vec_t & | assump_vec | ) | const |
NodeRef* ilasynth::Abstraction::getBit | ( | const std::string & | name | ) |
|
inline |
py::list ilasynth::Abstraction::getDecodeExpressions | ( | ) | const |
|
inline |
const nptr_vec_t& ilasynth::Abstraction::getDecodeNodes | ( | ) | const |
NodeRef* ilasynth::Abstraction::getFetchExpr | ( | ) | const |
|
inline |
NodeRef* ilasynth::Abstraction::getFetchValid | ( | ) | const |
nptr_t ilasynth::Abstraction::getFetchValidNode | ( | ) | const |
|
inline |
NodeRef* ilasynth::Abstraction::getFun | ( | const std::string & | name | ) |
|
inline |
NodeRef* ilasynth::Abstraction::getInit | ( | const std::string & | name | ) | const |
NodeRef* ilasynth::Abstraction::getInp | ( | const std::string & | name | ) |
|
inline |
NodeRef* ilasynth::Abstraction::getIpred | ( | const std::string & | name | ) | const |
|
protected |
const npair_t* ilasynth::Abstraction::getMapEntry | ( | const std::string & | name | ) | const |
NodeRef* ilasynth::Abstraction::getMem | ( | const std::string & | name | ) |
|
inline |
|
inline |
NodeRef* ilasynth::Abstraction::getNext | ( | const std::string & | name | ) | const |
NodeRef* ilasynth::Abstraction::getNextI | ( | const std::string & | name, |
int | i | ||
) | const |
|
static |
NodeRef* ilasynth::Abstraction::getReg | ( | const std::string & | name | ) |
|
inline |
NodeRef* ilasynth::Abstraction::getStage | ( | const std::string & | name | ) |
AbstractionWrapper* ilasynth::Abstraction::getUAbs | ( | const std::string & | name | ) |
void ilasynth::Abstraction::hornifyAll | ( | const std::string & | fileName | ) |
void ilasynth::Abstraction::hornifyBvAsInt | ( | bool | bvAsInt | ) |
void ilasynth::Abstraction::hornifyIteAsNode | ( | bool | iteAsNode | ) |
void ilasynth::Abstraction::hornifyNode | ( | NodeRef * | node, |
const std::string & | ruleName | ||
) |
void ilasynth::Abstraction::importAllFromFile | ( | const std::string & | fileName | ) |
void ilasynth::Abstraction::importAllFromStream | ( | std::ifstream & | in, |
bool | Clear | ||
) |
py::list ilasynth::Abstraction::importListFromFile | ( | const std::string & | fileName | ) |
NodeRef* ilasynth::Abstraction::importOneFromFile | ( | const std::string & | fileName | ) |
|
inline |
|
protected |
|
protected |
void ilasynth::Abstraction::setDecodeExpressions | ( | const py::list & | l | ) |
void ilasynth::Abstraction::setFetchExpr | ( | NodeRef * | expr | ) |
void ilasynth::Abstraction::setFetchValid | ( | NodeRef * | expr | ) |
void ilasynth::Abstraction::setInit | ( | const std::string & | name, |
NodeRef * | n | ||
) |
void ilasynth::Abstraction::setIpred | ( | const std::string & | name, |
NodeRef * | n | ||
) |
void ilasynth::Abstraction::setNext | ( | const std::string & | name, |
NodeRef * | n | ||
) |
|
private |
void ilasynth::Abstraction::synthesizeAll | ( | PyObject * | fun | ) |
NodeRef* ilasynth::Abstraction::synthesizeElement | ( | const std::string & | name, |
NodeRef * | expr, | ||
PyObject * | fun | ||
) |
void ilasynth::Abstraction::synthesizeReg | ( | const std::string & | name, |
PyObject * | fun | ||
) |
void ilasynth::Abstraction::toBoogie | ( | const std::string & | filename | ) |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprivate |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
staticprivate |
int ilasynth::Abstraction::paramSyn |
|
protected |
int ilasynth::Abstraction::reduceWhenImport |
|
protected |
|
protected |
VlgExportConfig ilasynth::Abstraction::vlgExpConfig |