Skip to content

Commit

Permalink
Fixed bug in setExtendsModifierValue and setComponentModifierValue
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1783 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed May 11, 2005
1 parent f099373 commit db5de8c
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions modeq/Interactive.rml
Expand Up @@ -478,18 +478,18 @@ end
relation evaluate_graphical_api: (InteractiveStmts, InteractiveSymbolTable) =>
(string, InteractiveSymbolTable) =

rule set_extends_modifier_value(class,ident,subident,mod,p)
rule set_extends_modifier_value(class,Absyn.CREF_IDENT(ident,[]),
subident,mod,p)
=> (newp,resstr)
--------------------------------------------
evaluate_graphical_api(
ISTMTS([IEXP(Absyn.CALL(
Absyn.CREF_IDENT("setExtendsModifierValue",_),
Absyn.FUNCTIONARGS([Absyn.CREF(class),
Absyn.CREF(ident),
Absyn.CREF(subident),
Absyn.CREF(Absyn.CREF_QUAL(ident,_,subident)),
Absyn.CODE(Absyn.C_MODIFICATION(mod))
],[])))],_
),
),
st as SYMBOLTABLE(p,s,ic,iv,cf))
=> (resstr,SYMBOLTABLE(newp,s,ic,iv,cf))

Expand Down Expand Up @@ -538,6 +538,18 @@ relation evaluate_graphical_api: (InteractiveStmts, InteractiveSymbolTable) =>
),
st as SYMBOLTABLE(p,s,ic,iv,cf)) => (resstr,st)

rule (* expressions *)
set_parameter_value(class,ident,exp,p) => (p',resstr)
--------------------------------------------
evaluate_graphical_api(
ISTMTS([IEXP(Absyn.CALL(
Absyn.CREF_IDENT("setComponentModifierValue",_),
Absyn.FUNCTIONARGS([Absyn.CREF(class),
Absyn.CREF(ident as Absyn.CREF_IDENT(_,_)),
Absyn.CODE(Absyn.C_EXPRESSION(exp))
],[])))],_),
st as SYMBOLTABLE(p,s,ic,iv,cf)) => (resstr,SYMBOLTABLE(p',s,ic,iv,cf))

rule (* special case for clearing modifier *)
set_component_modifier(class,ident,Absyn.CREF_IDENT("",[]),mod,p)
=> (p',resstr)
Expand Down

0 comments on commit db5de8c

Please sign in to comment.