Skip to content

Commit

Permalink
added more functionality to tornado. Generation of hierarhical models
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1407 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x02lucpo committed Jan 20, 2005
1 parent 6c603cd commit 3bdc514
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 53 deletions.
13 changes: 7 additions & 6 deletions modeq/daelow.rml
Expand Up @@ -542,21 +542,22 @@ relation dump_vars: Var list => ()=
axiom dump_vars [] => ()

rule DAE.dump_direction_str dir => dirstr & print dirstr & print " " &
Exp.print_component_ref_str(cr) => str &
Exp.print_component_ref_str(cr) => str &
print str & print ":" & dump_kind kind &

print "= " & Exp.print_exp_str e => s & print s & print ",\n " &
Absyn.path_string(path) => path_str &
print "= " & Exp.print_exp_str e => s & print s & print(" ") & print(path_str) & print ",\n " &
dump_vars(xs)
-------------
dump_vars(VAR(cr,kind,dir,_,SOME(e),_,_,_,_,_,_)::xs)
dump_vars(VAR(cr,kind,dir,_,SOME(e),_,_,_,_,_,path)::xs)

rule DAE.dump_direction_str dir => dirstr & print dirstr & print " " &
Exp.print_component_ref_str(cr) => str &
print str & print ":" & dump_kind kind &
Absyn.path_string(path) => path_str &
print str & print ":" & dump_kind kind & print(" ") & print(path_str) &
print ",\n " &
dump_vars(xs)
-------------
dump_vars(VAR(cr,kind,dir,_,NONE,_,_,_,_,_,_)::xs)
dump_vars(VAR(cr,kind,dir,_,NONE,_,_,_,_,_,path)::xs)
end

(** relation: dump_kind
Expand Down
9 changes: 7 additions & 2 deletions modeq/interactive.rml
Expand Up @@ -82,7 +82,10 @@ module Interactive:


relation get_elementitems_in_class: (Absyn.Class) => Absyn.ElementItem list
relation get_components_in_class: (Absyn.Class) => Absyn.Element list
relation get_classnames_in_elts: (Absyn.ElementItem list) => string list
relation get_component_name_and_type_and_comment: (Absyn.Element,Env.Env) => string list
relation get_components: (Absyn.ComponentRef,Absyn.Program) => string
end


Expand Down Expand Up @@ -3544,7 +3547,8 @@ relation get_components_name_and_type_and_comment2: (Absyn.Element list, Env.Env
end

(** relation: get_component_name_and_type_and_comment
** This relation takes an `Element' and returns a list of strings of comma separated values of the
** This relation takes an `Element' and returns a list of strings
** of comma separated values of the
** type and name and comment of the component, e.g. 'Resistor,R1, "comment"'
** or 'Resistor,R1,"comment1",R2,"comment2"'
** If Element is not a component, the empty string is returned
Expand Down Expand Up @@ -3586,7 +3590,8 @@ end


(** relation_get_componentitems_name
** This relation takes a `ComponentItems' list and returns a comma separated list of all
** This relation takes a `ComponentItems' list and returns a
** comma separated list of all
** component names and comments (if any).
**)
relation get_componentitems_name: Absyn.ComponentItem list => string list =
Expand Down

0 comments on commit 3bdc514

Please sign in to comment.