Skip to content

Commit

Permalink
Changed so top level inputs are not part of model equations, but inst…
Browse files Browse the repository at this point in the history
…ead must be given as input "parameters" in input file.

Also removed errobuf flag so error printing is allways done if main fails.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1821 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Peter Aronsson committed Jun 21, 2005
1 parent 089d6f7 commit 871cd6c
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 91 deletions.
6 changes: 3 additions & 3 deletions Compiler/Ceval.rml
Expand Up @@ -1047,7 +1047,7 @@ relation ceval_interactive_functions: (Env.Env, Exp.Exp, Interactive.Interactive
-------------------------------
ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("clearCache"),[],_,_),st as Interactive.SYMBOLTABLE(p,fp,ic,iv,cf)) => (Values.BOOL(true),newst)

rule Dump.unparse_str(p,false) => str
rule Dump.unparse_str(p(*,false*) ) => str
-------------------
ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("list"),[],_,_),st as Interactive.SYMBOLTABLE(p,sp,ic,iv,cf)) => (Values.STRING(str),st)

Expand Down Expand Up @@ -1378,7 +1378,7 @@ relation ceval_interactive_functions: (Env.Env, Exp.Exp, Interactive.Interactive

rule Static.component_ref_to_path(cr) => classpath &
Interactive.get_contained_class_and_file(classpath,p) => (p',filename) &
Dump.unparse_str(p',true) => str &
Dump.unparse_str(p'(*,true*)) => str &
System.write_file(filename,str)
--------------------------
ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("save"),[Exp.CREF(cr,_)],_,_),st as Interactive.SYMBOLTABLE(p,sp,ic,iv,cf))
Expand All @@ -1387,7 +1387,7 @@ relation ceval_interactive_functions: (Env.Env, Exp.Exp, Interactive.Interactive
axiom ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("save"),[Exp.CREF(cr,_)],_,_),st as Interactive.SYMBOLTABLE(p,sp,ic,iv,cf))
=> (Values.BOOL(false),st)

rule Dump.unparse_str(p,true) => str &
rule Dump.unparse_str(p(*,true*)) => str &
System.write_file(filename,str)
--------------------------
ceval_interactive_functions (env, Exp.CALL(Absyn.IDENT("saveAll"),[Exp.SCONST(filename)],_,_),st as Interactive.SYMBOLTABLE(p,sp,ic,iv,cf))
Expand Down
12 changes: 7 additions & 5 deletions Compiler/DAE.rml
Expand Up @@ -127,6 +127,7 @@ module DAE:
with "Algorithm.rml"
with "Types.rml"
with "Values.rml"
with "ClassInf.rml"

type Ident = string
type InstDims = Exp.Subscript list
Expand All @@ -136,7 +137,7 @@ module DAE:
datatype VarKind = VARIABLE | DISCRETE | PARAM | CONST

datatype Type = REAL | INT | BOOL | STRING | ENUM | ENUMERATION of string list
datatype Flow = FLOW | NON_FLOW
datatype Flow = FLOW | NON_FLOW | NON_CONNECTOR

datatype VarDirection = INPUT | OUTPUT | BIDIR

Expand Down Expand Up @@ -255,7 +256,7 @@ module DAE:
relation find_element: (Element list, Element => ()) => Element option
relation build_gr_strlist : ('a list, 'a => string, int) => (string list, 'a list)
relation get_variable_bindings_str: Element list => string
relation to_flow: bool => Flow
relation to_flow: (bool,ClassInf.State) => Flow
relation get_flow_variables: Element list => Exp.ComponentRef list
relation dae_to_record_value: (Absyn.Path,Element list, bool (*impl*) ) => Values.Value
relation to_modelica_form: (DAElist) => DAElist
Expand Down Expand Up @@ -1965,11 +1966,12 @@ relation get_bindings_str: Element list => string =
end


relation to_flow: bool => Flow =
relation to_flow: (bool,ClassInf.State) => Flow =

axiom to_flow(true) => FLOW
axiom to_flow(false) => NON_FLOW
axiom to_flow(true,_) => FLOW

axiom to_flow(_,ClassInf.CONNECTOR(_)) => NON_FLOW
axiom to_flow(_,_) => NON_CONNECTOR
end

relation get_flow_variables: Element list => Exp.ComponentRef list =
Expand Down

0 comments on commit 871cd6c

Please sign in to comment.