|
| InstrLvlAbs (const std::string &name="", const InstrLvlAbsPtr &parent=nullptr) |
| Consturctor.
|
|
| ~InstrLvlAbs () |
| Default destructor.
|
|
bool | is_instr_lvl_abs () const |
| Return true if is InstrLvlAbs.
|
|
bool | is_spec () const |
| Return true if is specification (not implementation).
|
|
const InstrLvlAbsPtr | parent () const |
| Return the parent ILA.
|
|
const ExprMngrPtr | expr_mngr () const |
| Return the ast simplifier.
|
|
void | set_spec (bool spec) |
| Set the ILA to be specification if true.
|
|
void | set_expr_mngr (const ExprMngrPtr expr_mngr) |
| Update the ast simplifier.
|
|
size_t | input_num () const |
| Return the number of input variables.
|
|
size_t | state_num () const |
| Return the number of state variables.
|
|
size_t | instr_num () const |
| Return the number of instructions.
|
|
size_t | child_num () const |
| Return the number of child-ILAs.
|
|
size_t | init_num () const |
| Return the number of initial condition.
|
|
const ExprPtr | fetch () const |
| Return the fetch function.
|
|
const ExprPtr | valid () const |
| Return the valid function.
|
|
const ExprPtr | input (const size_t &i) const |
| Access the i-th input variable.
|
|
const ExprPtr | state (const size_t &i) const |
| Access the i-th state variable.
|
|
const InstrPtr | instr (const size_t &i) const |
| Access the i-th instruction.
|
|
const InstrLvlAbsPtr | child (const size_t &i) const |
| Access the i-th child-ILA.
|
|
const ExprPtr | init (const size_t &i) const |
| Access the i-th initial condition.
|
|
const ExprPtr | input (const std::string &name) const |
| Return the named input variable; return NULL if not registered.
|
|
const ExprPtr | state (const std::string &name) const |
| Return the named state variable; return NULL if not registered.
|
|
const InstrPtr | instr (const std::string &name) const |
| Return the named instruction; return NULL if not registered.
|
|
const InstrLvlAbsPtr | child (const std::string &name) const |
| Return the named child-ILA; return NULL if not registered.
|
|
const ExprPtr | find_input (const Symbol &name) const |
| Return the named input variable; return NULL if not registered.
|
|
const ExprPtr | find_state (const Symbol &name) const |
| Return the named state variable; return NULL if not registered.
|
|
const InstrPtr | find_instr (const Symbol &name) const |
| Return the named instruction; return NULL if not registered.
|
|
const InstrLvlAbsPtr | find_child (const Symbol &name) const |
| Return the named child-ILA; return NULL if not registered.
|
|
const InstrSeqPtr & | instr_seq () const |
|
void | AddInput (const ExprPtr &input_var) |
| Add one input variable to the ILA, and register to the simplifier. More...
|
|
void | AddState (const ExprPtr &state_var) |
| Add one state variable to the ILA, and register to the simplifier. More...
|
|
void | AddInit (const ExprPtr &cntr_expr) |
| Add one constraint to the initial condition, i.e. no contraint means arbitrary initial values to the state variables. More...
|
|
void | SetFetch (const ExprPtr &fetch_expr) |
| Set the fetch function, and simplify (if needed) by the simplifier. More...
|
|
void | SetValid (const ExprPtr &valid_expr) |
| Set the valid function, and simplify (if needed) by the simplifier. More...
|
|
void | AddInstr (const InstrPtr &instr) |
| Add one instruction to the ILA, and simplify (if needed). Note that only fully constructed instruction can be added. More...
|
|
void | AddChild (const InstrLvlAbsPtr &child) |
| Add one ILA to the child list. No simplification between ILAs. More...
|
|
const ExprPtr | NewBoolInput (const std::string &name) |
| Create one Boolean variable and register as an input. More...
|
|
const ExprPtr | NewBvInput (const std::string &name, const int &bit_width) |
| Create one Bitvector variable and register as an input. More...
|
|
const ExprPtr | NewMemInput (const std::string &name, const int &addr_width, const int &data_width) |
| Create one Memory variable and register as an input. More...
|
|
const ExprPtr | NewBoolState (const std::string &name) |
| Create one Boolean variable and register as a state. More...
|
|
const ExprPtr | NewBvState (const std::string &name, const int &bit_width) |
| Create one Bitvector variable and register as a state. More...
|
|
const ExprPtr | NewMemState (const std::string &name, const int &addr_width, const int &data_width) |
| Create one Memory variable and register as a state. More...
|
|
const ExprPtr | NewBoolFreeVar (const std::string &name) |
| Create one free Boolean variable. More...
|
|
const ExprPtr | NewBvFreeVar (const std::string &name, const int &bit_width) |
| Create one free bit-vector variable. More...
|
|
const ExprPtr | NewMemFreeVar (const std::string &name, const int &addr_width, const int &data_width) |
| Create one free Memory variable. More...
|
|
const InstrPtr | NewInstr (const std::string &name="") |
| Create and register one instruction. More...
|
|
const InstrLvlAbsPtr | NewChild (const std::string &name) |
| Create and register one child-ILA. More...
|
|
void | ForceSetFetch (const ExprPtr &fetch_expr) |
| Set the fetch function no matter if is already set. More...
|
|
void | ForceSetValid (const ExprPtr &valid_expr) |
| Set the valid function no matter if is already set. More...
|
|
void | AddSeqTran (const InstrPtr &src, const InstrPtr &dst, const ExprPtr &cnd) |
| Define instruction sequencing by adding a transition edge. More...
|
|
std::string | GetRootName () const |
| Return the ancestor names in sequence.
|
|
std::ostream & | Print (std::ostream &out) const |
| Output stream function.
|
|
template<class F > |
void | DepthFirstVisit (F &func) const |
| Templated visitor: visit each child-ILA in a depth-first order.
|
|
template<class F > |
void | DepthFirstVisitPrePost (F &func) const |
| Templated visitor: visit each child-ILA in a depth-first order and apply the function object F pre/pose on it.
|
|
| Object () |
| Default constructor.
|
|
| Object (const std::string &name) |
| Constructor with string name.
|
|
virtual | ~Object () |
| Default destructor.
|
|
const Symbol & | name () const |
| Get the symbol (name).
|
|
virtual bool | is_instr () const |
| Is type Instr.
|
|
virtual bool | is_ast () const |
| Is type Ast.
|
|
The class of Instruction-Level Abstraction (ILA). An ILA contains:
- a set of state variables
- a set of input variables
- the set constraints for initial conditiona
- the valid function
- the fetch function
- the set of instructions
- the decode function
- a set of update functions
- the set of child-ILAs
- the child-instruction sequencing (if not parent)