Skip to content

Commit

Permalink
Added eq_cref
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@198 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x97davka committed Mar 17, 1998
1 parent a4112c6 commit 585de6b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions modeq/exp.rml
Expand Up @@ -42,6 +42,7 @@ module Exp:

relation path_string : Path => string
relation extend_cref : (ComponentRef, Ident, Subscript list) => ComponentRef
relation eq_cref : (ComponentRef, ComponentRef) => ()

end

Expand All @@ -66,3 +67,38 @@ relation extend_cref : (ComponentRef, Ident, Subscript list) => ComponentRef =
extend_cref(x::xs, i, s) => x::xs'

end

relation eq_subscript : (Subscript, Subscript) => () =

axiom eq_subscript(NOSUB,NOSUB)

(* FIXME *)
rule print "# Subscript expression\n" &
fail
--------------------------------
eq_subscript(_,_)

end

relation eq_subscripts : (Subscript list, Subscript list) => () =

axiom eq_subscripts([],[])

rule eq_subscript(s1,s2) &
eq_subscripts(ss1,ss2)
----------------------
eq_subscripts(s1::ss1, s2::ss2)

end

relation eq_cref : (ComponentRef, ComponentRef) => () =

axiom eq_cref([],[])

rule n1 = n2 &
eq_subscripts(s1,s2) &
eq_cref(c1,c2)
-------------------
eq_cref((n1,s1)::c1, (n2,s2)::c2)

end

0 comments on commit 585de6b

Please sign in to comment.