Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

alpha renaming

  • Loading branch information...
commit 174b0f59665839df1f68b62ed17c14b96192a0c9 1 parent 76494a8
Marco Pensallorto authored
10 src/model/model.cc
View
@@ -50,7 +50,7 @@ Module::Module(const Expr_ptr name)
, f_trans()
{}
-void Module::add_localVar(Expr_ptr name, IVariable_ptr var)
+void Module::add_var(Expr_ptr name, IVariable_ptr var)
{
DEBUG << "Module " << (*this)
<< ", added local var " << var << endl;
@@ -58,7 +58,7 @@ void Module::add_localVar(Expr_ptr name, IVariable_ptr var)
IVariable_ptr>(FQExpr(expr(), name), var));
}
-void Module::add_localDef(Expr_ptr name, IDefine_ptr body)
+void Module::add_def(Expr_ptr name, IDefine_ptr body)
{
DEBUG << "Module " << (*this)
<< ", added local def " << name << endl;
@@ -66,7 +66,7 @@ void Module::add_localDef(Expr_ptr name, IDefine_ptr body)
IDefine_ptr>(FQExpr(expr(), name), body));
}
-void Module::add_localConst(Expr_ptr name, IConstant_ptr k)
+void Module::add_const(Expr_ptr name, IConstant_ptr k)
{
DEBUG << "Module " << (*this)
<< ", added local const " << name << endl;
@@ -114,7 +114,7 @@ SymbIter::SymbIter(IModel& model, Expr_ptr formula)
IModule& module = * (*mi).second;
{ /* defines */
- Defines defs = module.get_localDefs();
+ Defines defs = module.defs();
for (Defines::const_iterator di = defs.begin();
di != defs.end(); ++ di) {
@@ -124,7 +124,7 @@ SymbIter::SymbIter(IModel& model, Expr_ptr formula)
}
{ /* variables */
- Variables vars = module.get_localVars();
+ Variables vars = module.vars();
for (Variables::const_iterator vi = vars.begin();
vi != vars.end(); ++ vi) {
45 src/model/model.hh
View
@@ -50,14 +50,14 @@ public:
virtual const Expr_ptr expr() const =0;
// Symbols management
- virtual const Variables& get_localVars() const =0;
- virtual void add_localVar(Expr_ptr expr, IVariable_ptr var) =0;
+ virtual const Variables& vars() const =0;
+ virtual void add_var(Expr_ptr expr, IVariable_ptr var) =0;
- virtual const Constants& get_localConsts() const =0;
- virtual void add_localConst(Expr_ptr expr, IConstant_ptr k) =0;
+ virtual const Constants& consts() const =0;
+ virtual void add_const(Expr_ptr expr, IConstant_ptr k) =0;
- virtual const Defines& get_localDefs() const =0;
- virtual void add_localDef(Expr_ptr expr, IDefine_ptr def) =0;
+ virtual const Defines& defs() const =0;
+ virtual void add_def(Expr_ptr expr, IDefine_ptr def) =0;
// Finite State Machine definition
virtual const ExprVector& init() const =0;
@@ -97,16 +97,16 @@ public:
bool is_main() const
{ return f_name == ExprMgr::INSTANCE().make_main(); }
- void add_localVar(Expr_ptr name, IVariable_ptr var);
- const Variables& get_localVars() const
+ void add_var(Expr_ptr name, IVariable_ptr var);
+ const Variables& vars() const
{ return f_localVars; }
- void add_localDef(Expr_ptr name, IDefine_ptr def);
- const Defines& get_localDefs() const
+ void add_def(Expr_ptr name, IDefine_ptr def);
+ const Defines& defs() const
{ return f_localDefs; }
- void add_localConst(Expr_ptr name, IConstant_ptr k);
- const Constants& get_localConsts() const
+ void add_const(Expr_ptr name, IConstant_ptr k);
+ const Constants& consts() const
{ return f_localConsts; }
void add_init(Expr_ptr expr);
@@ -166,27 +166,6 @@ public:
};
-class StateVar : public Variable {
-public:
- StateVar (const Expr_ptr ctx, const Expr_ptr name, Type_ptr type_)
- : Variable(ctx, name, type_)
- {}
-};
-
-class InputVar : public Variable {
-public:
- InputVar (const Expr_ptr ctx, const Expr_ptr name, Type_ptr type_)
- : Variable(ctx, name, type_)
- {}
-};
-
-class FrozenVar: public Variable {
-public:
- FrozenVar (const Expr_ptr ctx, const Expr_ptr name, Type_ptr type_)
- : Variable(ctx, name, type_)
- {}
-};
-
class Constant : public IConstant {
const Expr_ptr f_ctx;
const Expr_ptr f_name;
2  src/model/model_mgr.cc
View
@@ -262,7 +262,7 @@ void ModelMgr::second_pass()
Expr_ptr ctx = module.expr();
// type inference: defines
- const Defines defines = module.get_localDefs();
+ const Defines defines = module.defs();
for (Defines::const_iterator define_eye = defines.begin();
define_eye != defines.end(); define_eye ++) {
6 src/model/resolver.cc
View
@@ -92,7 +92,7 @@ ISymbol_ptr Resolver::fetch_symbol(const Expr_ptr ctx, const Expr_ptr symb)
}
{ /* local consts */
- const Constants& cnts = module->get_localConsts();
+ const Constants& cnts = module->consts();
Constants::const_iterator citer = cnts.find(key);
if (citer != cnts.end()) {
return (*citer).second;
@@ -108,7 +108,7 @@ ISymbol_ptr Resolver::fetch_symbol(const Expr_ptr ctx, const Expr_ptr symb)
}
{ /* defines */
- const Defines& defs = module->get_localDefs();
+ const Defines& defs = module->defs();
Defines::const_iterator diter = defs.find(key);
if (diter != defs.end()) {
return (*diter).second;
@@ -116,7 +116,7 @@ ISymbol_ptr Resolver::fetch_symbol(const Expr_ptr ctx, const Expr_ptr symb)
}
{ /* variables */
- const Variables& vars = module->get_localVars();
+ const Variables& vars = module->vars();
Variables::const_iterator viter = vars.find(key);
if (viter != vars.end()) {
return (*viter).second;
8 src/parser/grammars/smv.g
View
@@ -260,7 +260,7 @@ module_decl
;
fsm_var_decl
- : 'VAR' fsm_var_decl_body
+ : 'VAR' fsm_var_decl_body
;
fsm_enum_decl
@@ -310,8 +310,8 @@ fsm_var_decl_clause
assert(NULL != tp);
for (expr_iter = ev.begin(); expr_iter != ev.end(); ++ expr_iter) {
Expr_ptr id = (*expr_iter);
- IVariable_ptr var = new StateVar($smv::module->expr(), id, tp);
- $smv::module->add_localVar(id, var);
+ IVariable_ptr var = new Variable($smv::module->expr(), id, tp);
+ $smv::module->add_var(id, var);
}
}
;
@@ -329,7 +329,7 @@ fsm_define_decl_clause
: id=identifier ':=' body=toplevel_expression
{
IDefine_ptr def = new Define($smv::module->expr(), id, body);
- $smv::module->add_localDef(id, def);
+ $smv::module->add_def(id, def);
}
;
Please sign in to comment.
Something went wrong with that request. Please try again.