Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@829 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Aug 14, 2002
1 parent f06c4b2 commit c992eae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions modeq/env.rml
Expand Up @@ -155,18 +155,18 @@ end

relation update_frame_v : (Env,Types.Var) => Env =

rule v=n
rule v = n
---------------------------
update_frame_v(FRAME(VAR(Types.VAR(v,_,_,_,_),b)::rest)::rest2,v2 as Types.VAR(n,_,_,_,_))
=> (FRAME((v2,NONE)::rest)::rest)
update_frame_v(FRAME((id,VAR(Types.VAR(v,_,_,_,_),b))::rest)::rest2,v2 as Types.VAR(n,_,_,_,_))
=> (FRAME((id,VAR(v2,NONE))::rest)::rest2)
rule not v = n &
update_frame_v(FRAME(rest)::rest2,v2) => FRAME(res)::reslst
-------------------------------------------
update_frame_V(FRAME(VAR(v,b)::rest)::rest2,v2 as Types.VAR(n,_,_,_,_))
=> FRAME(VAR(v,b)::res)::reslst
update_frame_v(FRAME((id,VAR(v1 as Types.VAR(v,_,_,_,_),b))::rest)::rest2,v2 as Types.VAR(n,_,_,_,_))
=> FRAME((id,VAR(v1,b))::res)::reslst


axiom extend_frame_v(FRAME([])::fs,v as Types.VAR(n,_,_,_,_),b)
axiom update_frame_v(FRAME([])::fs,v as Types.VAR(n,_,_,_,_))
=> (FRAME([])::fs)
end

Expand Down
10 changes: 6 additions & 4 deletions modeq/inst.rml
Expand Up @@ -970,6 +970,8 @@ relation update_variable_in_env: (Mod.Mod,Absyn.ComponentRef, Env.Env) => Env.En
attr as SCode.ATTR(ad,flow,acc,param,dir),
t,m))) &

Mod.elab_mod(env,Prefix.NOPRE,m) => m' &

Mod.lookup_modification_p(mods,t) => classmod &
Mod.lookup_comp_modification(mods,n) => mm &
Mod.merge(classmod,mm) => mod &
Expand All @@ -984,20 +986,20 @@ relation update_variable_in_env: (Mod.Mod,Absyn.ComponentRef, Env.Env) => Env.En
(** The variable declaration and the (optional) equation *)
(** modification are inspected for array dimensions. *)

elab_arraydim(env2,ad,eq) => dims &
elab_arraydim(env,ad,eq) => dims &

Debug.fprintln ("insttr", "arraydim elabed") &
Debug.fprint("peter2","inst_var, env =") &
Debug.fcall("peter2",Env.print_env, cenv) &
Debug.fcall("peter2",Env.print_env, env) &
(** Instantiate the component *)
inst_var(cenv,mod',pre,csets,n,cl,attr,dims,[],inst_dims)
=> (dae1,csets',ty) &
(** The environment is extended with the new variable *)
(** binding. *)

make_binding (env2,attr,eq) => binding &
make_binding (env,attr,eq) => binding &

Env.update_frame_v(env2,Types.VAR(n,Types.ATTR(flow,acc,param,dir),
Env.update_frame_v(env,Types.VAR(n,Types.ATTR(flow,acc,param,dir),
prot,ty,binding)) => env'

----------------------------------
Expand Down

0 comments on commit c992eae

Please sign in to comment.