Changes to make it work: Please run diff against the .mo files I fixed because i haven't put all the changes here. Algorithm.mo: - should import: protected import OpenModelica.Compiler.Absyn (because of a return type) + this doesn't happen in RML as the types are inferred. Builtin.mo: - Types.UNBOUND should be: Types.UNBOUND() Ceval.mo: - ceval_range_real2: Values.REAL(start) :: l instead of Values.REAL(start::l) - ceval_range2 Values.INTEGER(start :: l) should be Values.INTEGER(start) :: l - ceval_function Prefix.NOPRE should be Prefix.NOPRE() Inst.TOP_CALL should be Ist.TOPC_CALL() - ceval_interactive_functions and all the others Types.UNBOUND should be Types.UNBOUND() Connect.mo: - merge: EQU(cs)::ss_1 instead of EQU(cs::ss_1) FLOW(cs)::ss_1 instead of FLOW(cs::ss_1) DAELow.mo: - print_equation_no: true = print_equation(eq); should be print_equation(eq); - print_equations: true = print_equations(rest, dae) should be print_equations(rest, dae); true = print_equation_no(n, dae) should be print_equation_no(n, dae); - add_variables_to_env: SCode.RW should be SCode.RW() SCode.CONST should be SCode.CONST() Types.UNBOUND should be Types.UNBOUND() Env.mo: - tree_new: should be: matchcontinue() case () then ... or out_bintree := TREENODE(NONE, NONE, NONE); Inst.mo: - mktype: all the then (Types.T_XXX(xx), somep) should be ((Types.T_XXX(xx), somep)) - compatible_arraydim: DIMINT(x::l) should be DIMINT(x)::l - elab_arraydim_type: SOME(DIMINT(i) :: l) should be SOME(DIMINT(i)) :: l - elab_arraydim_decl: SOME(DIMEXP(Exp.INDEX(e),NONE) :: l); should be SOME(DIMEXP(Exp.INDEX(e),NONE)) :: l; Interactive.mo: - replace_public_list: should be Absyn.PUBLIC(newpublst)::rest_1 instead of Absyn.PUBLIC(newpublst::rest_1) - delete_public_list: should be Absyn.PUBLIC(newpublst)::rest_1 instead of Absyn.PUBLIC(newpublst::rest_1) - replace_equation_list: should have Absyn.EQUATIONS(newpublst) :: rest instead of Absyn.EQUATIONS(newpublst :: rest) Static.mo: - n_dim_array should return: ((Types.T_ARRAY(Types.DIM(NONE),t_1),NONE)); instead of (Types.T_ARRAY(Types.DIM(NONE),t_1),NONE); - elab_code_type should return: (of what is now) VarTransform.mo: - empty_replacements: should be: matchcontinue () case () ....