#ifdef OMC_BASE_FILE
#define OMC_FILE OMC_BASE_FILE
#else
#define OMC_FILE "Interactive.c"
#endif
#include "omc_simulation_settings.h"
#include "Interactive.h"
#define _OMC_LIT0_data ".moc"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,4,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
#define _OMC_LIT1_data "Access"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,6,_OMC_LIT1_data);
#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
#define _OMC_LIT2_data "all"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,3,_OMC_LIT2_data);
#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT2}};
#define _OMC_LIT3 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT3}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT5,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT4}};
#define _OMC_LIT5 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT5)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT5,MMC_IMMEDIATE(MMC_TAGFIXNUM(9))}};
#define _OMC_LIT6 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data "documentation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,13,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT8,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT7}};
#define _OMC_LIT8 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT8)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT8}};
#define _OMC_LIT9 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT10,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT9}};
#define _OMC_LIT10 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT10)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT10,MMC_IMMEDIATE(MMC_TAGFIXNUM(3))}};
#define _OMC_LIT11 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)
#define _OMC_LIT12_data "packageDuplicate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT12,16,_OMC_LIT12_data);
#define _OMC_LIT12 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT12)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT13,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT12}};
#define _OMC_LIT13 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT13)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT14,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT13}};
#define _OMC_LIT14 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT14)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT15,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT14}};
#define _OMC_LIT15 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT15)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT16,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT15,MMC_IMMEDIATE(MMC_TAGFIXNUM(8))}};
#define _OMC_LIT16 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "Access.packageDuplicate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,23,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
#define _OMC_LIT18_data "packageText"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,11,_OMC_LIT18_data);
#define _OMC_LIT18 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT18)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT19,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT18}};
#define _OMC_LIT19 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT19)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT20,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT19}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT20}};
#define _OMC_LIT21 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT21,MMC_IMMEDIATE(MMC_TAGFIXNUM(7))}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
#define _OMC_LIT23_data "Access.packageText"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,18,_OMC_LIT23_data);
#define _OMC_LIT23 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)
#define _OMC_LIT24_data "nonPackageDuplicate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT24,19,_OMC_LIT24_data);
#define _OMC_LIT24 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT24}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT25}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT27,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT26}};
#define _OMC_LIT27 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT27)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT28,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT27,MMC_IMMEDIATE(MMC_TAGFIXNUM(6))}};
#define _OMC_LIT28 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT28)
#define _OMC_LIT29_data "Access.nonPackageDuplicate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT29,26,_OMC_LIT29_data);
#define _OMC_LIT29 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT29)
#define _OMC_LIT30_data "nonPackageText"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT30,14,_OMC_LIT30_data);
#define _OMC_LIT30 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT30)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT31,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT30}};
#define _OMC_LIT31 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT31)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT32,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT31}};
#define _OMC_LIT32 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT32)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT33,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT32}};
#define _OMC_LIT33 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT33,MMC_IMMEDIATE(MMC_TAGFIXNUM(5))}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
#define _OMC_LIT35_data "Access.nonPackageText"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT35,21,_OMC_LIT35_data);
#define _OMC_LIT35 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT35)
#define _OMC_LIT36_data "diagram"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT36,7,_OMC_LIT36_data);
#define _OMC_LIT36 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT36)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT37,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT36}};
#define _OMC_LIT37 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT37)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT38,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT37}};
#define _OMC_LIT38 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT38)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT39,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT38}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT39,MMC_IMMEDIATE(MMC_TAGFIXNUM(4))}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "Access.diagram"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,14,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
#define _OMC_LIT42_data "Access.documentation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT42,20,_OMC_LIT42_data);
#define _OMC_LIT42 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "icon"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,4,_OMC_LIT43_data);
#define _OMC_LIT43 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT43}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT45,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT44}};
#define _OMC_LIT45 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT47,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT46,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT47 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT47)
#define _OMC_LIT48_data "Access.icon"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT48,11,_OMC_LIT48_data);
#define _OMC_LIT48 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT48)
#define _OMC_LIT49_data "hide"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT49,4,_OMC_LIT49_data);
#define _OMC_LIT49 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT49)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT50,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT49}};
#define _OMC_LIT50 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT50)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT51,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT1,_OMC_LIT50}};
#define _OMC_LIT51 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT51}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT52,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "Access.hide"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,11,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,0,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
#define _OMC_LIT56_data "access"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT56,6,_OMC_LIT56_data);
#define _OMC_LIT56 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "Protection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,10,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT57}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,1,1) {_OMC_LIT55}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
#define _OMC_LIT60_data "Ok"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT60,2,_OMC_LIT60_data);
#define _OMC_LIT60 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT60)
#define _OMC_LIT61_data "Error"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT61,5,_OMC_LIT61_data);
#define _OMC_LIT61 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT61)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT62,1,5) {&DAE_Mod_NOMOD__desc,}};
#define _OMC_LIT62 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,1,3) {&DAE_Prefix_NOPRE__desc,}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT64,1,3) {&SCode_Visibility_PUBLIC__desc,}};
#define _OMC_LIT64 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT64)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT65,1,4) {&UnitAbsyn_InstStore_NOSTORE__desc,}};
#define _OMC_LIT65 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT65)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT66,1,4) {&InstTypes_CallingScope_INNER__CALL__desc,}};
#define _OMC_LIT66 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,7,3) {&ConnectionGraph_ConnectionGraph_GRAPH__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT68,1,6) {&DAE_ComponentRef_WILD__desc,}};
#define _OMC_LIT68 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,5,3) {&DAE_Connect_SetTrieNode_SET__TRIE__NODE__desc,_OMC_LIT55,_OMC_LIT68,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT70,5,3) {&DAE_Connect_Sets_SETS__desc,_OMC_LIT69,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT70 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT70)
#define _OMC_LIT71_data "([A-Za-z0-9().]*),"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT71,18,_OMC_LIT71_data);
#define _OMC_LIT71 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT71)
#define _OMC_LIT72_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT72,1,_OMC_LIT72_data);
#define _OMC_LIT72 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT72)
#define _OMC_LIT73_data ","
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT73,1,_OMC_LIT73_data);
#define _OMC_LIT73 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "SimpleVisual.Position"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,21,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
#define _OMC_LIT75_data "SimpleVisual.PositionSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT75,25,_OMC_LIT75_data);
#define _OMC_LIT75 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "SimpleVisual.PositionRotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,29,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
#define _OMC_LIT77_data "SimpleVisual.PositionRotationSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT77,33,_OMC_LIT77_data);
#define _OMC_LIT77 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT77)
#define _OMC_LIT78_data "SimpleVisual.PositionRotationSizeOffset"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT78,39,_OMC_LIT78_data);
#define _OMC_LIT78 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT78)
#define _OMC_LIT79_data ":"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT79,1,_OMC_LIT79_data);
#define _OMC_LIT79 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data ", "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,2,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
#define _OMC_LIT81_data "package.moc"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT81,11,_OMC_LIT81_data);
#define _OMC_LIT81 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "(replaceable type "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,18,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,1,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,1,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data " "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,1,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,1,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "input "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,6,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "output "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,7,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
#define _OMC_LIT89_data "(extends "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT89,9,_OMC_LIT89_data);
#define _OMC_LIT89 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT89)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT90,2,1) {_OMC_LIT83,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT90 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT90)
#define _OMC_LIT91_data "<"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT91,1,_OMC_LIT91_data);
#define _OMC_LIT91 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data ">"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,1,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,1,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,1,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
#define _OMC_LIT95_data "polymorphic"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT95,11,_OMC_LIT95_data);
#define _OMC_LIT95 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "Any"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,3,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
#define _OMC_LIT97_data "(package "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT97,9,_OMC_LIT97_data);
#define _OMC_LIT97 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT97)
#define _OMC_LIT98_data "(partial impure function"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT98,24,_OMC_LIT98_data);
#define _OMC_LIT98 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT98)
#define _OMC_LIT99_data "(partial function"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT99,17,_OMC_LIT99_data);
#define _OMC_LIT99 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data "(impure function"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,16,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
#define _OMC_LIT101_data "(function"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT101,9,_OMC_LIT101_data);
#define _OMC_LIT101 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "(operator function"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,18,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
#define _OMC_LIT103_data "(uniontype"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT103,10,_OMC_LIT103_data);
#define _OMC_LIT103 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "(record"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,7,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
#define _OMC_LIT105_data "(metarecord"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT105,11,_OMC_LIT105_data);
#define _OMC_LIT105 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "(type"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,5,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
#define _OMC_LIT107_data "\"(\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT107,3,_OMC_LIT107_data);
#define _OMC_LIT107 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT107)
#define _OMC_LIT108_data "SourceInfo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT108,10,_OMC_LIT108_data);
#define _OMC_LIT108 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT108)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT109,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT108}};
#define _OMC_LIT109 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT109)
#define _OMC_LIT110_data "\n)\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT110,3,_OMC_LIT110_data);
#define _OMC_LIT110 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,1,11) {&Absyn_Algorithm_ALG__BREAK__desc,}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT112,1,10) {&Absyn_Algorithm_ALG__RETURN__desc,}};
#define _OMC_LIT112 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,1,3) {&Absyn_EqMod_NOMOD__desc,}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT114,1,3) {&Absyn_Subscript_NOSUB__desc,}};
#define _OMC_LIT114 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT114)
#define _OMC_LIT115_data "Interactive.transformFlatPart failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT115,37,_OMC_LIT115_data);
#define _OMC_LIT115 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT115)
#define _OMC_LIT116_data "Interactive.transformFlatClassDef failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT116,41,_OMC_LIT116_data);
#define _OMC_LIT116 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT116)
#define _OMC_LIT117_data "Interactive.transformFlatClass failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT117,38,_OMC_LIT117_data);
#define _OMC_LIT117 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT117)
#define _OMC_LIT118_data "comment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT118,7,_OMC_LIT118_data);
#define _OMC_LIT118 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT119,0.0);
#define _OMC_LIT119 MMC_REFREALLIT(_OMC_LIT_STRUCT119)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT120,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT55,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT119}};
#define _OMC_LIT120 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT120)
#define _OMC_LIT121_data "binding"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT121,7,_OMC_LIT121_data);
#define _OMC_LIT121 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT121)
#define _OMC_LIT122_data "modification"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT122,12,_OMC_LIT122_data);
#define _OMC_LIT122 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT122)
#define _OMC_LIT123_data "Interactive.getComponentInfoOld failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT123,39,_OMC_LIT123_data);
#define _OMC_LIT123 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "},{"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,3,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
#define _OMC_LIT125_data "{"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT125,1,_OMC_LIT125_data);
#define _OMC_LIT125 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT125)
#define _OMC_LIT126_data "}"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT126,1,_OMC_LIT126_data);
#define _OMC_LIT126 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT126)
#define _OMC_LIT127_data "true"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT127,4,_OMC_LIT127_data);
#define _OMC_LIT127 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT127)
#define _OMC_LIT128_data "false"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT128,5,_OMC_LIT128_data);
#define _OMC_LIT128 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT128)
#define _OMC_LIT129_data "nfAPI"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT129,5,_OMC_LIT129_data);
#define _OMC_LIT129 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT129)
#define _OMC_LIT130_data "Enables experimental new instantiation use in the OMC API."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,58,_OMC_LIT130_data);
#define _OMC_LIT130 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT130}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT132,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(171)),_OMC_LIT129,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT131}};
#define _OMC_LIT132 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT132)
#define _OMC_LIT133_data "empty"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT133,5,_OMC_LIT133_data);
#define _OMC_LIT133 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT133)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT134,2,4) {&FCore_Graph_EG__desc,_OMC_LIT133}};
#define _OMC_LIT134 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT134)
#define _OMC_LIT135_data "$Code(),"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT135,8,_OMC_LIT135_data);
#define _OMC_LIT135 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "$Code()"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,7,_OMC_LIT136_data);
#define _OMC_LIT136 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT136)
#define _OMC_LIT137_data "},"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT137,2,_OMC_LIT137_data);
#define _OMC_LIT137 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT137)
#define _OMC_LIT138_data "{nada},"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT138,7,_OMC_LIT138_data);
#define _OMC_LIT138 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT138)
#define _OMC_LIT139_data "{},"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT139,3,_OMC_LIT139_data);
#define _OMC_LIT139 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT139)
#define _OMC_LIT140_data "{}"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT140,2,_OMC_LIT140_data);
#define _OMC_LIT140 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT140)
#define _OMC_LIT141_data "Placement"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT141,9,_OMC_LIT141_data);
#define _OMC_LIT141 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT141)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT142,3,3) {&Absyn_FunctionArgs_FUNCTIONARGS__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT142 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT142)
#define _OMC_LIT143_data "(error)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT143,7,_OMC_LIT143_data);
#define _OMC_LIT143 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT143)
#define _OMC_LIT144_data "__OpenModelica_infoHeader"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT144,25,_OMC_LIT144_data);
#define _OMC_LIT144 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT144)
#define _OMC_LIT145_data "revisions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT145,9,_OMC_LIT145_data);
#define _OMC_LIT145 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "info"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,4,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
#define _OMC_LIT147_data "="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT147,1,_OMC_LIT147_data);
#define _OMC_LIT147 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data "defaultComponentPrefixes"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,24,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT149,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT148}};
#define _OMC_LIT149 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT149)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT150,1,1) {_OMC_LIT140}};
#define _OMC_LIT150 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data "defaultComponentName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,20,_OMC_LIT151_data);
#define _OMC_LIT151 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT151)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT152,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT151}};
#define _OMC_LIT152 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT152)
#define _OMC_LIT153_data "DocumentationClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT153,18,_OMC_LIT153_data);
#define _OMC_LIT153 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT153)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT154,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT153}};
#define _OMC_LIT154 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT154)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT155,1,1) {_OMC_LIT128}};
#define _OMC_LIT155 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT155)
#define _OMC_LIT156_data "Icon"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT156,4,_OMC_LIT156_data);
#define _OMC_LIT156 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT156)
#define _OMC_LIT157_data "Diagram"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT157,7,_OMC_LIT157_data);
#define _OMC_LIT157 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT157)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT158,1,3) {&Interactive_AnnotationType_ICON__ANNOTATION__desc,}};
#define _OMC_LIT158 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT158)
#define _OMC_LIT159_data "version"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT159,7,_OMC_LIT159_data);
#define _OMC_LIT159 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT159)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT160,1,8) {&ErrorTypes_MessageType_SCRIPTING__desc,}};
#define _OMC_LIT160 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT160)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT161,1,5) {&ErrorTypes_Severity_WARNING__desc,}};
#define _OMC_LIT161 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT161)
#define _OMC_LIT162_data "Conversion-annotation contains unknown element: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT162,51,_OMC_LIT162_data);
#define _OMC_LIT162 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT162}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT164,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5049)),_OMC_LIT160,_OMC_LIT161,_OMC_LIT163}};
#define _OMC_LIT164 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT164)
#define _OMC_LIT165_data "__"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT165,2,_OMC_LIT165_data);
#define _OMC_LIT165 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data "to"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,2,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
#define _OMC_LIT167_data "script"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT167,6,_OMC_LIT167_data);
#define _OMC_LIT167 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data "Conversion-annotation is missing version for from-conversion: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,65,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT169,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT168}};
#define _OMC_LIT169 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT169)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT170,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5048)),_OMC_LIT160,_OMC_LIT161,_OMC_LIT169}};
#define _OMC_LIT170 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT170)
#define _OMC_LIT171_data "noneFromVersion"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT171,15,_OMC_LIT171_data);
#define _OMC_LIT171 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT171)
#define _OMC_LIT172_data "from"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT172,4,_OMC_LIT172_data);
#define _OMC_LIT172 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "conversion"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,10,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT174,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT173}};
#define _OMC_LIT174 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT174)
#define _OMC_LIT175_data "uses"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT175,4,_OMC_LIT175_data);
#define _OMC_LIT175 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT175)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT176,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT159}};
#define _OMC_LIT176 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT176)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT177,1,4) {&Absyn_Within_TOP__desc,}};
#define _OMC_LIT177 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT177)
#define _OMC_LIT178_data "Uses-annotation is missing version for library %s. Assuming the tool-specific version=\"default\"."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT178,96,_OMC_LIT178_data);
#define _OMC_LIT178 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT178)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT179,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT178}};
#define _OMC_LIT179 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT179)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT180,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(558)),_OMC_LIT160,_OMC_LIT161,_OMC_LIT179}};
#define _OMC_LIT180 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT180)
#define _OMC_LIT181_data "default"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT181,7,_OMC_LIT181_data);
#define _OMC_LIT181 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT181)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT182,2,1) {_OMC_LIT181,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT182 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT182)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT183,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT175}};
#define _OMC_LIT183 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT183)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT184,1,4) {&Interactive_AnnotationType_DIAGRAM__ANNOTATION__desc,}};
#define _OMC_LIT184 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT184)
#define _OMC_LIT185_data "immediate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT185,9,_OMC_LIT185_data);
#define _OMC_LIT185 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT185)
#define _OMC_LIT186_data "reset"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT186,5,_OMC_LIT186_data);
#define _OMC_LIT186 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT186)
#define _OMC_LIT187_data "synchronize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT187,11,_OMC_LIT187_data);
#define _OMC_LIT187 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT187)
#define _OMC_LIT188_data "priority"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT188,8,_OMC_LIT188_data);
#define _OMC_LIT188 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT188)
#define _OMC_LIT189_data "1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT189,1,_OMC_LIT189_data);
#define _OMC_LIT189 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT189)
#define _OMC_LIT190_data "<interactive>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT190,13,_OMC_LIT190_data);
#define _OMC_LIT190 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT190)
#define _OMC_LIT191_data "transition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT191,10,_OMC_LIT191_data);
#define _OMC_LIT191 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT191)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT192,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT191,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT192 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT192)
#define _OMC_LIT193_data "\"public\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT193,8,_OMC_LIT193_data);
#define _OMC_LIT193 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT193)
#define _OMC_LIT194_data "\"protected\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT194,11,_OMC_LIT194_data);
#define _OMC_LIT194 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT194)
#define _OMC_LIT195_data "useQuotes"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT195,9,_OMC_LIT195_data);
#define _OMC_LIT195 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT195)
#define _OMC_LIT196_data ",{}}"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT196,4,_OMC_LIT196_data);
#define _OMC_LIT196 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT196)
#define _OMC_LIT197_data "getInheritedClasses"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT197,19,_OMC_LIT197_data);
#define _OMC_LIT197 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT197)
#define _OMC_LIT198_data "nfAPINoise"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT198,10,_OMC_LIT198_data);
#define _OMC_LIT198 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT198)
#define _OMC_LIT199_data "Enables error display for the experimental new instantiation use in the OMC API."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT199,80,_OMC_LIT199_data);
#define _OMC_LIT199 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT199)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT200,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT199}};
#define _OMC_LIT200 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT200)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT201,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(173)),_OMC_LIT198,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT200}};
#define _OMC_LIT201 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT201)
#define _OMC_LIT202_data "getInheritedClassesHelper"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT202,25,_OMC_LIT202_data);
#define _OMC_LIT202 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT202)
#define _OMC_LIT203_data "parameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT203,9,_OMC_LIT203_data);
#define _OMC_LIT203 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT203)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT204,1,5) {&Absyn_Parallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT204 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT204)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT205,1,5) {&Absyn_Variability_PARAM__desc,}};
#define _OMC_LIT205 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT205)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT206,1,5) {&Absyn_Direction_BIDIR__desc,}};
#define _OMC_LIT206 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT206)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT207,1,3) {&Absyn_IsField_NONFIELD__desc,}};
#define _OMC_LIT207 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT207)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT208,8,3) {&Absyn_ElementAttributes_ATTR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT204,_OMC_LIT205,_OMC_LIT206,_OMC_LIT207,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT208 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT208)
#define _OMC_LIT209_data "constant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT209,8,_OMC_LIT209_data);
#define _OMC_LIT209 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT209)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT210,1,6) {&Absyn_Variability_CONST__desc,}};
#define _OMC_LIT210 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT210)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT211,8,3) {&Absyn_ElementAttributes_ATTR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT204,_OMC_LIT210,_OMC_LIT206,_OMC_LIT207,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT211 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT211)
#define _OMC_LIT212_data "discrete"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT212,8,_OMC_LIT212_data);
#define _OMC_LIT212 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT212)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT213,1,4) {&Absyn_Variability_DISCRETE__desc,}};
#define _OMC_LIT213 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT213)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT214,8,3) {&Absyn_ElementAttributes_ATTR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT204,_OMC_LIT213,_OMC_LIT206,_OMC_LIT207,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT214 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT214)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT215,1,3) {&Absyn_Variability_VAR__desc,}};
#define _OMC_LIT215 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT215)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT216,8,3) {&Absyn_ElementAttributes_ATTR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT204,_OMC_LIT215,_OMC_LIT206,_OMC_LIT207,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT216 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT216)
#define _OMC_LIT217_data "replaceable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT217,11,_OMC_LIT217_data);
#define _OMC_LIT217 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT217)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT218,1,4) {&Absyn_RedeclareKeywords_REPLACEABLE__desc,}};
#define _OMC_LIT218 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT218)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT219,1,1) {_OMC_LIT218}};
#define _OMC_LIT219 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT219)
#define _OMC_LIT220_data "inner"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT220,5,_OMC_LIT220_data);
#define _OMC_LIT220 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT220)
#define _OMC_LIT221_data "outer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT221,5,_OMC_LIT221_data);
#define _OMC_LIT221 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT221)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT222,1,6) {&Absyn_InnerOuter_NOT__INNER__OUTER__desc,}};
#define _OMC_LIT222 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT222)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT223,1,3) {&Absyn_InnerOuter_INNER__desc,}};
#define _OMC_LIT223 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT223)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT224,1,4) {&Absyn_InnerOuter_OUTER__desc,}};
#define _OMC_LIT224 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT224)
#define _OMC_LIT225_data "false\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT225,6,_OMC_LIT225_data);
#define _OMC_LIT225 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT225)
#define _OMC_LIT226_data "Ok\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT226,3,_OMC_LIT226_data);
#define _OMC_LIT226 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT226)
#define _OMC_LIT227_data "Real"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT227,4,_OMC_LIT227_data);
#define _OMC_LIT227 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT227)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT228,1,17) {&Absyn_Restriction_R__PREDEFINED__REAL__desc,}};
#define _OMC_LIT228 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT228)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT229,6,3) {&Absyn_ClassDef_PARTS__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT229 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT229)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT230,10,3) {&Absyn_Class_CLASS__desc,_OMC_LIT227,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT228,_OMC_LIT229,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT120}};
#define _OMC_LIT230 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT230)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT231,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT227}};
#define _OMC_LIT231 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT231)
#define _OMC_LIT232_data "Integer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT232,7,_OMC_LIT232_data);
#define _OMC_LIT232 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT232)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT233,1,16) {&Absyn_Restriction_R__PREDEFINED__INTEGER__desc,}};
#define _OMC_LIT233 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT233)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT234,10,3) {&Absyn_Class_CLASS__desc,_OMC_LIT232,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT233,_OMC_LIT229,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT120}};
#define _OMC_LIT234 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT234)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT235,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT232}};
#define _OMC_LIT235 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT235)
#define _OMC_LIT236_data "String"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT236,6,_OMC_LIT236_data);
#define _OMC_LIT236 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT236)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT237,1,18) {&Absyn_Restriction_R__PREDEFINED__STRING__desc,}};
#define _OMC_LIT237 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT237)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT238,10,3) {&Absyn_Class_CLASS__desc,_OMC_LIT236,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT237,_OMC_LIT229,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT120}};
#define _OMC_LIT238 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT238)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT239,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT236}};
#define _OMC_LIT239 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT239)
#define _OMC_LIT240_data "Boolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT240,7,_OMC_LIT240_data);
#define _OMC_LIT240 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT240)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT241,1,19) {&Absyn_Restriction_R__PREDEFINED__BOOLEAN__desc,}};
#define _OMC_LIT241 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT241)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT242,10,3) {&Absyn_Class_CLASS__desc,_OMC_LIT240,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT241,_OMC_LIT229,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT120}};
#define _OMC_LIT242 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT242)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT243,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT240}};
#define _OMC_LIT243 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT243)
#define _OMC_LIT244_data "Clock"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT244,5,_OMC_LIT244_data);
#define _OMC_LIT244 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT244)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT245,1,21) {&Absyn_Restriction_R__PREDEFINED__CLOCK__desc,}};
#define _OMC_LIT245 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT245)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT246,10,3) {&Absyn_Class_CLASS__desc,_OMC_LIT244,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT245,_OMC_LIT229,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT120}};
#define _OMC_LIT246 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT246)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT247,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT244}};
#define _OMC_LIT247 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT247)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT248,1,5) {&ErrorTypes_MessageType_TRANSLATION__desc,}};
#define _OMC_LIT248 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT248)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT249,1,4) {&ErrorTypes_Severity_ERROR__desc,}};
#define _OMC_LIT249 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT249)
#define _OMC_LIT250_data "Class %s not found in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT250,31,_OMC_LIT250_data);
#define _OMC_LIT250 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT250)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT251,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT250}};
#define _OMC_LIT251 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT251)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT252,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(3)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT251}};
#define _OMC_LIT252 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT252)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT253,1,11) {&DAE_Type_T__UNKNOWN__desc,}};
#define _OMC_LIT253 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT253)
#define _OMC_LIT254_data "scope"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT254,5,_OMC_LIT254_data);
#define _OMC_LIT254 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT254)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT255,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT55,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT255 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT255)
#define _OMC_LIT256_data "\"flow\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT256,6,_OMC_LIT256_data);
#define _OMC_LIT256 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT256)
#define _OMC_LIT257_data "\"\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT257,2,_OMC_LIT257_data);
#define _OMC_LIT257 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT257)
#define _OMC_LIT258_data "\"stream\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT258,8,_OMC_LIT258_data);
#define _OMC_LIT258 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT258)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT259,1,5) {&Absyn_Restriction_R__MODEL__desc,}};
#define _OMC_LIT259 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT259)
#define _OMC_LIT260_data "error"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT260,5,_OMC_LIT260_data);
#define _OMC_LIT260 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT260)
#define _OMC_LIT261_data "Error: component with name: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT261,28,_OMC_LIT261_data);
#define _OMC_LIT261 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT261)
#define _OMC_LIT262_data " in class: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT262,11,_OMC_LIT262_data);
#define _OMC_LIT262 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT262)
#define _OMC_LIT263_data " not found."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT263,11,_OMC_LIT263_data);
#define _OMC_LIT263 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT263)
#define _OMC_LIT264_data "Error: class: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT264,14,_OMC_LIT264_data);
#define _OMC_LIT264 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT264)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT265,1,4) {&Absyn_Each_NON__EACH__desc,}};
#define _OMC_LIT265 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT265)
#define _OMC_LIT266_data "public"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT266,6,_OMC_LIT266_data);
#define _OMC_LIT266 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "protected"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,9,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
#define _OMC_LIT268_data "{ "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT268,2,_OMC_LIT268_data);
#define _OMC_LIT268 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data " }"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,2,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
#define _OMC_LIT270_data "{ }"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT270,3,_OMC_LIT270_data);
#define _OMC_LIT270 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT270)
#define _OMC_LIT271_data "{ rec(elementvisibility="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT271,24,_OMC_LIT271_data);
#define _OMC_LIT271 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT271)
#define _OMC_LIT272_data ") }"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT272,3,_OMC_LIT272_data);
#define _OMC_LIT272 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT272)
#define _OMC_LIT273_data ",\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT273,2,_OMC_LIT273_data);
#define _OMC_LIT273 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT273)
#define _OMC_LIT274_data "elementtype=classdef, classname="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT274,32,_OMC_LIT274_data);
#define _OMC_LIT274 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT274)
#define _OMC_LIT275_data ", classrestriction="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT275,19,_OMC_LIT275_data);
#define _OMC_LIT275 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT275)
#define _OMC_LIT276_data "readonly"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT276,8,_OMC_LIT276_data);
#define _OMC_LIT276 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT276)
#define _OMC_LIT277_data "writable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT277,8,_OMC_LIT277_data);
#define _OMC_LIT277 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "elementfile=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,13,_OMC_LIT278_data);
#define _OMC_LIT278 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT278)
#define _OMC_LIT279_data "\", elementreadonly=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT279,20,_OMC_LIT279_data);
#define _OMC_LIT279 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT279)
#define _OMC_LIT280_data "\", elementStartLine="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT280,20,_OMC_LIT280_data);
#define _OMC_LIT280 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT280)
#define _OMC_LIT281_data ", elementStartColumn="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT281,21,_OMC_LIT281_data);
#define _OMC_LIT281 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT281)
#define _OMC_LIT282_data ", elementEndLine="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT282,17,_OMC_LIT282_data);
#define _OMC_LIT282 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT282)
#define _OMC_LIT283_data ", elementEndColumn="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT283,19,_OMC_LIT283_data);
#define _OMC_LIT283 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT283)
#define _OMC_LIT284_data ", final="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT284,8,_OMC_LIT284_data);
#define _OMC_LIT284 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT284)
#define _OMC_LIT285_data ", replaceable="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT285,14,_OMC_LIT285_data);
#define _OMC_LIT285 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT285)
#define _OMC_LIT286_data ", inout="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT286,8,_OMC_LIT286_data);
#define _OMC_LIT286 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT286)
#define _OMC_LIT287_data "elementtype=comment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT287,19,_OMC_LIT287_data);
#define _OMC_LIT287 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT287)
#define _OMC_LIT288_data "elementtype=annotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT288,22,_OMC_LIT288_data);
#define _OMC_LIT288 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT288)
#define _OMC_LIT289_data "elementtype=extends, path="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT289,26,_OMC_LIT289_data);
#define _OMC_LIT289 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT289)
#define _OMC_LIT290_data "elementtype=import, "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT290,20,_OMC_LIT290_data);
#define _OMC_LIT290 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT290)
#define _OMC_LIT291_data "elementtype=component, typename="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT291,32,_OMC_LIT291_data);
#define _OMC_LIT291 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT291)
#define _OMC_LIT292_data ", names={"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT292,9,_OMC_LIT292_data);
#define _OMC_LIT292 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT292)
#define _OMC_LIT293_data "}, flow="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT293,8,_OMC_LIT293_data);
#define _OMC_LIT293 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT293)
#define _OMC_LIT294_data ", stream="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT294,9,_OMC_LIT294_data);
#define _OMC_LIT294 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT294)
#define _OMC_LIT295_data ", variability="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT295,14,_OMC_LIT295_data);
#define _OMC_LIT295 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT295)
#define _OMC_LIT296_data ", direction="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT296,12,_OMC_LIT296_data);
#define _OMC_LIT296 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT296)
#define _OMC_LIT297_data "kind=named, id="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT297,15,_OMC_LIT297_data);
#define _OMC_LIT297 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT297)
#define _OMC_LIT298_data ", path="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT298,7,_OMC_LIT298_data);
#define _OMC_LIT298 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT298)
#define _OMC_LIT299_data "kind=qualified, path="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT299,21,_OMC_LIT299_data);
#define _OMC_LIT299 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT299)
#define _OMC_LIT300_data "kind=unqualified, path="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT300,23,_OMC_LIT300_data);
#define _OMC_LIT300 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT300)
#define _OMC_LIT301_data "PDEModelica: %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT301,15,_OMC_LIT301_data);
#define _OMC_LIT301 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT301)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT302,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT301}};
#define _OMC_LIT302 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT302)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT303,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(7013)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT302}};
#define _OMC_LIT303 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT303)
#define _OMC_LIT304_data "Fields not supported in standard modelica. Enable PDEModelica usign flag --grammar=\"PDEModelica\"."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT304,97,_OMC_LIT304_data);
#define _OMC_LIT304 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT304)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT305,2,1) {_OMC_LIT304,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT305 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT305)
#define _OMC_LIT306_data "grammar"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT306,7,_OMC_LIT306_data);
#define _OMC_LIT306 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT306)
#define _OMC_LIT307_data "g"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT307,1,_OMC_LIT307_data);
#define _OMC_LIT307 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT307)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT308,1,1) {_OMC_LIT307}};
#define _OMC_LIT308 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT308)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT309,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT309 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT309)
#define _OMC_LIT310_data "Modelica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT310,8,_OMC_LIT310_data);
#define _OMC_LIT310 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT310)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT311,2,0) {_OMC_LIT310,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT311 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT311)
#define _OMC_LIT312_data "MetaModelica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT312,12,_OMC_LIT312_data);
#define _OMC_LIT312 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT312)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT313,2,0) {_OMC_LIT312,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT313 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT313)
#define _OMC_LIT314_data "ParModelica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT314,11,_OMC_LIT314_data);
#define _OMC_LIT314 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT314)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT315,2,0) {_OMC_LIT314,MMC_IMMEDIATE(MMC_TAGFIXNUM(3))}};
#define _OMC_LIT315 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT315)
#define _OMC_LIT316_data "Optimica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT316,8,_OMC_LIT316_data);
#define _OMC_LIT316 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT316)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT317,2,0) {_OMC_LIT316,MMC_IMMEDIATE(MMC_TAGFIXNUM(4))}};
#define _OMC_LIT317 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT317)
#define _OMC_LIT318_data "PDEModelica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT318,11,_OMC_LIT318_data);
#define _OMC_LIT318 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT318)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT319,2,0) {_OMC_LIT318,MMC_IMMEDIATE(MMC_TAGFIXNUM(5))}};
#define _OMC_LIT319 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT319)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT320,2,1) {_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT320 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT320)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT321,2,1) {_OMC_LIT317,_OMC_LIT320}};
#define _OMC_LIT321 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT321)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT322,2,1) {_OMC_LIT315,_OMC_LIT321}};
#define _OMC_LIT322 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT322)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT323,2,1) {_OMC_LIT313,_OMC_LIT322}};
#define _OMC_LIT323 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT323)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT324,2,1) {_OMC_LIT311,_OMC_LIT323}};
#define _OMC_LIT324 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT324)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT325,3,10) {&Flags_FlagData_ENUM__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT324}};
#define _OMC_LIT325 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT325)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT326,2,1) {_OMC_LIT318,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT326 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT326)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT327,2,1) {_OMC_LIT316,_OMC_LIT326}};
#define _OMC_LIT327 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT327)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT328,2,1) {_OMC_LIT314,_OMC_LIT327}};
#define _OMC_LIT328 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT328)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT329,2,1) {_OMC_LIT312,_OMC_LIT328}};
#define _OMC_LIT329 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT329)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT330,2,1) {_OMC_LIT310,_OMC_LIT329}};
#define _OMC_LIT330 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT330)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT331,2,3) {&Flags_ValidOptions_STRING__OPTION__desc,_OMC_LIT330}};
#define _OMC_LIT331 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT331)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT332,1,1) {_OMC_LIT331}};
#define _OMC_LIT332 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT332)
#define _OMC_LIT333_data "Sets the grammar and semantics to accept."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT333,41,_OMC_LIT333_data);
#define _OMC_LIT333 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT333)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT334,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT333}};
#define _OMC_LIT334 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT334)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT335,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(6)),_OMC_LIT306,_OMC_LIT308,_OMC_LIT309,_OMC_LIT325,_OMC_LIT332,_OMC_LIT334}};
#define _OMC_LIT335 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT335)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT336,1,4) {&Absyn_IsField_FIELD__desc,}};
#define _OMC_LIT336 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT336)
#define _OMC_LIT337_data "nonfield"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT337,8,_OMC_LIT337_data);
#define _OMC_LIT337 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT337)
#define _OMC_LIT338_data "field"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT338,5,_OMC_LIT338_data);
#define _OMC_LIT338 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT338)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT339,1,3) {&Absyn_Direction_INPUT__desc,}};
#define _OMC_LIT339 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT339)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT340,1,4) {&Absyn_Direction_OUTPUT__desc,}};
#define _OMC_LIT340 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT340)
#define _OMC_LIT341_data "input"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT341,5,_OMC_LIT341_data);
#define _OMC_LIT341 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT341)
#define _OMC_LIT342_data "output"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT342,6,_OMC_LIT342_data);
#define _OMC_LIT342 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT342)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT343,1,3) {&Absyn_Parallelism_PARGLOBAL__desc,}};
#define _OMC_LIT343 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT343)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT344,1,4) {&Absyn_Parallelism_PARLOCAL__desc,}};
#define _OMC_LIT344 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT344)
#define _OMC_LIT345_data "parglobal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT345,9,_OMC_LIT345_data);
#define _OMC_LIT345 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT345)
#define _OMC_LIT346_data "parlocal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT346,8,_OMC_LIT346_data);
#define _OMC_LIT346 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT346)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT347,1,5) {&Absyn_InnerOuter_INNER__OUTER__desc,}};
#define _OMC_LIT347 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT347)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT348,1,3) {&Absyn_RedeclareKeywords_REDECLARE__desc,}};
#define _OMC_LIT348 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT348)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT349,1,1) {_OMC_LIT348}};
#define _OMC_LIT349 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT349)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT350,1,5) {&Absyn_RedeclareKeywords_REDECLARE__REPLACEABLE__desc,}};
#define _OMC_LIT350 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT350)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT351,1,1) {_OMC_LIT350}};
#define _OMC_LIT351 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT351)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT352,3,3) {&GlobalScript_Components_COMPONENTS__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT352 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT352)
#define _OMC_LIT353_data "-first_component failed: no components\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT353,39,_OMC_LIT353_data);
#define _OMC_LIT353 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT353)
#define _OMC_LIT354_data "-extract_components_from_componentitems failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT354,47,_OMC_LIT354_data);
#define _OMC_LIT354 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT354)
#define _OMC_LIT355_data "-extract_components_from_class failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT355,38,_OMC_LIT355_data);
#define _OMC_LIT355 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT355)
#define _OMC_LIT356_data "-get_components_with_type failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT356,33,_OMC_LIT356_data);
#define _OMC_LIT356 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT356)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT357,3,3) {&GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT357 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT357)
#define _OMC_LIT358_data "-first_componentReplacement failed: no componentReplacementReplacementRules\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT358,76,_OMC_LIT358_data);
#define _OMC_LIT358 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT358)
#define _OMC_LIT359_data "-make_componentsReplacementRules_from_components failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT359,56,_OMC_LIT359_data);
#define _OMC_LIT359 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT359)
#define _OMC_LIT360_data "-get_new_componentreplacementsrules_for_each_rule failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT360,57,_OMC_LIT360_data);
#define _OMC_LIT360 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT360)
#define _OMC_LIT361_data "-get_componentreplacementsrules failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT361,39,_OMC_LIT361_data);
#define _OMC_LIT361 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT361)
#define _OMC_LIT362_data "-rename_component_in_external_decl not implemented yet\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT362,55,_OMC_LIT362_data);
#define _OMC_LIT362 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT362)
#define _OMC_LIT363_data "-rename_component_in_namedArgs failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT363,38,_OMC_LIT363_data);
#define _OMC_LIT363 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT363)
#define _OMC_LIT364_data "-rename_component_in_function_args failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT364,42,_OMC_LIT364_data);
#define _OMC_LIT364 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT364)
#define _OMC_LIT365_data "-rename_component_in_exp_algoritms_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT365,47,_OMC_LIT365_data);
#define _OMC_LIT365 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT365)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT366,1,20) {&Absyn_Exp_END__desc,}};
#define _OMC_LIT366 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT366)
#define _OMC_LIT367_data "-rename_component_in_exp failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT367,32,_OMC_LIT367_data);
#define _OMC_LIT367 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT367)
#define _OMC_LIT368_data "-rename_component_in_element_arg_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT368,45,_OMC_LIT368_data);
#define _OMC_LIT368 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT368)
#define _OMC_LIT369_data "-rename_component_in_exp_tuple_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT369,43,_OMC_LIT369_data);
#define _OMC_LIT369 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT369)
#define _OMC_LIT370_data "-rename_component_in_exp_list_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT370,42,_OMC_LIT370_data);
#define _OMC_LIT370 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT370)
#define _OMC_LIT371_data "-rename_component_in_exp_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT371,37,_OMC_LIT371_data);
#define _OMC_LIT371 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT371)
#define _OMC_LIT372_data "-rename_component_in_equation EQ_NORETCALL not implemented yet\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT372,63,_OMC_LIT372_data);
#define _OMC_LIT372 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT372)
#define _OMC_LIT373_data "-rename_component_in_equation failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT373,37,_OMC_LIT373_data);
#define _OMC_LIT373 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT373)
#define _OMC_LIT374_data "-rename_component_in_exp_equationitem_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT374,50,_OMC_LIT374_data);
#define _OMC_LIT374 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT374)
#define _OMC_LIT375_data "-Interactive.renameComponentInComponentitems failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT375,52,_OMC_LIT375_data);
#define _OMC_LIT375 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT375)
#define _OMC_LIT376_data "-rename_component_from_componentreplacements failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT376,52,_OMC_LIT376_data);
#define _OMC_LIT376 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT376)
#define _OMC_LIT377_data "-extract_renamed_classes_as_string_list failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT377,47,_OMC_LIT377_data);
#define _OMC_LIT377 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT377)
#define _OMC_LIT378_data " is in a read only file!"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT378,24,_OMC_LIT378_data);
#define _OMC_LIT378 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT378)
#define _OMC_LIT379_data "renameComponentOnlyInClass failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT379,34,_OMC_LIT379_data);
#define _OMC_LIT379 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT379)
#define _OMC_LIT380_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT380,9,_OMC_LIT380_data);
#define _OMC_LIT380 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT380)
#define _OMC_LIT381_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT381,41,_OMC_LIT381_data);
#define _OMC_LIT381 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT381)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT382,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT381}};
#define _OMC_LIT382 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT382)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT383,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT380,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT382}};
#define _OMC_LIT383 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT383)
#define _OMC_LIT384_data "rename_component failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT384,24,_OMC_LIT384_data);
#define _OMC_LIT384 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT384)
#define _OMC_LIT385_data "Interactive.extractAllComponentreplacements"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT385,43,_OMC_LIT385_data);
#define _OMC_LIT385 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT385)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT386,1,6) {&ErrorTypes_Severity_NOTIFICATION__desc,}};
#define _OMC_LIT386 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT386)
#define _OMC_LIT387_data "Cannot access encrypted and protected class contents."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT387,53,_OMC_LIT387_data);
#define _OMC_LIT387 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT387)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT388,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT387}};
#define _OMC_LIT388 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT388)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT389,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(7023)),_OMC_LIT160,_OMC_LIT386,_OMC_LIT388}};
#define _OMC_LIT389 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT389)
#define _OMC_LIT390_data "getComponents"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT390,13,_OMC_LIT390_data);
#define _OMC_LIT390 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT390)
#define _OMC_LIT391_data "getElements"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT391,11,_OMC_LIT391_data);
#define _OMC_LIT391 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT391)
#define _OMC_LIT392_data "getComponentAnnotations"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT392,23,_OMC_LIT392_data);
#define _OMC_LIT392 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT392)
#define _OMC_LIT393_data "getElementAnnotations"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT393,21,_OMC_LIT393_data);
#define _OMC_LIT393 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT393)
#define _OMC_LIT394_data "getNthComponentAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT394,25,_OMC_LIT394_data);
#define _OMC_LIT394 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT394)
#define _OMC_LIT395_data "getNthConnectionAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT395,26,_OMC_LIT395_data);
#define _OMC_LIT395 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT395)
#define _OMC_LIT396_data "getNthConnectorIconAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT396,29,_OMC_LIT396_data);
#define _OMC_LIT396 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT396)
#define _OMC_LIT397_data "getIconAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT397,17,_OMC_LIT397_data);
#define _OMC_LIT397 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT397)
#define _OMC_LIT398_data "getDiagramAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT398,20,_OMC_LIT398_data);
#define _OMC_LIT398 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT398)
#define _OMC_LIT399_data "getNthInheritedClassIconMapAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT399,37,_OMC_LIT399_data);
#define _OMC_LIT399 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT399)
#define _OMC_LIT400_data "IconMap"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT400,7,_OMC_LIT400_data);
#define _OMC_LIT400 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT400)
#define _OMC_LIT401_data "getNthInheritedClassDiagramMapAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT401,40,_OMC_LIT401_data);
#define _OMC_LIT401 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT401)
#define _OMC_LIT402_data "DiagramMap"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT402,10,_OMC_LIT402_data);
#define _OMC_LIT402 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT402)
#define _OMC_LIT403_data "getNamedAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT403,18,_OMC_LIT403_data);
#define _OMC_LIT403 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT403)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT404,2,3) {&Dump_DumpOptions_DUMPOPTIONS__desc,_OMC_LIT55}};
#define _OMC_LIT404 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT404)
#define _OMC_LIT405_data "Failed in translating "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT405,22,_OMC_LIT405_data);
#define _OMC_LIT405 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT405)
#define _OMC_LIT406_data " to Modelica v2.0 graphical annotations"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT406,39,_OMC_LIT406_data);
#define _OMC_LIT406 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT406)
#define _OMC_LIT407_data "getExtendsModifierNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT407,23,_OMC_LIT407_data);
#define _OMC_LIT407 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT407)
#define _OMC_LIT408_data "setComponentModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT408,25,_OMC_LIT408_data);
#define _OMC_LIT408 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT408)
#define _OMC_LIT409_data "setElementModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT409,23,_OMC_LIT409_data);
#define _OMC_LIT409 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT409)
#define _OMC_LIT410_data "setParameterValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT410,17,_OMC_LIT410_data);
#define _OMC_LIT410 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT410)
#define _OMC_LIT411_data "setComponentDimensions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT411,22,_OMC_LIT411_data);
#define _OMC_LIT411 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT411)
#define _OMC_LIT412_data "createModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT412,11,_OMC_LIT412_data);
#define _OMC_LIT412 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT412)
#define _OMC_LIT413_data "newModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT413,8,_OMC_LIT413_data);
#define _OMC_LIT413 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT413)
#define _OMC_LIT414_data "deleteClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT414,11,_OMC_LIT414_data);
#define _OMC_LIT414 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT414)
#define _OMC_LIT415_data "addComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT415,12,_OMC_LIT415_data);
#define _OMC_LIT415 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT415)
#define _OMC_LIT416_data "updateComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT416,15,_OMC_LIT416_data);
#define _OMC_LIT416 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT416)
#define _OMC_LIT417_data "deleteComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT417,15,_OMC_LIT417_data);
#define _OMC_LIT417 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT417)
#define _OMC_LIT418_data "getComponentCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT418,17,_OMC_LIT418_data);
#define _OMC_LIT418 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT418)
#define _OMC_LIT419_data "getNthComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT419,15,_OMC_LIT419_data);
#define _OMC_LIT419 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT419)
#define _OMC_LIT420_data "getNthComponentModification"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT420,27,_OMC_LIT420_data);
#define _OMC_LIT420 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT420)
#define _OMC_LIT421_data "getNthComponentCondition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT421,24,_OMC_LIT421_data);
#define _OMC_LIT421 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT421)
#define _OMC_LIT422_data "getInheritanceCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT422,19,_OMC_LIT422_data);
#define _OMC_LIT422 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT422)
#define _OMC_LIT423_data "getNthInheritedClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT423,20,_OMC_LIT423_data);
#define _OMC_LIT423 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT423)
#define _OMC_LIT424_data "setConnectionComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT424,20,_OMC_LIT424_data);
#define _OMC_LIT424 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT424)
#define _OMC_LIT425_data "addConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT425,13,_OMC_LIT425_data);
#define _OMC_LIT425 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT425)
#define _OMC_LIT426_data "deleteConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT426,16,_OMC_LIT426_data);
#define _OMC_LIT426 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT426)
#define _OMC_LIT427_data "getConnectorCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT427,17,_OMC_LIT427_data);
#define _OMC_LIT427 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT427)
#define _OMC_LIT428_data "getNthConnector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT428,15,_OMC_LIT428_data);
#define _OMC_LIT428 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT428)
#define _OMC_LIT429_data "refactorClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT429,13,_OMC_LIT429_data);
#define _OMC_LIT429 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT429)
#define _OMC_LIT430_data "refactorIconAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT430,22,_OMC_LIT430_data);
#define _OMC_LIT430 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT430)
#define _OMC_LIT431_data "refactorDiagramAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT431,25,_OMC_LIT431_data);
#define _OMC_LIT431 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT431)
#define _OMC_LIT432_data "getShortDefinitionBaseClassInformation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT432,38,_OMC_LIT432_data);
#define _OMC_LIT432 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT432)
#define _OMC_LIT433_data "getExternalFunctionSpecification"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT433,32,_OMC_LIT433_data);
#define _OMC_LIT433 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT433)
#define _OMC_LIT434_data "isPrimitive"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT434,11,_OMC_LIT434_data);
#define _OMC_LIT434 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT434)
#define _OMC_LIT435_data "isParameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT435,11,_OMC_LIT435_data);
#define _OMC_LIT435 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT435)
#define _OMC_LIT436_data "isProtected"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT436,11,_OMC_LIT436_data);
#define _OMC_LIT436 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT436)
#define _OMC_LIT437_data "isConstant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT437,10,_OMC_LIT437_data);
#define _OMC_LIT437 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT437)
#define _OMC_LIT438_data "isReplaceable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT438,13,_OMC_LIT438_data);
#define _OMC_LIT438 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT438)
#define _OMC_LIT439_data "getEnumerationLiterals"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT439,22,_OMC_LIT439_data);
#define _OMC_LIT439 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT439)
#define _OMC_LIT440_data "existClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT440,10,_OMC_LIT440_data);
#define _OMC_LIT440 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT440)
#define _OMC_LIT441_data "existModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT441,10,_OMC_LIT441_data);
#define _OMC_LIT441 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT441)
#define _OMC_LIT442_data "existPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT442,12,_OMC_LIT442_data);
#define _OMC_LIT442 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT442)
#define _OMC_LIT443_data "renameClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT443,11,_OMC_LIT443_data);
#define _OMC_LIT443 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT443)
#define _OMC_LIT444_data "renameComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT444,15,_OMC_LIT444_data);
#define _OMC_LIT444 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT444)
#define _OMC_LIT445_data "renameComponentInClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT445,22,_OMC_LIT445_data);
#define _OMC_LIT445 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT445)
#define _OMC_LIT446_data "getCrefInfo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT446,11,_OMC_LIT446_data);
#define _OMC_LIT446 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT446)
#define _OMC_LIT447_data "setExtendsModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT447,23,_OMC_LIT447_data);
#define _OMC_LIT447 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT447)
#define _OMC_LIT448_data "getExtendsModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT448,23,_OMC_LIT448_data);
#define _OMC_LIT448 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT448)
#define _OMC_LIT449_data "isExtendsModifierFinal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT449,22,_OMC_LIT449_data);
#define _OMC_LIT449 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT449)
#define _OMC_LIT450_data "getDefaultComponentName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT450,23,_OMC_LIT450_data);
#define _OMC_LIT450 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT450)
#define _OMC_LIT451_data "getDefaultComponentPrefixes"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT451,27,_OMC_LIT451_data);
#define _OMC_LIT451 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT451)
#define _OMC_LIT452_data "getComponentComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT452,19,_OMC_LIT452_data);
#define _OMC_LIT452 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT452)
#define _OMC_LIT453_data "setComponentComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT453,19,_OMC_LIT453_data);
#define _OMC_LIT453 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT453)
#define _OMC_LIT454_data "setComponentProperties"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT454,22,_OMC_LIT454_data);
#define _OMC_LIT454 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT454)
#define _OMC_LIT455_data "getElementsInfo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT455,15,_OMC_LIT455_data);
#define _OMC_LIT455 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT455)
#define _OMC_LIT456_data "getElementsOfVisType"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT456,20,_OMC_LIT456_data);
#define _OMC_LIT456 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT456)
#define _OMC_LIT457_data "getDefinitions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT457,14,_OMC_LIT457_data);
#define _OMC_LIT457 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT457)
#define _OMC_LIT458_data "getLocalVariables"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT458,17,_OMC_LIT458_data);
#define _OMC_LIT458 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT458)
#define _OMC_LIT459_data "getErrorString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT459,14,_OMC_LIT459_data);
#define _OMC_LIT459 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT459)
#define _OMC_LIT460_data "gen"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT460,3,_OMC_LIT460_data);
#define _OMC_LIT460 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT460)
#define _OMC_LIT461_data "Turns on/off dynamic loading of functions that are compiled during translation. Only enable this if external functions are needed to calculate structural parameters or constants."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT461,178,_OMC_LIT461_data);
#define _OMC_LIT461 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT461)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT462,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT461}};
#define _OMC_LIT462 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT462)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT463,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(8)),_OMC_LIT460,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT462}};
#define _OMC_LIT463 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT463)
#define _OMC_LIT464_data "evalfunc"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT464,8,_OMC_LIT464_data);
#define _OMC_LIT464 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT464)
#define _OMC_LIT465_data "Turns on/off symbolic function evaluation."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT465,42,_OMC_LIT465_data);
#define _OMC_LIT465 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT465)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT466,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT465}};
#define _OMC_LIT466 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT466)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT467,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(7)),_OMC_LIT464,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT466}};
#define _OMC_LIT467 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT467)
#define _OMC_LIT468_data "keepArrays"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT468,10,_OMC_LIT468_data);
#define _OMC_LIT468 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT468)
#define _OMC_LIT469_data "a"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT469,1,_OMC_LIT469_data);
#define _OMC_LIT469 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT469)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT470,1,1) {_OMC_LIT469}};
#define _OMC_LIT470 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT470)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT471,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT471 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT471)
#define _OMC_LIT472_data "Sets whether to split arrays or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT472,36,_OMC_LIT472_data);
#define _OMC_LIT472 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT472)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT473,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT472}};
#define _OMC_LIT473 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT473)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT474,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(20)),_OMC_LIT468,_OMC_LIT470,_OMC_LIT309,_OMC_LIT471,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT473}};
#define _OMC_LIT474 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT474)
#define _OMC_LIT475_data "Tuple %s must contain component references only."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT475,48,_OMC_LIT475_data);
#define _OMC_LIT475 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT475)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT476,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT475}};
#define _OMC_LIT476 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT476)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT477,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(55)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT476}};
#define _OMC_LIT477 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT477)
#define _OMC_LIT478_data "Type error in conditional '%s'. Expected Boolean, got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT478,57,_OMC_LIT478_data);
#define _OMC_LIT478 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT478)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT479,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT478}};
#define _OMC_LIT479 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT479)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT480,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(10)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT479}};
#define _OMC_LIT480 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT480)
#define _OMC_LIT481_data "Type error in while conditional '%s'. Expected Boolean got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT481,62,_OMC_LIT481_data);
#define _OMC_LIT481 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT481)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT482,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT481}};
#define _OMC_LIT482 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT482)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT483,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(13)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT482}};
#define _OMC_LIT483 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT483)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT484,1,5) {&Values_IntRealOp_ADDOP__desc,}};
#define _OMC_LIT484 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT484)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT485,2,7) {&Absyn_Exp_BOOL__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT485 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT485)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT486,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT486 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT486)
#define _OMC_LIT487_data "Expression %s in for-statement must be an array type."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT487,53,_OMC_LIT487_data);
#define _OMC_LIT487 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT487)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT488,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT487}};
#define _OMC_LIT488 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT488)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT489,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(93)),_OMC_LIT248,_OMC_LIT249,_OMC_LIT488}};
#define _OMC_LIT489 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT489)
#define _OMC_LIT490_data "assert"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT490,6,_OMC_LIT490_data);
#define _OMC_LIT490 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT490)
#define _OMC_LIT491_data "Stack overflow occurred while evaluating %s:\n%s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT491,47,_OMC_LIT491_data);
#define _OMC_LIT491 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT491)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT492,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT491}};
#define _OMC_LIT492 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT492)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT493,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(585)),_OMC_LIT160,_OMC_LIT249,_OMC_LIT492}};
#define _OMC_LIT493 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT493)
#define _OMC_LIT494_data "showStatement"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT494,13,_OMC_LIT494_data);
#define _OMC_LIT494 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT494)
#define _OMC_LIT495_data "Shows the statement that is currently being evaluated when evaluating a script."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT495,79,_OMC_LIT495_data);
#define _OMC_LIT495 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT495)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT496,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT495}};
#define _OMC_LIT496 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT496)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT497,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(28)),_OMC_LIT494,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT496}};
#define _OMC_LIT497 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT497)
#define _OMC_LIT498_data "Evaluating: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT498,12,_OMC_LIT498_data);
#define _OMC_LIT498 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT498)
#define _OMC_LIT499_data "Evaluating:   > "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT499,16,_OMC_LIT499_data);
#define _OMC_LIT499 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT499)
#define _OMC_LIT500_data "Evaluated:    < "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT500,16,_OMC_LIT500_data);
#define _OMC_LIT500 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT500)
#define _OMC_LIT501_data " / "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT501,3,_OMC_LIT501_data);
#define _OMC_LIT501 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT501)
#include "util/modelica.h"
#include "Interactive_includes.h"
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAccessAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAccessAnnotationString2,2,0) {(void*) boxptr_Interactive_getAccessAnnotationString2,0}};
#define boxvar_Interactive_getAccessAnnotationString2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAccessAnnotationString2)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAccessAnnotationString(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAccessAnnotationString,2,0) {(void*) boxptr_Interactive_getAccessAnnotationString,0}};
#define boxvar_Interactive_getAccessAnnotationString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAccessAnnotationString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensionsInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_boolean _inFound, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_boolean *out_outFound, modelica_boolean *out_outContinue);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentDimensionsInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inFound, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_metatype *out_outFound, modelica_metatype *out_outContinue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensionsInCompitems,2,0) {(void*) boxptr_Interactive_setComponentDimensionsInCompitems,0}};
#define boxvar_Interactive_setComponentDimensionsInCompitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensionsInCompitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensionsInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inDimensions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensionsInClass,2,0) {(void*) boxptr_Interactive_setComponentDimensionsInClass,0}};
#define boxvar_Interactive_setComponentDimensionsInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensionsInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensions(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_metatype _inProgram, modelica_string *out_outResult);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensions,2,0) {(void*) boxptr_Interactive_setComponentDimensions,0}};
#define boxvar_Interactive_setComponentDimensions MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentDimensions)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getClassEnvNoElaboration(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inClassPath, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getClassEnvNoElaboration,2,0) {(void*) boxptr_Interactive_getClassEnvNoElaboration,0}};
#define boxvar_Interactive_getClassEnvNoElaboration MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getClassEnvNoElaboration)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getAllClassesInClass(threadData_t *threadData, modelica_metatype _class_);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAllClassesInClass,2,0) {(void*) boxptr_Interactive_getAllClassesInClass,0}};
#define boxvar_Interactive_getAllClassesInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAllClassesInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getFunctionsInClasses(threadData_t *threadData, modelica_metatype _classes, modelica_metatype _acc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getFunctionsInClasses,2,0) {(void*) boxptr_Interactive_getFunctionsInClasses,0}};
#define boxvar_Interactive_getFunctionsInClasses MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getFunctionsInClasses)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentElementInClass(threadData_t *threadData, modelica_metatype _cl, modelica_string _compName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentElementInClass,2,0) {(void*) boxptr_Interactive_getComponentElementInClass,0}};
#define boxvar_Interactive_getComponentElementInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentElementInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getSCodeClassNamesRecursiveWork(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inAcc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getSCodeClassNamesRecursiveWork,2,0) {(void*) boxptr_Interactive_getSCodeClassNamesRecursiveWork,0}};
#define boxvar_Interactive_getSCodeClassNamesRecursiveWork MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getSCodeClassNamesRecursiveWork)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentBindingMapable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inProgram3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentBindingMapable,2,0) {(void*) boxptr_Interactive_getComponentBindingMapable,0}};
#define boxvar_Interactive_getComponentBindingMapable MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentBindingMapable)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getVisElementNameFromStr(threadData_t *threadData, modelica_string _str);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getVisElementNameFromStr,2,0) {(void*) boxptr_Interactive_getVisElementNameFromStr,0}};
#define boxvar_Interactive_getVisElementNameFromStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getVisElementNameFromStr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_constructVisTypesList(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_constructVisTypesList,2,0) {(void*) boxptr_Interactive_constructVisTypesList,0}};
#define boxvar_Interactive_constructVisTypesList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_constructVisTypesList)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNameFromElementIfVisType(threadData_t *threadData, modelica_metatype _inElementItem, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNameFromElementIfVisType,2,0) {(void*) boxptr_Interactive_getNameFromElementIfVisType,0}};
#define boxvar_Interactive_getNameFromElementIfVisType MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNameFromElementIfVisType)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDescIfVis(threadData_t *threadData, modelica_string _in_type, modelica_metatype _inElement, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDescIfVis,2,0) {(void*) boxptr_Interactive_getDescIfVis,0}};
#define boxvar_Interactive_getDescIfVis MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDescIfVis)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementTypeName(threadData_t *threadData, modelica_metatype _inElementSpec);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementTypeName,2,0) {(void*) boxptr_Interactive_getElementTypeName,0}};
#define boxvar_Interactive_getElementTypeName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementTypeName)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementName(threadData_t *threadData, modelica_metatype _inElementSpec);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementName,2,0) {(void*) boxptr_Interactive_getElementName,0}};
#define boxvar_Interactive_getElementName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionTypeVars(threadData_t *threadData, modelica_metatype _inTypeVars, modelica_metatype _inDefinitions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionTypeVars,2,0) {(void*) boxptr_Interactive_getDefinitionTypeVars,0}};
#define boxvar_Interactive_getDefinitionTypeVars MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionTypeVars)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionComponents(threadData_t *threadData, modelica_string _typeStr, modelica_string _dirStr, modelica_integer _numDim, modelica_metatype _components);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionComponents(threadData_t *threadData, modelica_metatype _typeStr, modelica_metatype _dirStr, modelica_metatype _numDim, modelica_metatype _components);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionComponents,2,0) {(void*) boxptr_Interactive_getDefinitionComponents,0}};
#define boxvar_Interactive_getDefinitionComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionComponents)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionDirString(threadData_t *threadData, modelica_metatype _dir, modelica_metatype _variability, modelica_boolean _isFunction);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionDirString(threadData_t *threadData, modelica_metatype _dir, modelica_metatype _variability, modelica_metatype _isFunction);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionDirString,2,0) {(void*) boxptr_Interactive_getDefinitionDirString,0}};
#define boxvar_Interactive_getDefinitionDirString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionDirString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionContent(threadData_t *threadData, modelica_metatype _contents, modelica_boolean _addFunctions, modelica_boolean _isPublic);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionContent(threadData_t *threadData, modelica_metatype _contents, modelica_metatype _addFunctions, modelica_metatype _isPublic);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionContent,2,0) {(void*) boxptr_Interactive_getDefinitionContent,0}};
#define boxvar_Interactive_getDefinitionContent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionContent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionParts(threadData_t *threadData, modelica_metatype _parts, modelica_metatype _inTypeVars, modelica_boolean _isFunction);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionParts(threadData_t *threadData, modelica_metatype _parts, modelica_metatype _inTypeVars, modelica_metatype _isFunction);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionParts,2,0) {(void*) boxptr_Interactive_getDefinitionParts,0}};
#define boxvar_Interactive_getDefinitionParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionParts)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_getDefinitionDimensions(threadData_t *threadData, modelica_metatype _ts, modelica_metatype _attr);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionDimensions(threadData_t *threadData, modelica_metatype _ts, modelica_metatype _attr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionDimensions,2,0) {(void*) boxptr_Interactive_getDefinitionDimensions,0}};
#define boxvar_Interactive_getDefinitionDimensions MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionDimensions)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionPathString(threadData_t *threadData, modelica_metatype _path);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionPathString,2,0) {(void*) boxptr_Interactive_getDefinitionPathString,0}};
#define boxvar_Interactive_getDefinitionPathString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionPathString)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getEnumerationLiterals(threadData_t *threadData, modelica_metatype _el);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getEnumerationLiterals,2,0) {(void*) boxptr_Interactive_getEnumerationLiterals,0}};
#define boxvar_Interactive_getEnumerationLiterals MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getEnumerationLiterals)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionsReplaceableClass(threadData_t *threadData, modelica_metatype _class_);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionsReplaceableClass,2,0) {(void*) boxptr_Interactive_getDefinitionsReplaceableClass,0}};
#define boxvar_Interactive_getDefinitionsReplaceableClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionsReplaceableClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionsClass(threadData_t *threadData, modelica_metatype _class_, modelica_boolean _addFunctions);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionsClass(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _addFunctions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionsClass,2,0) {(void*) boxptr_Interactive_getDefinitionsClass,0}};
#define boxvar_Interactive_getDefinitionsClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitionsClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitions2(threadData_t *threadData, modelica_metatype _classes, modelica_boolean _addFunctions);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitions2(threadData_t *threadData, modelica_metatype _classes, modelica_metatype _addFunctions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitions2,2,0) {(void*) boxptr_Interactive_getDefinitions2,0}};
#define boxvar_Interactive_getDefinitions2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitions2)
PROTECTED_FUNCTION_STATIC void omc_Interactive_printWithNewline(threadData_t *threadData, modelica_string _s);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_printWithNewline,2,0) {(void*) boxptr_Interactive_printWithNewline,0}};
#define boxvar_Interactive_printWithNewline MMC_REFSTRUCTLIT(boxvar_lit_Interactive_printWithNewline)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitions(threadData_t *threadData, modelica_metatype _ast, modelica_boolean _addFunctions);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitions(threadData_t *threadData, modelica_metatype _ast, modelica_metatype _addFunctions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefinitions,2,0) {(void*) boxptr_Interactive_getDefinitions,0}};
#define boxvar_Interactive_getDefinitions MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefinitions)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElseIfAlgorithm(threadData_t *threadData, modelica_metatype _elseIfbranch);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElseIfAlgorithm,2,0) {(void*) boxptr_Interactive_transformFlatElseIfAlgorithm,0}};
#define boxvar_Interactive_transformFlatElseIfAlgorithm MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElseIfAlgorithm)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatAlgorithm(threadData_t *threadData, modelica_metatype _alg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatAlgorithm,2,0) {(void*) boxptr_Interactive_transformFlatAlgorithm,0}};
#define boxvar_Interactive_transformFlatAlgorithm MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatAlgorithm)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatAlgorithmItem(threadData_t *threadData, modelica_metatype _algitem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatAlgorithmItem,2,0) {(void*) boxptr_Interactive_transformFlatAlgorithmItem,0}};
#define boxvar_Interactive_transformFlatAlgorithmItem MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatAlgorithmItem)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatExp(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDummy, modelica_integer *out_outDummy);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformFlatExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDummy, modelica_metatype *out_outDummy);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatExp,2,0) {(void*) boxptr_Interactive_transformFlatExp,0}};
#define boxvar_Interactive_transformFlatExp MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatNamedArg(threadData_t *threadData, modelica_metatype _namedArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatNamedArg,2,0) {(void*) boxptr_Interactive_transformFlatNamedArg,0}};
#define boxvar_Interactive_transformFlatNamedArg MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatNamedArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatFunctionArgs(threadData_t *threadData, modelica_metatype _fargs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatFunctionArgs,2,0) {(void*) boxptr_Interactive_transformFlatFunctionArgs,0}};
#define boxvar_Interactive_transformFlatFunctionArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatFunctionArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElseIfPart(threadData_t *threadData, modelica_metatype _elseIfPart);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElseIfPart,2,0) {(void*) boxptr_Interactive_transformFlatElseIfPart,0}};
#define boxvar_Interactive_transformFlatElseIfPart MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElseIfPart)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatEquation(threadData_t *threadData, modelica_metatype _eqn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatEquation,2,0) {(void*) boxptr_Interactive_transformFlatEquation,0}};
#define boxvar_Interactive_transformFlatEquation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatEquationItem(threadData_t *threadData, modelica_metatype _eqnitem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatEquationItem,2,0) {(void*) boxptr_Interactive_transformFlatEquationItem,0}};
#define boxvar_Interactive_transformFlatEquationItem MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatEquationItem)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponentRef(threadData_t *threadData, modelica_metatype _cr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponentRef,2,0) {(void*) boxptr_Interactive_transformFlatComponentRef,0}};
#define boxvar_Interactive_transformFlatComponentRef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponentRef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatModificationOption(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatModificationOption,2,0) {(void*) boxptr_Interactive_transformFlatModificationOption,0}};
#define boxvar_Interactive_transformFlatModificationOption MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatModificationOption)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementArg(threadData_t *threadData, modelica_metatype _eltArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementArg,2,0) {(void*) boxptr_Interactive_transformFlatElementArg,0}};
#define boxvar_Interactive_transformFlatElementArg MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatSubscript(threadData_t *threadData, modelica_metatype _s);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatSubscript,2,0) {(void*) boxptr_Interactive_transformFlatSubscript,0}};
#define boxvar_Interactive_transformFlatSubscript MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatSubscript)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatArrayDim(threadData_t *threadData, modelica_metatype _ad);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatArrayDim,2,0) {(void*) boxptr_Interactive_transformFlatArrayDim,0}};
#define boxvar_Interactive_transformFlatArrayDim MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatArrayDim)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponent(threadData_t *threadData, modelica_metatype _comp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponent,2,0) {(void*) boxptr_Interactive_transformFlatComponent,0}};
#define boxvar_Interactive_transformFlatComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponentItem(threadData_t *threadData, modelica_metatype _compitem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponentItem,2,0) {(void*) boxptr_Interactive_transformFlatComponentItem,0}};
#define boxvar_Interactive_transformFlatComponentItem MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatComponentItem)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementSpec(threadData_t *threadData, modelica_metatype _eltSpec);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementSpec,2,0) {(void*) boxptr_Interactive_transformFlatElementSpec,0}};
#define boxvar_Interactive_transformFlatElementSpec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementSpec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElement(threadData_t *threadData, modelica_metatype _elt);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElement,2,0) {(void*) boxptr_Interactive_transformFlatElement,0}};
#define boxvar_Interactive_transformFlatElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementItem(threadData_t *threadData, modelica_metatype _eitem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementItem,2,0) {(void*) boxptr_Interactive_transformFlatElementItem,0}};
#define boxvar_Interactive_transformFlatElementItem MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatElementItem)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatClassDef(threadData_t *threadData, modelica_metatype _cdef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatClassDef,2,0) {(void*) boxptr_Interactive_transformFlatClassDef,0}};
#define boxvar_Interactive_transformFlatClassDef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatClassDef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatClass(threadData_t *threadData, modelica_metatype _inTuple);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformFlatClass,2,0) {(void*) boxptr_Interactive_transformFlatClass,0}};
#define boxvar_Interactive_transformFlatClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformFlatClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getSurroundingPackage(threadData_t *threadData, modelica_metatype _classpath, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getSurroundingPackage,2,0) {(void*) boxptr_Interactive_getSurroundingPackage,0}};
#define boxvar_Interactive_getSurroundingPackage MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getSurroundingPackage)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeClassDiffFiledInElementitemlist(threadData_t *threadData, modelica_metatype _inElements, modelica_string _inFilename);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeClassDiffFiledInElementitemlist,2,0) {(void*) boxptr_Interactive_removeClassDiffFiledInElementitemlist,0}};
#define boxvar_Interactive_removeClassDiffFiledInElementitemlist MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeClassDiffFiledInElementitemlist)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_classIsInFile(threadData_t *threadData, modelica_string _inFilename, modelica_metatype _inElement);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_classIsInFile(threadData_t *threadData, modelica_metatype _inFilename, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_classIsInFile,2,0) {(void*) boxptr_Interactive_classIsInFile,0}};
#define boxvar_Interactive_classIsInFile MMC_REFSTRUCTLIT(boxvar_lit_Interactive_classIsInFile)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeInnerDiffFiledClass(threadData_t *threadData, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeInnerDiffFiledClass,2,0) {(void*) boxptr_Interactive_removeInnerDiffFiledClass,0}};
#define boxvar_Interactive_removeInnerDiffFiledClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeInnerDiffFiledClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeInnerDiffFiledClasses(threadData_t *threadData, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeInnerDiffFiledClasses,2,0) {(void*) boxptr_Interactive_removeInnerDiffFiledClasses,0}};
#define boxvar_Interactive_removeInnerDiffFiledClasses MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeInnerDiffFiledClasses)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_commentToAbsyn(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_commentToAbsyn,2,0) {(void*) boxptr_Interactive_commentToAbsyn,0}};
#define boxvar_Interactive_commentToAbsyn MMC_REFSTRUCTLIT(boxvar_lit_Interactive_commentToAbsyn)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_annotationListToAbsynComment2(threadData_t *threadData, modelica_metatype _inNamedArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_annotationListToAbsynComment2,2,0) {(void*) boxptr_Interactive_annotationListToAbsynComment2,0}};
#define boxvar_Interactive_annotationListToAbsynComment2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_annotationListToAbsynComment2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_annotationListToAbsynComment(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inAbsynCommentOption);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_annotationListToAbsynComment,2,0) {(void*) boxptr_Interactive_annotationListToAbsynComment,0}};
#define boxvar_Interactive_annotationListToAbsynComment MMC_REFSTRUCTLIT(boxvar_lit_Interactive_annotationListToAbsynComment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_selectAnnotation(threadData_t *threadData, modelica_metatype _newAnn, modelica_metatype _oldAnn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_selectAnnotation,2,0) {(void*) boxptr_Interactive_selectAnnotation,0}};
#define boxvar_Interactive_selectAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_selectAnnotation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_modificationToAbsyn2(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_modificationToAbsyn2,2,0) {(void*) boxptr_Interactive_modificationToAbsyn2,0}};
#define boxvar_Interactive_modificationToAbsyn2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_modificationToAbsyn2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_modificationToAbsyn(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inAbsynModificationOption);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_modificationToAbsyn,2,0) {(void*) boxptr_Interactive_modificationToAbsyn,0}};
#define boxvar_Interactive_modificationToAbsyn MMC_REFSTRUCTLIT(boxvar_lit_Interactive_modificationToAbsyn)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElementSpec(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fspec, modelica_boolean *out_found);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElementSpec(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fspec, modelica_metatype *out_found);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElementSpec,2,0) {(void*) boxptr_Interactive_transformClassInElementSpec,0}};
#define boxvar_Interactive_transformClassInElementSpec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElementSpec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElement(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Felement, modelica_boolean *out_found);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElement(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Felement, modelica_metatype *out_found);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElement,2,0) {(void*) boxptr_Interactive_transformClassInElement,0}};
#define boxvar_Interactive_transformClassInElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElementItem(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fitem, modelica_boolean *out_found);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElementItem(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fitem, modelica_metatype *out_found);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElementItem,2,0) {(void*) boxptr_Interactive_transformClassInElementItem,0}};
#define boxvar_Interactive_transformClassInElementItem MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformClassInElementItem)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInClassPart(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fpart, modelica_boolean *out_found);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInClassPart(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fpart, modelica_metatype *out_found);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformClassInClassPart,2,0) {(void*) boxptr_Interactive_transformClassInClassPart,0}};
#define boxvar_Interactive_transformClassInClassPart MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformClassInClassPart)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInClass(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fcls);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformClassInClass,2,0) {(void*) boxptr_Interactive_transformClassInClass,0}};
#define boxvar_Interactive_transformClassInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformClassInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformPathedClassInClass(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_fnptr _inFunc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_transformPathedClassInClass,2,0) {(void*) boxptr_Interactive_transformPathedClassInClass,0}};
#define boxvar_Interactive_transformPathedClassInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_transformPathedClassInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInitialAlgorithmList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getInitialAlgorithmList,2,0) {(void*) boxptr_Interactive_getInitialAlgorithmList,0}};
#define boxvar_Interactive_getInitialAlgorithmList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getInitialAlgorithmList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getAlgorithmList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAlgorithmList,2,0) {(void*) boxptr_Interactive_getAlgorithmList,0}};
#define boxvar_Interactive_getAlgorithmList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAlgorithmList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInitialEquationList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getInitialEquationList,2,0) {(void*) boxptr_Interactive_getInitialEquationList,0}};
#define boxvar_Interactive_getInitialEquationList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getInitialEquationList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_addToProtected(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inElementItem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_addToProtected,2,0) {(void*) boxptr_Interactive_addToProtected,0}};
#define boxvar_Interactive_addToProtected MMC_REFSTRUCTLIT(boxvar_lit_Interactive_addToProtected)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentInfoOld(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentInfoOld,2,0) {(void*) boxptr_Interactive_getComponentInfoOld,0}};
#define boxvar_Interactive_getComponentInfoOld MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentInfoOld)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsInfo2(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_boolean _inBoolean, modelica_string _inString, modelica_metatype _inEnv, modelica_metatype _acc);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentsInfo2(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_metatype _inBoolean, modelica_metatype _inString, modelica_metatype _inEnv, modelica_metatype _acc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentsInfo2,2,0) {(void*) boxptr_Interactive_getComponentsInfo2,0}};
#define boxvar_Interactive_getComponentsInfo2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentsInfo2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentInfo(threadData_t *threadData, modelica_metatype _inElement, modelica_boolean _inQuoteNames, modelica_string _inVisibility, modelica_metatype _inEnv);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentInfo(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inQuoteNames, modelica_metatype _inVisibility, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentInfo,2,0) {(void*) boxptr_Interactive_getComponentInfo,0}};
#define boxvar_Interactive_getComponentInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentInfo)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getNthComponentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_integer _nth);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _nth);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentInClass,2,0) {(void*) boxptr_Interactive_getNthComponentInClass,0}};
#define boxvar_Interactive_getNthComponentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationString(threadData_t *threadData, modelica_metatype _inAnnotation, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationString,2,0) {(void*) boxptr_Interactive_getAnnotationString,0}};
#define boxvar_Interactive_getAnnotationString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_cacheFromGraphicEnvCache(threadData_t *threadData, modelica_metatype _inEnvCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_cacheFromGraphicEnvCache,2,0) {(void*) boxptr_Interactive_cacheFromGraphicEnvCache,0}};
#define boxvar_Interactive_cacheFromGraphicEnvCache MMC_REFSTRUCTLIT(boxvar_lit_Interactive_cacheFromGraphicEnvCache)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsModification(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsModification,2,0) {(void*) boxptr_Interactive_getComponentitemsModification,0}};
#define boxvar_Interactive_getComponentitemsModification MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsModification)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsAnnotation(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotation,2,0) {(void*) boxptr_Interactive_getComponentitemsAnnotation,0}};
#define boxvar_Interactive_getComponentitemsAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotation)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotation(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotation,2,0) {(void*) boxptr_Interactive_getComponentAnnotation,0}};
#define boxvar_Interactive_getComponentAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotationsFromItems(threadData_t *threadData, modelica_metatype _inComponentItems, modelica_metatype _ccAnnotations, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotationsFromItems,2,0) {(void*) boxptr_Interactive_getComponentitemsAnnotationsFromItems,0}};
#define boxvar_Interactive_getComponentitemsAnnotationsFromItems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotationsFromItems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotationsElArgs(threadData_t *threadData, modelica_metatype _inElementArgs, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_boolean _addAnnotationName, modelica_metatype *out_outCache);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentitemsAnnotationsElArgs(threadData_t *threadData, modelica_metatype _inElementArgs, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_metatype _addAnnotationName, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotationsElArgs,2,0) {(void*) boxptr_Interactive_getComponentitemsAnnotationsElArgs,0}};
#define boxvar_Interactive_getComponentitemsAnnotationsElArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotationsElArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotations(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotations,2,0) {(void*) boxptr_Interactive_getComponentitemsAnnotations,0}};
#define boxvar_Interactive_getComponentitemsAnnotations MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsAnnotations)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotationsFromElts(threadData_t *threadData, modelica_metatype _comps, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotationsFromElts,2,0) {(void*) boxptr_Interactive_getComponentAnnotationsFromElts,0}};
#define boxvar_Interactive_getComponentAnnotationsFromElts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotationsFromElts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionsInEquations(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectionsInEquations,2,0) {(void*) boxptr_Interactive_getConnectionsInEquations,0}};
#define boxvar_Interactive_getConnectionsInEquations MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectionsInEquations)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionsInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectionsInClassparts,2,0) {(void*) boxptr_Interactive_getConnectionsInClassparts,0}};
#define boxvar_Interactive_getConnectionsInClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectionsInClassparts)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectionStr(threadData_t *threadData, modelica_metatype _inEquation, modelica_string *out_outToString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectionStr,2,0) {(void*) boxptr_Interactive_getConnectionStr,0}};
#define boxvar_Interactive_getConnectionStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectionStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectionAnnotationStr(threadData_t *threadData, modelica_metatype _inEquationItem, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectionAnnotationStr,2,0) {(void*) boxptr_Interactive_getConnectionAnnotationStr,0}};
#define boxvar_Interactive_getConnectionAnnotationStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectionAnnotationStr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionAnnotationStrElArgs(threadData_t *threadData, modelica_metatype _inElArgLst, modelica_metatype _info, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectionAnnotationStrElArgs,2,0) {(void*) boxptr_Interactive_getConnectionAnnotationStrElArgs,0}};
#define boxvar_Interactive_getConnectionAnnotationStrElArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectionAnnotationStrElArgs)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inAbsynElementItemLst);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countConnectors,2,0) {(void*) boxptr_Interactive_countConnectors,0}};
#define boxvar_Interactive_countConnectors MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countConnectors)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countPublicConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countPublicConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countPublicConnectors,2,0) {(void*) boxptr_Interactive_countPublicConnectors,0}};
#define boxvar_Interactive_countPublicConnectors MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countPublicConnectors)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthCompname,2,0) {(void*) boxptr_Interactive_getNthCompname,0}};
#define boxvar_Interactive_getNthCompname MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthCompname)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectorStr(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_integer _inInteger, modelica_metatype *out_outPath);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectorStr(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inInteger, modelica_metatype *out_outPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectorStr,2,0) {(void*) boxptr_Interactive_getNthConnectorStr,0}};
#define boxvar_Interactive_getNthConnectorStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectorStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthPublicConnectorStr(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_integer _inInteger, modelica_metatype *out_outPath);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthPublicConnectorStr(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype _inInteger, modelica_metatype *out_outPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthPublicConnectorStr,2,0) {(void*) boxptr_Interactive_getNthPublicConnectorStr,0}};
#define boxvar_Interactive_getNthPublicConnectorStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthPublicConnectorStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationInfoHeader(threadData_t *threadData, modelica_metatype _eltArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationInfoHeader,2,0) {(void*) boxptr_Interactive_getDocumentationAnnotationInfoHeader,0}};
#define boxvar_Interactive_getDocumentationAnnotationInfoHeader MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationInfoHeader)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationRevision(threadData_t *threadData, modelica_metatype _eltArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationRevision,2,0) {(void*) boxptr_Interactive_getDocumentationAnnotationRevision,0}};
#define boxvar_Interactive_getDocumentationAnnotationRevision MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationRevision)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationInfo(threadData_t *threadData, modelica_metatype _eltArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationInfo,2,0) {(void*) boxptr_Interactive_getDocumentationAnnotationInfo,0}};
#define boxvar_Interactive_getDocumentationAnnotationInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationAnnotationInfo)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExperimentAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExperimentAnnotationString2,2,0) {(void*) boxptr_Interactive_getExperimentAnnotationString2,0}};
#define boxvar_Interactive_getExperimentAnnotationString2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExperimentAnnotationString2)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentPrefixes(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentPrefixes,2,0) {(void*) boxptr_Interactive_getDefaultComponentPrefixes,0}};
#define boxvar_Interactive_getDefaultComponentPrefixes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentPrefixes)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentNameModStr(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentNameModStr,2,0) {(void*) boxptr_Interactive_getDefaultComponentNameModStr,0}};
#define boxvar_Interactive_getDefaultComponentNameModStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentNameModStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentName(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentName,2,0) {(void*) boxptr_Interactive_getDefaultComponentName,0}};
#define boxvar_Interactive_getDefaultComponentName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentName)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationClassAnnotationModStr(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationClassAnnotationModStr,2,0) {(void*) boxptr_Interactive_getDocumentationClassAnnotationModStr,0}};
#define boxvar_Interactive_getDocumentationClassAnnotationModStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDocumentationClassAnnotationModStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationStr(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _annotationType, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationStr,2,0) {(void*) boxptr_Interactive_getAnnotationStr,0}};
#define boxvar_Interactive_getAnnotationStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationStr)
PROTECTED_FUNCTION_STATIC void omc_Interactive_containAnnotation(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _annotationType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_containAnnotation,2,0) {(void*) boxptr_Interactive_containAnnotation,0}};
#define boxvar_Interactive_containAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_containAnnotation)
PROTECTED_FUNCTION_STATIC void omc_Interactive_isAnnotationType(threadData_t *threadData, modelica_string _annotationStr, modelica_metatype _annotationType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isAnnotationType,2,0) {(void*) boxptr_Interactive_isAnnotationType,0}};
#define boxvar_Interactive_isAnnotationType MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isAnnotationType)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _annotationType, modelica_metatype _inProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationInClass,2,0) {(void*) boxptr_Interactive_getAnnotationInClass,0}};
#define boxvar_Interactive_getAnnotationInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getAnnotationInClass)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countBaseClassesFromElts,2,0) {(void*) boxptr_Interactive_countBaseClassesFromElts,0}};
#define boxvar_Interactive_countBaseClassesFromElts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countBaseClassesFromElts)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countBaseClassesFromParts,2,0) {(void*) boxptr_Interactive_countBaseClassesFromParts,0}};
#define boxvar_Interactive_countBaseClassesFromParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countBaseClassesFromParts)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClasses(threadData_t *threadData, modelica_metatype _inClass);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClasses(threadData_t *threadData, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countBaseClasses,2,0) {(void*) boxptr_Interactive_countBaseClasses,0}};
#define boxvar_Interactive_countBaseClasses MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countBaseClasses)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getBaseClassesFromElts,2,0) {(void*) boxptr_Interactive_getBaseClassesFromElts,0}};
#define boxvar_Interactive_getBaseClassesFromElts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getBaseClassesFromElts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getBaseClassesFromParts,2,0) {(void*) boxptr_Interactive_getBaseClassesFromParts,0}};
#define boxvar_Interactive_getBaseClassesFromParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getBaseClassesFromParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClasses(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getBaseClasses,2,0) {(void*) boxptr_Interactive_getBaseClasses,0}};
#define boxvar_Interactive_getBaseClasses MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getBaseClasses)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getTopQualifiedClassnames(threadData_t *threadData, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getTopQualifiedClassnames,2,0) {(void*) boxptr_Interactive_getTopQualifiedClassnames,0}};
#define boxvar_Interactive_getTopQualifiedClassnames MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getTopQualifiedClassnames)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInElts,2,0) {(void*) boxptr_Interactive_getPackagesInElts,0}};
#define boxvar_Interactive_getPackagesInElts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInElts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInParts,2,0) {(void*) boxptr_Interactive_getPackagesInParts,0}};
#define boxvar_Interactive_getPackagesInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInClass(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInClass,2,0) {(void*) boxptr_Interactive_getPackagesInClass,0}};
#define boxvar_Interactive_getPackagesInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getPackagesInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getTopPackagesInProgram(threadData_t *threadData, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getTopPackagesInProgram,2,0) {(void*) boxptr_Interactive_getTopPackagesInProgram,0}};
#define boxvar_Interactive_getTopPackagesInProgram MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getTopPackagesInProgram)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getIconAnnotation(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getIconAnnotation,2,0) {(void*) boxptr_Interactive_getIconAnnotation,0}};
#define boxvar_Interactive_getIconAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getIconAnnotation)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_filterIsVersionElement(threadData_t *threadData, modelica_metatype _eltArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_filterIsVersionElement(threadData_t *threadData, modelica_metatype _eltArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_filterIsVersionElement,2,0) {(void*) boxptr_Interactive_filterIsVersionElement,0}};
#define boxvar_Interactive_filterIsVersionElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_filterIsVersionElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_parseConversionAnnotationElement(threadData_t *threadData, modelica_metatype _mod, modelica_metatype *out_toVersion, modelica_metatype *out_scriptFilename);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_parseConversionAnnotationElement,2,0) {(void*) boxptr_Interactive_parseConversionAnnotationElement,0}};
#define boxvar_Interactive_parseConversionAnnotationElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_parseConversionAnnotationElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConversionsInClassMod(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConversionsInClassMod,2,0) {(void*) boxptr_Interactive_getConversionsInClassMod,0}};
#define boxvar_Interactive_getConversionsInClassMod MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConversionsInClassMod)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConversionAnnotationString(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConversionAnnotationString,2,0) {(void*) boxptr_Interactive_getConversionAnnotationString,0}};
#define boxvar_Interactive_getConversionAnnotationString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConversionAnnotationString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_updateUsedVersion_make__version__exp(threadData_t *threadData, modelica_metatype _exp, modelica_string _version);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_updateUsedVersion_make__version__exp,2,0) {(void*) boxptr_Interactive_updateUsedVersion_make__version__exp,0}};
#define boxvar_Interactive_updateUsedVersion_make__version__exp MMC_REFSTRUCTLIT(boxvar_lit_Interactive_updateUsedVersion_make__version__exp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getUsesAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs, modelica_string _classOrigin);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getUsesAnnotationString2,2,0) {(void*) boxptr_Interactive_getUsesAnnotationString2,0}};
#define boxvar_Interactive_getUsesAnnotationString2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getUsesAnnotationString2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getUsesAnnotationString(threadData_t *threadData, modelica_metatype _mod, modelica_string _classOrigin);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getUsesAnnotationString,2,0) {(void*) boxptr_Interactive_getUsesAnnotationString,0}};
#define boxvar_Interactive_getUsesAnnotationString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getUsesAnnotationString)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDiagramAnnotation(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDiagramAnnotation,2,0) {(void*) boxptr_Interactive_getDiagramAnnotation,0}};
#define boxvar_Interactive_getDiagramAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDiagramAnnotation)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectorIconAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectorIconAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectorIconAnnotation,2,0) {(void*) boxptr_Interactive_getNthConnectorIconAnnotation,0}};
#define boxvar_Interactive_getNthConnectorIconAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectorIconAnnotation)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnector(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnector(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthConnector,2,0) {(void*) boxptr_Interactive_getNthConnector,0}};
#define boxvar_Interactive_getNthConnector MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthConnector)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectorCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getConnectorCount,2,0) {(void*) boxptr_Interactive_getConnectorCount,0}};
#define boxvar_Interactive_getConnectorCount MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getConnectorCount)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectionAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectionAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectionAnnotation,2,0) {(void*) boxptr_Interactive_getNthConnectionAnnotation,0}};
#define boxvar_Interactive_getNthConnectionAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthConnectionAnnotation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInEquations(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInEquations,2,0) {(void*) boxptr_Interactive_setConnectionCommentInEquations,0}};
#define boxvar_Interactive_setConnectionCommentInEquations MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInEquations)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInParts,2,0) {(void*) boxptr_Interactive_setConnectionCommentInParts,0}};
#define boxvar_Interactive_setConnectionCommentInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInClass,2,0) {(void*) boxptr_Interactive_setConnectionCommentInClass,0}};
#define boxvar_Interactive_setConnectionCommentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setConnectionCommentInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4, modelica_metatype _inProgram5, modelica_string *out_outString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setConnectionComment,2,0) {(void*) boxptr_Interactive_setConnectionComment,0}};
#define boxvar_Interactive_setConnectionComment MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setConnectionComment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inComponentRef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInCompitems,2,0) {(void*) boxptr_Interactive_setComponentCommentInCompitems,0}};
#define boxvar_Interactive_setComponentCommentInCompitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInCompitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inComponentRef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInElementspec,2,0) {(void*) boxptr_Interactive_setComponentCommentInElementspec,0}};
#define boxvar_Interactive_setComponentCommentInElementspec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInElementspec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponentRef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInElementitems,2,0) {(void*) boxptr_Interactive_setComponentCommentInElementitems,0}};
#define boxvar_Interactive_setComponentCommentInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponentRef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInParts,2,0) {(void*) boxptr_Interactive_setComponentCommentInParts,0}};
#define boxvar_Interactive_setComponentCommentInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentRef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInClass,2,0) {(void*) boxptr_Interactive_setComponentCommentInClass,0}};
#define boxvar_Interactive_setComponentCommentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentCommentInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_setComponentComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_string _inString3, modelica_metatype _inProgram4, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentComment,2,0) {(void*) boxptr_Interactive_setComponentComment,0}};
#define boxvar_Interactive_setComponentComment MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentComment)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInCompitems,2,0) {(void*) boxptr_Interactive_getComponentCommentInCompitems,0}};
#define boxvar_Interactive_getComponentCommentInCompitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInCompitems)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInElementspec,2,0) {(void*) boxptr_Interactive_getComponentCommentInElementspec,0}};
#define boxvar_Interactive_getComponentCommentInElementspec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInElementspec)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInElementitems,2,0) {(void*) boxptr_Interactive_getComponentCommentInElementitems,0}};
#define boxvar_Interactive_getComponentCommentInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInElementitems)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInParts,2,0) {(void*) boxptr_Interactive_getComponentCommentInParts,0}};
#define boxvar_Interactive_getComponentCommentInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInParts)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInClass,2,0) {(void*) boxptr_Interactive_getComponentCommentInClass,0}};
#define boxvar_Interactive_getComponentCommentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCommentInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inProgram4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentComment,2,0) {(void*) boxptr_Interactive_getComponentComment,0}};
#define boxvar_Interactive_getComponentComment MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentComment)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_compareTransitionFuncArgs(threadData_t *threadData, modelica_metatype _args, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_compareTransitionFuncArgs(threadData_t *threadData, modelica_metatype _args, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_compareTransitionFuncArgs,2,0) {(void*) boxptr_Interactive_compareTransitionFuncArgs,0}};
#define boxvar_Interactive_compareTransitionFuncArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_compareTransitionFuncArgs)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_namedArgValueAsString(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_string _inNamedArg, modelica_string _inDefaultValue, modelica_boolean *out_outDefault);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_namedArgValueAsString(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inNamedArg, modelica_metatype _inDefaultValue, modelica_metatype *out_outDefault);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_namedArgValueAsString,2,0) {(void*) boxptr_Interactive_namedArgValueAsString,0}};
#define boxvar_Interactive_namedArgValueAsString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_namedArgValueAsString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteTransitionInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteTransitionInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteTransitionInEqlist,2,0) {(void*) boxptr_Interactive_deleteTransitionInEqlist,0}};
#define boxvar_Interactive_deleteTransitionInEqlist MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteTransitionInEqlist)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteTransitionInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteTransitionInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteTransitionInClass,2,0) {(void*) boxptr_Interactive_deleteTransitionInClass,0}};
#define boxvar_Interactive_deleteTransitionInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteTransitionInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteEquationInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteEquationInEqlist,2,0) {(void*) boxptr_Interactive_deleteEquationInEqlist,0}};
#define boxvar_Interactive_deleteEquationInEqlist MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteEquationInEqlist)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteEquationInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteEquationInClass,2,0) {(void*) boxptr_Interactive_deleteEquationInClass,0}};
#define boxvar_Interactive_deleteEquationInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteEquationInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_deleteConnection(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inProgram4, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteConnection,2,0) {(void*) boxptr_Interactive_deleteConnection,0}};
#define boxvar_Interactive_deleteConnection MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteConnection)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_addConnection(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inAbsynNamedArgLst4, modelica_metatype _inProgram5, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_addConnection,2,0) {(void*) boxptr_Interactive_addConnection,0}};
#define boxvar_Interactive_addConnection MMC_REFSTRUCTLIT(boxvar_lit_Interactive_addConnection)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsCondition(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsCondition,2,0) {(void*) boxptr_Interactive_getComponentitemsCondition,0}};
#define boxvar_Interactive_getComponentitemsCondition MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemsCondition)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCondition(threadData_t *threadData, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentCondition,2,0) {(void*) boxptr_Interactive_getComponentCondition,0}};
#define boxvar_Interactive_getComponentCondition MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentCondition)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentCondition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentCondition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentCondition,2,0) {(void*) boxptr_Interactive_getNthComponentCondition,0}};
#define boxvar_Interactive_getNthComponentCondition MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentCondition)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentModification(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentModification(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentModification,2,0) {(void*) boxptr_Interactive_getNthComponentModification,0}};
#define boxvar_Interactive_getNthComponentModification MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentModification)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentAnnotation,2,0) {(void*) boxptr_Interactive_getNthComponentAnnotation,0}};
#define boxvar_Interactive_getNthComponentAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponentAnnotation)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotations(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inProgram, modelica_integer _inAccess);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentAnnotations(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inProgram, modelica_metatype _inAccess);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotations,2,0) {(void*) boxptr_Interactive_getComponentAnnotations,0}};
#define boxvar_Interactive_getComponentAnnotations MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentAnnotations)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponents2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_boolean _inBoolean, modelica_integer _inAccess);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponents2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inBoolean, modelica_metatype _inAccess);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponents2,2,0) {(void*) boxptr_Interactive_getComponents2,0}};
#define boxvar_Interactive_getComponents2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponents2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_insertQuotesToList(threadData_t *threadData, modelica_metatype _inStringList);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_insertQuotesToList,2,0) {(void*) boxptr_Interactive_insertQuotesToList,0}};
#define boxvar_Interactive_insertQuotesToList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_insertQuotesToList)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_useQuotes(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_useQuotes(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_useQuotes,2,0) {(void*) boxptr_Interactive_useQuotes,0}};
#define boxvar_Interactive_useQuotes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_useQuotes)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponent2(threadData_t *threadData, modelica_metatype _inClass2, modelica_integer _inInteger3, modelica_metatype _genv);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponent2(threadData_t *threadData, modelica_metatype _inClass2, modelica_metatype _inInteger3, modelica_metatype _genv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponent2,2,0) {(void*) boxptr_Interactive_getNthComponent2,0}};
#define boxvar_Interactive_getNthComponent2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponent2)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponent(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponent(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthComponent,2,0) {(void*) boxptr_Interactive_getNthComponent,0}};
#define boxvar_Interactive_getNthComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthComponent)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countComponentsInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countComponentsInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countComponentsInElts,2,0) {(void*) boxptr_Interactive_countComponentsInElts,0}};
#define boxvar_Interactive_countComponentsInElts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countComponentsInElts)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countComponents(threadData_t *threadData, modelica_metatype _inClass);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countComponents(threadData_t *threadData, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_countComponents,2,0) {(void*) boxptr_Interactive_countComponents,0}};
#define boxvar_Interactive_countComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_countComponents)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClass2(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_integer _inInteger3, modelica_metatype _inEnv4);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClass2(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_metatype _inInteger3, modelica_metatype _inEnv4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClass2,2,0) {(void*) boxptr_Interactive_getNthInheritedClass2,0}};
#define boxvar_Interactive_getNthInheritedClass2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClass2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInElementitems,2,0) {(void*) boxptr_Interactive_getExtendsInElementitems,0}};
#define boxvar_Interactive_getExtendsInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInParts,2,0) {(void*) boxptr_Interactive_getExtendsInParts,0}};
#define boxvar_Interactive_getExtendsInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInClass(threadData_t *threadData, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInClass,2,0) {(void*) boxptr_Interactive_getExtendsInClass,0}};
#define boxvar_Interactive_getExtendsInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExtendsInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClassMapAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_integer _inInteger, modelica_metatype _inProgram, modelica_string _inMapType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClassMapAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inInteger, modelica_metatype _inProgram, modelica_metatype _inMapType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClassMapAnnotation,2,0) {(void*) boxptr_Interactive_getNthInheritedClassMapAnnotation,0}};
#define boxvar_Interactive_getNthInheritedClassMapAnnotation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClassMapAnnotation)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getMapAnnotationStr(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_string _inMapType, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getMapAnnotationStr,2,0) {(void*) boxptr_Interactive_getMapAnnotationStr,0}};
#define boxvar_Interactive_getMapAnnotationStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getMapAnnotationStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClassAnnotationOpt(threadData_t *threadData, modelica_metatype _inModelPath, modelica_integer _inInteger, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype *out_annotationOpt);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClassAnnotationOpt(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inInteger, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype *out_annotationOpt);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClassAnnotationOpt,2,0) {(void*) boxptr_Interactive_getNthInheritedClassAnnotationOpt,0}};
#define boxvar_Interactive_getNthInheritedClassAnnotationOpt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClassAnnotationOpt)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClass,2,0) {(void*) boxptr_Interactive_getNthInheritedClass,0}};
#define boxvar_Interactive_getNthInheritedClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNthInheritedClass)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_getInheritanceCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getInheritanceCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getInheritanceCount,2,0) {(void*) boxptr_Interactive_getInheritanceCount,0}};
#define boxvar_Interactive_getInheritanceCount MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getInheritanceCount)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInheritedClassesHelper(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_metatype _inEnv4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getInheritedClassesHelper,2,0) {(void*) boxptr_Interactive_getInheritedClassesHelper,0}};
#define boxvar_Interactive_getInheritedClassesHelper MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getInheritedClassesHelper)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_updateComponent(threadData_t *threadData, modelica_string _inString1, modelica_metatype _inTypeCref, modelica_metatype _inComponentRef3, modelica_metatype _inAbsynNamedArgLst4, modelica_metatype _inProgram5, modelica_string *out_outString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_updateComponent,2,0) {(void*) boxptr_Interactive_updateComponent,0}};
#define boxvar_Interactive_updateComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_updateComponent)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentPrefixesModStr(threadData_t *threadData, modelica_metatype _mod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentPrefixesModStr,2,0) {(void*) boxptr_Interactive_getDefaultComponentPrefixesModStr,0}};
#define boxvar_Interactive_getDefaultComponentPrefixesModStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultComponentPrefixesModStr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultAttr(threadData_t *threadData, modelica_string _str);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultAttr,2,0) {(void*) boxptr_Interactive_getDefaultAttr,0}};
#define boxvar_Interactive_getDefaultAttr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultAttr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultReplaceable(threadData_t *threadData, modelica_string _str);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultReplaceable,2,0) {(void*) boxptr_Interactive_getDefaultReplaceable,0}};
#define boxvar_Interactive_getDefaultReplaceable MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultReplaceable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultInnerOuter(threadData_t *threadData, modelica_string _str);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultInnerOuter,2,0) {(void*) boxptr_Interactive_getDefaultInnerOuter,0}};
#define boxvar_Interactive_getDefaultInnerOuter MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultInnerOuter)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeReplaceableIfPartial(threadData_t *threadData, modelica_metatype _p, modelica_metatype _className, modelica_metatype _redecl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_makeReplaceableIfPartial,2,0) {(void*) boxptr_Interactive_makeReplaceableIfPartial,0}};
#define boxvar_Interactive_makeReplaceableIfPartial MMC_REFSTRUCTLIT(boxvar_lit_Interactive_makeReplaceableIfPartial)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultPrefixes(threadData_t *threadData, modelica_metatype _p, modelica_metatype _className, modelica_metatype *out_redecl, modelica_metatype *out_attr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getDefaultPrefixes,2,0) {(void*) boxptr_Interactive_getDefaultPrefixes,0}};
#define boxvar_Interactive_getDefaultPrefixes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getDefaultPrefixes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData_t *threadData, modelica_string _inString, modelica_metatype _inAbsynElementItemLst, modelica_metatype _item, modelica_boolean *out_success);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteOrUpdateComponentFromElementitems(threadData_t *threadData, modelica_metatype _inString, modelica_metatype _inAbsynElementItemLst, modelica_metatype _item, modelica_metatype *out_success);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponentFromElementitems,2,0) {(void*) boxptr_Interactive_deleteOrUpdateComponentFromElementitems,0}};
#define boxvar_Interactive_deleteOrUpdateComponentFromElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponentFromElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponentFromClass(threadData_t *threadData, modelica_string _inString, modelica_metatype _inClass, modelica_metatype _item);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponentFromClass,2,0) {(void*) boxptr_Interactive_deleteOrUpdateComponentFromClass,0}};
#define boxvar_Interactive_deleteOrUpdateComponentFromClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponentFromClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponent(threadData_t *threadData, modelica_string _inString, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _item);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponent,2,0) {(void*) boxptr_Interactive_deleteOrUpdateComponent,0}};
#define boxvar_Interactive_deleteOrUpdateComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteOrUpdateComponent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_lookupClassdef(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2, modelica_metatype _inProgram3, modelica_metatype *out_outPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_lookupClassdef,2,0) {(void*) boxptr_Interactive_lookupClassdef,0}};
#define boxvar_Interactive_lookupClassdef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_lookupClassdef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getVariableValueLst(threadData_t *threadData, modelica_metatype _ids, modelica_metatype _vars);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getVariableValueLst,2,0) {(void*) boxptr_Interactive_getVariableValueLst,0}};
#define boxvar_Interactive_getVariableValueLst MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getVariableValueLst)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getVariableValue(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inVariableLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getVariableValue,2,0) {(void*) boxptr_Interactive_getVariableValue,0}};
#define boxvar_Interactive_getVariableValue MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getVariableValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getCompitemNamed(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynComponentItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getCompitemNamed,2,0) {(void*) boxptr_Interactive_getCompitemNamed,0}};
#define boxvar_Interactive_getCompitemNamed MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getCompitemNamed)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getElementContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementContainsName,2,0) {(void*) boxptr_Interactive_getElementContainsName,0}};
#define boxvar_Interactive_getElementContainsName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementContainsName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentsContainsName,2,0) {(void*) boxptr_Interactive_getComponentsContainsName,0}};
#define boxvar_Interactive_getComponentsContainsName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentsContainsName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getElementitemContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementitemContainsName,2,0) {(void*) boxptr_Interactive_getElementitemContainsName,0}};
#define boxvar_Interactive_getElementitemContainsName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementitemContainsName)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getEnumLiterals(threadData_t *threadData, modelica_metatype _inClass);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getEnumLiterals,2,0) {(void*) boxptr_Interactive_getEnumLiterals,0}};
#define boxvar_Interactive_getEnumLiterals MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getEnumLiterals)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isProtectedClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inString);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isProtectedClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isProtectedClassInElements,2,0) {(void*) boxptr_Interactive_isProtectedClassInElements,0}};
#define boxvar_Interactive_isProtectedClassInElements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isProtectedClassInElements)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReplaceableInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inString);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReplaceableInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isReplaceableInElements,2,0) {(void*) boxptr_Interactive_isReplaceableInElements,0}};
#define boxvar_Interactive_isReplaceableInElements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isReplaceableInElements)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReplaceable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_string _inString, modelica_metatype _inProgram);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReplaceable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inString, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isReplaceable,2,0) {(void*) boxptr_Interactive_isReplaceable,0}};
#define boxvar_Interactive_isReplaceable MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isReplaceable)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isConstant(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isConstant(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isConstant,2,0) {(void*) boxptr_Interactive_isConstant,0}};
#define boxvar_Interactive_isConstant MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isConstant)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isProtected(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isProtected(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isProtected,2,0) {(void*) boxptr_Interactive_isProtected,0}};
#define boxvar_Interactive_isProtected MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isProtected)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isParameter(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isParameter(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isParameter,2,0) {(void*) boxptr_Interactive_isParameter,0}};
#define boxvar_Interactive_isParameter MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isParameter)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getClassDimensions(threadData_t *threadData, modelica_metatype _cdef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getClassDimensions,2,0) {(void*) boxptr_Interactive_getClassDimensions,0}};
#define boxvar_Interactive_getClassDimensions MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getClassDimensions)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExternalFunctionSpecification(threadData_t *threadData, modelica_metatype _cr, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExternalFunctionSpecification,2,0) {(void*) boxptr_Interactive_getExternalFunctionSpecification,0}};
#define boxvar_Interactive_getExternalFunctionSpecification MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExternalFunctionSpecification)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getShortDefinitionBaseClassInformation(threadData_t *threadData, modelica_metatype _cr, modelica_metatype _p);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getShortDefinitionBaseClassInformation,2,0) {(void*) boxptr_Interactive_getShortDefinitionBaseClassInformation,0}};
#define boxvar_Interactive_getShortDefinitionBaseClassInformation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getShortDefinitionBaseClassInformation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInCommentOpt(threadData_t *threadData, modelica_metatype _inAbsynCommentOption, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInCommentOpt,2,0) {(void*) boxptr_Interactive_setClassCommentInCommentOpt,0}};
#define boxvar_Interactive_setClassCommentInCommentOpt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInCommentOpt)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInClassdef(threadData_t *threadData, modelica_metatype _inClassDef, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInClassdef,2,0) {(void*) boxptr_Interactive_setClassCommentInClassdef,0}};
#define boxvar_Interactive_setClassCommentInClassdef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInClassdef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInClass,2,0) {(void*) boxptr_Interactive_setClassCommentInClass,0}};
#define boxvar_Interactive_setClassCommentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setClassCommentInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteClassFromList(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inAbsynClassLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteClassFromList,2,0) {(void*) boxptr_Interactive_deleteClassFromList,0}};
#define boxvar_Interactive_deleteClassFromList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteClassFromList)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_deleteClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_deleteClass,2,0) {(void*) boxptr_Interactive_deleteClass,0}};
#define boxvar_Interactive_deleteClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_deleteClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_createModel(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_createModel,2,0) {(void*) boxptr_Interactive_createModel,0}};
#define boxvar_Interactive_createModel MMC_REFSTRUCTLIT(boxvar_lit_Interactive_createModel)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_changeLastIdent(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_changeLastIdent,2,0) {(void*) boxptr_Interactive_changeLastIdent,0}};
#define boxvar_Interactive_changeLastIdent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_changeLastIdent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInImport(threadData_t *threadData, modelica_metatype _inImport1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInImport(threadData_t *threadData, modelica_metatype _inImport1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassInImport,2,0) {(void*) boxptr_Interactive_renameClassInImport,0}};
#define boxvar_Interactive_renameClassInImport MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassInImport)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassInElementSpec,2,0) {(void*) boxptr_Interactive_renameClassInElementSpec,0}};
#define boxvar_Interactive_renameClassInElementSpec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassInElementSpec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassInElements,2,0) {(void*) boxptr_Interactive_renameClassInElements,0}};
#define boxvar_Interactive_renameClassInElements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassInElements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassInParts,2,0) {(void*) boxptr_Interactive_renameClassInParts,0}};
#define boxvar_Interactive_renameClassInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassInClass,2,0) {(void*) boxptr_Interactive_renameClassInClass,0}};
#define boxvar_Interactive_renameClassInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClassVisitor,2,0) {(void*) boxptr_Interactive_renameClassVisitor,0}};
#define boxvar_Interactive_renameClassVisitor MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClassVisitor)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameClass(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameClass,2,0) {(void*) boxptr_Interactive_renameClass,0}};
#define boxvar_Interactive_renameClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemName(threadData_t *threadData, modelica_metatype _inComponentItem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemName,2,0) {(void*) boxptr_Interactive_getComponentitemName,0}};
#define boxvar_Interactive_getComponentitemName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentitemName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInCompitems,2,0) {(void*) boxptr_Interactive_setVariableBindingInCompitems,0}};
#define boxvar_Interactive_setVariableBindingInCompitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInCompitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInElement,2,0) {(void*) boxptr_Interactive_setVariableBindingInElement,0}};
#define boxvar_Interactive_setVariableBindingInElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInElementitems,2,0) {(void*) boxptr_Interactive_setVariableBindingInElementitems,0}};
#define boxvar_Interactive_setVariableBindingInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInClassparts,2,0) {(void*) boxptr_Interactive_setVariableBindingInClassparts,0}};
#define boxvar_Interactive_setVariableBindingInClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInClassparts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInClass,2,0) {(void*) boxptr_Interactive_setVariableBindingInClass,0}};
#define boxvar_Interactive_setVariableBindingInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setVariableBindingInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setParameterValue(threadData_t *threadData, modelica_metatype _inComponentRefClass, modelica_metatype _inComponentRefComponentName, modelica_metatype _inBindingExp, modelica_metatype _inFullProgram, modelica_string *out_outString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setParameterValue,2,0) {(void*) boxptr_Interactive_setParameterValue,0}};
#define boxvar_Interactive_setParameterValue MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setParameterValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getModificationNames(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getModificationNames,2,0) {(void*) boxptr_Interactive_getModificationNames,0}};
#define boxvar_Interactive_getModificationNames MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getModificationNames)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getModificationValues(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getModificationValues,2,0) {(void*) boxptr_Interactive_getModificationValues,0}};
#define boxvar_Interactive_getModificationValues MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getModificationValues)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_createNestedSubMod(threadData_t *threadData, modelica_metatype _inComponentName, modelica_metatype _inMod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_createNestedSubMod,2,0) {(void*) boxptr_Interactive_createNestedSubMod,0}};
#define boxvar_Interactive_createNestedSubMod MMC_REFSTRUCTLIT(boxvar_lit_Interactive_createNestedSubMod)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_propagateMod2(threadData_t *threadData, modelica_metatype _inComponentName, modelica_metatype _inSubMods, modelica_metatype _inNewMod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_propagateMod2,2,0) {(void*) boxptr_Interactive_propagateMod2,0}};
#define boxvar_Interactive_propagateMod2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_propagateMod2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_mergeElementArgs(threadData_t *threadData, modelica_metatype _inOldArgs, modelica_metatype _inNewArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_mergeElementArgs,2,0) {(void*) boxptr_Interactive_mergeElementArgs,0}};
#define boxvar_Interactive_mergeElementArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_mergeElementArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentSubmodifierInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inMod);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentSubmodifierInClass,2,0) {(void*) boxptr_Interactive_setComponentSubmodifierInClass,0}};
#define boxvar_Interactive_setComponentSubmodifierInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentSubmodifierInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentModifier(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inMod, modelica_metatype _inProgram, modelica_string *out_outResult);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentModifier,2,0) {(void*) boxptr_Interactive_setComponentModifier,0}};
#define boxvar_Interactive_setComponentModifier MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentModifier)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extendsName(threadData_t *threadData, modelica_metatype _inElementSpec);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extendsName,2,0) {(void*) boxptr_Interactive_extendsName,0}};
#define boxvar_Interactive_extendsName MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extendsName)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_extendsElementspecNamed(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inPath);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_extendsElementspecNamed(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extendsElementspecNamed,2,0) {(void*) boxptr_Interactive_extendsElementspecNamed,0}};
#define boxvar_Interactive_extendsElementspecNamed MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extendsElementspecNamed)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_hasModifiers(threadData_t *threadData, modelica_metatype _exts);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_hasModifiers(threadData_t *threadData, modelica_metatype _exts);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_hasModifiers,2,0) {(void*) boxptr_Interactive_hasModifiers,0}};
#define boxvar_Interactive_hasModifiers MMC_REFSTRUCTLIT(boxvar_lit_Interactive_hasModifiers)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExtendsModifierNames(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_boolean _inBoolean, modelica_metatype _inProgram3);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getExtendsModifierNames(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inBoolean, modelica_metatype _inProgram3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExtendsModifierNames,2,0) {(void*) boxptr_Interactive_getExtendsModifierNames,0}};
#define boxvar_Interactive_getExtendsModifierNames MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExtendsModifierNames)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeExtendsFullyQualified(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_makeExtendsFullyQualified,2,0) {(void*) boxptr_Interactive_makeExtendsFullyQualified,0}};
#define boxvar_Interactive_makeExtendsFullyQualified MMC_REFSTRUCTLIT(boxvar_lit_Interactive_makeExtendsFullyQualified)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_isExtendsModifierFinal(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inProgram4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isExtendsModifierFinal,2,0) {(void*) boxptr_Interactive_isExtendsModifierFinal,0}};
#define boxvar_Interactive_isExtendsModifierFinal MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isExtendsModifierFinal)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExtendsModifierValue(threadData_t *threadData, modelica_metatype _classRef, modelica_metatype _extendsRef, modelica_metatype _varRef, modelica_metatype _program);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getExtendsModifierValue,2,0) {(void*) boxptr_Interactive_getExtendsModifierValue,0}};
#define boxvar_Interactive_getExtendsModifierValue MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getExtendsModifierValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInElement,2,0) {(void*) boxptr_Interactive_setExtendsSubmodifierInElement,0}};
#define boxvar_Interactive_setExtendsSubmodifierInElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInElementitems,2,0) {(void*) boxptr_Interactive_setExtendsSubmodifierInElementitems,0}};
#define boxvar_Interactive_setExtendsSubmodifierInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInClassparts,2,0) {(void*) boxptr_Interactive_setExtendsSubmodifierInClassparts,0}};
#define boxvar_Interactive_setExtendsSubmodifierInClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInClassparts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInClass,2,0) {(void*) boxptr_Interactive_setExtendsSubmodifierInClass,0}};
#define boxvar_Interactive_setExtendsSubmodifierInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setExtendsSubmodifierInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsModifierValue(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inModification4, modelica_metatype _inProgram5, modelica_string *out_outString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setExtendsModifierValue,2,0) {(void*) boxptr_Interactive_setExtendsModifierValue,0}};
#define boxvar_Interactive_setExtendsModifierValue MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setExtendsModifierValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInElement,2,0) {(void*) boxptr_Interactive_removeExtendsModifiersInElement,0}};
#define boxvar_Interactive_removeExtendsModifiersInElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInElementitems,2,0) {(void*) boxptr_Interactive_removeExtendsModifiersInElementitems,0}};
#define boxvar_Interactive_removeExtendsModifiersInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInClassparts,2,0) {(void*) boxptr_Interactive_removeExtendsModifiersInClassparts,0}};
#define boxvar_Interactive_removeExtendsModifiersInClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInClassparts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInClass,2,0) {(void*) boxptr_Interactive_removeExtendsModifiersInClass,0}};
#define boxvar_Interactive_removeExtendsModifiersInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_removeExtendsModifiersInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementsInfo(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementsInfo,2,0) {(void*) boxptr_Interactive_getElementsInfo,0}};
#define boxvar_Interactive_getElementsInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementsInfo)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_appendNonEmptyStrings(threadData_t *threadData, modelica_string _inString1, modelica_string _inString2, modelica_string _inString3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_appendNonEmptyStrings,2,0) {(void*) boxptr_Interactive_appendNonEmptyStrings,0}};
#define boxvar_Interactive_appendNonEmptyStrings MMC_REFSTRUCTLIT(boxvar_lit_Interactive_appendNonEmptyStrings)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_constructElementsInfo(threadData_t *threadData, modelica_string _inString, modelica_metatype _inAbsynElementItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_constructElementsInfo,2,0) {(void*) boxptr_Interactive_constructElementsInfo,0}};
#define boxvar_Interactive_constructElementsInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_constructElementsInfo)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementInfo(threadData_t *threadData, modelica_metatype _inElementItem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementInfo,2,0) {(void*) boxptr_Interactive_getElementInfo,0}};
#define boxvar_Interactive_getElementInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementInfo)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementType(threadData_t *threadData, modelica_metatype _inElementSpec);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getElementType,2,0) {(void*) boxptr_Interactive_getElementType,0}};
#define boxvar_Interactive_getElementType MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getElementType)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getImportString(threadData_t *threadData, modelica_metatype _inImport);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getImportString,2,0) {(void*) boxptr_Interactive_getImportString,0}};
#define boxvar_Interactive_getImportString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getImportString)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getCrefInfo(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getCrefInfo,2,0) {(void*) boxptr_Interactive_getCrefInfo,0}};
#define boxvar_Interactive_getCrefInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getCrefInfo)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_selectString(threadData_t *threadData, modelica_boolean _inSelector, modelica_string _inString2, modelica_string _inString3);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_selectString(threadData_t *threadData, modelica_metatype _inSelector, modelica_metatype _inString2, modelica_metatype _inString3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_selectString,2,0) {(void*) boxptr_Interactive_selectString,0}};
#define boxvar_Interactive_selectString MMC_REFSTRUCTLIT(boxvar_lit_Interactive_selectString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementIsField(threadData_t *threadData, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setElementIsField,2,0) {(void*) boxptr_Interactive_setElementIsField,0}};
#define boxvar_Interactive_setElementIsField MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setElementIsField)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementCausality(threadData_t *threadData, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setElementCausality,2,0) {(void*) boxptr_Interactive_setElementCausality,0}};
#define boxvar_Interactive_setElementCausality MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setElementCausality)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementVariability(threadData_t *threadData, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setElementVariability,2,0) {(void*) boxptr_Interactive_setElementVariability,0}};
#define boxvar_Interactive_setElementVariability MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setElementVariability)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementParallelism(threadData_t *threadData, modelica_string _inString);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setElementParallelism,2,0) {(void*) boxptr_Interactive_setElementParallelism,0}};
#define boxvar_Interactive_setElementParallelism MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setElementParallelism)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementAttributes(threadData_t *threadData, modelica_metatype _inElementAttributes1, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_string _inString2, modelica_string _inString3, modelica_string _inString4, modelica_string _inString5);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setElementAttributes(threadData_t *threadData, modelica_metatype _inElementAttributes1, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inString2, modelica_metatype _inString3, modelica_metatype _inString4, modelica_metatype _inString5);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setElementAttributes,2,0) {(void*) boxptr_Interactive_setElementAttributes,0}};
#define boxvar_Interactive_setElementAttributes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setElementAttributes)
PROTECTED_FUNCTION_STATIC void omc_Interactive_itemsContainCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_string _inIdent);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_itemsContainCompname,2,0) {(void*) boxptr_Interactive_itemsContainCompname,0}};
#define boxvar_Interactive_itemsContainCompname MMC_REFSTRUCTLIT(boxvar_lit_Interactive_itemsContainCompname)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_string _inIdent2, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_string _inString3, modelica_string _inString4, modelica_string _inString5, modelica_string _inString6);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inIdent2, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inString3, modelica_metatype _inString4, modelica_metatype _inString5, modelica_metatype _inString6);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElementspec,2,0) {(void*) boxptr_Interactive_setComponentPropertiesInElementspec,0}};
#define boxvar_Interactive_setComponentPropertiesInElementspec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElementspec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setInnerOuterAttributes(threadData_t *threadData, modelica_metatype _inBooleanLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setInnerOuterAttributes,2,0) {(void*) boxptr_Interactive_setInnerOuterAttributes,0}};
#define boxvar_Interactive_setInnerOuterAttributes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setInnerOuterAttributes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setReplaceableKeywordAttributes(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption, modelica_boolean _inBoolean);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setReplaceableKeywordAttributes(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption, modelica_metatype _inBoolean);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setReplaceableKeywordAttributes,2,0) {(void*) boxptr_Interactive_setReplaceableKeywordAttributes,0}};
#define boxvar_Interactive_setReplaceableKeywordAttributes MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setReplaceableKeywordAttributes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElement(threadData_t *threadData, modelica_metatype _inElement1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inReplaceable, modelica_string _inString5, modelica_string _inString6, modelica_metatype _inBooleanLst7, modelica_string _inString8, modelica_string _inString9);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElement(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inReplaceable, modelica_metatype _inString5, modelica_metatype _inString6, modelica_metatype _inBooleanLst7, modelica_metatype _inString8, modelica_metatype _inString9);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElement,2,0) {(void*) boxptr_Interactive_setComponentPropertiesInElement,0}};
#define boxvar_Interactive_setComponentPropertiesInElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inReplaceable, modelica_string _inString5, modelica_string _inString6, modelica_metatype _inBooleanLst7, modelica_string _inString8, modelica_string _inString9);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inReplaceable, modelica_metatype _inString5, modelica_metatype _inString6, modelica_metatype _inBooleanLst7, modelica_metatype _inString8, modelica_metatype _inString9);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElementitems,2,0) {(void*) boxptr_Interactive_setComponentPropertiesInElementitems,0}};
#define boxvar_Interactive_setComponentPropertiesInElementitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInElementitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString6, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_string _inString10);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString6, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inString10);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInClassparts,2,0) {(void*) boxptr_Interactive_setComponentPropertiesInClassparts,0}};
#define boxvar_Interactive_setComponentPropertiesInClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInClassparts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_string _inString2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString6, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_string _inString10);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inString2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString6, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inString10);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInClass,2,0) {(void*) boxptr_Interactive_setComponentPropertiesInClass,0}};
#define boxvar_Interactive_setComponentPropertiesInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentPropertiesInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_setComponentProperties(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inComponentRef2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_metatype _inProgram10, modelica_metatype *out_outProgram);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentProperties(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inComponentRef2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inProgram10, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_setComponentProperties,2,0) {(void*) boxptr_Interactive_setComponentProperties,0}};
#define boxvar_Interactive_setComponentProperties MMC_REFSTRUCTLIT(boxvar_lit_Interactive_setComponentProperties)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isParameterElement(threadData_t *threadData, modelica_metatype _inElement);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isParameterElement(threadData_t *threadData, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isParameterElement,2,0) {(void*) boxptr_Interactive_isParameterElement,0}};
#define boxvar_Interactive_isParameterElement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isParameterElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_addComponentToComponents(threadData_t *threadData, modelica_metatype _inComponent, modelica_metatype _inComponents);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_addComponentToComponents,2,0) {(void*) boxptr_Interactive_addComponentToComponents,0}};
#define boxvar_Interactive_addComponentToComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_addComponentToComponents)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_lengthComponents(threadData_t *threadData, modelica_metatype _inComponents);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_lengthComponents(threadData_t *threadData, modelica_metatype _inComponents);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_lengthComponents,2,0) {(void*) boxptr_Interactive_lengthComponents,0}};
#define boxvar_Interactive_lengthComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_lengthComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_restComponents(threadData_t *threadData, modelica_metatype _inComponents);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_restComponents,2,0) {(void*) boxptr_Interactive_restComponents,0}};
#define boxvar_Interactive_restComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_restComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_firstComponent(threadData_t *threadData, modelica_metatype _inComponents);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_firstComponent,2,0) {(void*) boxptr_Interactive_firstComponent,0}};
#define boxvar_Interactive_firstComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_firstComponent)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_emptyComponents(threadData_t *threadData, modelica_metatype _inComponents);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_emptyComponents(threadData_t *threadData, modelica_metatype _inComponents);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_emptyComponents,2,0) {(void*) boxptr_Interactive_emptyComponents,0}};
#define boxvar_Interactive_emptyComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_emptyComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromModificationOption(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynModificationOption, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromModificationOption,2,0) {(void*) boxptr_Interactive_extractComponentsFromModificationOption,0}};
#define boxvar_Interactive_extractComponentsFromModificationOption MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromModificationOption)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElementargs(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElementargs,2,0) {(void*) boxptr_Interactive_extractComponentsFromElementargs,0}};
#define boxvar_Interactive_extractComponentsFromElementargs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElementargs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromComponentitems(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2, modelica_metatype _inAbsynComponentItemLst3, modelica_metatype _inComponents4, modelica_metatype _inEnv5);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromComponentitems,2,0) {(void*) boxptr_Interactive_extractComponentsFromComponentitems,0}};
#define boxvar_Interactive_extractComponentsFromComponentitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromComponentitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElementspec(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inElementSpec, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElementspec,2,0) {(void*) boxptr_Interactive_extractComponentsFromElementspec,0}};
#define boxvar_Interactive_extractComponentsFromElementspec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElementspec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElements(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElements,2,0) {(void*) boxptr_Interactive_extractComponentsFromElements,0}};
#define boxvar_Interactive_extractComponentsFromElements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromElements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClassparts(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClassparts,2,0) {(void*) boxptr_Interactive_extractComponentsFromClassparts,0}};
#define boxvar_Interactive_extractComponentsFromClassparts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClassparts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClassdef(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClassDef, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClassdef,2,0) {(void*) boxptr_Interactive_extractComponentsFromClassdef,0}};
#define boxvar_Interactive_extractComponentsFromClassdef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClassdef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inComponents, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClass,2,0) {(void*) boxptr_Interactive_extractComponentsFromClass,0}};
#define boxvar_Interactive_extractComponentsFromClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractComponentsFromClass)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReadOnly(threadData_t *threadData, modelica_metatype _file_info);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReadOnly(threadData_t *threadData, modelica_metatype _file_info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isReadOnly,2,0) {(void*) boxptr_Interactive_isReadOnly,0}};
#define boxvar_Interactive_isReadOnly MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isReadOnly)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponentsVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponentsVisitor,2,0) {(void*) boxptr_Interactive_extractAllComponentsVisitor,0}};
#define boxvar_Interactive_extractAllComponentsVisitor MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponentsVisitor)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponents(threadData_t *threadData, modelica_metatype _p, modelica_metatype _path);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponents,2,0) {(void*) boxptr_Interactive_extractAllComponents,0}};
#define boxvar_Interactive_extractAllComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsWithType(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentsWithType,2,0) {(void*) boxptr_Interactive_getComponentsWithType,0}};
#define boxvar_Interactive_getComponentsWithType MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentsWithType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_restComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_restComponentReplacementRules,2,0) {(void*) boxptr_Interactive_restComponentReplacementRules,0}};
#define boxvar_Interactive_restComponentReplacementRules MMC_REFSTRUCTLIT(boxvar_lit_Interactive_restComponentReplacementRules)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_firstComponentReplacement(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_firstComponentReplacement,2,0) {(void*) boxptr_Interactive_firstComponentReplacement,0}};
#define boxvar_Interactive_firstComponentReplacement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_firstComponentReplacement)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_lengthComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_lengthComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_lengthComponentReplacementRules,2,0) {(void*) boxptr_Interactive_lengthComponentReplacementRules,0}};
#define boxvar_Interactive_lengthComponentReplacementRules MMC_REFSTRUCTLIT(boxvar_lit_Interactive_lengthComponentReplacementRules)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_joinComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules1, modelica_metatype _inComponentReplacementRules2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_joinComponentReplacementRules,2,0) {(void*) boxptr_Interactive_joinComponentReplacementRules,0}};
#define boxvar_Interactive_joinComponentReplacementRules MMC_REFSTRUCTLIT(boxvar_lit_Interactive_joinComponentReplacementRules)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_emptyComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_emptyComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_emptyComponentReplacementRules,2,0) {(void*) boxptr_Interactive_emptyComponentReplacementRules,0}};
#define boxvar_Interactive_emptyComponentReplacementRules MMC_REFSTRUCTLIT(boxvar_lit_Interactive_emptyComponentReplacementRules)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeComponentsReplacementRulesFromComponents(threadData_t *threadData, modelica_metatype _inComponents1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_makeComponentsReplacementRulesFromComponents,2,0) {(void*) boxptr_Interactive_makeComponentsReplacementRulesFromComponents,0}};
#define boxvar_Interactive_makeComponentsReplacementRulesFromComponents MMC_REFSTRUCTLIT(boxvar_lit_Interactive_makeComponentsReplacementRulesFromComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getNewComponentreplacementsrulesForEachRule(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getNewComponentreplacementsrulesForEachRule,2,0) {(void*) boxptr_Interactive_getNewComponentreplacementsrulesForEachRule,0}};
#define boxvar_Interactive_getNewComponentreplacementsrulesForEachRule MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getNewComponentreplacementsrulesForEachRule)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentreplacementsrules(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules, modelica_integer _inInteger);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentreplacementsrules(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules, modelica_metatype _inInteger);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getComponentreplacementsrules,2,0) {(void*) boxptr_Interactive_getComponentreplacementsrules,0}};
#define boxvar_Interactive_getComponentreplacementsrules MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getComponentreplacementsrules)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_replaceStartInComponentRef2(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_replaceStartInComponentRef2,2,0) {(void*) boxptr_Interactive_replaceStartInComponentRef2,0}};
#define boxvar_Interactive_replaceStartInComponentRef2 MMC_REFSTRUCTLIT(boxvar_lit_Interactive_replaceStartInComponentRef2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_replaceStartInComponentRef(threadData_t *threadData, modelica_metatype _cr1, modelica_metatype _cr2, modelica_metatype _cr3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_replaceStartInComponentRef,2,0) {(void*) boxptr_Interactive_replaceStartInComponentRef,0}};
#define boxvar_Interactive_replaceStartInComponentRef MMC_REFSTRUCTLIT(boxvar_lit_Interactive_replaceStartInComponentRef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExternalDecl(threadData_t *threadData, modelica_metatype _external_, modelica_metatype _old_comp, modelica_metatype _new_comp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExternalDecl,2,0) {(void*) boxptr_Interactive_renameComponentInExternalDecl,0}};
#define boxvar_Interactive_renameComponentInExternalDecl MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExternalDecl)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInNamedArgs(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInNamedArgs,2,0) {(void*) boxptr_Interactive_renameComponentInNamedArgs,0}};
#define boxvar_Interactive_renameComponentInNamedArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInNamedArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInIterators(threadData_t *threadData, modelica_metatype _iterators, modelica_metatype _oldComp, modelica_metatype _newComp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInIterators,2,0) {(void*) boxptr_Interactive_renameComponentInIterators,0}};
#define boxvar_Interactive_renameComponentInIterators MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInIterators)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInFunctionArgs(threadData_t *threadData, modelica_metatype _inFunctionArgs1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInFunctionArgs,2,0) {(void*) boxptr_Interactive_renameComponentInFunctionArgs,0}};
#define boxvar_Interactive_renameComponentInFunctionArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInFunctionArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpAlgoritmsList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpAlgoritmsList,2,0) {(void*) boxptr_Interactive_renameComponentInExpAlgoritmsList,0}};
#define boxvar_Interactive_renameComponentInExpAlgoritmsList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpAlgoritmsList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInAlgorithm(threadData_t *threadData, modelica_metatype _inAlgorithm1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInAlgorithm,2,0) {(void*) boxptr_Interactive_renameComponentInAlgorithm,0}};
#define boxvar_Interactive_renameComponentInAlgorithm MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInAlgorithm)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInAlgorithms(threadData_t *threadData, modelica_metatype _inAbsynAlgorithmItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInAlgorithms,2,0) {(void*) boxptr_Interactive_renameComponentInAlgorithms,0}};
#define boxvar_Interactive_renameComponentInAlgorithms MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInAlgorithms)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExp(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _oldPrefix, modelica_metatype _newPrefix);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExp,2,0) {(void*) boxptr_Interactive_renameComponentInExp,0}};
#define boxvar_Interactive_renameComponentInExp MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInCode(threadData_t *threadData, modelica_metatype _inCode1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInCode,2,0) {(void*) boxptr_Interactive_renameComponentInCode,0}};
#define boxvar_Interactive_renameComponentInCode MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInCode)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementArg(threadData_t *threadData, modelica_metatype _inElementArg1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementArg,2,0) {(void*) boxptr_Interactive_renameComponentInElementArg,0}};
#define boxvar_Interactive_renameComponentInElementArg MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementArgList(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementArgList,2,0) {(void*) boxptr_Interactive_renameComponentInElementArgList,0}};
#define boxvar_Interactive_renameComponentInElementArgList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementArgList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpTupleList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynExpLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpTupleList,2,0) {(void*) boxptr_Interactive_renameComponentInExpTupleList,0}};
#define boxvar_Interactive_renameComponentInExpTupleList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpTupleList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpListList(threadData_t *threadData, modelica_metatype _inAbsynExpLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpListList,2,0) {(void*) boxptr_Interactive_renameComponentInExpListList,0}};
#define boxvar_Interactive_renameComponentInExpListList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpListList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpList(threadData_t *threadData, modelica_metatype _inAbsynExpLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpList,2,0) {(void*) boxptr_Interactive_renameComponentInExpList,0}};
#define boxvar_Interactive_renameComponentInExpList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInEquation(threadData_t *threadData, modelica_metatype _inEquation1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInEquation,2,0) {(void*) boxptr_Interactive_renameComponentInEquation,0}};
#define boxvar_Interactive_renameComponentInEquation MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpEquationitemList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynEquationItemLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpEquationitemList,2,0) {(void*) boxptr_Interactive_renameComponentInExpEquationitemList,0}};
#define boxvar_Interactive_renameComponentInExpEquationitemList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInExpEquationitemList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInEquationList(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInEquationList,2,0) {(void*) boxptr_Interactive_renameComponentInEquationList,0}};
#define boxvar_Interactive_renameComponentInEquationList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInEquationList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInComponentitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInComponentitems,2,0) {(void*) boxptr_Interactive_renameComponentInComponentitems,0}};
#define boxvar_Interactive_renameComponentInComponentitems MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInComponentitems)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementSpec,2,0) {(void*) boxptr_Interactive_renameComponentInElementSpec,0}};
#define boxvar_Interactive_renameComponentInElementSpec MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElementSpec)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElements,2,0) {(void*) boxptr_Interactive_renameComponentInElements,0}};
#define boxvar_Interactive_renameComponentInElements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInElements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInParts,2,0) {(void*) boxptr_Interactive_renameComponentInParts,0}};
#define boxvar_Interactive_renameComponentInParts MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInParts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInClass,2,0) {(void*) boxptr_Interactive_renameComponentInClass,0}};
#define boxvar_Interactive_renameComponentInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentInClass)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionComponentReplacement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentVisitor,2,0) {(void*) boxptr_Interactive_renameComponentVisitor,0}};
#define boxvar_Interactive_renameComponentVisitor MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentVisitor)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentFromComponentreplacements(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentFromComponentreplacements,2,0) {(void*) boxptr_Interactive_renameComponentFromComponentreplacements,0}};
#define boxvar_Interactive_renameComponentFromComponentreplacements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentFromComponentreplacements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractRenamedClassesAsStringList(threadData_t *threadData, modelica_metatype _inComponentReplacementRules);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractRenamedClassesAsStringList,2,0) {(void*) boxptr_Interactive_extractRenamedClassesAsStringList,0}};
#define boxvar_Interactive_extractRenamedClassesAsStringList MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractRenamedClassesAsStringList)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameComponentOnlyInClass(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inComponentRef4, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponentOnlyInClass,2,0) {(void*) boxptr_Interactive_renameComponentOnlyInClass,0}};
#define boxvar_Interactive_renameComponentOnlyInClass MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponentOnlyInClass)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameComponent(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inComponentRef4, modelica_metatype *out_outProgram);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_renameComponent,2,0) {(void*) boxptr_Interactive_renameComponent,0}};
#define boxvar_Interactive_renameComponent MMC_REFSTRUCTLIT(boxvar_lit_Interactive_renameComponent)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isClassReadOnly(threadData_t *threadData, modelica_metatype _cl);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isClassReadOnly(threadData_t *threadData, modelica_metatype _cl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_isClassReadOnly,2,0) {(void*) boxptr_Interactive_isClassReadOnly,0}};
#define boxvar_Interactive_isClassReadOnly MMC_REFSTRUCTLIT(boxvar_lit_Interactive_isClassReadOnly)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponentreplacements(threadData_t *threadData, modelica_metatype _p, modelica_metatype _class_, modelica_metatype _cref1, modelica_metatype _cref2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponentreplacements,2,0) {(void*) boxptr_Interactive_extractAllComponentreplacements,0}};
#define boxvar_Interactive_extractAllComponentreplacements MMC_REFSTRUCTLIT(boxvar_lit_Interactive_extractAllComponentreplacements)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateGraphicalApi__dispatch(threadData_t *threadData, modelica_metatype _inStatement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateGraphicalApi__dispatch,2,0) {(void*) boxptr_Interactive_evaluateGraphicalApi__dispatch,0}};
#define boxvar_Interactive_evaluateGraphicalApi__dispatch MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateGraphicalApi__dispatch)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateGraphicalApi(threadData_t *threadData, modelica_metatype _inStatement, modelica_boolean _isPartialInst, modelica_boolean _flagGen, modelica_boolean _flagEvalFunc, modelica_boolean _flagKeepArrays);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_evaluateGraphicalApi(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _isPartialInst, modelica_metatype _flagGen, modelica_metatype _flagEvalFunc, modelica_metatype _flagKeepArrays);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateGraphicalApi,2,0) {(void*) boxptr_Interactive_evaluateGraphicalApi,0}};
#define boxvar_Interactive_evaluateGraphicalApi MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateGraphicalApi)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getApiFunctionNamedArgs(threadData_t *threadData, modelica_metatype _inStmt);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionNamedArgs,2,0) {(void*) boxptr_Interactive_getApiFunctionNamedArgs,0}};
#define boxvar_Interactive_getApiFunctionNamedArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionNamedArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getApiFunctionArgs(threadData_t *threadData, modelica_metatype _inStmt);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionArgs,2,0) {(void*) boxptr_Interactive_getApiFunctionArgs,0}};
#define boxvar_Interactive_getApiFunctionArgs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionArgs)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getApiFunctionNameInfo(threadData_t *threadData, modelica_metatype _inStmt, modelica_metatype *out_outInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionNameInfo,2,0) {(void*) boxptr_Interactive_getApiFunctionNameInfo,0}};
#define boxvar_Interactive_getApiFunctionNameInfo MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getApiFunctionNameInfo)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeTupleCref(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_makeTupleCref,2,0) {(void*) boxptr_Interactive_makeTupleCref,0}};
#define boxvar_Interactive_makeTupleCref MMC_REFSTRUCTLIT(boxvar_lit_Interactive_makeTupleCref)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeTupleCrefs(threadData_t *threadData, modelica_metatype _inCrefs, modelica_metatype _inTypes, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_makeTupleCrefs,2,0) {(void*) boxptr_Interactive_makeTupleCrefs,0}};
#define boxvar_Interactive_makeTupleCrefs MMC_REFSTRUCTLIT(boxvar_lit_Interactive_makeTupleCrefs)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateExprToStr(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateExprToStr,2,0) {(void*) boxptr_Interactive_evaluateExprToStr,0}};
#define boxvar_Interactive_evaluateExprToStr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateExprToStr)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_stringRepresOfExpr(threadData_t *threadData, modelica_metatype _exp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_stringRepresOfExpr,2,0) {(void*) boxptr_Interactive_stringRepresOfExpr,0}};
#define boxvar_Interactive_stringRepresOfExpr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_stringRepresOfExpr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_evaluateExpr(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateExpr,2,0) {(void*) boxptr_Interactive_evaluateExpr,0}};
#define boxvar_Interactive_evaluateExpr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateExpr)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateAlgStmtLst(threadData_t *threadData, modelica_metatype _inAbsynAlgorithmItemLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateAlgStmtLst,2,0) {(void*) boxptr_Interactive_evaluateAlgStmtLst,0}};
#define boxvar_Interactive_evaluateAlgStmtLst MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateAlgStmtLst)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateIfStatementLst(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateIfStatementLst,2,0) {(void*) boxptr_Interactive_evaluateIfStatementLst,0}};
#define boxvar_Interactive_evaluateIfStatementLst MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateIfStatementLst)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluatePartOfIfStatement(threadData_t *threadData, modelica_metatype _inValue, modelica_metatype _inExp, modelica_metatype _inAbsynAlgorithmItemLst, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluatePartOfIfStatement,2,0) {(void*) boxptr_Interactive_evaluatePartOfIfStatement,0}};
#define boxvar_Interactive_evaluatePartOfIfStatement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluatePartOfIfStatement)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateWhileStmt(threadData_t *threadData, modelica_metatype _inValue, modelica_metatype _inExp, modelica_metatype _inAbsynAlgorithmItemLst, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateWhileStmt,2,0) {(void*) boxptr_Interactive_evaluateWhileStmt,0}};
#define boxvar_Interactive_evaluateWhileStmt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateWhileStmt)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateForStmtRangeOpt(threadData_t *threadData, modelica_string _iter, modelica_metatype _startVal, modelica_metatype _stepVal, modelica_metatype _stopVal, modelica_metatype _algItems);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateForStmtRangeOpt,2,0) {(void*) boxptr_Interactive_evaluateForStmtRangeOpt,0}};
#define boxvar_Interactive_evaluateForStmtRangeOpt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateForStmtRangeOpt)
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateForStmt(threadData_t *threadData, modelica_string _iter, modelica_metatype _valList, modelica_metatype _algItemList);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateForStmt,2,0) {(void*) boxptr_Interactive_evaluateForStmt,0}};
#define boxvar_Interactive_evaluateForStmt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateForStmt)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateAlgStmt(threadData_t *threadData, modelica_metatype _inAlgorithmItem);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_evaluateAlgStmt,2,0) {(void*) boxptr_Interactive_evaluateAlgStmt,0}};
#define boxvar_Interactive_evaluateAlgStmt MMC_REFSTRUCTLIT(boxvar_lit_Interactive_evaluateAlgStmt)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_getEcho(threadData_t *threadData);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getEcho(threadData_t *threadData);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_getEcho,2,0) {(void*) boxptr_Interactive_getEcho,0}};
#define boxvar_Interactive_getEcho MMC_REFSTRUCTLIT(boxvar_lit_Interactive_getEcho)
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_selectResultstr(threadData_t *threadData, modelica_string _inString, modelica_boolean _inSemicolon, modelica_boolean _inVerbose, modelica_boolean _inEcho);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_selectResultstr(threadData_t *threadData, modelica_metatype _inString, modelica_metatype _inSemicolon, modelica_metatype _inVerbose, modelica_metatype _inEcho);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_selectResultstr,2,0) {(void*) boxptr_Interactive_selectResultstr,0}};
#define boxvar_Interactive_selectResultstr MMC_REFSTRUCTLIT(boxvar_lit_Interactive_selectResultstr)
PROTECTED_FUNCTION_STATIC void omc_Interactive_showStatement(threadData_t *threadData, modelica_metatype _s, modelica_boolean _semicolon, modelica_boolean _start);
PROTECTED_FUNCTION_STATIC void boxptr_Interactive_showStatement(threadData_t *threadData, modelica_metatype _s, modelica_metatype _semicolon, modelica_metatype _start);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Interactive_showStatement,2,0) {(void*) boxptr_Interactive_showStatement,0}};
#define boxvar_Interactive_showStatement MMC_REFSTRUCTLIT(boxvar_lit_Interactive_showStatement)
DLLExport
modelica_boolean omc_Interactive_astContainsEncryptedClass(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_boolean _containsEncryptedClass;
modelica_metatype _classes = NULL;
modelica_metatype _p = NULL;
modelica_string _fileName = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_containsEncryptedClass = 0;
{
modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_p = tmp4_1;
tmpMeta1 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 2)));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_classes = tmpMeta1;
{
modelica_metatype _c;
for (tmpMeta6 = _classes; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
{
_c = MMC_CAR(tmpMeta6);
tmpMeta7 = _c;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 10));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_fileName = tmpMeta9;
_containsEncryptedClass = (_containsEncryptedClass || omc_Util_endsWith(threadData, _fileName, _OMC_LIT0));
if(_containsEncryptedClass)
{
break;
}
}
}
_return: OMC_LABEL_UNUSED
return _containsEncryptedClass;
}
modelica_metatype boxptr_Interactive_astContainsEncryptedClass(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_boolean _containsEncryptedClass;
modelica_metatype out_containsEncryptedClass;
_containsEncryptedClass = omc_Interactive_astContainsEncryptedClass(threadData, _inProgram);
out_containsEncryptedClass = mmc_mk_icon(_containsEncryptedClass);
return out_containsEncryptedClass;
}
DLLExport
modelica_metatype omc_Interactive_checkAccessAnnotationAndEncryption(threadData_t *threadData, modelica_metatype _path, modelica_metatype _p)
{
modelica_metatype _val = NULL;
modelica_string _access = NULL;
modelica_string _fileName = NULL;
modelica_boolean _encryptedClass;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta5 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 10));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_fileName = tmpMeta7;
_encryptedClass = omc_Util_endsWith(threadData, _fileName, _OMC_LIT0);
if(_encryptedClass)
{
_access = omc_Interactive_getAccessAnnotation(threadData, _path, _p);
if((stringEqual(_access, _OMC_LIT54)))
{
_val = _OMC_LIT53;
}
else
{
if((stringEqual(_access, _OMC_LIT48)))
{
_val = _OMC_LIT47;
}
else
{
if((stringEqual(_access, _OMC_LIT42)))
{
_val = _OMC_LIT11;
}
else
{
if((stringEqual(_access, _OMC_LIT41)))
{
_val = _OMC_LIT40;
}
else
{
if((stringEqual(_access, _OMC_LIT35)))
{
_val = _OMC_LIT34;
}
else
{
if((stringEqual(_access, _OMC_LIT29)))
{
_val = _OMC_LIT28;
}
else
{
if((stringEqual(_access, _OMC_LIT23)))
{
_val = _OMC_LIT22;
}
else
{
if((stringEqual(_access, _OMC_LIT17)))
{
_val = _OMC_LIT16;
}
else
{
if((!omc_AbsynUtil_pathIsIdent(threadData, _path)))
{
_val = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_stripLast(threadData, _path), _p);
}
else
{
_val = _OMC_LIT11;
}
}
}
}
}
}
}
}
}
}
else
{
_val = _OMC_LIT6;
}
goto tmp2_done;
}
case 1: {
_val = _OMC_LIT6;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _val;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAccessAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs)
{
modelica_string _access = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _xs = NULL;
modelica_metatype _cref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (6 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT56), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,2,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
_cref = tmpMeta14;
tmp1 = omc_Dump_printComponentRefStr(threadData, _cref);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_1);
tmpMeta16 = MMC_CDR(tmp4_1);
_xs = tmpMeta16;
_eltArgs = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_access = tmp1;
_return: OMC_LABEL_UNUSED
return _access;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAccessAnnotationString(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _access = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _arglst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_arglst = tmpMeta7;
tmp1 = omc_Interactive_getAccessAnnotationString2(threadData, _arglst);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_access = tmp1;
_return: OMC_LABEL_UNUSED
return _access;
}
DLLExport
modelica_string omc_Interactive_getAccessAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p)
{
modelica_string _access = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
tmp1 = omc_Interactive_getNamedAnnotation(threadData, _className, _p, _OMC_LIT58, _OMC_LIT59, boxvar_Interactive_getAccessAnnotationString);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_access = tmp1;
_return: OMC_LABEL_UNUSED
return _access;
}
DLLExport
modelica_metatype omc_Interactive_getInstantiatedParametersAndValues(threadData_t *threadData, modelica_metatype _odae)
{
modelica_metatype _parametersAndValues = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _els = NULL;
modelica_metatype _params = NULL;
modelica_metatype _strs = NULL;
modelica_metatype tmpMeta2;
modelica_string _s = NULL;
modelica_metatype _oe = NULL;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_parametersAndValues = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_strs = tmpMeta2;
{
modelica_metatype tmp6_1;
tmp6_1 = _odae;
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
for (; tmp6 < 2; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (optionNone(tmp6_1)) goto tmp5_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_els = tmpMeta9;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
_params = omc_DAEUtil_getParameters(threadData, _els, tmpMeta10);
{
modelica_metatype _p;
for (tmpMeta11 = _params; !listEmpty(tmpMeta11); tmpMeta11=MMC_CDR(tmpMeta11))
{
_p = MMC_CAR(tmpMeta11);
tmpMeta12 = _p;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,13) == 0) goto goto_4;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 8));
_oe = tmpMeta13;
tmpMeta14 = stringAppend(omc_DAEUtil_varName(threadData, _p),omc_DAEDump_dumpVarBindingStr(threadData, _oe));
_s = tmpMeta14;
tmpMeta15 = mmc_mk_cons(_s, _strs);
_strs = tmpMeta15;
}
}
tmpMeta3 = listReverse(_strs);
goto tmp5_done;
}
case 1: {
tmpMeta3 = _strs;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_parametersAndValues = tmpMeta3;
_return: OMC_LABEL_UNUSED
return _parametersAndValues;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensionsInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_boolean _inFound, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_boolean *out_outFound, modelica_boolean *out_outContinue)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
modelica_boolean _outFound;
modelica_boolean _outContinue;
modelica_metatype _item = NULL;
modelica_metatype _rest_items = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _args_old = NULL;
modelica_metatype _args_new = NULL;
modelica_metatype _eqmod_old = NULL;
modelica_metatype _eqmod_new = NULL;
modelica_string _comp_id = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outComponents = tmpMeta1;
_rest_items = _inComponents;
_comp_id = omc_AbsynUtil_crefFirstIdent(threadData, _inComponentName);
while(1)
{
if(!(!listEmpty(_rest_items))) break;
tmpMeta2 = _rest_items;
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
_item = tmpMeta3;
_rest_items = tmpMeta4;
if((stringEqual(omc_AbsynUtil_componentName(threadData, _item), _comp_id)))
{
{
modelica_metatype tmp7_1;
tmp7_1 = _item;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 1; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
_comp = tmpMeta9;
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_comp), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[3] = omc_List_map(threadData, _inDimensions, boxvar_AbsynUtil_makeSubscript);
_comp = tmpMeta10;
tmpMeta11 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta11), MMC_UNTAGPTR(_item), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta11))[2] = _comp;
_item = tmpMeta11;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
;
tmpMeta12 = mmc_mk_cons(_item, _rest_items);
_outComponents = omc_List_append__reverse(threadData, _outComponents, tmpMeta12);
_outFound = 1;
_outContinue = 0;
goto _return;
}
tmpMeta13 = mmc_mk_cons(_item, _outComponents);
_outComponents = tmpMeta13;
}
_outComponents = _inComponents;
_outFound = 0;
_outContinue = 1;
_return: OMC_LABEL_UNUSED
if (out_outFound) { *out_outFound = _outFound; }
if (out_outContinue) { *out_outContinue = _outContinue; }
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentDimensionsInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inFound, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_metatype *out_outFound, modelica_metatype *out_outContinue)
{
modelica_integer tmp1;
modelica_boolean _outFound;
modelica_boolean _outContinue;
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta2;
tmp1 = mmc_unbox_integer(_inFound);
_outComponents = omc_Interactive_setComponentDimensionsInCompitems(threadData, _inComponents, tmp1, _inComponentName, _inDimensions, &_outFound, &_outContinue);
if (out_outFound) { *out_outFound = mmc_mk_icon(_outFound); }
if (out_outContinue) { *out_outContinue = mmc_mk_icon(_outContinue); }
return _outComponents;
}
static modelica_metatype closure0_Interactive_setComponentDimensionsInCompitems(threadData_t *thData, modelica_metatype closure, modelica_metatype inComponents, modelica_metatype inFound, modelica_metatype tmp3, modelica_metatype tmp4)
{
modelica_metatype inComponentName = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_metatype inDimensions = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_setComponentDimensionsInCompitems(thData, inComponents, inFound, inComponentName, inDimensions, tmp3, tmp4);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensionsInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inDimensions)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
modelica_integer tmp2;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outClass = _inClass;
tmpMeta5 = mmc_mk_box2(0, _inComponentName, _inDimensions);
tmpMeta6 = omc_AbsynUtil_traverseClassComponents(threadData, _inClass, (modelica_fnptr) mmc_mk_box2(0,closure0_Interactive_setComponentDimensionsInCompitems,tmpMeta5), mmc_mk_boolean(0), &tmpMeta1);
_outClass = tmpMeta6;
tmp2 = mmc_unbox_integer(tmpMeta1);
if (1 != tmp2) MMC_THROW_INTERNAL();
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentDimensions(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inDimensions, modelica_metatype _inProgram, modelica_string *out_outResult)
{
modelica_metatype _outProgram = NULL;
modelica_string _outResult = NULL;
modelica_metatype _p_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cls = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
_p_class = omc_AbsynUtil_crefToPath(threadData, _inClass);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _inProgram, 0, 0);
_cls = omc_Interactive_setComponentDimensionsInClass(threadData, _cls, _inComponentName, _inDimensions);
tmpMeta5 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta5, _within_);
_outProgram = omc_InteractiveUtil_updateProgram(threadData, tmpMeta6, _inProgram, 0);
_outResult = _OMC_LIT60;
goto tmp2_done;
}
case 1: {
_outProgram = _inProgram;
_outResult = _OMC_LIT61;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getClassEnvNoElaboration(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inClassPath, modelica_metatype _inEnv)
{
modelica_metatype _outEnv = NULL;
modelica_metatype _cl = NULL;
modelica_string _id = NULL;
modelica_metatype _encflag = NULL;
modelica_metatype _restr = NULL;
modelica_metatype _env = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _cache = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta6 = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _inEnv, _inClassPath, mmc_mk_none(), &tmpMeta1, &tmpMeta5);
_cache = tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,8) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 6));
_cl = tmpMeta1;
_id = tmpMeta2;
_encflag = tmpMeta3;
_restr = tmpMeta4;
_env = tmpMeta5;
_env = omc_FGraph_openScope(threadData, _env, _encflag, _id, omc_FGraph_restrictionToScopeType(threadData, _restr));
_ci_state = omc_ClassInf_start(threadData, _restr, omc_FGraph_getGraphName(threadData, _env));
{
{
volatile mmc_switch_type tmp9;
int tmp10;
tmp9 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp8_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp9 < 2; tmp9++) {
switch (MMC_SWITCH_CAST(tmp9)) {
case 0: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Inst_partialInstClassIn(threadData, _cache, _env, tmpMeta11, _OMC_LIT62, _OMC_LIT63, _ci_state, _cl, _OMC_LIT64, tmpMeta12, ((modelica_integer) 0) ,&_outEnv, NULL, NULL, NULL);
goto tmp8_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Inst_instClassIn(threadData, _cache, _env, tmpMeta13, _OMC_LIT65, _OMC_LIT62, _OMC_LIT63, _ci_state, _cl, _OMC_LIT64, tmpMeta14, 0, _OMC_LIT66, _OMC_LIT67, _OMC_LIT70, mmc_mk_none() ,&_outEnv, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
goto tmp8_done;
}
}
goto tmp8_end;
tmp8_end: ;
}
goto goto_7;
tmp8_done:
(void)tmp9;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp8_done2;
goto_7:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp9 < 2) {
goto tmp8_top;
}
MMC_THROW_INTERNAL();
tmp8_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _outEnv;
}
DLLExport
modelica_string omc_Interactive_printIstmtStr(threadData_t *threadData, modelica_metatype _inStatements)
{
modelica_string _strIstmt = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_strIstmt = omc_GlobalScriptDump_printIstmtsStr(threadData, _inStatements);
_return: OMC_LABEL_UNUSED
return _strIstmt;
}
DLLExport
modelica_metatype omc_Interactive_getAllInheritedClasses(threadData_t *threadData, modelica_metatype _inClassName, modelica_metatype _inProgram)
{
modelica_metatype _outBaseClassNames = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inClassName;
tmp4_2 = _inProgram;
{
modelica_metatype _p_class = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _exts = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_p_class = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_exts = omc_InteractiveUtil_getExtendsElementspecInClass(threadData, _cdef);
tmpMeta1 = omc_List_map(threadData, _exts, boxvar_InteractiveUtil_getBaseClassNameFromExtends);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBaseClassNames = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outBaseClassNames;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getAllClassesInClass(threadData_t *threadData, modelica_metatype _class_)
{
modelica_metatype _outClasses = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _class_;
{
modelica_metatype _classParts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_classParts = tmpMeta7;
tmpMeta1 = omc_InteractiveUtil_getClassesInParts(threadData, _classParts);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClasses = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClasses;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getFunctionsInClasses(threadData_t *threadData, modelica_metatype _classes, modelica_metatype _acc)
{
modelica_metatype _funcs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _classes;
{
modelica_metatype _cl = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta1 = _acc;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,9,1) == 0) goto tmp3_end;
_cl = tmpMeta6;
_rest = tmpMeta7;
tmpMeta9 = mmc_mk_cons(_cl, _acc);
_classes = _rest;
_acc = tmpMeta9;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
_rest = tmpMeta11;
_classes = _rest;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_funcs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _funcs;
}
DLLExport
modelica_metatype omc_Interactive_getFunctionsInProgram(threadData_t *threadData, modelica_metatype _prog)
{
modelica_metatype _funcs = NULL;
modelica_metatype _classes = NULL;
modelica_metatype _classesList = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _prog;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_classes = tmpMeta2;
_classesList = omc_List_map(threadData, _classes, boxvar_Interactive_getAllClassesInClass);
tmpMeta3 = mmc_mk_cons(_classes, _classesList);
tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
_funcs = omc_List_fold(threadData, tmpMeta3, boxvar_Interactive_getFunctionsInClasses, tmpMeta4);
_return: OMC_LABEL_UNUSED
return _funcs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentElementInClass(threadData_t *threadData, modelica_metatype _cl, modelica_string _compName)
{
modelica_metatype _comp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _cl;
{
modelica_metatype _parts = NULL;
modelica_metatype _publst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta9 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _compName, tmpMeta8);
tmpMeta1 = omc_Interactive_getComponentsContainsName(threadData, tmpMeta9, _publst);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,4,5) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
_parts = tmpMeta11;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta13 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _compName, tmpMeta12);
tmpMeta1 = omc_Interactive_getComponentsContainsName(threadData, tmpMeta13, _publst);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_comp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _comp;
}
DLLExport
modelica_metatype omc_Interactive_getPathedComponentElementInProgram(threadData_t *threadData, modelica_metatype _path, modelica_metatype _prg)
{
modelica_metatype _comp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _cl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_cl = omc_InteractiveUtil_getPathedClassInProgram(threadData, omc_AbsynUtil_stripLast(threadData, _path), _prg, 0, 0);
tmpMeta1 = omc_Interactive_getComponentElementInClass(threadData, _cl, omc_AbsynUtil_pathLastIdent(threadData, _path));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_comp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _comp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getSCodeClassNamesRecursiveWork(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inAcc)
{
modelica_metatype _paths = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inElement;
tmp4_2 = _inPath;
tmp4_3 = _inAcc;
{
modelica_metatype _classes = NULL;
modelica_metatype _acc = NULL;
modelica_metatype _path = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!optionNone(tmp4_2)) goto tmp3_end;
_name = tmpMeta6;
_acc = tmp4_3;
tmpMeta7 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _name);
_path = tmpMeta7;
tmpMeta8 = mmc_mk_cons(_path, _acc);
_acc = tmpMeta8;
_classes = omc_SCodeUtil_getClassElements(threadData, _inElement);
tmpMeta1 = omc_List_fold1(threadData, _classes, boxvar_Interactive_getSCodeClassNamesRecursiveWork, mmc_mk_some(_path), _acc);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_name = tmpMeta9;
_path = tmpMeta10;
_acc = tmp4_3;
_path = omc_AbsynUtil_suffixPath(threadData, _path, _name);
tmpMeta11 = mmc_mk_cons(_path, _acc);
_acc = tmpMeta11;
_classes = omc_SCodeUtil_getClassElements(threadData, _inElement);
tmpMeta1 = omc_List_fold1(threadData, _classes, boxvar_Interactive_getSCodeClassNamesRecursiveWork, mmc_mk_some(_path), _acc);
goto tmp3_done;
}
case 2: {
tmpMeta1 = _inAcc;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_paths = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _paths;
}
DLLExport
modelica_metatype omc_Interactive_getSCodeClassNamesRecursive(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_metatype _paths = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_paths = omc_List_fold1(threadData, _inProgram, boxvar_Interactive_getSCodeClassNamesRecursiveWork, mmc_mk_none(), tmpMeta1);
_return: OMC_LABEL_UNUSED
return _paths;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentBindingMapable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inProgram3)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inProgram3;
{
modelica_metatype _p_class = NULL;
modelica_string _name = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _compelts = NULL;
modelica_metatype _compelts_1 = NULL;
modelica_metatype _compitem = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_cr = tmp4_1;
_class_ = tmp4_2;
_p = tmp4_3;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta6 = omc_AbsynUtil_crefToPath(threadData, _cr);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_name = tmpMeta7;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_comps = omc_Interactive_getComponentsInClass(threadData, _cdef);
_compelts = omc_List_map(threadData, _comps, boxvar_InteractiveUtil_getComponentitemsInElement);
_compelts_1 = omc_List_flatten(threadData, _compelts);
tmpMeta8 = omc_List_select1(threadData, _compelts_1, boxvar_InteractiveUtil_componentitemNamed, _name);
if (listEmpty(tmpMeta8)) goto goto_2;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
if (!listEmpty(tmpMeta10)) goto goto_2;
_compitem = tmpMeta9;
_exp = omc_InteractiveUtil_getVariableBindingInComponentitem(threadData, _compitem);
tmp1 = omc_Dump_printExpStr(threadData, _exp);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
_cr = tmp4_1;
_class_ = tmp4_2;
_p = tmp4_3;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta11 = omc_AbsynUtil_crefToPath(threadData, _cr);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_name = tmpMeta12;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_comps = omc_Interactive_getComponentsInClass(threadData, _cdef);
_compelts = omc_List_map(threadData, _comps, boxvar_InteractiveUtil_getComponentitemsInElement);
_compelts_1 = omc_List_flatten(threadData, _compelts);
tmpMeta13 = omc_List_select1(threadData, _compelts_1, boxvar_InteractiveUtil_componentitemNamed, _name);
if (listEmpty(tmpMeta13)) goto goto_2;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (!listEmpty(tmpMeta15)) goto goto_2;
_compitem = tmpMeta14;
tmp16 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_InteractiveUtil_getVariableBindingInComponentitem(threadData, _compitem);
tmp16 = 1;
goto goto_17;
goto_17:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp16) {goto goto_2;}
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 2: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getVisElementNameFromStr(threadData_t *threadData, modelica_string _str)
{
modelica_string _outStr = NULL;
modelica_metatype _strs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_System_regex(threadData, _str, _OMC_LIT71, ((modelica_integer) 3), 1, 0, &tmpMeta1);
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
_strs = tmpMeta1;
_outStr = tmpMeta4;
_return: OMC_LABEL_UNUSED
return _outStr;
}
DLLExport
modelica_metatype omc_Interactive_getElementsOfVisType(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_string *out_res)
{
modelica_metatype _names = NULL;
modelica_string _res = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
{
modelica_metatype _parts = NULL;
modelica_metatype _public_elementitem_list = NULL;
modelica_metatype _protected_elementitem_list = NULL;
modelica_metatype _modelPath_ = NULL;
modelica_metatype _public_list = NULL;
modelica_metatype _protected_list = NULL;
modelica_metatype _all_list = NULL;
modelica_metatype _prog = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_modelPath_ = tmp4_1;
_prog = tmp4_2;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelPath_, _prog, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_public_elementitem_list = omc_InteractiveUtil_getPublicList(threadData, _parts);
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
_public_list = omc_Interactive_constructVisTypesList(threadData, _public_elementitem_list, _prog);
_protected_list = omc_Interactive_constructVisTypesList(threadData, _protected_elementitem_list, _prog);
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_all_list = omc_List_union(threadData, listAppend(_public_list, _protected_list), tmpMeta9);
tmpMeta[0+0] = omc_List_map(threadData, _all_list, boxvar_Interactive_getVisElementNameFromStr);
tmp1_c1 = stringDelimitList(_all_list, _OMC_LIT72);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_names = tmpMeta[0+0];
_res = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_res) { *out_res = _res; }
return _names;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_constructVisTypesList(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inProgram)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inProgram;
{
modelica_string _s1 = NULL;
modelica_metatype _res_list = NULL;
modelica_metatype _list2 = NULL;
modelica_metatype _current = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_current = tmpMeta7;
_p = tmp4_2;
_s1 = omc_Interactive_getNameFromElementIfVisType(threadData, _current, _p);
tmpMeta1 = omc_List_create(threadData, _s1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_current = tmpMeta9;
_rest = tmpMeta10;
_p = tmp4_2;
_s1 = omc_Interactive_getNameFromElementIfVisType(threadData, _current, _p);
_res_list = omc_List_create(threadData, _s1);
_list2 = omc_Interactive_constructVisTypesList(threadData, _rest, _p);
tmpMeta1 = omc_List_union(threadData, _list2, _res_list);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNameFromElementIfVisType(threadData_t *threadData, modelica_metatype _inElementItem, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inElementItem;
tmp4_2 = _inProgram;
{
modelica_string _typename_str = NULL;
modelica_string _varname_str = NULL;
modelica_metatype _elementSpec = NULL;
modelica_metatype _prog = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
_elementSpec = tmpMeta10;
_prog = tmp4_2;
_typename_str = omc_Interactive_getElementTypeName(threadData, _elementSpec);
_varname_str = omc_Interactive_getElementName(threadData, _elementSpec);
tmpMeta11 = omc_Util_stringSplitAtChar(threadData, _varname_str, _OMC_LIT73);
if (listEmpty(tmpMeta11)) goto goto_2;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
tmp1 = omc_Interactive_getDescIfVis(threadData, _typename_str, _inElementItem, _prog);
goto tmp3_done;
}
case 2: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDescIfVis(threadData_t *threadData, modelica_string _in_type, modelica_metatype _inElement, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _in_type;
tmp4_2 = _inElement;
tmp4_3 = _inProgram;
{
modelica_metatype _tmp = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (21 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT74), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_tmp = tmp4_2;
_p = tmp4_3;
tmp1 = omc_Interactive_getElementVisString(threadData, _tmp, _p);
goto tmp3_done;
}
case 1: {
if (25 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT75), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_tmp = tmp4_2;
_p = tmp4_3;
tmp1 = omc_Interactive_getElementVisString(threadData, _tmp, _p);
goto tmp3_done;
}
case 2: {
if (29 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT76), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_tmp = tmp4_2;
_p = tmp4_3;
tmp1 = omc_Interactive_getElementVisString(threadData, _tmp, _p);
goto tmp3_done;
}
case 3: {
if (33 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT77), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_tmp = tmp4_2;
_p = tmp4_3;
tmp1 = omc_Interactive_getElementVisString(threadData, _tmp, _p);
goto tmp3_done;
}
case 4: {
if (39 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT78), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_tmp = tmp4_2;
_p = tmp4_3;
tmp1 = omc_Interactive_getElementVisString(threadData, _tmp, _p);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_string omc_Interactive_getElementVisString(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_string _desc = NULL;
modelica_metatype _el = NULL;
modelica_metatype _elementSpec = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_el = tmpMeta6;
tmpMeta7 = _el;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
_elementSpec = tmpMeta8;
tmpMeta9 = _elementSpec;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto goto_2;
_desc = omc_Interactive_getElementName(threadData, _elementSpec);
tmpMeta10 = stringAppend(_desc,_OMC_LIT79);
tmpMeta11 = stringAppend(tmpMeta10,omc_Interactive_getElementTypeName(threadData, _elementSpec));
tmp1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementTypeName(threadData_t *threadData, modelica_metatype _inElementSpec)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElementSpec;
{
modelica_metatype _typeSpec = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_typeSpec = tmpMeta6;
tmp1 = omc_Dump_unparseTypeSpec(threadData, _typeSpec);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementName(threadData_t *threadData, modelica_metatype _inElementSpec)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElementSpec;
{
modelica_metatype _names = NULL;
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_lst = tmpMeta6;
_names = omc_InteractiveUtil_getComponentItemsNameAndComment(threadData, _lst, 0);
tmp1 = stringDelimitList(_names, _OMC_LIT80);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_metatype omc_Interactive_parseFile(threadData_t *threadData, modelica_string _fileName, modelica_string _encoding, modelica_boolean _updateProgram)
{
modelica_metatype _topClassNamesQualified = NULL;
modelica_metatype _parsed = NULL;
modelica_string _dir = NULL;
modelica_string _filename = NULL;
modelica_boolean _lveStarted;
modelica_metatype _lveInstance = NULL;
modelica_metatype _features = NULL;
modelica_string _libraryKey = NULL;
modelica_string _licenseFile = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_lveStarted = 0;
_lveInstance = mmc_mk_none();
if((!omc_System_regularFileExists(threadData, _fileName)))
{
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_topClassNamesQualified = tmpMeta1;
goto _return;
}
_dir = omc_Util_getAbsoluteDirectoryAndFile(threadData, _fileName ,&_filename);
if((stringEqual(_filename, _OMC_LIT81)))
{
_lveStarted = omc_Parser_startLibraryVendorExecutable(threadData, _dir ,&_lveInstance);
if((!_lveStarted))
{
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_topClassNamesQualified = tmpMeta2;
goto _return;
}
}
_parsed = omc_Parser_parse(threadData, _fileName, _encoding, _dir, _lveInstance);
_parsed = omc_MetaUtil_createMetaClassesInProgram(threadData, _parsed);
_topClassNamesQualified = omc_Interactive_getTopQualifiedClassnames(threadData, _parsed);
if(_lveStarted)
{
omc_Parser_stopLibraryVendorExecutable(threadData, _lveInstance);
}
if(_updateProgram)
{
omc_SymbolTable_setAbsyn(threadData, omc_InteractiveUtil_updateProgram(threadData, _parsed, omc_SymbolTable_getAbsyn(threadData), 0));
}
_return: OMC_LABEL_UNUSED
return _topClassNamesQualified;
}
modelica_metatype boxptr_Interactive_parseFile(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _encoding, modelica_metatype _updateProgram)
{
modelica_integer tmp1;
modelica_metatype _topClassNamesQualified = NULL;
tmp1 = mmc_unbox_integer(_updateProgram);
_topClassNamesQualified = omc_Interactive_parseFile(threadData, _fileName, _encoding, tmp1);
return _topClassNamesQualified;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionTypeVars(threadData_t *threadData, modelica_metatype _inTypeVars, modelica_metatype _inDefinitions)
{
modelica_metatype _outDefinitions = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outDefinitions = _inDefinitions;
{
modelica_metatype _ty_var;
for (tmpMeta1 = listReverse(_inTypeVars); !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_ty_var = MMC_CAR(tmpMeta1);
tmpMeta3 = stringAppend(_OMC_LIT82,_ty_var);
tmpMeta4 = stringAppend(tmpMeta3,_OMC_LIT83);
tmpMeta2 = mmc_mk_cons(tmpMeta4, _outDefinitions);
_outDefinitions = tmpMeta2;
}
}
_return: OMC_LABEL_UNUSED
return _outDefinitions;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionComponents(threadData_t *threadData, modelica_string _typeStr, modelica_string _dirStr, modelica_integer _numDim, modelica_metatype _components)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _components;
{
modelica_metatype _rest = NULL;
modelica_string _ident = NULL;
modelica_metatype _l = NULL;
modelica_integer _sumDim;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
modelica_string tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_ident = tmpMeta10;
_l = tmpMeta11;
_rest = tmpMeta8;
_sumDim = _numDim + listLength(_l);
tmp13 = (modelica_boolean)(_numDim == ((modelica_integer) 0));
if(tmp13)
{
tmp14 = _OMC_LIT55;
}
else
{
tmpMeta12 = stringAppend(_OMC_LIT84,intString(_sumDim));
tmp14 = tmpMeta12;
}
tmpMeta15 = stringAppend(_dirStr,tmp14);
tmpMeta16 = stringAppend(tmpMeta15,_typeStr);
tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT85);
tmpMeta18 = stringAppend(tmpMeta17,_ident);
_ident = tmpMeta18;
tmpMeta19 = stringAppend(_OMC_LIT86,_ident);
tmpMeta20 = stringAppend(tmpMeta19,_OMC_LIT83);
_ident = tmpMeta20;
_res = omc_Interactive_getDefinitionComponents(threadData, _typeStr, _dirStr, _numDim, _rest);
tmpMeta21 = mmc_mk_cons(_ident, _res);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
_rest = tmpMeta23;
tmpMeta1 = omc_Interactive_getDefinitionComponents(threadData, _typeStr, _dirStr, _numDim, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionComponents(threadData_t *threadData, modelica_metatype _typeStr, modelica_metatype _dirStr, modelica_metatype _numDim, modelica_metatype _components)
{
modelica_integer tmp1;
modelica_metatype _res = NULL;
tmp1 = mmc_unbox_integer(_numDim);
_res = omc_Interactive_getDefinitionComponents(threadData, _typeStr, _dirStr, tmp1, _components);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionDirString(threadData_t *threadData, modelica_metatype _dir, modelica_metatype _variability, modelica_boolean _isFunction)
{
modelica_string _res = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _dir;
tmp4_2 = _isFunction;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_2) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmp1 = _OMC_LIT87;
goto tmp3_done;
}
case 1: {
if (1 != tmp4_2) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
tmp1 = _OMC_LIT88;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp6;
modelica_metatype tmpMeta8;
if (0 != tmp4_2) goto tmp3_end;
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta8 = _variability;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,0) == 0) goto goto_7;
tmp6 = 1;
goto goto_7;
goto_7:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp6) {goto goto_2;}
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_res = tmp1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionDirString(threadData_t *threadData, modelica_metatype _dir, modelica_metatype _variability, modelica_metatype _isFunction)
{
modelica_integer tmp1;
modelica_string _res = NULL;
tmp1 = mmc_unbox_integer(_isFunction);
_res = omc_Interactive_getDefinitionDirString(threadData, _dir, _variability, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionContent(threadData_t *threadData, modelica_metatype _contents, modelica_boolean _addFunctions, modelica_boolean _isPublic)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_boolean tmp4_2;volatile modelica_boolean tmp4_3;
tmp4_1 = _contents;
tmp4_2 = _addFunctions;
tmp4_3 = _isPublic;
{
modelica_metatype _rest = NULL;
modelica_string _ident = NULL;
modelica_string _typeStr = NULL;
modelica_string _dirStr = NULL;
modelica_string _str = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _path = NULL;
modelica_metatype _components = NULL;
modelica_metatype _direction = NULL;
modelica_metatype _ts = NULL;
modelica_metatype _variability = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _res2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 5;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
if (0 != tmp12) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
_class_ = tmpMeta13;
_rest = tmpMeta8;
tmp4 += 3;
_res = omc_Interactive_getDefinitionContent(threadData, _rest, _addFunctions, _isPublic);
_str = omc_Interactive_getDefinitionsClass(threadData, _class_, _addFunctions);
tmpMeta14 = mmc_mk_cons(_str, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_integer tmp20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_1);
tmpMeta16 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,6) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
tmp20 = mmc_unbox_integer(tmpMeta19);
if (1 != tmp20) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
_class_ = tmpMeta21;
_rest = tmpMeta16;
tmp4 += 2;
_res = omc_Interactive_getDefinitionContent(threadData, _rest, _addFunctions, _isPublic);
_ident = omc_Interactive_getDefinitionsReplaceableClass(threadData, _class_);
tmpMeta22 = mmc_mk_cons(_ident, _res);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
if (1 != tmp4_3) goto tmp3_end;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta23 = MMC_CAR(tmp4_1);
tmpMeta24 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,1) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,0,6) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,3,3) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 5));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 6));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 4));
_attr = tmpMeta27;
_variability = tmpMeta28;
_direction = tmpMeta29;
_ts = tmpMeta30;
_components = tmpMeta31;
_rest = tmpMeta24;
tmp4 += 1;
_typeStr = omc_Interactive_getDefinitionTypeSpecPathString(threadData, _ts);
_dirStr = omc_Interactive_getDefinitionDirString(threadData, _direction, _variability, _addFunctions);
_res = omc_Interactive_getDefinitionComponents(threadData, _typeStr, _dirStr, omc_Interactive_getDefinitionDimensions(threadData, _ts, _attr), _components);
_res2 = omc_Interactive_getDefinitionContent(threadData, _rest, _addFunctions, _isPublic);
tmpMeta1 = listAppend(_res, _res2);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (0 != tmp4_2) goto tmp3_end;
if (1 != tmp4_3) goto tmp3_end;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmp4_1);
tmpMeta33 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,0,6) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,1,3) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
_path = tmpMeta36;
_rest = tmpMeta33;
tmpMeta37 = stringAppend(_OMC_LIT89,omc_Interactive_getDefinitionPathString(threadData, _path));
tmpMeta38 = stringAppend(tmpMeta37,_OMC_LIT83);
_typeStr = tmpMeta38;
_res = omc_Interactive_getDefinitionContent(threadData, _rest, _addFunctions, _isPublic);
tmpMeta39 = mmc_mk_cons(_typeStr, _res);
tmpMeta1 = tmpMeta39;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta40 = MMC_CAR(tmp4_1);
tmpMeta41 = MMC_CDR(tmp4_1);
_rest = tmpMeta41;
tmpMeta1 = omc_Interactive_getDefinitionContent(threadData, _rest, _addFunctions, _isPublic);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionContent(threadData_t *threadData, modelica_metatype _contents, modelica_metatype _addFunctions, modelica_metatype _isPublic)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _res = NULL;
tmp1 = mmc_unbox_integer(_addFunctions);
tmp2 = mmc_unbox_integer(_isPublic);
_res = omc_Interactive_getDefinitionContent(threadData, _contents, tmp1, tmp2);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitionParts(threadData_t *threadData, modelica_metatype _parts, modelica_metatype _inTypeVars, modelica_boolean _isFunction)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _parts;
{
modelica_metatype _rest = NULL;
modelica_metatype _contents = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta1 = omc_Interactive_getDefinitionTypeVars(threadData, _inTypeVars, _OMC_LIT90);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_contents = tmpMeta8;
_rest = tmpMeta7;
tmp4 += 1;
tmpMeta1 = listAppend(omc_Interactive_getDefinitionContent(threadData, _contents, _isFunction, 1), omc_Interactive_getDefinitionParts(threadData, _rest, _inTypeVars, _isFunction));
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_contents = tmpMeta11;
_rest = tmpMeta10;
tmpMeta1 = listAppend(omc_Interactive_getDefinitionContent(threadData, _contents, _isFunction, 0), omc_Interactive_getDefinitionParts(threadData, _rest, _inTypeVars, _isFunction));
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_rest = tmpMeta13;
tmpMeta1 = omc_Interactive_getDefinitionParts(threadData, _rest, _inTypeVars, _isFunction);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionParts(threadData_t *threadData, modelica_metatype _parts, modelica_metatype _inTypeVars, modelica_metatype _isFunction)
{
modelica_integer tmp1;
modelica_metatype _res = NULL;
tmp1 = mmc_unbox_integer(_isFunction);
_res = omc_Interactive_getDefinitionParts(threadData, _parts, _inTypeVars, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_getDefinitionDimensions(threadData_t *threadData, modelica_metatype _ts, modelica_metatype _attr)
{
modelica_integer _out;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _ts;
tmp4_2 = _attr;
{
modelica_metatype _l1 = NULL;
modelica_metatype _l2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (optionNone(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
_l1 = tmpMeta7;
_l2 = tmpMeta8;
tmp1 = listLength(_l1) + listLength(_l2);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
_l1 = tmpMeta10;
_l2 = tmpMeta11;
tmp1 = listLength(_l1) + listLength(_l2);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!optionNone(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
_l2 = tmpMeta13;
tmp1 = listLength(_l2);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!optionNone(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
_l2 = tmpMeta15;
tmp1 = listLength(_l2);
goto tmp3_done;
}
case 4: {
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out = tmp1;
_return: OMC_LABEL_UNUSED
return _out;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionDimensions(threadData_t *threadData, modelica_metatype _ts, modelica_metatype _attr)
{
modelica_integer _out;
modelica_metatype out_out;
_out = omc_Interactive_getDefinitionDimensions(threadData, _ts, _attr);
out_out = mmc_mk_icon(_out);
return out_out;
}
DLLExport
modelica_string omc_Interactive_getDefinitionTypeSpecPathString(threadData_t *threadData, modelica_metatype _tp)
{
modelica_string _s = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _tp;
{
modelica_metatype _p = NULL;
modelica_metatype _tspecs = NULL;
modelica_metatype _tspecsStr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_p = tmpMeta6;
tmp1 = omc_Interactive_getDefinitionPathString(threadData, _p);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_p = tmpMeta8;
_tspecs = tmpMeta9;
tmp4 += 1;
_tspecsStr = omc_List_map(threadData, _tspecs, boxvar_Interactive_getDefinitionTypeSpecPathString);
tmpMeta10 = stringAppend(omc_Interactive_getDefinitionPathString(threadData, _p),_OMC_LIT91);
tmpMeta11 = stringAppend(tmpMeta10,stringDelimitList(_tspecsStr, _OMC_LIT73));
tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT92);
tmp1 = tmpMeta12;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_p = tmpMeta13;
tmp1 = omc_Interactive_getDefinitionPathString(threadData, _p);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_s = tmp1;
_return: OMC_LABEL_UNUSED
return _s;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionPathString(threadData_t *threadData, modelica_metatype _path)
{
modelica_string _out = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_out = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
_return: OMC_LABEL_UNUSED
return _out;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getEnumerationLiterals(threadData_t *threadData, modelica_metatype _el)
{
modelica_string _out = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _el;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_out = tmpMeta6;
tmpMeta7 = mmc_mk_cons(_OMC_LIT94, mmc_mk_cons(_out, mmc_mk_cons(_OMC_LIT94, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta7);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out = tmp1;
_return: OMC_LABEL_UNUSED
return _out;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionsReplaceableClass(threadData_t *threadData, modelica_metatype _class_)
{
modelica_string _res = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _class_;
{
modelica_string _ident = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,7,0) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,4) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (11 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT95), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,2) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,1,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (3 != MMC_STRLEN(tmpMeta16) || strcmp(MMC_STRINGDATA(_OMC_LIT96), MMC_STRINGDATA(tmpMeta16)) != 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
if (!optionNone(tmpMeta17)) goto tmp3_end;
if (!listEmpty(tmpMeta14)) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
if (!optionNone(tmpMeta18)) goto tmp3_end;
_ident = tmpMeta6;
tmpMeta19 = stringAppend(_OMC_LIT82,_ident);
tmpMeta20 = stringAppend(tmpMeta19,_OMC_LIT83);
tmp1 = tmpMeta20;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_res = tmp1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitionsClass(threadData_t *threadData, modelica_metatype _class_, modelica_boolean _addFunctions)
{
modelica_string _res = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_boolean tmp4_2;
tmp4_1 = _class_;
tmp4_2 = _addFunctions;
{
modelica_string _ident = NULL;
modelica_string _tyStr = NULL;
modelica_metatype _strs = NULL;
modelica_metatype _ts = NULL;
modelica_metatype _attr = NULL;
modelica_integer _numDim;
modelica_integer _index;
modelica_metatype _path = NULL;
modelica_string _indexArg = NULL;
modelica_string _pathArg = NULL;
modelica_metatype _body = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 11; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,8,0) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,5) == 0) goto tmp3_end;
_ident = tmpMeta6;
_body = tmpMeta8;
tmp4 += 9;
tmpMeta9 = stringAppend(_OMC_LIT97,_ident);
_ident = tmpMeta9;
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), _addFunctions);
tmpMeta10 = mmc_mk_cons(_ident, _strs);
_strs = tmpMeta10;
tmp1 = stringDelimitList(_strs, _OMC_LIT72);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_integer tmp13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp13 = mmc_unbox_integer(tmpMeta12);
if (1 != tmp13) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,9,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,0) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,5) == 0) goto tmp3_end;
_ident = tmpMeta11;
tmpMeta18 = mmc_mk_cons(_OMC_LIT98, mmc_mk_cons(_ident, mmc_mk_cons(_OMC_LIT83, MMC_REFSTRUCTLIT(mmc_nil))));
_strs = tmpMeta18;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_integer tmp21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp21 = mmc_unbox_integer(tmpMeta20);
if (1 != tmp21) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,9,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,1) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,0,5) == 0) goto tmp3_end;
_ident = tmpMeta19;
tmp4 += 7;
tmpMeta25 = mmc_mk_cons(_OMC_LIT99, mmc_mk_cons(_ident, mmc_mk_cons(_OMC_LIT83, MMC_REFSTRUCTLIT(mmc_nil))));
_strs = tmpMeta25;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_integer tmp28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (1 != tmp4_2) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp28 = mmc_unbox_integer(tmpMeta27);
if (0 != tmp28) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,9,1) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,0,1) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,1,0) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,5) == 0) goto tmp3_end;
_ident = tmpMeta26;
_body = tmpMeta32;
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), 1);
tmpMeta34 = mmc_mk_cons(_ident, _strs);
tmpMeta33 = mmc_mk_cons(_OMC_LIT100, tmpMeta34);
_strs = tmpMeta33;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_integer tmp37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (1 != tmp4_2) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp37 = mmc_unbox_integer(tmpMeta36);
if (0 != tmp37) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,9,1) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta39,0,1) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,0,5) == 0) goto tmp3_end;
_ident = tmpMeta35;
_body = tmpMeta40;
tmp4 += 5;
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), 1);
tmpMeta42 = mmc_mk_cons(_ident, _strs);
tmpMeta41 = mmc_mk_cons(_OMC_LIT101, tmpMeta42);
_strs = tmpMeta41;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_integer tmp45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (1 != tmp4_2) goto tmp3_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp45 = mmc_unbox_integer(tmpMeta44);
if (0 != tmp45) goto tmp3_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,9,1) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta47,1,0) == 0) goto tmp3_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta48,0,5) == 0) goto tmp3_end;
_ident = tmpMeta43;
_body = tmpMeta48;
tmp4 += 4;
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), 1);
tmpMeta50 = mmc_mk_cons(_ident, _strs);
tmpMeta49 = mmc_mk_cons(_OMC_LIT102, tmpMeta50);
_strs = tmpMeta49;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta52,19,0) == 0) goto tmp3_end;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta53,0,5) == 0) goto tmp3_end;
_ident = tmpMeta51;
tmp4 += 3;
tmpMeta54 = mmc_mk_cons(_OMC_LIT103, mmc_mk_cons(_ident, mmc_mk_cons(_OMC_LIT83, MMC_REFSTRUCTLIT(mmc_nil))));
_strs = tmpMeta54;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta56,3,0) == 0) goto tmp3_end;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,0,5) == 0) goto tmp3_end;
_ident = tmpMeta55;
_body = tmpMeta57;
tmp4 += 2;
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), 0);
tmpMeta59 = mmc_mk_cons(_ident, _strs);
tmpMeta58 = mmc_mk_cons(_OMC_LIT104, tmpMeta59);
_strs = tmpMeta58;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_integer tmp64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta61,20,5) == 0) goto tmp3_end;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 2));
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 3));
tmp64 = mmc_unbox_integer(tmpMeta63);
tmpMeta65 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta65,0,5) == 0) goto tmp3_end;
_ident = tmpMeta60;
_path = tmpMeta62;
_index = tmp64;
_body = tmpMeta65;
tmp4 += 1;
_indexArg = intString(_index);
_pathArg = omc_AbsynUtil_pathLastIdent(threadData, _path);
_strs = omc_Interactive_getDefinitionParts(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 2))), 0);
tmpMeta69 = mmc_mk_cons(_pathArg, _strs);
tmpMeta68 = mmc_mk_cons(_indexArg, tmpMeta69);
tmpMeta67 = mmc_mk_cons(_ident, tmpMeta68);
tmpMeta66 = mmc_mk_cons(_OMC_LIT105, tmpMeta67);
_strs = tmpMeta66;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
modelica_boolean tmp75;
modelica_string tmp76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
tmpMeta70 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta71,1,4) == 0) goto tmp3_end;
tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 2));
tmpMeta73 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 3));
_ident = tmpMeta70;
_ts = tmpMeta72;
_attr = tmpMeta73;
_numDim = omc_Interactive_getDefinitionDimensions(threadData, _ts, _attr);
tmp75 = (modelica_boolean)(_numDim == ((modelica_integer) 0));
if(tmp75)
{
tmp76 = _OMC_LIT55;
}
else
{
tmpMeta74 = stringAppend(_OMC_LIT84,intString(_numDim));
tmp76 = tmpMeta74;
}
tmpMeta77 = stringAppend(tmp76,omc_Interactive_getDefinitionTypeSpecPathString(threadData, _ts));
_tyStr = tmpMeta77;
tmpMeta78 = mmc_mk_cons(_OMC_LIT106, mmc_mk_cons(_ident, mmc_mk_cons(_tyStr, mmc_mk_cons(_OMC_LIT83, MMC_REFSTRUCTLIT(mmc_nil)))));
_strs = tmpMeta78;
tmp1 = stringDelimitList(_strs, _OMC_LIT85);
goto tmp3_done;
}
case 10: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 11) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res = tmp1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitionsClass(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _addFunctions)
{
modelica_integer tmp1;
modelica_string _res = NULL;
tmp1 = mmc_unbox_integer(_addFunctions);
_res = omc_Interactive_getDefinitionsClass(threadData, _class_, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefinitions2(threadData_t *threadData, modelica_metatype _classes, modelica_boolean _addFunctions)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _classes;
{
modelica_metatype _rest = NULL;
modelica_metatype _class_ = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_class_ = tmpMeta7;
_rest = tmpMeta8;
_str = omc_Interactive_getDefinitionsClass(threadData, _class_, _addFunctions);
_res = omc_Interactive_getDefinitions2(threadData, _rest, _addFunctions);
tmpMeta9 = mmc_mk_cons(_str, _res);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_res = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitions2(threadData_t *threadData, modelica_metatype _classes, modelica_metatype _addFunctions)
{
modelica_integer tmp1;
modelica_metatype _res = NULL;
tmp1 = mmc_unbox_integer(_addFunctions);
_res = omc_Interactive_getDefinitions2(threadData, _classes, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_printWithNewline(threadData_t *threadData, modelica_string _s)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Print_printBuf(threadData, _s);
omc_Print_printBuf(threadData, _OMC_LIT72);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefinitions(threadData_t *threadData, modelica_metatype _ast, modelica_boolean _addFunctions)
{
modelica_string _res = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _classes = NULL;
modelica_metatype _toPrint = NULL;
modelica_integer _handle;
modelica_metatype _cl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = omc_MetaUtil_createMetaClassesInProgram(threadData, _ast);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_classes = tmpMeta7;
_handle = omc_Print_saveAndClearBuf(threadData);
omc_Print_printBuf(threadData, _OMC_LIT107);
_toPrint = omc_Interactive_getDefinitions2(threadData, _classes, _addFunctions);
omc_List_map__0(threadData, _toPrint, boxvar_Interactive_printWithNewline);
_cl = omc_InteractiveUtil_getPathedClassInProgram(threadData, _OMC_LIT109, _ast, 0, 0);
tmpMeta8 = mmc_mk_cons(_cl, MMC_REFSTRUCTLIT(mmc_nil));
_toPrint = omc_Interactive_getDefinitions2(threadData, tmpMeta8, 0);
omc_List_map__0(threadData, _toPrint, boxvar_Interactive_printWithNewline);
omc_Print_printBuf(threadData, _OMC_LIT110);
_res = omc_Print_getString(threadData);
omc_Print_restoreBuf(threadData, _handle);
tmp1 = _res;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_res = tmp1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getDefinitions(threadData_t *threadData, modelica_metatype _ast, modelica_metatype _addFunctions)
{
modelica_integer tmp1;
modelica_string _res = NULL;
tmp1 = mmc_unbox_integer(_addFunctions);
_res = omc_Interactive_getDefinitions(threadData, _ast, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElseIfAlgorithm(threadData_t *threadData, modelica_metatype _elseIfbranch)
{
modelica_metatype _outElseIfbranch = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _elseIfbranch;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e11 = NULL;
modelica_metatype _algitems = NULL;
modelica_metatype _algitems1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_e1 = tmpMeta6;
_algitems = tmpMeta7;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_algitems1 = omc_List_map(threadData, _algitems, boxvar_Interactive_transformFlatAlgorithmItem);
tmpMeta8 = mmc_mk_box2(0, _e11, _algitems1);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElseIfbranch = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElseIfbranch;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatAlgorithm(threadData_t *threadData, modelica_metatype _alg)
{
modelica_metatype _outAlg = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _alg;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e11 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _e21 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _body = NULL;
modelica_metatype _body1 = NULL;
modelica_metatype _thenPart = NULL;
modelica_metatype _thenPart1 = NULL;
modelica_metatype _elsePart = NULL;
modelica_metatype _elsePart1 = NULL;
modelica_metatype _elseIfPart = NULL;
modelica_metatype _elseIfPart1 = NULL;
modelica_metatype _whenBranch = NULL;
modelica_metatype _whenBranch1 = NULL;
modelica_string _id = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _fargs1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr = tmpMeta7;
_e1 = tmpMeta8;
omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_cr1 = omc_Interactive_transformFlatComponentRef(threadData, _cr);
tmpMeta9 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr1);
tmpMeta10 = mmc_mk_box3(3, &Absyn_Algorithm_ALG__ASSIGN__desc, tmpMeta9, _e1);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,16,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_e1 = tmpMeta11;
_e2 = tmpMeta12;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_e21 = omc_AbsynUtil_traverseExp(threadData, _e2, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta13 = mmc_mk_box3(3, &Absyn_Algorithm_ALG__ASSIGN__desc, _e11, _e21);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_e1 = tmpMeta14;
_thenPart = tmpMeta15;
_elseIfPart = tmpMeta16;
_elsePart = tmpMeta17;
_thenPart1 = omc_List_map(threadData, _thenPart, boxvar_Interactive_transformFlatAlgorithmItem);
_elseIfPart1 = omc_List_map(threadData, _elseIfPart, boxvar_Interactive_transformFlatElseIfAlgorithm);
_elsePart1 = omc_List_map(threadData, _elsePart, boxvar_Interactive_transformFlatAlgorithmItem);
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta18 = mmc_mk_box5(4, &Absyn_Algorithm_ALG__IF__desc, _e11, _thenPart1, _elseIfPart1, _elsePart1);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta19)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmpMeta19);
tmpMeta21 = MMC_CDR(tmpMeta19);
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
if (!optionNone(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 4));
if (optionNone(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 1));
if (!listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta22;
_e1 = tmpMeta25;
_body = tmpMeta26;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_body1 = omc_List_map(threadData, _body, boxvar_Interactive_transformFlatAlgorithmItem);
tmpMeta28 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _id, mmc_mk_none(), mmc_mk_some(_e11));
tmpMeta27 = mmc_mk_cons(tmpMeta28, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta29 = mmc_mk_box3(5, &Absyn_Algorithm_ALG__FOR__desc, tmpMeta27, _body1);
tmpMeta1 = tmpMeta29;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_e1 = tmpMeta30;
_body = tmpMeta31;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_body1 = omc_List_map(threadData, _body, boxvar_Interactive_transformFlatAlgorithmItem);
tmpMeta32 = mmc_mk_box3(7, &Absyn_Algorithm_ALG__WHILE__desc, _e11, _body1);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_e1 = tmpMeta33;
_body = tmpMeta34;
_whenBranch = tmpMeta35;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_body1 = omc_List_map(threadData, _body, boxvar_Interactive_transformFlatAlgorithmItem);
_whenBranch1 = omc_List_map(threadData, _whenBranch, boxvar_Interactive_transformFlatElseIfAlgorithm);
tmpMeta36 = mmc_mk_box4(8, &Absyn_Algorithm_ALG__WHEN__A__desc, _e11, _body1, _whenBranch1);
tmpMeta1 = tmpMeta36;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr = tmpMeta37;
_fargs = tmpMeta38;
_cr1 = omc_Interactive_transformFlatComponentRef(threadData, _cr);
_fargs1 = omc_Interactive_transformFlatFunctionArgs(threadData, _fargs);
tmpMeta39 = mmc_mk_box3(9, &Absyn_Algorithm_ALG__NORETCALL__desc, _cr1, _fargs1);
tmpMeta1 = tmpMeta39;
goto tmp3_done;
}
case 7: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT111;
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT112;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAlg = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAlg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatAlgorithmItem(threadData_t *threadData, modelica_metatype _algitem)
{
modelica_metatype _outAlgitem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _algitem;
{
modelica_metatype _cmt = NULL;
modelica_metatype _alg = NULL;
modelica_metatype _alg1 = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_alg = tmpMeta6;
_cmt = tmpMeta7;
_info = tmpMeta8;
_alg1 = omc_Interactive_transformFlatAlgorithm(threadData, _alg);
tmpMeta9 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, _alg1, _cmt, _info);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAlgitem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAlgitem;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatExp(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDummy, modelica_integer *out_outDummy)
{
modelica_metatype _outExp = NULL;
modelica_integer _outDummy;
modelica_integer tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_integer tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inDummy;
{
modelica_metatype _cr = NULL;
modelica_metatype _cr1 = NULL;
modelica_integer _i;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta6;
_i = tmp4_2;
_cr1 = omc_Interactive_transformFlatComponentRef(threadData, _cr);
tmpMeta7 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr1);
tmpMeta[0+0] = tmpMeta7;
tmp1_c1 = _i;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inExp;
tmp1_c1 = _inDummy;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta[0+0];
_outDummy = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outDummy) { *out_outDummy = _outDummy; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformFlatExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDummy, modelica_metatype *out_outDummy)
{
modelica_integer tmp1;
modelica_integer _outDummy;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inDummy);
_outExp = omc_Interactive_transformFlatExp(threadData, _inExp, tmp1, &_outDummy);
if (out_outDummy) { *out_outDummy = mmc_mk_icon(_outDummy); }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatNamedArg(threadData_t *threadData, modelica_metatype _namedArg)
{
modelica_metatype _outNamedArg = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _namedArg;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e11 = NULL;
modelica_string _id = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta6;
_e1 = tmpMeta7;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta8 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _id, _e11);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outNamedArg = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outNamedArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatFunctionArgs(threadData_t *threadData, modelica_metatype _fargs)
{
modelica_metatype _outFargs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _fargs;
{
modelica_metatype _expl = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _namedArgs = NULL;
modelica_metatype _namedArgs1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_expl = tmpMeta6;
_namedArgs = tmpMeta7;
{
modelica_metatype __omcQ_24tmpVar1;
modelica_metatype* tmp9;
modelica_metatype tmpMeta10;
modelica_metatype __omcQ_24tmpVar0;
modelica_integer tmp11;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _expl;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar1 = tmpMeta10;
tmp9 = &__omcQ_24tmpVar1;
while(1) {
tmp11 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp11--;
}
if (tmp11 == 0) {
__omcQ_24tmpVar0 = omc_AbsynUtil_traverseExp(threadData, _e, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
*tmp9 = mmc_mk_cons(__omcQ_24tmpVar0,0);
tmp9 = &MMC_CDR(*tmp9);
} else if (tmp11 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp9 = mmc_mk_nil();
tmpMeta8 = __omcQ_24tmpVar1;
}
_expl1 = tmpMeta8;
_namedArgs1 = omc_List_map(threadData, _namedArgs, boxvar_Interactive_transformFlatNamedArg);
tmpMeta12 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _expl1, _namedArgs1);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta1 = _fargs;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outFargs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outFargs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElseIfPart(threadData_t *threadData, modelica_metatype _elseIfPart)
{
modelica_metatype _outElseIfPart = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _elseIfPart;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e11 = NULL;
modelica_metatype _eqnitems = NULL;
modelica_metatype _eqnitems1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_e1 = tmpMeta6;
_eqnitems = tmpMeta7;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_eqnitems1 = omc_List_map(threadData, _eqnitems, boxvar_Interactive_transformFlatEquationItem);
tmpMeta8 = mmc_mk_box2(0, _e11, _eqnitems1);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElseIfPart = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElseIfPart;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatEquation(threadData_t *threadData, modelica_metatype _eqn)
{
modelica_metatype _outEqn = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eqn;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _e11 = NULL;
modelica_metatype _e21 = NULL;
modelica_string _id = NULL;
modelica_metatype _name = NULL;
modelica_metatype _thenpart = NULL;
modelica_metatype _thenpart1 = NULL;
modelica_metatype _elsepart = NULL;
modelica_metatype _elsepart1 = NULL;
modelica_metatype _forEqns = NULL;
modelica_metatype _forEqns1 = NULL;
modelica_metatype _whenEqns = NULL;
modelica_metatype _whenEqns1 = NULL;
modelica_metatype _elseifpart = NULL;
modelica_metatype _elseifpart1 = NULL;
modelica_metatype _elseWhenEqns = NULL;
modelica_metatype _elseWhenEqns1 = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _cr11 = NULL;
modelica_metatype _cr21 = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _fargs1 = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_e1 = tmpMeta5;
_thenpart = tmpMeta6;
_elseifpart = tmpMeta7;
_elsepart = tmpMeta8;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_thenpart1 = omc_List_map(threadData, _thenpart, boxvar_Interactive_transformFlatEquationItem);
_elsepart1 = omc_List_map(threadData, _elsepart, boxvar_Interactive_transformFlatEquationItem);
_elseifpart1 = omc_List_map(threadData, _elseifpart, boxvar_Interactive_transformFlatElseIfPart);
tmpMeta9 = mmc_mk_box5(3, &Absyn_Equation_EQ__IF__desc, _e11, _thenpart1, _elseifpart1, _elsepart1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_e1 = tmpMeta10;
_e2 = tmpMeta11;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_e21 = omc_AbsynUtil_traverseExp(threadData, _e2, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta12 = mmc_mk_box3(4, &Absyn_Equation_EQ__EQUALS__desc, _e11, _e21);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_e1 = tmpMeta13;
_e2 = tmpMeta14;
_cr1 = tmpMeta15;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_e21 = omc_AbsynUtil_traverseExp(threadData, _e2, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_cr11 = omc_Interactive_transformFlatComponentRef(threadData, _cr1);
tmpMeta16 = mmc_mk_box4(5, &Absyn_Equation_EQ__PDE__desc, _e11, _e21, _cr11);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr1 = tmpMeta17;
_cr2 = tmpMeta18;
_cr11 = omc_Interactive_transformFlatComponentRef(threadData, _cr1);
_cr21 = omc_Interactive_transformFlatComponentRef(threadData, _cr2);
tmpMeta19 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _cr11, _cr21);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmpMeta20);
tmpMeta22 = MMC_CDR(tmpMeta20);
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
if (!optionNone(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 4));
if (optionNone(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 1));
if (!listEmpty(tmpMeta22)) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta23;
_e1 = tmpMeta26;
_forEqns = tmpMeta27;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_forEqns1 = omc_List_map(threadData, _forEqns, boxvar_Interactive_transformFlatEquationItem);
tmpMeta29 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _id, mmc_mk_none(), mmc_mk_some(_e11));
tmpMeta28 = mmc_mk_cons(tmpMeta29, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta30 = mmc_mk_box3(7, &Absyn_Equation_EQ__FOR__desc, tmpMeta28, _forEqns1);
tmpMeta1 = tmpMeta30;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_e1 = tmpMeta31;
_whenEqns = tmpMeta32;
_elseWhenEqns = tmpMeta33;
_e11 = omc_AbsynUtil_traverseExp(threadData, _e1, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
_elseWhenEqns1 = omc_List_map(threadData, _elseWhenEqns, boxvar_Interactive_transformFlatElseIfPart);
_whenEqns1 = omc_List_map(threadData, _whenEqns, boxvar_Interactive_transformFlatEquationItem);
tmpMeta34 = mmc_mk_box4(8, &Absyn_Equation_EQ__WHEN__E__desc, _e11, _whenEqns1, _elseWhenEqns1);
tmpMeta1 = tmpMeta34;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_name = tmpMeta35;
_fargs = tmpMeta36;
_fargs1 = omc_Interactive_transformFlatFunctionArgs(threadData, _fargs);
tmpMeta37 = mmc_mk_box3(9, &Absyn_Equation_EQ__NORETCALL__desc, _name, _fargs1);
tmpMeta1 = tmpMeta37;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEqn = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEqn;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatEquationItem(threadData_t *threadData, modelica_metatype _eqnitem)
{
modelica_metatype _outEqnitem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eqnitem;
{
modelica_metatype _cmt = NULL;
modelica_metatype _eqn = NULL;
modelica_metatype _eqn1 = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_eqn = tmpMeta6;
_cmt = tmpMeta7;
_info = tmpMeta8;
_eqn1 = omc_Interactive_transformFlatEquation(threadData, _eqn);
tmpMeta9 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, _eqn1, _cmt, _info);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEqnitem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEqnitem;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponentRef(threadData_t *threadData, modelica_metatype _cr)
{
modelica_metatype _outCr = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _cr1 = NULL;
modelica_metatype _ss = NULL;
modelica_string _s = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_ss = omc_AbsynUtil_crefLastSubs(threadData, _cr);
_cr1 = omc_AbsynUtil_crefStripLastSubs(threadData, _cr);
_s = omc_Dump_printComponentRefStr(threadData, _cr1);
tmpMeta6 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _s, _ss);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatModificationOption(threadData_t *threadData, modelica_metatype _mod)
{
modelica_metatype _outMod = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _info = NULL;
modelica_metatype _e = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _eltArgs = NULL;
modelica_metatype _eltArgs1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_eltArgs = tmpMeta7;
_e = tmpMeta9;
_info = tmpMeta10;
_eltArgs1 = omc_List_map(threadData, _eltArgs, boxvar_Interactive_transformFlatElementArg);
_e1 = omc_AbsynUtil_traverseExp(threadData, _e, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta11 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _e1, _info);
tmpMeta12 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _eltArgs1, tmpMeta11);
tmpMeta1 = mmc_mk_some(tmpMeta12);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,0) == 0) goto tmp3_end;
_eltArgs = tmpMeta14;
_eltArgs1 = omc_List_map(threadData, _eltArgs, boxvar_Interactive_transformFlatElementArg);
tmpMeta16 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _eltArgs1, _OMC_LIT113);
tmpMeta1 = mmc_mk_some(tmpMeta16);
goto tmp3_done;
}
case 2: {
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outMod = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outMod;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementArg(threadData_t *threadData, modelica_metatype _eltArg)
{
modelica_metatype _outEltArg = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eltArg;
{
modelica_boolean _f;
modelica_metatype _e = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _mod1 = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _info = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_f = tmp7;
_e = tmpMeta8;
_p = tmpMeta9;
_mod = tmpMeta10;
_cmt = tmpMeta11;
_info = tmpMeta12;
_mod1 = omc_Interactive_transformFlatModificationOption(threadData, _mod);
tmpMeta13 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(_f), _e, _p, _mod1, _cmt, _info);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,6) == 0) goto tmp3_end;
tmpMeta1 = _eltArg;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEltArg = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEltArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatSubscript(threadData_t *threadData, modelica_metatype _s)
{
modelica_metatype _outS = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _s;
{
modelica_metatype _e = NULL;
modelica_metatype _e1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT114;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_e = tmpMeta6;
_e1 = omc_AbsynUtil_traverseExp(threadData, _e, boxvar_Interactive_transformFlatExp, mmc_mk_integer(((modelica_integer) 0)), NULL);
tmpMeta7 = mmc_mk_box2(4, &Absyn_Subscript_SUBSCRIPT__desc, _e1);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outS = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outS;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatArrayDim(threadData_t *threadData, modelica_metatype _ad)
{
modelica_metatype _outAd = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outAd = omc_List_map(threadData, _ad, boxvar_Interactive_transformFlatSubscript);
_return: OMC_LABEL_UNUSED
return _outAd;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponent(threadData_t *threadData, modelica_metatype _comp)
{
modelica_metatype _outComp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _comp;
{
modelica_metatype _arraydim = NULL;
modelica_metatype _arraydimTransformed = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _modTransformed = NULL;
modelica_string _id = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_id = tmpMeta6;
_arraydim = tmpMeta7;
_mod = tmpMeta8;
_modTransformed = omc_Interactive_transformFlatModificationOption(threadData, _mod);
_arraydimTransformed = omc_Interactive_transformFlatArrayDim(threadData, _arraydim);
tmpMeta9 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _id, _arraydimTransformed, _modTransformed);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatComponentItem(threadData_t *threadData, modelica_metatype _compitem)
{
modelica_metatype _outCompitem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _compitem;
{
modelica_metatype _cond = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _compTransformed = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_comp = tmpMeta6;
_cond = tmpMeta7;
_cmt = tmpMeta8;
_compTransformed = omc_Interactive_transformFlatComponent(threadData, _comp);
tmpMeta9 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, _compTransformed, _cond, _cmt);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCompitem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCompitem;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementSpec(threadData_t *threadData, modelica_metatype _eltSpec)
{
modelica_metatype _outEltSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eltSpec;
{
modelica_boolean _r;
modelica_metatype _cl = NULL;
modelica_metatype _cl1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _eargs = NULL;
modelica_metatype _eargs1 = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _comps1 = NULL;
modelica_metatype _annOpt = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_integer tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp6 = mmc_unbox_integer(tmpMeta5);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_r = tmp6;
_cl = tmpMeta7;
tmpMeta8 = mmc_mk_box3(0, _cl, mmc_mk_none(), mmc_mk_integer(((modelica_integer) 0)));
tmpMeta9 = omc_Interactive_transformFlatClass(threadData, tmpMeta8);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
_cl1 = tmpMeta10;
tmpMeta11 = mmc_mk_box3(3, &Absyn_ElementSpec_CLASSDEF__desc, mmc_mk_boolean(_r), _cl1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_path = tmpMeta12;
_eargs = tmpMeta13;
_annOpt = tmpMeta14;
_eargs1 = omc_List_map(threadData, _eargs, boxvar_Interactive_transformFlatElementArg);
tmpMeta15 = mmc_mk_box4(4, &Absyn_ElementSpec_EXTENDS__desc, _path, _eargs1, _annOpt);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 5: {
tmpMeta1 = _eltSpec;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_attr = tmpMeta16;
_tp = tmpMeta17;
_comps = tmpMeta18;
_comps1 = omc_List_map(threadData, _comps, boxvar_Interactive_transformFlatComponentItem);
tmpMeta19 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr, _tp, _comps1);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEltSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEltSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElement(threadData_t *threadData, modelica_metatype _elt)
{
modelica_metatype _outElt = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _elt;
{
modelica_boolean _f;
modelica_metatype _r = NULL;
modelica_metatype _io = NULL;
modelica_metatype _spec = NULL;
modelica_metatype _spec1 = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta1 = _elt;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_f = tmp7;
_r = tmpMeta8;
_io = tmpMeta9;
_spec = tmpMeta10;
_info = tmpMeta11;
_constr = tmpMeta12;
_spec1 = omc_Interactive_transformFlatElementSpec(threadData, _spec);
tmpMeta13 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_f), _r, _io, _spec1, _info, _constr);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElt = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatElementItem(threadData_t *threadData, modelica_metatype _eitem)
{
modelica_metatype _outEitem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eitem;
{
modelica_metatype _elt = NULL;
modelica_metatype _elt1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_elt = tmpMeta6;
_elt1 = omc_Interactive_transformFlatElement(threadData, _elt);
tmpMeta7 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt1);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEitem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEitem;
}
DLLExport
modelica_metatype omc_Interactive_transformFlatPart(threadData_t *threadData, modelica_metatype _part)
{
modelica_metatype _outPart = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _part;
{
modelica_metatype _eitems = NULL;
modelica_metatype _eitems1 = NULL;
modelica_metatype _eqnitems = NULL;
modelica_metatype _eqnitems1 = NULL;
modelica_metatype _algitems = NULL;
modelica_metatype _algitems1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_eitems = tmpMeta6;
tmp4 += 6;
_eitems1 = omc_List_map(threadData, _eitems, boxvar_Interactive_transformFlatElementItem);
tmpMeta7 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _eitems1);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_eitems = tmpMeta8;
tmp4 += 5;
_eitems1 = omc_List_map(threadData, _eitems, boxvar_Interactive_transformFlatElementItem);
tmpMeta9 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _eitems1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_eqnitems = tmpMeta10;
tmp4 += 4;
_eqnitems1 = omc_List_map(threadData, _eqnitems, boxvar_Interactive_transformFlatEquationItem);
tmpMeta11 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, _eqnitems1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_eqnitems = tmpMeta12;
tmp4 += 3;
_eqnitems1 = omc_List_map(threadData, _eqnitems, boxvar_Interactive_transformFlatEquationItem);
tmpMeta13 = mmc_mk_box2(7, &Absyn_ClassPart_INITIALEQUATIONS__desc, _eqnitems1);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_algitems = tmpMeta14;
tmp4 += 2;
_algitems1 = omc_List_map(threadData, _algitems, boxvar_Interactive_transformFlatAlgorithmItem);
tmpMeta15 = mmc_mk_box2(8, &Absyn_ClassPart_ALGORITHMS__desc, _algitems1);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_algitems = tmpMeta16;
tmp4 += 1;
_algitems1 = omc_List_map(threadData, _algitems, boxvar_Interactive_transformFlatAlgorithmItem);
tmpMeta17 = mmc_mk_box2(9, &Absyn_ClassPart_INITIALALGORITHMS__desc, _algitems1);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,2) == 0) goto tmp3_end;
tmpMeta1 = _part;
goto tmp3_done;
}
case 7: {
fputs(MMC_STRINGDATA(_OMC_LIT115),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outPart = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outPart;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatClassDef(threadData_t *threadData, modelica_metatype _cdef)
{
modelica_metatype _outCdef = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _cdef;
{
modelica_metatype _parts = NULL;
modelica_metatype _partsTransformed = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmp4 += 5;
tmpMeta1 = _cdef;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmp4 += 4;
tmpMeta1 = _cdef;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmp4 += 3;
tmpMeta1 = _cdef;
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmp4 += 2;
tmpMeta1 = _cdef;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_typeVars = tmpMeta6;
_classAttrs = tmpMeta7;
_parts = tmpMeta8;
_ann = tmpMeta9;
_cmt = tmpMeta10;
tmp4 += 1;
_partsTransformed = omc_List_map(threadData, _parts, boxvar_Interactive_transformFlatPart);
tmpMeta11 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _partsTransformed, _ann, _cmt);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,5) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_baseClassName = tmpMeta12;
_modifications = tmpMeta13;
_cmt = tmpMeta14;
_parts = tmpMeta15;
_ann = tmpMeta16;
_partsTransformed = omc_List_map(threadData, _parts, boxvar_Interactive_transformFlatPart);
tmpMeta17 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _partsTransformed, _ann);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 6: {
fputs(MMC_STRINGDATA(_OMC_LIT116),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCdef = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCdef;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformFlatClass(threadData_t *threadData, modelica_metatype _inTuple)
{
modelica_metatype _outTuple = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inTuple;
{
modelica_metatype _pa = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef1 = NULL;
modelica_integer _i;
modelica_metatype _cl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp10 = mmc_unbox_integer(tmpMeta9);
_cl = tmpMeta6;
_cdef = tmpMeta7;
_pa = tmpMeta8;
_i = tmp10;
_cdef1 = omc_Interactive_transformFlatClassDef(threadData, _cdef);
tmpMeta11 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta11), MMC_UNTAGPTR(_cl), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta11))[7] = _cdef1;
_cl = tmpMeta11;
tmpMeta12 = mmc_mk_box3(0, _cl, _pa, mmc_mk_integer(_i));
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 1: {
fputs(MMC_STRINGDATA(_OMC_LIT117),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTuple = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTuple;
}
DLLExport
modelica_metatype omc_Interactive_transformFlatProgram(threadData_t *threadData, modelica_metatype _p)
{
modelica_metatype _newP = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_AbsynUtil_traverseClasses(threadData, _p, mmc_mk_none(), boxvar_Interactive_transformFlatClass, mmc_mk_integer(((modelica_integer) 0)), 1);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_newP = tmpMeta7;
tmpMeta1 = _newP;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_newP = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _newP;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getSurroundingPackage(threadData_t *threadData, modelica_metatype _classpath, modelica_metatype _inProgram)
{
modelica_metatype _p = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_p = _inProgram;
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _p;
{
modelica_metatype _cdef = NULL;
modelica_metatype _pdef = NULL;
modelica_string _filename1 = NULL;
modelica_string _filename2 = NULL;
modelica_metatype _ppath = NULL;
modelica_metatype _within_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _classpath, _p, 0, 0);
_filename1 = omc_AbsynUtil_classFilename(threadData, _cdef);
_ppath = omc_AbsynUtil_stripLast(threadData, _classpath);
_pdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _ppath, _p, 0, 0);
_filename2 = omc_AbsynUtil_classFilename(threadData, _pdef);
tmp6 = (stringEqual(_filename1, _filename2));
if (1 != tmp6) goto goto_2;
tmpMeta1 = omc_Interactive_getSurroundingPackage(threadData, _ppath, _p);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = mmc_mk_cons(omc_InteractiveUtil_getPathedClassInProgram(threadData, _classpath, _p, 0, 0), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_p), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[2] = tmpMeta8;
_p = tmpMeta7;
tmpMeta9 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta9), MMC_UNTAGPTR(_p), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta9))[3] = omc_InteractiveUtil_buildWithin(threadData, _classpath);
_p = tmpMeta9;
tmpMeta1 = _p;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_p = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _p;
}
static modelica_metatype closure1_Interactive_classIsInFile(threadData_t *thData, modelica_metatype closure, modelica_metatype inElement)
{
modelica_string inFilename = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
return boxptr_Interactive_classIsInFile(thData, inFilename, inElement);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeClassDiffFiledInElementitemlist(threadData_t *threadData, modelica_metatype _inElements, modelica_string _inFilename)
{
modelica_metatype _outElements = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_box1(0, _inFilename);
_outElements = omc_List_filterOnTrue(threadData, _inElements, (modelica_fnptr) mmc_mk_box2(0,closure1_Interactive_classIsInFile,tmpMeta1));
_return: OMC_LABEL_UNUSED
return _outElements;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_classIsInFile(threadData_t *threadData, modelica_string _inFilename, modelica_metatype _inElement)
{
modelica_boolean _outInFile;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_string _filename = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 10));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_filename = tmpMeta10;
tmp1 = (stringEqual(_inFilename, _filename));
goto tmp3_done;
}
case 1: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInFile = tmp1;
_return: OMC_LABEL_UNUSED
return _outInFile;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_classIsInFile(threadData_t *threadData, modelica_metatype _inFilename, modelica_metatype _inElement)
{
modelica_boolean _outInFile;
modelica_metatype out_outInFile;
_outInFile = omc_Interactive_classIsInFile(threadData, _inFilename, _inElement);
out_outInFile = mmc_mk_icon(_outInFile);
return out_outInFile;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeInnerDiffFiledClass(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _publst = NULL;
modelica_metatype _publst2 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _file = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 10));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_file = tmpMeta13;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
_publst2 = omc_Interactive_removeClassDiffFiledInElementitemlist(threadData, _publst, _file);
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
tmpMeta15 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta14 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta14), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta14))[7] = tmpMeta15;
_outClass = tmpMeta14;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,4,5) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 3));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 4));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 6));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 10));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
_outClass = tmp4_1;
_baseClassName = tmpMeta17;
_modifications = tmpMeta18;
_cmt = tmpMeta19;
_parts = tmpMeta20;
_ann = tmpMeta21;
_file = tmpMeta23;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
_publst2 = omc_Interactive_removeClassDiffFiledInElementitemlist(threadData, _publst, _file);
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
tmpMeta25 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _parts2, _ann);
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[7] = tmpMeta25;
_outClass = tmpMeta24;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 2: {
tmpMeta1 = _inClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeInnerDiffFiledClasses(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_metatype _p = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_p = _inProgram;
{
modelica_metatype tmp4_1;
tmp4_1 = _p;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_p), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[2] = omc_List_map(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 2))), boxvar_Interactive_removeInnerDiffFiledClass);
_p = tmpMeta6;
tmpMeta1 = _p;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_p = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _p;
}
DLLExport
modelica_metatype omc_Interactive_getContainedClassAndFile(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_string _filename = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _p_2 = NULL;
modelica_metatype _p = NULL;
modelica_metatype _classname = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_classname = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _classname, _p, 0, 0);
_filename = omc_AbsynUtil_classFilename(threadData, _cdef);
_p_1 = omc_Interactive_getSurroundingPackage(threadData, _classname, _p);
_p_2 = omc_Interactive_removeInnerDiffFiledClasses(threadData, _p_1);
tmpMeta[0+0] = _p_2;
tmp1_c1 = _filename;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_commentToAbsyn(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst)
{
modelica_metatype _outStringOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynNamedArgLst;
{
modelica_string _str = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (7 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT118), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_str = tmpMeta10;
if (!(!(stringEqual(_str, _OMC_LIT55)))) goto tmp3_end;
tmpMeta1 = mmc_mk_some(_str);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
_rest = tmpMeta12;
_inAbsynNamedArgLst = _rest;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStringOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_annotationListToAbsynComment2(threadData_t *threadData, modelica_metatype _inNamedArgs)
{
modelica_metatype _outComment = NULL;
modelica_metatype _annargs = NULL;
modelica_metatype _ostrcmt = NULL;
modelica_metatype _ann = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = omc_InteractiveUtil_annotationListToAbsyn(threadData, _inNamedArgs);
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_ann = tmpMeta1;
_annargs = tmpMeta2;
_ostrcmt = omc_Interactive_commentToAbsyn(threadData, _inNamedArgs);
{
modelica_metatype tmp6_1;modelica_metatype tmp6_2;
tmp6_1 = _ostrcmt;
tmp6_2 = _annargs;
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
for (; tmp6 < 4; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
if (!listEmpty(tmp6_2)) goto tmp5_end;
if (optionNone(tmp6_1)) goto tmp5_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 1));
if (0 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp5_end;
tmpMeta3 = mmc_mk_none();
goto tmp5_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (optionNone(tmp6_1)) goto tmp5_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 1));
if (!listEmpty(tmp6_2)) goto tmp5_end;
tmpMeta10 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, mmc_mk_none(), _ostrcmt);
tmpMeta3 = mmc_mk_some(tmpMeta10);
goto tmp5_done;
}
case 2: {
if (!optionNone(tmp6_1)) goto tmp5_end;
if (!listEmpty(tmp6_2)) goto tmp5_end;
tmpMeta3 = mmc_mk_none();
goto tmp5_done;
}
case 3: {
modelica_metatype tmpMeta11;
tmpMeta11 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, mmc_mk_some(_ann), _ostrcmt);
tmpMeta3 = mmc_mk_some(tmpMeta11);
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_outComment = tmpMeta3;
_return: OMC_LABEL_UNUSED
return _outComment;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_annotationListToAbsynComment(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inAbsynCommentOption)
{
modelica_metatype _outAbsynCommentOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynNamedArgLst;
tmp4_2 = _inAbsynCommentOption;
{
modelica_metatype _ann = NULL;
modelica_metatype _nargs = NULL;
modelica_string _oldcmt = NULL;
modelica_string _newcmt = NULL;
modelica_metatype _cmtOpt = NULL;
modelica_metatype _annOptOld = NULL;
modelica_metatype _annOptNew = NULL;
modelica_metatype _annOpt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (!optionNone(tmp4_2)) goto tmp3_end;
_nargs = tmp4_1;
tmp4 += 3;
tmpMeta6 = omc_Interactive_annotationListToAbsynComment2(threadData, _nargs);
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_ann = tmpMeta7;
tmpMeta1 = mmc_mk_some(_ann);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
if (!optionNone(tmpMeta10)) goto tmp3_end;
_annOptOld = tmpMeta9;
_nargs = tmp4_1;
tmp4 += 2;
tmpMeta11 = omc_Interactive_annotationListToAbsynComment2(threadData, _nargs);
if (optionNone(tmpMeta11)) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
_annOptNew = tmpMeta13;
_cmtOpt = tmpMeta14;
_annOpt = omc_Interactive_selectAnnotation(threadData, _annOptNew, _annOptOld);
tmpMeta15 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, _annOpt, _cmtOpt);
tmpMeta1 = mmc_mk_some(tmpMeta15);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 3));
if (optionNone(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
_annOptOld = tmpMeta17;
_oldcmt = tmpMeta19;
_nargs = tmp4_1;
tmpMeta20 = omc_Interactive_annotationListToAbsynComment2(threadData, _nargs);
if (optionNone(tmpMeta20)) goto goto_2;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 1));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
if (!optionNone(tmpMeta23)) goto goto_2;
_annOptNew = tmpMeta22;
_annOpt = omc_Interactive_selectAnnotation(threadData, _annOptNew, _annOptOld);
tmpMeta24 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, _annOpt, mmc_mk_some(_oldcmt));
tmpMeta1 = mmc_mk_some(tmpMeta24);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 2));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
if (optionNone(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 1));
_annOptOld = tmpMeta26;
_nargs = tmp4_1;
tmpMeta29 = omc_Interactive_annotationListToAbsynComment2(threadData, _nargs);
if (optionNone(tmpMeta29)) goto goto_2;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 1));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 3));
if (optionNone(tmpMeta32)) goto goto_2;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 1));
_annOptNew = tmpMeta31;
_newcmt = tmpMeta33;
_annOpt = omc_Interactive_selectAnnotation(threadData, _annOptNew, _annOptOld);
tmpMeta34 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, _annOpt, mmc_mk_some(_newcmt));
tmpMeta1 = mmc_mk_some(tmpMeta34);
goto tmp3_done;
}
case 4: {
tmpMeta1 = _inAbsynCommentOption;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynCommentOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynCommentOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_selectAnnotation(threadData_t *threadData, modelica_metatype _newAnn, modelica_metatype _oldAnn)
{
modelica_metatype _outAnn = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _newAnn;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta1 = _newAnn;
goto tmp3_done;
}
case 1: {
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = _oldAnn;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAnn = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAnn;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_modificationToAbsyn2(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst)
{
modelica_metatype _outAbsynModificationOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynNamedArgLst;
{
modelica_metatype _exp = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _mod = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (7 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT121), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_exp = tmpMeta9;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta11 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _exp, _OMC_LIT120);
tmpMeta12 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, tmpMeta10, tmpMeta11);
tmpMeta1 = mmc_mk_some(tmpMeta12);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (12 != MMC_STRLEN(tmpMeta15) || strcmp(MMC_STRINGDATA(_OMC_LIT122), MMC_STRINGDATA(tmpMeta15)) != 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,18,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,7,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_mod = tmpMeta18;
tmpMeta1 = mmc_mk_some(_mod);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_1);
tmpMeta20 = MMC_CDR(tmp4_1);
_xs = tmpMeta20;
_inAbsynNamedArgLst = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynModificationOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynModificationOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_modificationToAbsyn(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inAbsynModificationOption)
{
modelica_metatype _outAbsynModificationOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynNamedArgLst;
{
modelica_metatype _mod = NULL;
modelica_metatype _nargs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_nargs = tmp4_1;
tmpMeta6 = omc_Interactive_modificationToAbsyn2(threadData, _nargs);
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_mod = tmpMeta7;
tmpMeta1 = mmc_mk_some(_mod);
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inAbsynModificationOption;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynModificationOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynModificationOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElementSpec(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fspec, modelica_boolean *out_found)
{
modelica_metatype _spec = NULL;
modelica_boolean _found;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_spec = __omcQ_24in_5Fspec;
{
modelica_metatype tmp4_1;
tmp4_1 = _spec;
{
modelica_metatype _cls = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cls = tmpMeta6;
if (!(stringEqual((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_cls), 2))), _name))) goto tmp3_end;
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_spec), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[3] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_func), 2))) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_func), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_func), 2))), _cls) : ((modelica_metatype(*)(threadData_t*, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_func), 1)))) (threadData, _cls);
_spec = tmpMeta7;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_found = tmp1;
_return: OMC_LABEL_UNUSED
if (out_found) { *out_found = _found; }
return _spec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElementSpec(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fspec, modelica_metatype *out_found)
{
modelica_boolean _found;
modelica_metatype _spec = NULL;
_spec = omc_Interactive_transformClassInElementSpec(threadData, _name, _func, __omcQ_24in_5Fspec, &_found);
if (out_found) { *out_found = mmc_mk_icon(_found); }
return _spec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElement(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Felement, modelica_boolean *out_found)
{
modelica_metatype _element = NULL;
modelica_boolean _found;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_element = __omcQ_24in_5Felement;
{
modelica_metatype tmp4_1;
tmp4_1 = _element;
{
modelica_metatype _spec = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
_spec = omc_Interactive_transformClassInElementSpec(threadData, _name, ((modelica_fnptr) _func), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_element), 5))) ,&_found);
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_element), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[5] = _spec;
_element = tmpMeta6;
tmp1 = _found;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_found = tmp1;
_return: OMC_LABEL_UNUSED
if (out_found) { *out_found = _found; }
return _element;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElement(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Felement, modelica_metatype *out_found)
{
modelica_boolean _found;
modelica_metatype _element = NULL;
_element = omc_Interactive_transformClassInElement(threadData, _name, _func, __omcQ_24in_5Felement, &_found);
if (out_found) { *out_found = mmc_mk_icon(_found); }
return _element;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInElementItem(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fitem, modelica_boolean *out_found)
{
modelica_metatype _item = NULL;
modelica_boolean _found;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_item = __omcQ_24in_5Fitem;
{
modelica_metatype tmp4_1;
tmp4_1 = _item;
{
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
_e = omc_Interactive_transformClassInElement(threadData, _name, ((modelica_fnptr) _func), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_item), 2))) ,&_found);
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(3));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_item), 3*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[2] = _e;
_item = tmpMeta6;
tmp1 = _found;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_found = tmp1;
_return: OMC_LABEL_UNUSED
if (out_found) { *out_found = _found; }
return _item;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInElementItem(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fitem, modelica_metatype *out_found)
{
modelica_boolean _found;
modelica_metatype _item = NULL;
_item = omc_Interactive_transformClassInElementItem(threadData, _name, _func, __omcQ_24in_5Fitem, &_found);
if (out_found) { *out_found = mmc_mk_icon(_found); }
return _item;
}
static modelica_metatype closure2_Interactive_transformClassInElementItem(threadData_t *thData, modelica_metatype closure, modelica_metatype $in_item, modelica_metatype tmp5)
{
modelica_string name = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr func = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformClassInElementItem(thData, name, func, $in_item, tmp5);
}static modelica_metatype closure3_Interactive_transformClassInElementItem(threadData_t *thData, modelica_metatype closure, modelica_metatype $in_item, modelica_metatype tmp8)
{
modelica_string name = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr func = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformClassInElementItem(thData, name, func, $in_item, tmp8);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInClassPart(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fpart, modelica_boolean *out_found)
{
modelica_metatype _part = NULL;
modelica_boolean _found;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_part = __omcQ_24in_5Fpart;
{
modelica_metatype tmp4_1;
tmp4_1 = _part;
{
modelica_metatype _items = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = mmc_mk_box2(0, _name, ((modelica_fnptr) _func));
_items = omc_List_findMap(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_part), 2))), (modelica_fnptr) mmc_mk_box2(0,closure2_Interactive_transformClassInElementItem,tmpMeta6) ,&_found);
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(3));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_part), 3*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[2] = _items;
_part = tmpMeta7;
tmp1 = _found;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta9 = mmc_mk_box2(0, _name, ((modelica_fnptr) _func));
_items = omc_List_findMap(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_part), 2))), (modelica_fnptr) mmc_mk_box2(0,closure3_Interactive_transformClassInElementItem,tmpMeta9) ,&_found);
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(3));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_part), 3*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[2] = _items;
_part = tmpMeta10;
tmp1 = _found;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_found = tmp1;
_return: OMC_LABEL_UNUSED
if (out_found) { *out_found = _found; }
return _part;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_transformClassInClassPart(threadData_t *threadData, modelica_metatype _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fpart, modelica_metatype *out_found)
{
modelica_boolean _found;
modelica_metatype _part = NULL;
_part = omc_Interactive_transformClassInClassPart(threadData, _name, _func, __omcQ_24in_5Fpart, &_found);
if (out_found) { *out_found = mmc_mk_icon(_found); }
return _part;
}
static modelica_metatype closure4_Interactive_transformClassInClassPart(threadData_t *thData, modelica_metatype closure, modelica_metatype $in_part, modelica_metatype tmp5)
{
modelica_string name = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr func = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformClassInClassPart(thData, name, func, $in_part, tmp5);
}static modelica_metatype closure5_Interactive_transformClassInClassPart(threadData_t *thData, modelica_metatype closure, modelica_metatype $in_part, modelica_metatype tmp8)
{
modelica_string name = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr func = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformClassInClassPart(thData, name, func, $in_part, tmp8);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformClassInClass(threadData_t *threadData, modelica_string _name, modelica_fnptr _func, modelica_metatype __omcQ_24in_5Fcls)
{
modelica_metatype _cls = NULL;
modelica_metatype _body = NULL;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cls = __omcQ_24in_5Fcls;
_body = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_cls), 7)));
{
modelica_metatype tmp3_1;
tmp3_1 = _body;
{
int tmp3;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp3_1))) {
case 3: {
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta6;
tmpMeta6 = mmc_mk_box2(0, _name, ((modelica_fnptr) _func));
tmpMeta4 = MMC_TAGPTR(mmc_alloc_words(7));
memcpy(MMC_UNTAGPTR(tmpMeta4), MMC_UNTAGPTR(_body), 7*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta4))[4] = omc_List_findMap(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))), (modelica_fnptr) mmc_mk_box2(0,closure4_Interactive_transformClassInClassPart,tmpMeta6), NULL);
_body = tmpMeta4;
goto tmp2_done;
}
case 7: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta9;
tmpMeta9 = mmc_mk_box2(0, _name, ((modelica_fnptr) _func));
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(7));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_body), 7*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[5] = omc_List_findMap(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 5))), (modelica_fnptr) mmc_mk_box2(0,closure5_Interactive_transformClassInClassPart,tmpMeta9), NULL);
_body = tmpMeta7;
goto tmp2_done;
}
default:
tmp2_default: OMC_LABEL_UNUSED; {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_cls), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[7] = _body;
_cls = tmpMeta10;
_return: OMC_LABEL_UNUSED
return _cls;
}
static modelica_metatype closure6_Interactive_transformPathedClassInClass(threadData_t *thData, modelica_metatype closure, modelica_metatype inClass)
{
modelica_metatype inPath = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr inFunc = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformPathedClassInClass(thData, inPath, inClass, inFunc);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_transformPathedClassInClass(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_fnptr _inFunc)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inPath;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 4: {
tmpMeta1 = omc_Interactive_transformClassInClass(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2))), ((modelica_fnptr) _inFunc), _inClass);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta5;
tmpMeta5 = mmc_mk_box2(0, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 3))), ((modelica_fnptr) _inFunc));
tmpMeta1 = omc_Interactive_transformClassInClass(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2))), (modelica_fnptr) mmc_mk_box2(0,closure6_Interactive_transformPathedClassInClass,tmpMeta5), _inClass);
goto tmp3_done;
}
case 5: {
_inPath = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2)));
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
DLLExport
modelica_metatype omc_Interactive_transformClassInProgram(threadData_t *threadData, modelica_string _inName, modelica_metatype _inProgram, modelica_fnptr _inFunc)
{
modelica_metatype _outProgram = NULL;
modelica_metatype _classes = NULL;
modelica_metatype _acc = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _wi = NULL;
modelica_metatype _cls = NULL;
modelica_string _name = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_acc = tmpMeta1;
tmpMeta2 = _inProgram;
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_classes = tmpMeta3;
_wi = tmpMeta4;
while(1)
{
if(!1) break;
tmpMeta5 = _classes;
if (listEmpty(tmpMeta5)) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_CAR(tmpMeta5);
tmpMeta7 = MMC_CDR(tmpMeta5);
_cls = tmpMeta6;
_classes = tmpMeta7;
tmpMeta8 = _cls;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_name = tmpMeta9;
if((stringEqual(_name, _inName)))
{
_cls = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inFunc), 2))) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inFunc), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inFunc), 2))), _cls) : ((modelica_metatype(*)(threadData_t*, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inFunc), 1)))) (threadData, _cls);
tmpMeta10 = mmc_mk_cons(_cls, _classes);
_classes = omc_List_append__reverse(threadData, _acc, tmpMeta10);
tmpMeta11 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _classes, _wi);
_outProgram = tmpMeta11;
break;
}
tmpMeta12 = mmc_mk_cons(_cls, _acc);
_acc = tmpMeta12;
}
_return: OMC_LABEL_UNUSED
return _outProgram;
}
static modelica_metatype closure7_Interactive_transformPathedClassInClass(threadData_t *thData, modelica_metatype closure, modelica_metatype inClass)
{
modelica_metatype inPath = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_fnptr inFunc = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_transformPathedClassInClass(thData, inPath, inClass, inFunc);
}
DLLExport
modelica_metatype omc_Interactive_transformPathedClassInProgram(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_fnptr _inFunc)
{
modelica_metatype _outProgram = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inPath;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 4: {
tmpMeta1 = omc_Interactive_transformClassInProgram(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2))), _inProgram, ((modelica_fnptr) _inFunc));
goto tmp3_done;
}
case 5: {
_inPath = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2)));
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta5;
tmpMeta5 = mmc_mk_box2(0, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 3))), ((modelica_fnptr) _inFunc));
tmpMeta1 = omc_Interactive_transformClassInProgram(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inPath), 2))), _inProgram, (modelica_fnptr) mmc_mk_box2(0,closure7_Interactive_transformPathedClassInClass,tmpMeta5));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outProgram = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInitialAlgorithmList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outAbsynInitialAlgorithmItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _lst = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_lst = tmpMeta8;
tmpMeta1 = _lst;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_xs = tmpMeta10;
_inAbsynClassPartLst = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynInitialAlgorithmItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynInitialAlgorithmItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getAlgorithmList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outAbsynAlgorithmItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _lst = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,5,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_lst = tmpMeta8;
tmpMeta1 = _lst;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_xs = tmpMeta10;
_inAbsynClassPartLst = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynAlgorithmItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynAlgorithmItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInitialEquationList(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outAbsynInitialEquationItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _lst = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,4,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_lst = tmpMeta8;
tmpMeta1 = _lst;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_xs = tmpMeta10;
_inAbsynClassPartLst = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynInitialEquationItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynInitialEquationItemLst;
}
DLLExport
modelica_metatype omc_Interactive_addToEquation(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inEquationItem)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inEquationItem;
{
modelica_metatype _eqlst = NULL;
modelica_metatype _eqlst2 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _newparts = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _eitem = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_eitem = tmp4_2;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
tmpMeta12 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_eqlst2 = listAppend(_eqlst, tmpMeta12);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst2);
tmpMeta14 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta13 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta13), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta13))[7] = tmpMeta14;
_outClass = tmpMeta13;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,5) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta16;
_classAttrs = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_cmt = tmpMeta20;
_eitem = tmp4_2;
tmp4 += 2;
tmpMeta22 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta23 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, tmpMeta22);
tmpMeta21 = mmc_mk_cons(tmpMeta23, MMC_REFSTRUCTLIT(mmc_nil));
_newparts = listAppend(_parts, tmpMeta21);
tmpMeta25 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _newparts, _ann, _cmt);
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[7] = tmpMeta25;
_outClass = tmpMeta24;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,4,5) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 4));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 5));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta27;
_modifications = tmpMeta28;
_cmt = tmpMeta29;
_parts = tmpMeta30;
_ann = tmpMeta31;
_eitem = tmp4_2;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
tmpMeta32 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_eqlst2 = listAppend(_eqlst, tmpMeta32);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst2);
tmpMeta34 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _parts2, _ann);
tmpMeta33 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta33), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta33))[7] = tmpMeta34;
_outClass = tmpMeta33;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,4,5) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 3));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 4));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 5));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta36;
_modifications = tmpMeta37;
_cmt = tmpMeta38;
_parts = tmpMeta39;
_ann = tmpMeta40;
_eitem = tmp4_2;
tmpMeta42 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta43 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, tmpMeta42);
tmpMeta41 = mmc_mk_cons(tmpMeta43, MMC_REFSTRUCTLIT(mmc_nil));
_newparts = listAppend(_parts, tmpMeta41);
tmpMeta45 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _newparts, _ann);
tmpMeta44 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta44), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta44))[7] = tmpMeta45;
_outClass = tmpMeta44;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_addToProtected(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inElementItem)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inElementItem;
{
modelica_metatype _protlst = NULL;
modelica_metatype _protlst2 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _eitem = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_eitem = tmp4_2;
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmpMeta12 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_protlst2 = listAppend(_protlst, tmpMeta12);
_parts2 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts, _protlst2);
tmpMeta14 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta13 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta13), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta13))[7] = tmpMeta14;
_outClass = tmpMeta13;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,5) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta16;
_classAttrs = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_cmt = tmpMeta20;
_eitem = tmp4_2;
tmp4 += 2;
tmpMeta23 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta24 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, tmpMeta23);
tmpMeta22 = mmc_mk_cons(tmpMeta24, _parts);
tmpMeta25 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, tmpMeta22, _ann, _cmt);
tmpMeta21 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta21), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta21))[7] = tmpMeta25;
_outClass = tmpMeta21;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,4,5) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 4));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 5));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta27;
_modifications = tmpMeta28;
_cmt = tmpMeta29;
_parts = tmpMeta30;
_ann = tmpMeta31;
_eitem = tmp4_2;
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmpMeta32 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_protlst2 = listAppend(_protlst, tmpMeta32);
_parts2 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts, _protlst2);
tmpMeta34 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _parts2, _ann);
tmpMeta33 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta33), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta33))[7] = tmpMeta34;
_outClass = tmpMeta33;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,4,5) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 3));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 4));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 5));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta36;
_modifications = tmpMeta37;
_cmt = tmpMeta38;
_parts = tmpMeta39;
_ann = tmpMeta40;
_eitem = tmp4_2;
tmpMeta43 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta44 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, tmpMeta43);
tmpMeta42 = mmc_mk_cons(tmpMeta44, _parts);
tmpMeta45 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, tmpMeta42, _ann);
tmpMeta41 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta41), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta41))[7] = tmpMeta45;
_outClass = tmpMeta41;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
DLLExport
modelica_metatype omc_Interactive_addToPublic(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inElementItem)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inElementItem;
{
modelica_metatype _publst = NULL;
modelica_metatype _publst2 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _eitem = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_eitem = tmp4_2;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta12 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_publst2 = listAppend(_publst, tmpMeta12);
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
tmpMeta14 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta13 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta13), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta13))[7] = tmpMeta14;
_outClass = tmpMeta13;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,5) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta16;
_classAttrs = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_cmt = tmpMeta20;
_eitem = tmp4_2;
tmp4 += 2;
tmpMeta23 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta24 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, tmpMeta23);
tmpMeta22 = mmc_mk_cons(tmpMeta24, _parts);
tmpMeta25 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, tmpMeta22, _ann, _cmt);
tmpMeta21 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta21), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta21))[7] = tmpMeta25;
_outClass = tmpMeta21;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,4,5) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 4));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 5));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta27;
_modifications = tmpMeta28;
_cmt = tmpMeta29;
_parts = tmpMeta30;
_ann = tmpMeta31;
_eitem = tmp4_2;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta32 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
_publst2 = listAppend(_publst, tmpMeta32);
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
tmpMeta34 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, _parts2, _ann);
tmpMeta33 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta33), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta33))[7] = tmpMeta34;
_outClass = tmpMeta33;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,4,5) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 3));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 4));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 5));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta36;
_modifications = tmpMeta37;
_cmt = tmpMeta38;
_parts = tmpMeta39;
_ann = tmpMeta40;
_eitem = tmp4_2;
tmpMeta43 = mmc_mk_cons(_eitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta44 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, tmpMeta43);
tmpMeta42 = mmc_mk_cons(tmpMeta44, _parts);
tmpMeta45 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _cmt, tmpMeta42, _ann);
tmpMeta41 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta41), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta41))[7] = tmpMeta45;
_outClass = tmpMeta41;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentInfoOld(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inEnv)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inElement;
tmp4_2 = _inEnv;
{
modelica_metatype _env = NULL;
modelica_metatype _p = NULL;
modelica_string _typename = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _names = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_p = tmpMeta8;
_lst = tmpMeta9;
_env = tmp4_2;
_typename = omc_AbsynUtil_pathString(threadData, omc_InteractiveUtil_qualifyPath(threadData, _env, _p), _OMC_LIT93, 1, 0);
_names = omc_InteractiveUtil_getComponentItemsNameAndComment(threadData, _lst, 0);
tmpMeta1 = omc_InteractiveUtil_prefixTypename(threadData, _typename, _names);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,3,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_p = tmpMeta12;
_lst = tmpMeta13;
_env = tmp4_2;
_typename = omc_AbsynUtil_pathString(threadData, omc_InteractiveUtil_qualifyPath(threadData, _env, _p), _OMC_LIT93, 1, 0);
_names = omc_InteractiveUtil_getComponentItemsNameAndComment(threadData, _lst, 0);
tmpMeta1 = omc_InteractiveUtil_prefixTypename(threadData, _typename, _names);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 3: {
fputs(MMC_STRINGDATA(_OMC_LIT123),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
DLLExport
modelica_boolean omc_Interactive_keywordReplaceable(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynRedeclareKeywordsOption;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_keywordReplaceable(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_keywordReplaceable(threadData, _inAbsynRedeclareKeywordsOption);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsInfo2(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_boolean _inBoolean, modelica_string _inString, modelica_metatype _inEnv, modelica_metatype _acc)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inAbsynElementLst;
tmp4_2 = _inBoolean;
tmp4_3 = _inString;
tmp4_4 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _rest = NULL;
modelica_string _access = NULL;
modelica_metatype _env = NULL;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta1 = listReverse(_acc);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
_elt = tmpMeta6;
_rest = tmpMeta7;
_b = tmp4_2;
_access = tmp4_3;
_env = tmp4_4;
_res = omc_Interactive_getComponentInfo(threadData, _elt, _b, _access, _env);
_inAbsynElementLst = _rest;
_inBoolean = _b;
_inString = _access;
_inEnv = _env;
_acc = omc_List_append__reverse(threadData, _res, _acc);
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentsInfo2(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_metatype _inBoolean, modelica_metatype _inString, modelica_metatype _inEnv, modelica_metatype _acc)
{
modelica_integer tmp1;
modelica_metatype _outStringLst = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outStringLst = omc_Interactive_getComponentsInfo2(threadData, _inAbsynElementLst, tmp1, _inString, _inEnv, _acc);
return _outStringLst;
}
DLLExport
modelica_string omc_Interactive_getComponentsInfo(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_boolean _inBoolean, modelica_string _inString, modelica_metatype _inEnv)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynElementLst;
tmp4_2 = _inString;
tmp4_3 = _inEnv;
{
modelica_metatype _lst = NULL;
modelica_string _lst_1 = NULL;
modelica_string _access = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_elts = tmp4_1;
_access = tmp4_2;
_env = tmp4_3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = omc_Interactive_getComponentsInfo2(threadData, _elts, _inBoolean, _access, _env, tmpMeta6);
if (listEmpty(tmpMeta7)) goto goto_2;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_lst = tmpMeta7;
_lst_1 = stringDelimitList(_lst, _OMC_LIT124);
tmpMeta10 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_lst_1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta10);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
modelica_metatype boxptr_Interactive_getComponentsInfo(threadData_t *threadData, modelica_metatype _inAbsynElementLst, modelica_metatype _inBoolean, modelica_metatype _inString, modelica_metatype _inEnv)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outString = omc_Interactive_getComponentsInfo(threadData, _inAbsynElementLst, tmp1, _inString, _inEnv);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentInfo(threadData_t *threadData, modelica_metatype _inElement, modelica_boolean _inQuoteNames, modelica_string _inVisibility, modelica_metatype _inEnv)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _attr = NULL;
modelica_metatype _p = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _names = NULL;
modelica_metatype _dims = NULL;
modelica_string _typename = NULL;
modelica_string _final_str = NULL;
modelica_string _repl_str = NULL;
modelica_string _io_str = NULL;
modelica_string _flow_str = NULL;
modelica_string _stream_str = NULL;
modelica_string _var_str = NULL;
modelica_string _dir_str = NULL;
modelica_string _dim_str = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_attr = tmpMeta7;
_p = tmpMeta9;
_comps = tmpMeta10;
_typename = omc_AbsynUtil_pathString(threadData, omc_InteractiveUtil_qualifyPath(threadData, _inEnv, _p), _OMC_LIT93, 1, 0);
_names = omc_InteractiveUtil_getComponentItemsNameAndComment(threadData, _comps, _inQuoteNames);
_dims = omc_InteractiveUtil_getComponentitemsDimension(threadData, _comps);
_final_str = (mmc_unbox_boolean((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inElement), 2))))?_OMC_LIT127:_OMC_LIT128);
_repl_str = (omc_Interactive_keywordReplaceable(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inElement), 3))))?_OMC_LIT127:_OMC_LIT128);
_io_str = omc_InteractiveUtil_innerOuterStr(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inElement), 4))));
_flow_str = omc_InteractiveUtil_attrFlowStr(threadData, _attr);
_stream_str = omc_InteractiveUtil_attrStreamStr(threadData, _attr);
_var_str = omc_InteractiveUtil_attrVariabilityStr(threadData, _attr);
_dir_str = omc_InteractiveUtil_attrDirectionStr(threadData, _attr);
_dim_str = omc_InteractiveUtil_attrDimensionStr(threadData, _attr);
if(_inQuoteNames)
{
_typename = omc_StringUtil_quote(threadData, _typename);
_final_str = omc_StringUtil_quote(threadData, _final_str);
_repl_str = omc_StringUtil_quote(threadData, _repl_str);
_flow_str = omc_StringUtil_quote(threadData, _flow_str);
_stream_str = omc_StringUtil_quote(threadData, _stream_str);
}
_names = omc_InteractiveUtil_prefixTypename(threadData, _typename, _names);
tmpMeta11 = mmc_mk_cons(_inVisibility, mmc_mk_cons(_final_str, mmc_mk_cons(_flow_str, mmc_mk_cons(_stream_str, mmc_mk_cons(_repl_str, mmc_mk_cons(_var_str, mmc_mk_cons(_io_str, mmc_mk_cons(_dir_str, MMC_REFSTRUCTLIT(mmc_nil)))))))));
_str = stringDelimitList(tmpMeta11, _OMC_LIT80);
tmpMeta1 = omc_InteractiveUtil_suffixInfos(threadData, _names, _dims, _dim_str, _str, _inQuoteNames);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentInfo(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inQuoteNames, modelica_metatype _inVisibility, modelica_metatype _inEnv)
{
modelica_integer tmp1;
modelica_metatype _outStringLst = NULL;
tmp1 = mmc_unbox_integer(_inQuoteNames);
_outStringLst = omc_Interactive_getComponentInfo(threadData, _inElement, tmp1, _inVisibility, _inEnv);
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getNthComponentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_integer _nth)
{
modelica_metatype _outElement = NULL;
modelica_metatype _pub = NULL;
modelica_metatype _pro = NULL;
modelica_metatype _lst = NULL;
modelica_integer _n;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_pub = omc_Interactive_getPublicComponentsInClass(threadData, _inClass);
_n = listLength(_pub);
if((_nth <= _n))
{
_outElement = listGet(_pub, _nth);
}
else
{
_pro = omc_Interactive_getProtectedComponentsInClass(threadData, _inClass);
_outElement = listGet(_pro, _nth - _n);
}
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _nth)
{
modelica_integer tmp1;
modelica_metatype _outElement = NULL;
tmp1 = mmc_unbox_integer(_nth);
_outElement = omc_Interactive_getNthComponentInClass(threadData, _inClass, tmp1);
return _outElement;
}
DLLExport
modelica_metatype omc_Interactive_getComponentsInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outAbsynElementLst = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outAbsynElementLst = tmpMeta1;
{
modelica_metatype _el;
for (tmpMeta2 = _inAbsynElementItemLst; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_el = MMC_CAR(tmpMeta2);
{
modelica_metatype tmp5_1;
tmp5_1 = _el;
{
modelica_metatype _elt = NULL;
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
for (; tmp5 < 2; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp5_1,0,1) == 0) goto tmp4_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp5_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto tmp4_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,3) == 0) goto tmp4_end;
_elt = tmpMeta7;
tmpMeta9 = mmc_mk_cons(_elt, _outAbsynElementLst);
_outAbsynElementLst = tmpMeta9;
goto tmp4_done;
}
case 1: {
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
goto_3:;
MMC_THROW_INTERNAL();
goto tmp4_done;
tmp4_done:;
}
}
;
}
}
_outAbsynElementLst = listReverseInPlace(_outAbsynElementLst);
_return: OMC_LABEL_UNUSED
return _outAbsynElementLst;
}
DLLExport
modelica_metatype omc_Interactive_getProtectedComponentsInClass(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outAbsynElementLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _lst1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta18;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,5) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_lst = tmpMeta10;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta11;
{
modelica_metatype _elt;
for (tmpMeta12 = _lst; !listEmpty(tmpMeta12); tmpMeta12=MMC_CDR(tmpMeta12))
{
_elt = MMC_CAR(tmpMeta12);
{
modelica_metatype tmp15_1;
tmp15_1 = _elt;
{
volatile mmc_switch_type tmp15;
int tmp16;
tmp15 = 0;
for (; tmp15 < 2; tmp15++) {
switch (MMC_SWITCH_CAST(tmp15)) {
case 0: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,1,1) == 0) goto tmp14_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp15_1), 2));
_elts = tmpMeta17;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp14_done;
}
case 1: {
goto tmp14_done;
}
}
goto tmp14_end;
tmp14_end: ;
}
goto goto_13;
goto_13:;
goto goto_2;
goto tmp14_done;
tmp14_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,4,5) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 5));
if (!listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta31;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,4,5) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
_lst = tmpMeta23;
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta24;
{
modelica_metatype _elt;
for (tmpMeta25 = _lst; !listEmpty(tmpMeta25); tmpMeta25=MMC_CDR(tmpMeta25))
{
_elt = MMC_CAR(tmpMeta25);
{
modelica_metatype tmp28_1;
tmp28_1 = _elt;
{
volatile mmc_switch_type tmp28;
int tmp29;
tmp28 = 0;
for (; tmp28 < 2; tmp28++) {
switch (MMC_SWITCH_CAST(tmp28)) {
case 0: {
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp28_1,1,1) == 0) goto tmp27_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp28_1), 2));
_elts = tmpMeta30;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp27_done;
}
case 1: {
goto tmp27_done;
}
}
goto tmp27_end;
tmp27_end: ;
}
goto goto_26;
goto_26:;
goto goto_2;
goto tmp27_done;
tmp27_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta32;
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynElementLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementLst;
}
DLLExport
modelica_metatype omc_Interactive_getPublicComponentsInClass(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outAbsynElementLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _lst1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta18;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,5) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_lst = tmpMeta10;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta11;
{
modelica_metatype _elt;
for (tmpMeta12 = _lst; !listEmpty(tmpMeta12); tmpMeta12=MMC_CDR(tmpMeta12))
{
_elt = MMC_CAR(tmpMeta12);
{
modelica_metatype tmp15_1;
tmp15_1 = _elt;
{
volatile mmc_switch_type tmp15;
int tmp16;
tmp15 = 0;
for (; tmp15 < 2; tmp15++) {
switch (MMC_SWITCH_CAST(tmp15)) {
case 0: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,0,1) == 0) goto tmp14_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp15_1), 2));
_elts = tmpMeta17;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp14_done;
}
case 1: {
goto tmp14_done;
}
}
goto tmp14_end;
tmp14_end: ;
}
goto goto_13;
goto_13:;
goto goto_2;
goto tmp14_done;
tmp14_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,4,5) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 5));
if (!listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta31;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,4,5) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
_lst = tmpMeta23;
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta24;
{
modelica_metatype _elt;
for (tmpMeta25 = _lst; !listEmpty(tmpMeta25); tmpMeta25=MMC_CDR(tmpMeta25))
{
_elt = MMC_CAR(tmpMeta25);
{
modelica_metatype tmp28_1;
tmp28_1 = _elt;
{
volatile mmc_switch_type tmp28;
int tmp29;
tmp28 = 0;
for (; tmp28 < 2; tmp28++) {
switch (MMC_SWITCH_CAST(tmp28)) {
case 0: {
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp28_1,0,1) == 0) goto tmp27_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp28_1), 2));
_elts = tmpMeta30;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp27_done;
}
case 1: {
goto tmp27_done;
}
}
goto tmp27_end;
tmp27_end: ;
}
goto goto_26;
goto_26:;
goto goto_2;
goto tmp27_done;
tmp27_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta32;
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynElementLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementLst;
}
DLLExport
modelica_metatype omc_Interactive_getComponentsInClass(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outAbsynElementLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _lst1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta18;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,5) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_lst = tmpMeta10;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta11;
{
modelica_metatype _elt;
for (tmpMeta12 = _lst; !listEmpty(tmpMeta12); tmpMeta12=MMC_CDR(tmpMeta12))
{
_elt = MMC_CAR(tmpMeta12);
{
modelica_metatype tmp15_1;
tmp15_1 = _elt;
{
int tmp15;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp15_1))) {
case 3: {
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,0,1) == 0) goto tmp14_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp15_1), 2));
_elts = tmpMeta16;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp14_done;
}
case 4: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,1,1) == 0) goto tmp14_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp15_1), 2));
_elts = tmpMeta17;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp14_done;
}
default:
tmp14_default: OMC_LABEL_UNUSED; {
goto tmp14_done;
}
}
goto tmp14_end;
tmp14_end: ;
}
goto goto_13;
goto_13:;
goto goto_2;
goto tmp14_done;
tmp14_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,4,5) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 5));
if (!listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta31;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,4,5) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
_lst = tmpMeta23;
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta24;
{
modelica_metatype _elt;
for (tmpMeta25 = _lst; !listEmpty(tmpMeta25); tmpMeta25=MMC_CDR(tmpMeta25))
{
_elt = MMC_CAR(tmpMeta25);
{
modelica_metatype tmp28_1;
tmp28_1 = _elt;
{
int tmp28;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp28_1))) {
case 3: {
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp28_1,0,1) == 0) goto tmp27_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp28_1), 2));
_elts = tmpMeta29;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp27_done;
}
case 4: {
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp28_1,1,1) == 0) goto tmp27_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp28_1), 2));
_elts = tmpMeta30;
_lst1 = omc_Interactive_getComponentsInElementitems(threadData, _elts);
_res = omc_List_append__reverse(threadData, _lst1, _res);
goto tmp27_done;
}
default:
tmp27_default: OMC_LABEL_UNUSED; {
goto tmp27_done;
}
}
goto tmp27_end;
tmp27_end: ;
}
goto goto_26;
goto_26:;
goto goto_2;
goto tmp27_done;
tmp27_done:;
}
}
;
}
}
tmpMeta1 = listReverseInPlace(_res);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta32;
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynElementLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementLst;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationString(threadData_t *threadData, modelica_metatype _inAnnotation, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_string _outString = NULL;
modelica_metatype _el = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _acc = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _ann = NULL;
modelica_string tmp8 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_el = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_acc = tmpMeta2;
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
{
{
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp4_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp5 < 2; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
_outString = omc_NFApi_evaluateAnnotation(threadData, _inFullProgram, _inModelPath, _inAnnotation);
goto tmp4_done;
}
case 1: {
modelica_metatype tmpMeta7;
tmpMeta7 = stringAppend(omc_Dump_unparseAnnotation(threadData, _inAnnotation),_OMC_LIT85);
_outString = tmpMeta7;
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
tmp4_done:
(void)tmp5;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp4_done2;
goto_3:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp5 < 2) {
goto tmp4_top;
}
MMC_THROW_INTERNAL();
tmp4_done2:;
}
}
;
goto _return;
}
{
volatile modelica_metatype tmp11_1;
tmp11_1 = _inAnnotation;
{
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp10_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp11 < 2; tmp11++) {
switch (MMC_SWITCH_CAST(tmp11)) {
case 0: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 2));
_el = tmpMeta13;
tmpMeta14 = mmc_mk_box3(3, &Interactive_GraphicEnvCache_GRAPHIC__ENV__NO__CACHE__desc, _inFullProgram, _inModelPath);
tmp8 = listHead(omc_InteractiveUtil_getElementitemsAnnotationsElArgs(threadData, _el, _OMC_LIT134, _inClass, tmpMeta14, 0, NULL));
goto tmp10_done;
}
case 1: {
modelica_metatype tmpMeta15;
tmpMeta15 = stringAppend(omc_Dump_unparseAnnotation(threadData, _inAnnotation),_OMC_LIT85);
tmp8 = tmpMeta15;
goto tmp10_done;
}
}
goto tmp10_end;
tmp10_end: ;
}
goto goto_9;
tmp10_done:
(void)tmp11;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp10_done2;
goto_9:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp11 < 2) {
goto tmp10_top;
}
MMC_THROW_INTERNAL();
tmp10_done2:;
}
}
_outString = tmp8;
_return: OMC_LABEL_UNUSED
threadData->mmc_jumper = old_mmc_jumper;
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_cacheFromGraphicEnvCache(threadData_t *threadData, modelica_metatype _inEnvCache)
{
modelica_metatype _cache = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inEnvCache;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,4) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_cache = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _cache;
}
DLLExport
modelica_metatype omc_Interactive_envFromGraphicEnvCache(threadData_t *threadData, modelica_metatype _inEnvCache)
{
modelica_metatype _env = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inEnvCache;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,4) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 5));
_env = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _env;
}
DLLExport
modelica_metatype omc_Interactive_cacheProgramAndPath(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype *out_outPath)
{
modelica_metatype _outProgram = NULL;
modelica_metatype _outPath = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCache;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 5: {
tmpMeta[0+0] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 2)));
tmpMeta[0+1] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 3)));
goto tmp3_done;
}
case 4: {
tmpMeta[0+0] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 2)));
tmpMeta[0+1] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 3)));
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 2)));
tmpMeta[0+1] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCache), 3)));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outProgram = tmpMeta[0+0];
_outPath = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outPath) { *out_outPath = _outPath; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsModification(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynComponentItemLst;
{
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _str = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta7);
tmpMeta12 = MMC_CDR(tmpMeta7);
_mod = tmpMeta10;
_rest = tmpMeta7;
tmp4 += 4;
tmpMeta13 = mmc_mk_box2(10, &Absyn_CodeNode_C__MODIFICATION__desc, _mod);
tmpMeta14 = mmc_mk_box2(21, &Absyn_Exp_CODE__desc, tmpMeta13);
_s1 = omc_Dump_printExpStr(threadData, tmpMeta14);
_s2 = omc_Interactive_getComponentitemsModification(threadData, _rest);
tmpMeta15 = mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta15);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 4));
if (optionNone(tmpMeta19)) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
if (!listEmpty(tmpMeta17)) goto tmp3_end;
_mod = tmpMeta20;
tmp4 += 2;
tmpMeta21 = mmc_mk_box2(10, &Absyn_CodeNode_C__MODIFICATION__desc, _mod);
tmpMeta22 = mmc_mk_box2(21, &Absyn_Exp_CODE__desc, tmpMeta21);
tmp1 = omc_Dump_printExpStr(threadData, tmpMeta22);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta23 = MMC_CAR(tmp4_1);
tmpMeta24 = MMC_CDR(tmp4_1);
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 4));
if (!optionNone(tmpMeta26)) goto tmp3_end;
if (listEmpty(tmpMeta24)) goto tmp3_end;
tmpMeta27 = MMC_CAR(tmpMeta24);
tmpMeta28 = MMC_CDR(tmpMeta24);
_rest = tmpMeta24;
_str = omc_Interactive_getComponentitemsModification(threadData, _rest);
tmpMeta29 = stringAppend(_OMC_LIT135,_str);
tmp1 = tmpMeta29;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmp4_1);
tmpMeta31 = MMC_CDR(tmp4_1);
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 4));
if (!optionNone(tmpMeta33)) goto tmp3_end;
if (listEmpty(tmpMeta31)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmpMeta31);
tmpMeta35 = MMC_CDR(tmpMeta31);
_rest = tmpMeta31;
tmp4 += 1;
_str = omc_Interactive_getComponentitemsModification(threadData, _rest);
tmpMeta36 = stringAppend(_OMC_LIT135,_str);
tmp1 = tmpMeta36;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta37 = MMC_CAR(tmp4_1);
tmpMeta38 = MMC_CDR(tmp4_1);
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 4));
if (!optionNone(tmpMeta39)) goto tmp3_end;
if (!listEmpty(tmpMeta38)) goto tmp3_end;
tmp1 = _OMC_LIT136;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_string omc_Interactive_getComponentModification(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_lst = tmpMeta7;
tmp1 = omc_Interactive_getComponentitemsModification(threadData, _lst);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsAnnotation(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynComponentItemLst;
{
modelica_string _s1 = NULL;
modelica_string _str = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (optionNone(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,6) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,1,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (9 != MMC_STRLEN(tmpMeta16) || strcmp(MMC_STRINGDATA(_OMC_LIT141), MMC_STRINGDATA(tmpMeta16)) != 0) goto tmp3_end;
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmpMeta7);
tmpMeta18 = MMC_CDR(tmpMeta7);
_mod = tmpMeta12;
_rest = tmpMeta7;
tmpMeta19 = mmc_mk_box2(3, &Absyn_Annotation_ANNOTATION__desc, _mod);
_s1 = omc_Interactive_getAnnotationString(threadData, tmpMeta19, _inClass, _inFullProgram, _inModelPath);
_str = omc_Interactive_getComponentitemsAnnotation(threadData, _rest, _inClass, _inFullProgram, _inModelPath);
tmpMeta20 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT137, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)))));
tmp1 = stringAppendList(tmpMeta20);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmp4_1);
tmpMeta22 = MMC_CDR(tmp4_1);
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 4));
if (optionNone(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
if (optionNone(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 1));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
if (listEmpty(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,6) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,1,1) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
if (9 != MMC_STRLEN(tmpMeta31) || strcmp(MMC_STRINGDATA(_OMC_LIT141), MMC_STRINGDATA(tmpMeta31)) != 0) goto tmp3_end;
if (!listEmpty(tmpMeta22)) goto tmp3_end;
_mod = tmpMeta27;
tmpMeta32 = mmc_mk_box2(3, &Absyn_Annotation_ANNOTATION__desc, _mod);
_s1 = omc_Interactive_getAnnotationString(threadData, tmpMeta32, _inClass, _inFullProgram, _inModelPath);
tmpMeta33 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta33);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmp4_1);
tmpMeta35 = MMC_CDR(tmp4_1);
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 4));
if (optionNone(tmpMeta36)) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta36), 1));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 2));
if (!optionNone(tmpMeta38)) goto tmp3_end;
if (listEmpty(tmpMeta35)) goto tmp3_end;
tmpMeta39 = MMC_CAR(tmpMeta35);
tmpMeta40 = MMC_CDR(tmpMeta35);
_rest = tmpMeta35;
_str = omc_Interactive_getComponentitemsAnnotation(threadData, _rest, _inClass, _inFullProgram, _inModelPath);
tmpMeta41 = stringAppend(_OMC_LIT138,_str);
tmp1 = tmpMeta41;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta42 = MMC_CAR(tmp4_1);
tmpMeta43 = MMC_CDR(tmp4_1);
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 4));
if (!optionNone(tmpMeta44)) goto tmp3_end;
if (listEmpty(tmpMeta43)) goto tmp3_end;
tmpMeta45 = MMC_CAR(tmpMeta43);
tmpMeta46 = MMC_CDR(tmpMeta43);
_rest = tmpMeta43;
_str = omc_Interactive_getComponentitemsAnnotation(threadData, _rest, _inClass, _inFullProgram, _inModelPath);
tmpMeta47 = stringAppend(_OMC_LIT139,_str);
tmp1 = tmpMeta47;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta48 = MMC_CAR(tmp4_1);
tmpMeta49 = MMC_CDR(tmp4_1);
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 4));
if (!optionNone(tmpMeta50)) goto tmp3_end;
if (!listEmpty(tmpMeta49)) goto tmp3_end;
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotation(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_lst = tmpMeta7;
tmp1 = omc_Interactive_getComponentitemsAnnotation(threadData, _lst, _inClass, _inFullProgram, _inModelPath);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotationsFromItems(threadData_t *threadData, modelica_metatype _inComponentItems, modelica_metatype _ccAnnotations, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_metatype *out_outCache)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outCache = NULL;
modelica_metatype _annotations = NULL;
modelica_metatype _res = NULL;
modelica_string _str = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outStringLst = tmpMeta1;
_outCache = _inCache;
{
modelica_metatype _comp;
for (tmpMeta2 = listReverse(_inComponentItems); !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_comp = MMC_CAR(tmpMeta2);
{
modelica_metatype tmp6_1;
tmp6_1 = _comp;
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
for (; tmp6 < 2; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 4));
if (optionNone(tmpMeta8)) goto tmp5_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (optionNone(tmpMeta10)) goto tmp5_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_annotations = tmpMeta12;
tmpMeta3 = listAppend(_annotations, _ccAnnotations);
goto tmp5_done;
}
case 1: {
tmpMeta3 = _ccAnnotations;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_annotations = tmpMeta3;
_res = omc_Interactive_getComponentitemsAnnotationsElArgs(threadData, _annotations, _inEnv, _inClass, _outCache, 1 ,&_outCache);
_str = stringDelimitList(_res, _OMC_LIT80);
tmpMeta14 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta13 = mmc_mk_cons(stringAppendList(tmpMeta14), _outStringLst);
_outStringLst = tmpMeta13;
}
}
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotationsElArgs(threadData_t *threadData, modelica_metatype _inElementArgs, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_boolean _addAnnotationName, modelica_metatype *out_outCache)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outCache = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outStringLst = tmpMeta1;
_outCache = _inCache;
_outStringLst = omc_InteractiveUtil_getElementitemsAnnotationsElArgs(threadData, _inElementArgs, _inEnv, _inClass, _inCache, _addAnnotationName ,&_outCache);
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentitemsAnnotationsElArgs(threadData_t *threadData, modelica_metatype _inElementArgs, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache, modelica_metatype _addAnnotationName, modelica_metatype *out_outCache)
{
modelica_integer tmp1;
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta2;
tmp1 = mmc_unbox_integer(_addAnnotationName);
_outStringLst = omc_Interactive_getComponentitemsAnnotationsElArgs(threadData, _inElementArgs, _inEnv, _inClass, _inCache, tmp1, out_outCache);
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentitemsAnnotations(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inEnv, modelica_metatype _inClass, modelica_metatype _inCache)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _res = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _items = NULL;
modelica_metatype _cc = NULL;
modelica_metatype _fullProgram = NULL;
modelica_metatype _modelPath = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outStringLst = tmpMeta1;
_cache = _inCache;
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
_fullProgram = omc_Interactive_cacheProgramAndPath(threadData, _inCache ,&_modelPath);
_outStringLst = omc_NFApi_evaluateAnnotations(threadData, _fullProgram, _modelPath, _inElements);
goto _return;
}
{
modelica_metatype _e;
for (tmpMeta2 = listReverse(_inElements); !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_e = MMC_CAR(tmpMeta2);
{
volatile modelica_metatype tmp6_1;
tmp6_1 = _e;
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp5_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp6 < 3; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,0,6) == 0) goto tmp5_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,3) == 0) goto tmp5_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 7));
_items = tmpMeta9;
_cc = tmpMeta10;
_res = omc_Interactive_getComponentitemsAnnotationsFromItems(threadData, _items, omc_AbsynUtil_getAnnotationsFromConstraintClass(threadData, _cc), _inEnv, _inClass, _cache ,&_cache);
tmpMeta3 = listAppend(_res, _outStringLst);
goto tmp5_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,0,6) == 0) goto tmp5_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,3,3) == 0) goto tmp5_end;
tmpMeta12 = mmc_mk_cons(_OMC_LIT140, _outStringLst);
tmpMeta3 = tmpMeta12;
goto tmp5_done;
}
case 2: {
tmpMeta3 = _outStringLst;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
tmp5_done:
(void)tmp6;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp5_done2;
goto_4:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp6 < 3) {
goto tmp5_top;
}
MMC_THROW_INTERNAL();
tmp5_done2:;
}
}
_outStringLst = tmpMeta3;
}
}
_return: OMC_LABEL_UNUSED
threadData->mmc_jumper = old_mmc_jumper;
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotationsFromElts(threadData_t *threadData, modelica_metatype _comps, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_string _resStr = NULL;
modelica_metatype _graphicProgramSCode = NULL;
modelica_metatype _env = NULL;
modelica_metatype _res = NULL;
modelica_metatype _placementProgram = NULL;
modelica_metatype _cache = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if((!omc_Flags_isSet(threadData, _OMC_LIT132)))
{
_placementProgram = omc_InteractiveUtil_modelicaAnnotationProgram(threadData, omc_Config_getAnnotationVersion(threadData));
_graphicProgramSCode = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _placementProgram);
omc_Inst_makeEnvFromProgram(threadData, _graphicProgramSCode ,&_env);
}
else
{
_env = _OMC_LIT134;
}
tmpMeta1 = mmc_mk_box3(3, &Interactive_GraphicEnvCache_GRAPHIC__ENV__NO__CACHE__desc, _inFullProgram, _inModelPath);
_cache = tmpMeta1;
_res = omc_Interactive_getComponentitemsAnnotations(threadData, _comps, _env, _inClass, _cache);
_resStr = stringDelimitList(_res, _OMC_LIT73);
_return: OMC_LABEL_UNUSED
return _resStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionsInEquations(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynEquationItemLst;
{
modelica_metatype _eq = NULL;
modelica_metatype _eqlist1 = NULL;
modelica_metatype _eqlist2 = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _forEqList = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,2) == 0) goto tmp3_end;
_eq = tmpMeta6;
_xs = tmpMeta7;
_eqlist1 = omc_Interactive_getConnectionsInEquations(threadData, _xs);
tmpMeta9 = mmc_mk_cons(_eq, _eqlist1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,4,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
_forEqList = tmpMeta13;
_xs = tmpMeta11;
_eqlist1 = omc_Interactive_getConnectionsInEquations(threadData, _forEqList);
_eqlist2 = omc_Interactive_getConnectionsInEquations(threadData, _xs);
tmpMeta1 = listAppend(_eqlist1, _eqlist2);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
_xs = tmpMeta15;
_inAbsynEquationItemLst = _xs;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta16;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionsInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _eqlist1 = NULL;
modelica_metatype _eqlist2 = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_eqlist1 = tmpMeta8;
_xs = tmpMeta7;
_eqlist1 = omc_Interactive_getConnectionsInEquations(threadData, _eqlist1);
_eqlist2 = omc_Interactive_getConnectionsInClassparts(threadData, _xs);
tmpMeta1 = listAppend(_eqlist1, _eqlist2);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_xs = tmpMeta10;
tmp4 += 1;
tmpMeta1 = omc_Interactive_getConnectionsInClassparts(threadData, _xs);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
DLLExport
modelica_metatype omc_Interactive_getConnections(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _parts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
tmpMeta1 = omc_Interactive_getConnectionsInClassparts(threadData, _parts);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_parts = tmpMeta9;
tmpMeta1 = omc_Interactive_getConnectionsInClassparts(threadData, _parts);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,4) == 0) goto tmp3_end;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectionStr(threadData_t *threadData, modelica_metatype _inEquation, modelica_string *out_outToString)
{
modelica_string _outFromString = NULL;
modelica_string _outToString = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inEquation;
{
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr1 = tmpMeta6;
_cr2 = tmpMeta7;
_s1 = omc_Dump_printComponentRefStr(threadData, _cr1);
_s2 = omc_Dump_printComponentRefStr(threadData, _cr2);
tmp1_c0 = _s1;
tmp1_c1 = _s2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outFromString = tmp1_c0;
_outToString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outToString) { *out_outToString = _outToString; }
return _outFromString;
}
DLLExport
modelica_metatype omc_Interactive_createFuncargsFromElementargs(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst)
{
modelica_metatype _outFunctionArgs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementArgLst;
{
modelica_metatype _expl = NULL;
modelica_metatype _narg = NULL;
modelica_string _id = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta1 = _OMC_LIT142;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_id = tmpMeta9;
_exp = tmpMeta13;
_xs = tmpMeta7;
tmpMeta14 = omc_Interactive_createFuncargsFromElementargs(threadData, _xs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,0,2) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
_expl = tmpMeta15;
_narg = tmpMeta16;
tmpMeta18 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _id, _exp);
tmpMeta17 = mmc_mk_cons(tmpMeta18, _narg);
tmpMeta19 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _expl, tmpMeta17);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_xs = tmpMeta21;
tmpMeta22 = omc_Interactive_createFuncargsFromElementargs(threadData, _xs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,2) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
_expl = tmpMeta23;
_narg = tmpMeta24;
tmpMeta25 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _expl, _narg);
tmpMeta1 = tmpMeta25;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outFunctionArgs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outFunctionArgs;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectionAnnotationStr(threadData_t *threadData, modelica_metatype _inEquationItem, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inEquationItem;
{
modelica_metatype _res = NULL;
modelica_metatype _annotations = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (optionNone(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_annotations = tmpMeta11;
_info = tmpMeta12;
_res = omc_Interactive_getConnectionAnnotationStrElArgs(threadData, _annotations, _info, _inClass, _inFullProgram, _inModelPath);
tmp1 = stringDelimitList(_res, _OMC_LIT80);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConnectionAnnotationStrElArgs(threadData_t *threadData, modelica_metatype _inElArgLst, modelica_metatype _info, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inElArgLst;
{
modelica_metatype _fargs = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _newexp = NULL;
modelica_string _gexpstr = NULL;
modelica_string _gexpstr_1 = NULL;
modelica_string _annName = NULL;
modelica_metatype _res = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _lineProgram = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_annName = tmpMeta10;
_mod = tmpMeta13;
_rest = tmpMeta8;
_lineProgram = omc_InteractiveUtil_modelicaAnnotationProgram(threadData, omc_Config_getAnnotationVersion(threadData));
_fargs = omc_Interactive_createFuncargsFromElementargs(threadData, _mod);
_p_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _lineProgram);
_cache = omc_Inst_makeEnvFromProgram(threadData, _p_1 ,&_env);
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _annName, tmpMeta14);
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, tmpMeta15, _fargs, tmpMeta16);
omc_StaticScript_elabGraphicsExp(threadData, _cache, _env, tmpMeta17, 0, _OMC_LIT63, _info ,&_newexp ,&_prop);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _newexp, _prop, 0, _info ,&_newexp ,&_prop);
omc_Print_clearErrorBuf(threadData);
_gexpstr = omc_ExpressionDump_printExpStr(threadData, _newexp);
_res = omc_Interactive_getConnectionAnnotationStrElArgs(threadData, _rest, _info, _inClass, _inFullProgram, _inModelPath);
tmpMeta18 = mmc_mk_cons(_gexpstr, _res);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_1);
tmpMeta20 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,6) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,1,1) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 5));
if (optionNone(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,0,0) == 0) goto tmp3_end;
_annName = tmpMeta22;
_rest = tmpMeta20;
tmpMeta26 = stringAppend(_annName,_OMC_LIT143);
_gexpstr_1 = tmpMeta26;
_res = omc_Interactive_getConnectionAnnotationStrElArgs(threadData, _rest, _info, _inClass, _inFullProgram, _inModelPath);
tmpMeta27 = mmc_mk_cons(_gexpstr_1, _res);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inAbsynElementItemLst)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
tmp4_3 = _inAbsynElementItemLst;
{
modelica_metatype _cdef = NULL;
modelica_metatype _newmodelpath = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _tp = NULL;
modelica_integer _c1;
modelica_integer _c2;
modelica_metatype _p = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _complst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_tp = tmpMeta10;
_lst = tmpMeta7;
_modelpath = tmp4_1;
_p = tmp4_2;
tmp4 += 2;
_cdef = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p ,&_newmodelpath);
_c1 = omc_Interactive_countPublicConnectors(threadData, _newmodelpath, _p, _cdef);
_c2 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _lst);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_3);
tmpMeta12 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,6) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,3,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
_tp = tmpMeta16;
_complst = tmpMeta17;
_lst = tmpMeta12;
_modelpath = tmp4_1;
_p = tmp4_2;
tmpMeta18 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,5,0) == 0) goto goto_2;
_c1 = listLength(_complst);
_c2 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _lst);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_3);
tmpMeta21 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,0,1) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,6) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,3,3) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,0,2) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 4));
_tp = tmpMeta25;
_complst = tmpMeta26;
_lst = tmpMeta21;
_modelpath = tmp4_1;
_p = tmp4_2;
tmpMeta27 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,6,0) == 0) goto goto_2;
_c1 = listLength(_complst);
_c2 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _lst);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmp4_3);
tmpMeta30 = MMC_CDR(tmp4_3);
_lst = tmpMeta30;
_modelpath = tmp4_1;
_p = tmp4_2;
tmp4 += 1;
tmp1 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _lst);
goto tmp3_done;
}
case 4: {
if (!listEmpty(tmp4_3)) goto tmp3_end;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inAbsynElementItemLst)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countConnectors(threadData, _inPath, _inProgram, _inAbsynElementItemLst);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countPublicConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
tmp4_3 = _inClass;
{
modelica_integer _c1;
modelica_integer _c2;
modelica_metatype _modelpath = NULL;
modelica_metatype _newmodelpath = NULL;
modelica_metatype _cname = NULL;
modelica_metatype _p = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_cdef = tmp4_3;
_elt = tmpMeta10;
_lst = tmpMeta9;
_ann = tmpMeta11;
_cmt = tmpMeta12;
_modelpath = tmp4_1;
_p = tmp4_2;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta14, tmpMeta15, _lst, _ann, _cmt);
tmpMeta13 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta13), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta13))[7] = tmpMeta16;
_cdef = tmpMeta13;
_c1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
_c2 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _elt);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,5) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 4));
if (listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 5));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 6));
_cdef = tmp4_3;
_lst = tmpMeta20;
_ann = tmpMeta21;
_cmt = tmpMeta22;
_modelpath = tmp4_1;
_p = tmp4_2;
tmp4 += 5;
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta25 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta26 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta24, tmpMeta25, _lst, _ann, _cmt);
tmpMeta23 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta23), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta23))[7] = tmpMeta26;
_cdef = tmpMeta23;
tmp1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,5) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 4));
if (!listEmpty(tmpMeta28)) goto tmp3_end;
tmp4 += 4;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,4,5) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 4));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 5));
if (listEmpty(tmpMeta31)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 6));
_cdef = tmp4_3;
_cmt = tmpMeta30;
_elt = tmpMeta34;
_lst = tmpMeta33;
_ann = tmpMeta35;
_modelpath = tmp4_1;
_p = tmp4_2;
tmpMeta37 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta38 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta39 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta37, tmpMeta38, _lst, _ann, _cmt);
tmpMeta36 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta36), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta36))[7] = tmpMeta39;
_cdef = tmpMeta36;
_c1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
_c2 = omc_Interactive_countConnectors(threadData, _modelpath, _p, _elt);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,4,5) == 0) goto tmp3_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 4));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 5));
if (listEmpty(tmpMeta42)) goto tmp3_end;
tmpMeta43 = MMC_CAR(tmpMeta42);
tmpMeta44 = MMC_CDR(tmpMeta42);
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 6));
_cdef = tmp4_3;
_cmt = tmpMeta41;
_lst = tmpMeta44;
_ann = tmpMeta45;
_modelpath = tmp4_1;
_p = tmp4_2;
tmp4 += 2;
tmpMeta47 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta48 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta49 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta47, tmpMeta48, _lst, _ann, _cmt);
tmpMeta46 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta46), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta46))[7] = tmpMeta49;
_cdef = tmpMeta46;
tmp1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta50,4,5) == 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 5));
if (!listEmpty(tmpMeta51)) goto tmp3_end;
tmp4 += 1;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta52,1,4) == 0) goto tmp3_end;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta52), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta53,0,2) == 0) goto tmp3_end;
tmpMeta54 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta53), 2));
_cname = tmpMeta54;
_modelpath = tmp4_1;
_p = tmp4_2;
_cdef = omc_Interactive_lookupClassdef(threadData, _cname, _modelpath, _p ,&_newmodelpath);
tmp1 = omc_Interactive_countPublicConnectors(threadData, _newmodelpath, _p, _cdef);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countPublicConnectors(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countPublicConnectors(threadData, _inPath, _inProgram, _inClass);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_integer tmp4_2;
tmp4_1 = _inAbsynComponentItemLst;
tmp4_2 = _inInteger;
{
modelica_string _id = NULL;
modelica_metatype _xs = NULL;
modelica_integer _n1;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (1 != tmp4_2) goto tmp3_end;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_id = tmpMeta9;
tmp1 = _id;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
_xs = tmpMeta11;
_n = tmp4_2;
_n1 = ((modelica_integer) -1) + _n;
_inAbsynComponentItemLst = _xs;
_inInteger = _n1;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthCompname(threadData, _inAbsynComponentItemLst, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectorStr(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_integer _inInteger, modelica_metatype *out_outPath)
{
modelica_string _outString = NULL;
modelica_metatype _outPath = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_integer tmp4_4;
tmp4_1 = _inProgram;
tmp4_2 = _inPath;
tmp4_3 = _inAbsynElementItemLst;
tmp4_4 = _inInteger;
{
modelica_metatype _cdef = NULL;
modelica_metatype _newmodelpath = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _modelpath = NULL;
modelica_string _str = NULL;
modelica_metatype _p = NULL;
modelica_metatype _lst = NULL;
modelica_integer _n;
modelica_integer _c1;
modelica_integer _c2;
modelica_integer _newn;
modelica_metatype _complst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_tp = tmpMeta10;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
_cdef = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p ,&_newmodelpath);
tmp1_c0 = omc_Interactive_getNthPublicConnectorStr(threadData, _newmodelpath, _cdef, _p, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_3);
tmpMeta12 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,6) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,1,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_tp = tmpMeta15;
_lst = tmpMeta12;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmp4 += 4;
_cdef = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p ,&_newmodelpath);
_c1 = omc_Interactive_countPublicConnectors(threadData, _newmodelpath, _p, _cdef);
_c2 = _n - _c1;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _lst, _c2, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_3);
tmpMeta17 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,0,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,6) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,3,3) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,0,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 4));
_tp = tmpMeta21;
_complst = tmpMeta22;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmpMeta23 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,5,0) == 0) goto goto_2;
_str = omc_Interactive_getNthCompname(threadData, _complst, _n);
tmp1_c0 = _str;
tmpMeta[0+1] = _tp;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmp4_3);
tmpMeta26 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,0,1) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,6) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,3,3) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,0,2) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 4));
_tp = tmpMeta30;
_complst = tmpMeta31;
_lst = tmpMeta26;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmpMeta32 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,5,0) == 0) goto goto_2;
_c1 = listLength(_complst);
_newn = _n - _c1;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _lst, _newn, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmp4_3);
tmpMeta35 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,0,1) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta36,0,6) == 0) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta36), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta37,3,3) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,0,2) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 4));
_tp = tmpMeta39;
_complst = tmpMeta40;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmpMeta41 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta42,6,0) == 0) goto goto_2;
_str = omc_Interactive_getNthCompname(threadData, _complst, _n);
tmp1_c0 = _str;
tmpMeta[0+1] = _tp;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta43 = MMC_CAR(tmp4_3);
tmpMeta44 = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,0,1) == 0) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,0,6) == 0) goto tmp3_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,3,3) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta47,0,2) == 0) goto tmp3_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 2));
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 4));
_tp = tmpMeta48;
_complst = tmpMeta49;
_lst = tmpMeta44;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmpMeta50 = omc_Interactive_lookupClassdef(threadData, _tp, _modelpath, _p, NULL);
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,6,0) == 0) goto goto_2;
_c1 = listLength(_complst);
_newn = _n - _c1;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _lst, _newn, &tmpMeta[0+1]);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta52 = MMC_CAR(tmp4_3);
tmpMeta53 = MMC_CDR(tmp4_3);
_lst = tmpMeta53;
_p = tmp4_1;
_modelpath = tmp4_2;
_n = tmp4_4;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _lst, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outPath = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outPath) { *out_outPath = _outPath; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectorStr(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inInteger, modelica_metatype *out_outPath)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthConnectorStr(threadData, _inProgram, _inPath, _inAbsynElementItemLst, tmp1, out_outPath);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthPublicConnectorStr(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_integer _inInteger, modelica_metatype *out_outPath)
{
modelica_string _outString = NULL;
modelica_metatype _outPath = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_integer tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inClass;
tmp4_3 = _inProgram;
tmp4_4 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
modelica_integer _c1;
modelica_integer _c2;
modelica_metatype _cmt = NULL;
modelica_metatype _ann = NULL;
modelica_metatype _cdef = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_elt = tmpMeta10;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _elt, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,5) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 4));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 5));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 6));
_cdef = tmp4_2;
_elt = tmpMeta15;
_lst = tmpMeta14;
_ann = tmpMeta16;
_cmt = tmpMeta17;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta22 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elt);
tmpMeta21 = mmc_mk_cons(tmpMeta22, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta23 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta19, tmpMeta20, tmpMeta21, _ann, _cmt);
tmpMeta18 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta18), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta18))[7] = tmpMeta23;
_cdef = tmpMeta18;
_c1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
_c2 = _n - _c1;
tmpMeta25 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta26 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta27 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta25, tmpMeta26, _lst, _ann, _cmt);
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[7] = tmpMeta27;
_cdef = tmpMeta24;
tmp1_c0 = omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _c2, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,5) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 4));
if (listEmpty(tmpMeta29)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmpMeta29);
tmpMeta31 = MMC_CDR(tmpMeta29);
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 5));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 6));
_cdef = tmp4_2;
_lst = tmpMeta31;
_ann = tmpMeta32;
_cmt = tmpMeta33;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmp4 += 3;
tmpMeta35 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta37 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta35, tmpMeta36, _lst, _ann, _cmt);
tmpMeta34 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta34), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta34))[7] = tmpMeta37;
_cdef = tmpMeta34;
tmp1_c0 = omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,4,5) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 5));
if (listEmpty(tmpMeta39)) goto tmp3_end;
tmpMeta40 = MMC_CAR(tmpMeta39);
tmpMeta41 = MMC_CDR(tmpMeta39);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,0,1) == 0) goto tmp3_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
_elt = tmpMeta42;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmp1_c0 = omc_Interactive_getNthConnectorStr(threadData, _p, _modelpath, _elt, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,4,5) == 0) goto tmp3_end;
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 4));
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 5));
if (listEmpty(tmpMeta45)) goto tmp3_end;
tmpMeta46 = MMC_CAR(tmpMeta45);
tmpMeta47 = MMC_CDR(tmpMeta45);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,0,1) == 0) goto tmp3_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 2));
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 6));
_cdef = tmp4_2;
_cmt = tmpMeta44;
_elt = tmpMeta48;
_lst = tmpMeta47;
_ann = tmpMeta49;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmpMeta51 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta52 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta54 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elt);
tmpMeta53 = mmc_mk_cons(tmpMeta54, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta55 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta51, tmpMeta52, tmpMeta53, _ann, _cmt);
tmpMeta50 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta50), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta50))[7] = tmpMeta55;
_cdef = tmpMeta50;
_c1 = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
_c2 = _n - _c1;
tmpMeta57 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta58 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta59 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta57, tmpMeta58, _lst, _ann, _cmt);
tmpMeta56 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta56), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta56))[7] = tmpMeta59;
_cdef = tmpMeta56;
tmp1_c0 = omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _c2, &tmpMeta[0+1]);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta60,4,5) == 0) goto tmp3_end;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 4));
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 5));
if (listEmpty(tmpMeta62)) goto tmp3_end;
tmpMeta63 = MMC_CAR(tmpMeta62);
tmpMeta64 = MMC_CDR(tmpMeta62);
tmpMeta65 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 6));
_cdef = tmp4_2;
_cmt = tmpMeta61;
_lst = tmpMeta64;
_ann = tmpMeta65;
_modelpath = tmp4_1;
_p = tmp4_3;
_n = tmp4_4;
tmpMeta67 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta68 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta69 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta67, tmpMeta68, _lst, _ann, _cmt);
tmpMeta66 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta66), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta66))[7] = tmpMeta69;
_cdef = tmpMeta66;
tmp1_c0 = omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _n, &tmpMeta[0+1]);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outPath = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outPath) { *out_outPath = _outPath; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthPublicConnectorStr(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype _inInteger, modelica_metatype *out_outPath)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthPublicConnectorStr(threadData, _inPath, _inClass, _inProgram, tmp1, out_outPath);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationInfoHeader(threadData_t *threadData, modelica_metatype _eltArgs)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _exp = NULL;
modelica_metatype _xs = NULL;
modelica_string _s = NULL;
modelica_metatype _dexp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (25 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT144), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_exp = tmpMeta13;
omc_StaticScript_elabGraphicsExp(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _exp, 1, _OMC_LIT63, _OMC_LIT120 ,&_dexp ,NULL);
tmpMeta14 = omc_ExpressionSimplify_simplify(threadData, _dexp, NULL);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,2,1) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_s = tmpMeta15;
tmp1 = _s;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
_xs = tmpMeta17;
tmp1 = omc_Interactive_getDocumentationAnnotationInfoHeader(threadData, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationRevision(threadData_t *threadData, modelica_metatype _eltArgs)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _exp = NULL;
modelica_metatype _xs = NULL;
modelica_string _s = NULL;
modelica_metatype _dexp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (9 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT145), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_exp = tmpMeta13;
omc_StaticScript_elabGraphicsExp(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _exp, 1, _OMC_LIT63, _OMC_LIT120 ,&_dexp ,NULL);
tmpMeta14 = omc_ExpressionSimplify_simplify(threadData, _dexp, NULL);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,2,1) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_s = tmpMeta15;
tmp1 = _s;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
_xs = tmpMeta17;
tmp1 = omc_Interactive_getDocumentationAnnotationRevision(threadData, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationAnnotationInfo(threadData_t *threadData, modelica_metatype _eltArgs)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _exp = NULL;
modelica_metatype _dexp = NULL;
modelica_metatype _xs = NULL;
modelica_string _s = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (4 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT146), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_exp = tmpMeta13;
omc_StaticScript_elabGraphicsExp(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _exp, 1, _OMC_LIT63, _OMC_LIT120 ,&_dexp ,NULL);
tmpMeta14 = omc_ExpressionSimplify_simplify(threadData, _dexp, NULL);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,2,1) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_s = tmpMeta15;
tmp1 = _s;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
_xs = tmpMeta17;
tmp1 = omc_Interactive_getDocumentationAnnotationInfo(threadData, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
DLLExport
modelica_metatype omc_Interactive_getDocumentationAnnotationString(threadData_t *threadData, modelica_metatype _mod)
{
modelica_metatype _docStr = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _arglst = NULL;
modelica_string _info = NULL;
modelica_string _revisions = NULL;
modelica_string _infoHeader = NULL;
modelica_boolean _partialInst;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_arglst = tmpMeta7;
_partialInst = omc_System_getPartialInstantiation(threadData);
omc_System_setPartialInstantiation(threadData, 1);
_info = omc_Interactive_getDocumentationAnnotationInfo(threadData, _arglst);
_revisions = omc_Interactive_getDocumentationAnnotationRevision(threadData, _arglst);
_infoHeader = omc_Interactive_getDocumentationAnnotationInfoHeader(threadData, _arglst);
omc_System_setPartialInstantiation(threadData, _partialInst);
tmpMeta8 = mmc_mk_box3(0, _info, _revisions, _infoHeader);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_docStr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _docStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExperimentAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs)
{
modelica_metatype _strs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _exp = NULL;
modelica_metatype _xs = NULL;
modelica_string _name = NULL;
modelica_string _s = NULL;
modelica_metatype _ss = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
_name = tmpMeta10;
_exp = tmpMeta14;
_xs = tmpMeta8;
tmpMeta15 = stringAppend(_name,_OMC_LIT147);
tmpMeta16 = stringAppend(tmpMeta15,omc_Dump_printExpStr(threadData, _exp));
_s = tmpMeta16;
_ss = omc_Interactive_getExperimentAnnotationString2(threadData, _xs);
tmpMeta17 = mmc_mk_cons(_s, _ss);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmp4_1);
tmpMeta19 = MMC_CDR(tmp4_1);
_xs = tmpMeta19;
tmpMeta1 = omc_Interactive_getExperimentAnnotationString2(threadData, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_strs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _strs;
}
DLLExport
modelica_string omc_Interactive_getExperimentAnnotationString(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _experimentStr = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _arglst = NULL;
modelica_metatype _strs = NULL;
modelica_string _s = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_arglst = tmpMeta7;
_strs = omc_Interactive_getExperimentAnnotationString2(threadData, _arglst);
_s = stringDelimitList(_strs, _OMC_LIT73);
tmpMeta8 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta8);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_experimentStr = tmp1;
_return: OMC_LABEL_UNUSED
return _experimentStr;
}
DLLExport
modelica_string omc_Interactive_getAnnotationStringValueOrFail(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_exp = tmpMeta9;
tmp1 = omc_AbsynUtil_getString(threadData, _exp);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
DLLExport
modelica_metatype omc_Interactive_getAnnotationExp(threadData_t *threadData, modelica_metatype _mod)
{
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _mod;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta4,1,2) == 0) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
_exp = tmpMeta5;
_return: OMC_LABEL_UNUSED
return _exp;
}
DLLExport
modelica_string omc_Interactive_getAnnotationValue(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_string _s = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_exp = tmpMeta9;
_s = omc_Dump_printExpStr(threadData, _exp);
tmpMeta10 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta10);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentPrefixes(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p)
{
modelica_string _compName = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_compName = omc_Interactive_getNamedAnnotation(threadData, _className, _p, _OMC_LIT149, _OMC_LIT150, boxvar_Interactive_getDefaultComponentPrefixesModStr);
_return: OMC_LABEL_UNUSED
return _compName;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentNameModStr(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _docStr = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_e = tmpMeta8;
tmp1 = omc_Dump_printExpStr(threadData, _e);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_docStr = tmp1;
_return: OMC_LABEL_UNUSED
return _docStr;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentName(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p)
{
modelica_string _compName = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_compName = omc_Interactive_getNamedAnnotation(threadData, _className, _p, _OMC_LIT152, _OMC_LIT150, boxvar_Interactive_getDefaultComponentNameModStr);
_return: OMC_LABEL_UNUSED
return _compName;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDocumentationClassAnnotationModStr(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _docStr = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_e = tmpMeta8;
tmp1 = omc_Dump_printExpStr(threadData, _e);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT128;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_docStr = tmp1;
_return: OMC_LABEL_UNUSED
return _docStr;
}
DLLExport
modelica_boolean omc_Interactive_getDocumentationClassAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p)
{
modelica_boolean _isDocClass;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_string _docStr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_docStr = omc_Interactive_getNamedAnnotation(threadData, _className, _p, _OMC_LIT154, _OMC_LIT155, boxvar_Interactive_getDocumentationClassAnnotationModStr);
tmp1 = (stringEqual(_docStr, _OMC_LIT127));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_isDocClass = tmp1;
_return: OMC_LABEL_UNUSED
return _isDocClass;
}
modelica_metatype boxptr_Interactive_getDocumentationClassAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _p)
{
modelica_boolean _isDocClass;
modelica_metatype out_isDocClass;
_isDocClass = omc_Interactive_getDocumentationClassAnnotation(threadData, _className, _p);
out_isDocClass = mmc_mk_icon(_isDocClass);
return out_isDocClass;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationStr(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _annotationType, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype _inModelPath)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inAbsynElementArgLst;
tmp4_2 = _inClass;
tmp4_3 = _inProgram;
tmp4_4 = _inModelPath;
{
modelica_string _ann_name = NULL;
modelica_metatype _ann = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _fullProgram = NULL;
modelica_metatype _c = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_ann = tmpMeta6;
_ann_name = tmpMeta9;
_c = tmp4_2;
_fullProgram = tmp4_3;
_p = tmp4_4;
omc_Interactive_isAnnotationType(threadData, _ann_name, _annotationType);
tmpMeta10 = mmc_mk_cons(_ann, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &Absyn_Annotation_ANNOTATION__desc, tmpMeta10);
tmp1 = omc_Interactive_getAnnotationString(threadData, tmpMeta11, _c, _fullProgram, _p);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_xs = tmpMeta13;
_c = tmp4_2;
_fullProgram = tmp4_3;
_p = tmp4_4;
tmp1 = omc_Interactive_getAnnotationStr(threadData, _xs, _annotationType, _c, _fullProgram, _p);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_containAnnotation(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _annotationType)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inAbsynElementArgLst;
{
modelica_metatype _lst = NULL;
modelica_string _ann_name = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,6) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) goto tmp2_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_ann_name = tmpMeta8;
omc_Interactive_isAnnotationType(threadData, _ann_name, _annotationType);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta9 = MMC_CAR(tmp3_1);
tmpMeta10 = MMC_CDR(tmp3_1);
_lst = tmpMeta10;
omc_Interactive_containAnnotation(threadData, _lst, _annotationType);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_isAnnotationType(threadData_t *threadData, modelica_string _annotationStr, modelica_metatype _annotationType)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _annotationStr;
tmp3_2 = _annotationType;
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (4 != MMC_STRLEN(tmp3_1) || strcmp(MMC_STRINGDATA(_OMC_LIT156), MMC_STRINGDATA(tmp3_1)) != 0) goto tmp2_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,0,0) == 0) goto tmp2_end;
goto tmp2_done;
}
case 1: {
if (7 != MMC_STRLEN(tmp3_1) || strcmp(MMC_STRINGDATA(_OMC_LIT157), MMC_STRINGDATA(tmp3_1)) != 0) goto tmp2_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,1,0) == 0) goto tmp2_end;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getAnnotationInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _annotationType, modelica_metatype _inProgram, modelica_metatype _inModelPath)
{
modelica_string _annotationStr = NULL;
modelica_metatype _body = NULL;
modelica_metatype _ann = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inClass;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 7));
_body = tmpMeta2;
{
modelica_metatype tmp6_1;
tmp6_1 = _body;
{
int tmp6;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp6_1))) {
case 3: {
modelica_metatype tmpMeta7;
{
modelica_metatype __omcQ_24tmpVar3;
modelica_metatype* tmp8;
modelica_metatype tmpMeta9;
modelica_metatype __omcQ_24tmpVar2;
modelica_integer tmp10;
modelica_metatype _a_loopVar = 0;
modelica_metatype _a;
_a_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 5)));
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar3 = tmpMeta9;
tmp8 = &__omcQ_24tmpVar3;
while(1) {
tmp10 = 1;
if (!listEmpty(_a_loopVar)) {
_a = MMC_CAR(_a_loopVar);
_a_loopVar = MMC_CDR(_a_loopVar);
tmp10--;
}
if (tmp10 == 0) {
__omcQ_24tmpVar2 = omc_AbsynUtil_annotationToElementArgs(threadData, _a);
*tmp8 = mmc_mk_cons(__omcQ_24tmpVar2,0);
tmp8 = &MMC_CDR(*tmp8);
} else if (tmp10 == 1) {
break;
} else {
goto goto_4;
}
}
*tmp8 = mmc_mk_nil();
tmpMeta7 = __omcQ_24tmpVar3;
}
tmpMeta3 = omc_List_flatten(threadData, tmpMeta7);
goto tmp5_done;
}
case 7: {
modelica_metatype tmpMeta11;
{
modelica_metatype __omcQ_24tmpVar5;
modelica_metatype* tmp12;
modelica_metatype tmpMeta13;
modelica_metatype __omcQ_24tmpVar4;
modelica_integer tmp14;
modelica_metatype _a_loopVar = 0;
modelica_metatype _a;
_a_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 6)));
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar5 = tmpMeta13;
tmp12 = &__omcQ_24tmpVar5;
while(1) {
tmp14 = 1;
if (!listEmpty(_a_loopVar)) {
_a = MMC_CAR(_a_loopVar);
_a_loopVar = MMC_CDR(_a_loopVar);
tmp14--;
}
if (tmp14 == 0) {
__omcQ_24tmpVar4 = omc_AbsynUtil_annotationToElementArgs(threadData, _a);
*tmp12 = mmc_mk_cons(__omcQ_24tmpVar4,0);
tmp12 = &MMC_CDR(*tmp12);
} else if (tmp14 == 1) {
break;
} else {
goto goto_4;
}
}
*tmp12 = mmc_mk_nil();
tmpMeta11 = __omcQ_24tmpVar5;
}
tmpMeta3 = omc_List_flatten(threadData, tmpMeta11);
goto tmp5_done;
}
case 4: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,1,4) == 0) goto tmp5_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 5));
if (optionNone(tmpMeta15)) goto tmp5_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (optionNone(tmpMeta17)) goto tmp5_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
_ann = tmpMeta19;
tmpMeta3 = _ann;
goto tmp5_done;
}
case 5: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,2,2) == 0) goto tmp5_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 3));
if (optionNone(tmpMeta20)) goto tmp5_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 1));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (optionNone(tmpMeta22)) goto tmp5_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 1));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
_ann = tmpMeta24;
tmpMeta3 = _ann;
goto tmp5_done;
}
case 6: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,3,2) == 0) goto tmp5_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 3));
if (optionNone(tmpMeta25)) goto tmp5_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 1));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
if (optionNone(tmpMeta27)) goto tmp5_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 1));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
_ann = tmpMeta29;
tmpMeta3 = _ann;
goto tmp5_done;
}
case 8: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,5,3) == 0) goto tmp5_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 4));
if (optionNone(tmpMeta30)) goto tmp5_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 1));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
if (optionNone(tmpMeta32)) goto tmp5_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 1));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
_ann = tmpMeta34;
tmpMeta3 = _ann;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_ann = tmpMeta3;
_annotationStr = omc_Interactive_getAnnotationStr(threadData, _ann, _annotationType, _inClass, _inProgram, _inModelPath);
tmpMeta35 = stringAppend(_OMC_LIT125,_annotationStr);
tmpMeta36 = stringAppend(tmpMeta35,_OMC_LIT126);
_annotationStr = tmpMeta36;
_return: OMC_LABEL_UNUSED
return _annotationStr;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementItemLst;
{
modelica_integer _cl;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,3) == 0) goto tmp3_end;
_rest = tmpMeta7;
_cl = omc_Interactive_countBaseClassesFromElts(threadData, _rest);
tmp1 = ((modelica_integer) 1) + _cl;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
_rest = tmpMeta11;
tmp1 = omc_Interactive_countBaseClassesFromElts(threadData, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countBaseClassesFromElts(threadData, _inAbsynElementItemLst);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_integer _c1;
modelica_integer _c2;
modelica_metatype _elts = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elts = tmpMeta8;
_rest = tmpMeta7;
tmp4 += 1;
_c1 = omc_Interactive_countBaseClassesFromElts(threadData, _elts);
_c2 = omc_Interactive_countBaseClassesFromParts(threadData, _rest);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_elts = tmpMeta11;
_rest = tmpMeta10;
_c1 = omc_Interactive_countBaseClassesFromElts(threadData, _elts);
_c2 = omc_Interactive_countBaseClassesFromParts(threadData, _rest);
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_rest = tmpMeta13;
tmp4 += 1;
tmp1 = omc_Interactive_countBaseClassesFromParts(threadData, _rest);
goto tmp3_done;
}
case 3: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countBaseClassesFromParts(threadData, _inAbsynClassPartLst);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countBaseClasses(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_integer _res;
modelica_metatype _parts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
tmp4 += 2;
tmp1 = omc_Interactive_countBaseClassesFromParts(threadData, _parts);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_parts = tmpMeta9;
tmp4 += 1;
_res = omc_Interactive_countBaseClassesFromParts(threadData, _parts);
tmp1 = ((modelica_integer) 1) + _res;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,4) == 0) goto tmp3_end;
tmp1 = ((modelica_integer) 1);
goto tmp3_done;
}
case 3: {
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countBaseClasses(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countBaseClasses(threadData, _inClass);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClassesFromElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inEnv)
{
modelica_metatype _outAbsynComponentRefLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inEnv;
{
modelica_metatype _env = NULL;
modelica_metatype _env_1 = NULL;
modelica_metatype _cl = NULL;
modelica_metatype _envpath = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _path = NULL;
modelica_string _tpname = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_e = tmpMeta9;
_path = tmpMeta11;
_rest = tmpMeta8;
_env = tmp4_2;
_cl = omc_Interactive_getBaseClassesFromElts(threadData, _rest, _env);
omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path, mmc_mk_some((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_e), 6)))) ,NULL ,&_env_1);
tmpMeta12 = omc_FGraph_getScopePath(threadData, _env_1);
if (optionNone(tmpMeta12)) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
_envpath = tmpMeta13;
_tpname = omc_AbsynUtil_pathLastIdent(threadData, _path);
tmpMeta14 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _tpname);
_p_1 = omc_AbsynUtil_joinPaths(threadData, _envpath, tmpMeta14);
_cref = omc_AbsynUtil_pathToCref(threadData, _p_1);
tmpMeta15 = mmc_mk_cons(_cref, _cl);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,0,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,6) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,1,3) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_e = tmpMeta18;
_path = tmpMeta20;
_rest = tmpMeta17;
_env = tmp4_2;
_cl = omc_Interactive_getBaseClassesFromElts(threadData, _rest, _env);
omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path, mmc_mk_some((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_e), 6)))) ,NULL ,&_env_1);
tmpMeta21 = omc_FGraph_getScopePath(threadData, _env_1);
if (!optionNone(tmpMeta21)) goto goto_2;
_cref = omc_AbsynUtil_pathToCref(threadData, _path);
tmpMeta22 = mmc_mk_cons(_cref, _cl);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta23 = MMC_CAR(tmp4_1);
tmpMeta24 = MMC_CDR(tmp4_1);
_rest = tmpMeta24;
_env = tmp4_2;
tmpMeta1 = omc_Interactive_getBaseClassesFromElts(threadData, _rest, _env);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentRefLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentRefLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClassesFromParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inEnv)
{
modelica_metatype _outAbsynComponentRefLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inEnv;
{
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elts = tmpMeta8;
_rest = tmpMeta7;
_env = tmp4_2;
tmp4 += 1;
_c1 = omc_Interactive_getBaseClassesFromElts(threadData, _elts, _env);
_c2 = omc_Interactive_getBaseClassesFromParts(threadData, _rest, _env);
tmpMeta1 = listAppend(_c1, _c2);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_elts = tmpMeta11;
_rest = tmpMeta10;
_env = tmp4_2;
_c1 = omc_Interactive_getBaseClassesFromElts(threadData, _elts, _env);
_c2 = omc_Interactive_getBaseClassesFromParts(threadData, _rest, _env);
tmpMeta1 = listAppend(_c1, _c2);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_rest = tmpMeta13;
_env = tmp4_2;
tmp4 += 1;
tmpMeta1 = omc_Interactive_getBaseClassesFromParts(threadData, _rest, _env);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentRefLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentRefLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getBaseClasses(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inEnv)
{
modelica_metatype _outAbsynComponentRefLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _env = NULL;
modelica_metatype _tp = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _envpath = NULL;
modelica_metatype _p1 = NULL;
modelica_string _tpname = NULL;
modelica_metatype _cref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
_env = tmp4_2;
tmp4 += 3;
tmpMeta1 = omc_Interactive_getBaseClassesFromParts(threadData, _parts, _env);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_baseClassName = tmpMeta9;
_parts = tmpMeta10;
_env = tmp4_2;
tmp4 += 2;
omc_Lookup_lookupClassIdent(threadData, omc_FCore_emptyCache(threadData), _env, _baseClassName, mmc_mk_some((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inClass), 10)))) ,NULL ,&_cenv);
tmpMeta11 = omc_FGraph_getScopePath(threadData, _cenv);
if (optionNone(tmpMeta11)) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
_envpath = tmpMeta12;
tmpMeta13 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _baseClassName);
_p1 = omc_AbsynUtil_joinPaths(threadData, _envpath, tmpMeta13);
_cref = omc_AbsynUtil_pathToCref(threadData, _p1);
_res = omc_Interactive_getBaseClassesFromParts(threadData, _parts, _env);
tmpMeta14 = mmc_mk_cons(_cref, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,1,4) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,0,2) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
_tp = tmpMeta17;
_env = tmp4_2;
omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _tp, mmc_mk_some((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inClass), 10)))) ,NULL ,&_cenv);
tmpMeta18 = omc_FGraph_getScopePath(threadData, _cenv);
if (optionNone(tmpMeta18)) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
_envpath = tmpMeta19;
_tpname = omc_AbsynUtil_pathLastIdent(threadData, _tp);
tmpMeta20 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _tpname);
_p1 = omc_AbsynUtil_joinPaths(threadData, _envpath, tmpMeta20);
_cref = omc_AbsynUtil_pathToCref(threadData, _p1);
tmpMeta21 = mmc_mk_cons(_cref, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,1,4) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,2) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
_tp = tmpMeta24;
_env = tmp4_2;
omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _tp, mmc_mk_some((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inClass), 10)))) ,NULL ,&_cenv);
tmpMeta25 = omc_FGraph_getScopePath(threadData, _cenv);
if (!optionNone(tmpMeta25)) goto goto_2;
_cref = omc_AbsynUtil_pathToCref(threadData, _tp);
tmpMeta26 = mmc_mk_cons(_cref, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta26;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta27;
tmpMeta27 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentRefLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentRefLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getTopQualifiedClassnames(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_string _id = NULL;
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _w = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmp4 += 2;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta11;
_rest = tmpMeta10;
_w = tmpMeta12;
tmpMeta13 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_p = omc_AbsynUtil_joinWithinPath(threadData, _w, tmpMeta13);
tmpMeta14 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
_res = omc_Interactive_getTopQualifiedClassnames(threadData, tmpMeta14);
tmpMeta15 = mmc_mk_cons(_p, _res);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmpMeta16);
tmpMeta18 = MMC_CDR(tmpMeta16);
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_rest = tmpMeta18;
_w = tmpMeta19;
tmpMeta20 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
tmpMeta1 = omc_Interactive_getTopQualifiedClassnames(threadData, tmpMeta20);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
DLLExport
modelica_metatype omc_Interactive_getTopClassnamesInProgram(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_metatype _res = NULL;
modelica_string _id = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _w = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmp4 += 2;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta11;
_rest = tmpMeta10;
_w = tmpMeta12;
tmpMeta13 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
_res = omc_Interactive_getTopClassnamesInProgram(threadData, tmpMeta13);
tmpMeta14 = mmc_mk_cons(_id, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta15)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_rest = tmpMeta17;
_w = tmpMeta18;
tmpMeta19 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
tmpMeta1 = omc_Interactive_getTopClassnamesInProgram(threadData, tmpMeta19);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
DLLExport
modelica_metatype omc_Interactive_getTopClassnames(threadData_t *threadData, modelica_metatype _p)
{
modelica_metatype _paths = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_paths = omc_List_map(threadData, omc_Interactive_getTopClassnamesInProgram(threadData, _p), boxvar_AbsynUtil_makeIdentPathFromString);
_return: OMC_LABEL_UNUSED
return _paths;
}
DLLExport
modelica_metatype omc_Interactive_getClassnamesInPath(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_boolean _inShowProtected, modelica_boolean _includeConstants)
{
modelica_metatype _paths = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
tmp4_3 = _inShowProtected;
tmp4_4 = _includeConstants;
{
modelica_metatype _cdef = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _p = NULL;
modelica_boolean _b;
modelica_boolean _c;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_modelpath = tmp4_1;
_p = tmp4_2;
_b = tmp4_3;
_c = tmp4_4;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta1 = omc_InteractiveUtil_getClassnamesInClass(threadData, _modelpath, _p, _cdef, _b, _c);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_paths = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _paths;
}
modelica_metatype boxptr_Interactive_getClassnamesInPath(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inShowProtected, modelica_metatype _includeConstants)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _paths = NULL;
tmp1 = mmc_unbox_integer(_inShowProtected);
tmp2 = mmc_unbox_integer(_includeConstants);
_paths = omc_Interactive_getClassnamesInPath(threadData, _inPath, _inProgram, tmp1, tmp2);
return _paths;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementItemLst;
{
modelica_metatype _res = NULL;
modelica_string _id = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,8,0) == 0) goto tmp3_end;
_id = tmpMeta12;
_rest = tmpMeta8;
_res = omc_Interactive_getPackagesInElts(threadData, _rest);
tmpMeta14 = mmc_mk_cons(_id, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_1);
tmpMeta16 = MMC_CDR(tmp4_1);
_rest = tmpMeta16;
tmpMeta1 = omc_Interactive_getPackagesInElts(threadData, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _l1 = NULL;
modelica_metatype _l2 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elts = tmpMeta9;
_rest = tmpMeta8;
tmp4 += 1;
_l1 = omc_Interactive_getPackagesInElts(threadData, _elts);
_l2 = omc_Interactive_getPackagesInParts(threadData, _rest);
tmpMeta1 = listAppend(_l1, _l2);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_elts = tmpMeta12;
_rest = tmpMeta11;
_l1 = omc_Interactive_getPackagesInElts(threadData, _elts);
_l2 = omc_Interactive_getPackagesInParts(threadData, _rest);
tmpMeta1 = listAppend(_l1, _l2);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_rest = tmpMeta14;
tmpMeta1 = omc_Interactive_getPackagesInParts(threadData, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getPackagesInClass(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _inClass)
{
modelica_metatype _outString = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _strlist = NULL;
modelica_metatype _parts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
_strlist = omc_Interactive_getPackagesInParts(threadData, _parts);
tmpMeta1 = omc_List_map(threadData, _strlist, boxvar_AbsynUtil_makeIdentPathFromString);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_parts = tmpMeta9;
_strlist = omc_Interactive_getPackagesInParts(threadData, _parts);
tmpMeta1 = omc_List_map(threadData, _strlist, boxvar_AbsynUtil_makeIdentPathFromString);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,4) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getTopPackagesInProgram(threadData_t *threadData, modelica_metatype _inProgram)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_metatype _res = NULL;
modelica_string _id = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _w = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmp4 += 2;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,8,0) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta11;
_rest = tmpMeta10;
_w = tmpMeta13;
tmpMeta14 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
_res = omc_Interactive_getTopPackagesInProgram(threadData, tmpMeta14);
tmpMeta15 = mmc_mk_cons(_id, _res);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmpMeta16);
tmpMeta18 = MMC_CDR(tmpMeta16);
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_rest = tmpMeta18;
_w = tmpMeta19;
tmpMeta20 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _rest, _w);
tmpMeta1 = omc_Interactive_getTopPackagesInProgram(threadData, tmpMeta20);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
DLLExport
modelica_metatype omc_Interactive_getTopPackages(threadData_t *threadData, modelica_metatype _p)
{
modelica_metatype _paths = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_paths = omc_List_map(threadData, omc_Interactive_getTopPackagesInProgram(threadData, _p), boxvar_AbsynUtil_makeIdentPathFromString);
_return: OMC_LABEL_UNUSED
return _paths;
}
DLLExport
modelica_metatype omc_Interactive_getPackagesInPath(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram)
{
modelica_metatype _paths = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_modelpath = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta1 = omc_Interactive_getPackagesInClass(threadData, _modelpath, _p, _cdef);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_paths = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _paths;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getIconAnnotation(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_modelpath = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp1 = omc_Interactive_getAnnotationInClass(threadData, _cdef, _OMC_LIT158, _p, _modelpath);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_filterIsVersionElement(threadData_t *threadData, modelica_metatype _eltArg)
{
modelica_boolean _b;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eltArg;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (7 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT159), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_b = tmp1;
_return: OMC_LABEL_UNUSED
return _b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_filterIsVersionElement(threadData_t *threadData, modelica_metatype _eltArg)
{
modelica_boolean _b;
modelica_metatype out_b;
_b = omc_Interactive_filterIsVersionElement(threadData, _eltArg);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_parseConversionAnnotationElement(threadData_t *threadData, modelica_metatype _mod, modelica_metatype *out_toVersion, modelica_metatype *out_scriptFilename)
{
modelica_metatype _fromVersion = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _toVersion = NULL;
modelica_metatype _scriptFilename = NULL;
modelica_metatype _args = NULL;
modelica_metatype _arg_mod = NULL;
modelica_string _name = NULL;
modelica_metatype _info = NULL;
modelica_metatype _exp = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_fromVersion = tmpMeta1;
_toVersion = mmc_mk_none();
_scriptFilename = mmc_mk_none();
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (15 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT171), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmpMeta8 = mmc_mk_cons(omc_AbsynUtil_expString(threadData, omc_AbsynUtil_stripCommentExpressions(threadData, omc_Interactive_getAnnotationExp(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_mod), 5)))))), MMC_REFSTRUCTLIT(mmc_nil));
_fromVersion = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (4 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT172), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_args = tmpMeta13;
{
modelica_metatype _arg;
for (tmpMeta14 = _args; !listEmpty(tmpMeta14); tmpMeta14=MMC_CDR(tmpMeta14))
{
_arg = MMC_CAR(tmpMeta14);
tmpMeta15 = _arg;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,6) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 7));
_name = tmpMeta17;
_arg_mod = tmpMeta18;
_info = tmpMeta19;
{
volatile modelica_string tmp22_1;
tmp22_1 = _name;
{
volatile mmc_switch_type tmp22;
int tmp23;
tmp22 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp21_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp22 < 4; tmp22++) {
switch (MMC_SWITCH_CAST(tmp22)) {
case 0: {
modelica_metatype tmpMeta24;
if (7 != MMC_STRLEN(tmp22_1) || strcmp(MMC_STRINGDATA(_OMC_LIT159), MMC_STRINGDATA(tmp22_1)) != 0) goto tmp21_end;
tmp22 += 2;
_exp = omc_AbsynUtil_stripCommentExpressions(threadData, omc_Interactive_getAnnotationExp(threadData, _arg_mod));
{
modelica_metatype tmp27_1;
tmp27_1 = _exp;
{
volatile mmc_switch_type tmp27;
int tmp28;
tmp27 = 0;
for (; tmp27 < 2; tmp27++) {
switch (MMC_SWITCH_CAST(tmp27)) {
case 0: {
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,3,1) == 0) goto tmp26_end;
tmpMeta29 = mmc_mk_cons((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 2))), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta24 = tmpMeta29;
goto tmp26_done;
}
case 1: {
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,13,1) == 0) goto tmp26_end;
{
modelica_metatype __omcQ_24tmpVar7;
modelica_metatype* tmp31;
modelica_metatype tmpMeta32;
modelica_string __omcQ_24tmpVar6;
modelica_integer tmp33;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 2)));
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar7 = tmpMeta32;
tmp31 = &__omcQ_24tmpVar7;
while(1) {
tmp33 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp33--;
}
if (tmp33 == 0) {
__omcQ_24tmpVar6 = omc_AbsynUtil_expString(threadData, _e);
*tmp31 = mmc_mk_cons(__omcQ_24tmpVar6,0);
tmp31 = &MMC_CDR(*tmp31);
} else if (tmp33 == 1) {
break;
} else {
goto goto_25;
}
}
*tmp31 = mmc_mk_nil();
tmpMeta30 = __omcQ_24tmpVar7;
}
tmpMeta24 = tmpMeta30;
goto tmp26_done;
}
}
goto tmp26_end;
tmp26_end: ;
}
goto goto_25;
goto_25:;
goto goto_20;
goto tmp26_done;
tmp26_done:;
}
}
_fromVersion = tmpMeta24;
goto tmp21_done;
}
case 1: {
if (2 != MMC_STRLEN(tmp22_1) || strcmp(MMC_STRINGDATA(_OMC_LIT166), MMC_STRINGDATA(tmp22_1)) != 0) goto tmp21_end;
tmp22 += 1;
_toVersion = mmc_mk_some(omc_AbsynUtil_expString(threadData, omc_AbsynUtil_stripCommentExpressions(threadData, omc_Interactive_getAnnotationExp(threadData, _arg_mod))));
goto tmp21_done;
}
case 2: {
if (6 != MMC_STRLEN(tmp22_1) || strcmp(MMC_STRINGDATA(_OMC_LIT167), MMC_STRINGDATA(tmp22_1)) != 0) goto tmp21_end;
_scriptFilename = mmc_mk_some(omc_AbsynUtil_expString(threadData, omc_AbsynUtil_stripCommentExpressions(threadData, omc_Interactive_getAnnotationExp(threadData, _arg_mod))));
goto tmp21_done;
}
case 3: {
modelica_metatype tmpMeta34;
if((!omc_Util_stringStartsWith(threadData, _name, _OMC_LIT165)))
{
tmpMeta34 = mmc_mk_cons(_name, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT164, tmpMeta34, _info);
}
goto tmp21_done;
}
}
goto tmp21_end;
tmp21_end: ;
}
goto goto_20;
tmp21_done:
(void)tmp22;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp21_done2;
goto_20:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp22 < 4) {
goto tmp21_top;
}
goto goto_2;
tmp21_done2:;
}
}
;
if(listEmpty(_fromVersion))
{
tmpMeta35 = _mod;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,0,6) == 0) goto goto_2;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 7));
_info = tmpMeta36;
tmpMeta37 = mmc_mk_cons(omc_Dump_unparseElementArgStr(threadData, _mod), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT170, tmpMeta37, _info);
}
}
}
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta39,1,1) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 2));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_name = tmpMeta40;
_info = tmpMeta41;
if((!omc_Util_stringStartsWith(threadData, _name, _OMC_LIT165)))
{
tmpMeta42 = mmc_mk_cons(_name, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT164, tmpMeta42, _info);
}
goto tmp3_done;
}
case 3: {
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_toVersion) { *out_toVersion = _toVersion; }
if (out_scriptFilename) { *out_scriptFilename = _scriptFilename; }
return _fromVersion;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConversionsInClassMod(threadData_t *threadData, modelica_metatype _mod)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _args = NULL;
modelica_metatype _from = NULL;
modelica_metatype _to = NULL;
modelica_metatype _script = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta1;
tmpMeta2 = _mod;
if (optionNone(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
_args = tmpMeta4;
{
modelica_metatype _arg;
for (tmpMeta5 = _args; !listEmpty(tmpMeta5); tmpMeta5=MMC_CDR(tmpMeta5))
{
_arg = MMC_CAR(tmpMeta5);
_from = omc_Interactive_parseConversionAnnotationElement(threadData, _arg ,&_to ,&_script);
{
modelica_metatype _v;
for (tmpMeta6 = _from; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
{
_v = MMC_CAR(tmpMeta6);
tmpMeta8 = mmc_mk_box3(0, _v, _to, _script);
tmpMeta7 = mmc_mk_cons(tmpMeta8, _res);
_res = tmpMeta7;
}
}
}
}
_return: OMC_LABEL_UNUSED
return _res;
}
DLLExport
modelica_metatype omc_Interactive_getConversionsInClass(threadData_t *threadData, modelica_metatype _cls)
{
modelica_metatype _result = NULL;
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_res = omc_AbsynUtil_getNamedAnnotationInClass(threadData, _cls, _OMC_LIT174, boxvar_Interactive_getConversionsInClassMod);
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_result = omc_Util_getOptionOrDefault(threadData, _res, tmpMeta1);
_return: OMC_LABEL_UNUSED
return _result;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getConversionAnnotationString(threadData_t *threadData, modelica_metatype _mod)
{
modelica_metatype _result = NULL;
modelica_metatype _args = NULL;
modelica_metatype _without = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _with = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _from = NULL;
modelica_metatype _script = NULL;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_without = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_with = tmpMeta2;
tmpMeta3 = _mod;
if (optionNone(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 1));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
_args = tmpMeta5;
{
modelica_metatype _arg;
for (tmpMeta6 = _args; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
{
_arg = MMC_CAR(tmpMeta6);
_from = omc_Interactive_parseConversionAnnotationElement(threadData, _arg ,NULL ,&_script);
if(isNone(_script))
{
_without = omc_List_append__reverse(threadData, _from, _without);
}
else
{
_with = omc_List_append__reverse(threadData, _from, _with);
}
}
}
tmpMeta8 = mmc_mk_box2(0, listReverse(_without), listReverse(_with));
_result = tmpMeta8;
_return: OMC_LABEL_UNUSED
return _result;
}
DLLExport
modelica_metatype omc_Interactive_getConversionAnnotation(threadData_t *threadData, modelica_metatype _cls, modelica_metatype *out_withConversion)
{
modelica_metatype _withoutConversion = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _withConversion = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _opt_conversion = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_withoutConversion = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_withConversion = tmpMeta2;
_opt_conversion = omc_AbsynUtil_getNamedAnnotationInClass(threadData, _cls, _OMC_LIT174, boxvar_Interactive_getConversionAnnotationString);
{
modelica_metatype tmp6_1;
tmp6_1 = _opt_conversion;
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
for (; tmp6 < 2; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (optionNone(tmp6_1)) goto tmp5_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_withoutConversion = tmpMeta9;
_withConversion = tmpMeta10;
tmpMeta[0+0] = _withoutConversion;
tmpMeta[0+1] = _withConversion;
goto tmp5_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta11;
tmpMeta[0+1] = tmpMeta12;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_withoutConversion = tmpMeta[0+0];
_withConversion = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_withConversion) { *out_withConversion = _withConversion; }
return _withoutConversion;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_updateUsedVersion_make__version__exp(threadData_t *threadData, modelica_metatype _exp, modelica_string _version)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_box2(6, &Absyn_Exp_STRING__desc, _version);
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
static modelica_metatype closure8_Interactive_updateUsedVersion_make__version__exp(threadData_t *thData, modelica_metatype closure, modelica_metatype exp)
{
modelica_string version = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
return boxptr_Interactive_updateUsedVersion_make__version__exp(thData, exp, version);
}
DLLExport
modelica_metatype omc_Interactive_updateUsedVersion(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcls, modelica_metatype _library, modelica_string _newVersion)
{
modelica_metatype _cls = NULL;
modelica_metatype _opt_ann = NULL;
modelica_metatype _ann = NULL;
modelica_boolean _found;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cls = __omcQ_24in_5Fcls;
_opt_ann = omc_AbsynUtil_getClassAnnotation(threadData, _cls);
if(isNone(_opt_ann))
{
goto _return;
}
tmpMeta1 = _opt_ann;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
_ann = tmpMeta2;
tmpMeta3 = mmc_mk_box1(0, _newVersion);
_ann = omc_AbsynUtil_mapAnnotationBinding(threadData, _ann, omc_AbsynUtil_prefixPath(threadData, _OMC_LIT175, omc_AbsynUtil_joinPaths(threadData, _library, _OMC_LIT176)), (modelica_fnptr) mmc_mk_box2(0,closure8_Interactive_updateUsedVersion_make__version__exp,tmpMeta3) ,&_found);
if(_found)
{
_cls = omc_AbsynUtil_setClassAnnotation(threadData, _cls, mmc_mk_some(_ann));
}
_return: OMC_LABEL_UNUSED
return _cls;
}
DLLExport
modelica_metatype omc_Interactive_getUsedVersion(threadData_t *threadData, modelica_metatype _cls, modelica_metatype _library)
{
modelica_metatype _version = NULL;
modelica_metatype _uses = NULL;
modelica_metatype _lib = NULL;
modelica_metatype _versions = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_version = mmc_mk_none();
tmpMeta1 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta2 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta1, _OMC_LIT177);
_uses = omc_Interactive_getUsesAnnotationOrDefault(threadData, tmpMeta2, 1);
{
modelica_metatype _u;
for (tmpMeta3 = _uses; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_u = MMC_CAR(tmpMeta3);
tmpMeta4 = _u;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 1));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 3));
_lib = tmpMeta5;
_versions = tmpMeta6;
if(omc_AbsynUtil_pathEqual(threadData, _library, _lib))
{
if((!listEmpty(_versions)))
{
_version = mmc_mk_some(listHead(_versions));
goto _return;
}
}
}
}
_return: OMC_LABEL_UNUSED
return _version;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getUsesAnnotationString2(threadData_t *threadData, modelica_metatype _eltArgs, modelica_string _classOrigin)
{
modelica_metatype _strs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _eltArgs;
{
modelica_metatype _xs = NULL;
modelica_string _name = NULL;
modelica_string _version = NULL;
modelica_metatype _ss = NULL;
modelica_metatype _info = NULL;
modelica_metatype _omod = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_string tmp20 = 0;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,0,6) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (7 != MMC_STRLEN(tmpMeta17) || strcmp(MMC_STRINGDATA(_OMC_LIT159), MMC_STRINGDATA(tmpMeta17)) != 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
if (!listEmpty(tmpMeta15)) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 7));
_name = tmpMeta10;
_omod = tmpMeta18;
_info = tmpMeta19;
_xs = tmpMeta8;
{
modelica_metatype tmp23_1;
tmp23_1 = _omod;
{
volatile mmc_switch_type tmp23;
int tmp24;
tmp23 = 0;
for (; tmp23 < 3; tmp23++) {
switch (MMC_SWITCH_CAST(tmp23)) {
case 0: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (optionNone(tmp23_1)) goto tmp22_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp23_1), 1));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,1,2) == 0) goto tmp22_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,24,3) == 0) goto tmp22_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,3,1) == 0) goto tmp22_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
_version = tmpMeta29;
tmp20 = _version;
goto tmp22_done;
}
case 1: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (optionNone(tmp23_1)) goto tmp22_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp23_1), 1));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,1,2) == 0) goto tmp22_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,3,1) == 0) goto tmp22_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
_version = tmpMeta33;
tmp20 = _version;
goto tmp22_done;
}
case 2: {
modelica_metatype tmpMeta34;
tmpMeta34 = mmc_mk_cons(_name, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT180, tmpMeta34, _info);
tmp20 = _OMC_LIT181;
goto tmp22_done;
}
}
goto tmp22_end;
tmp22_end: ;
}
goto goto_21;
goto_21:;
goto goto_2;
goto tmp22_done;
tmp22_done:;
}
}
_version = tmp20;
_ss = omc_Interactive_getUsesAnnotationString2(threadData, _xs, _classOrigin);
tmpMeta36 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _name);
tmpMeta37 = mmc_mk_cons(_version, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta38 = mmc_mk_box4(0, tmpMeta36, _classOrigin, tmpMeta37, mmc_mk_boolean(0));
tmpMeta35 = mmc_mk_cons(tmpMeta38, _ss);
tmpMeta1 = tmpMeta35;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta39 = MMC_CAR(tmp4_1);
tmpMeta40 = MMC_CDR(tmp4_1);
_xs = tmpMeta40;
_eltArgs = _xs;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_strs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _strs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getUsesAnnotationString(threadData_t *threadData, modelica_metatype _mod, modelica_string _classOrigin)
{
modelica_metatype _usesStr = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _arglst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_arglst = tmpMeta7;
tmpMeta1 = omc_Interactive_getUsesAnnotationString2(threadData, _arglst, _classOrigin);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_usesStr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _usesStr;
}
DLLExport
modelica_metatype omc_Interactive_getUsesAnnotationOrDefault(threadData_t *threadData, modelica_metatype _p, modelica_boolean _requireExactVersion)
{
modelica_metatype _usesStr = NULL;
modelica_metatype _paths = NULL;
modelica_metatype _strs = NULL;
modelica_metatype _fromVersions = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_usesStr = omc_Interactive_getUsesAnnotation(threadData, _p);
_paths = omc_List_map(threadData, _usesStr, boxvar_Util_tuple41);
_fromVersions = omc_List_map(threadData, _usesStr, boxvar_Util_tuple42);
_strs = omc_List_map(threadData, _usesStr, boxvar_Util_tuple43);
if((!_requireExactVersion))
{
_strs = omc_List_map1(threadData, _strs, boxvar_listAppend, _OMC_LIT182);
}
{
modelica_metatype __omcQ_24tmpVar9;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype __omcQ_24tmpVar8;
modelica_integer tmp5;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
modelica_metatype _f_loopVar = 0;
modelica_metatype _f;
modelica_metatype _s_loopVar = 0;
modelica_metatype _s;
_p_loopVar = _paths;
_f_loopVar = _fromVersions;
_s_loopVar = _strs;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar9 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar9;
while(1) {
tmp5 = 3;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp5--;
}if (!listEmpty(_f_loopVar)) {
_f = MMC_CAR(_f_loopVar);
_f_loopVar = MMC_CDR(_f_loopVar);
tmp5--;
}if (!listEmpty(_s_loopVar)) {
_s = MMC_CAR(_s_loopVar);
_s_loopVar = MMC_CDR(_s_loopVar);
tmp5--;
}
if (tmp5 == 0) {
tmpMeta4 = mmc_mk_box4(0, _p, _f, _s, mmc_mk_boolean(0));
__omcQ_24tmpVar8 = tmpMeta4;
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar8,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp5 == 3) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar9;
}
_usesStr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _usesStr;
}
modelica_metatype boxptr_Interactive_getUsesAnnotationOrDefault(threadData_t *threadData, modelica_metatype _p, modelica_metatype _requireExactVersion)
{
modelica_integer tmp1;
modelica_metatype _usesStr = NULL;
tmp1 = mmc_unbox_integer(_requireExactVersion);
_usesStr = omc_Interactive_getUsesAnnotationOrDefault(threadData, _p, tmp1);
return _usesStr;
}
static modelica_metatype closure9_Interactive_getUsesAnnotationString(threadData_t *thData, modelica_metatype closure, modelica_metatype mod)
{
modelica_string classOrigin = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
return boxptr_Interactive_getUsesAnnotationString(thData, mod, classOrigin);
}
DLLExport
modelica_metatype omc_Interactive_getUsesAnnotation(threadData_t *threadData, modelica_metatype _program)
{
modelica_metatype _outUses = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _opt_uses = NULL;
modelica_metatype _uses = NULL;
modelica_metatype _classes = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outUses = tmpMeta1;
tmpMeta2 = _program;
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
_classes = tmpMeta3;
{
modelica_metatype _cls;
for (tmpMeta4 = _classes; !listEmpty(tmpMeta4); tmpMeta4=MMC_CDR(tmpMeta4))
{
_cls = MMC_CAR(tmpMeta4);
tmpMeta5 = mmc_mk_box1(0, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_cls), 2))));
_opt_uses = omc_AbsynUtil_getNamedAnnotationInClass(threadData, _cls, _OMC_LIT183, (modelica_fnptr) mmc_mk_box2(0,closure9_Interactive_getUsesAnnotationString,tmpMeta5));
if(isSome(_opt_uses))
{
tmpMeta6 = _opt_uses;
if (optionNone(tmpMeta6)) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_uses = tmpMeta7;
_outUses = listAppend(_uses, _outUses);
}
}
}
_return: OMC_LABEL_UNUSED
return _outUses;
}
DLLExport
modelica_metatype omc_Interactive_getNamedAnnotation(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram, modelica_metatype _id, modelica_metatype _default, modelica_fnptr _f)
{
modelica_metatype _outString = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
tmp4_3 = _default;
{
modelica_metatype _cdef = NULL;
modelica_metatype _str = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_modelpath = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta6 = omc_AbsynUtil_getNamedAnnotationInClass(threadData, _cdef, _id, ((modelica_fnptr) _f));
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_str = tmpMeta7;
tmpMeta1 = _str;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
if (optionNone(tmp4_3)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 1));
_str = tmpMeta8;
tmpMeta1 = _str;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDiagramAnnotation(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _modelpath = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_modelpath = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp1 = omc_Interactive_getAnnotationInClass(threadData, _cdef, _OMC_LIT184, _p, _modelpath);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectorIconAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inModelPath;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_modelpath = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _n ,&_tp);
tmp1 = omc_Interactive_getIconAnnotation(threadData, _tp, _p);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectorIconAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthConnectorIconAnnotation(threadData, _inModelPath, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnector(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inModelPath;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _cdef = NULL;
modelica_string _str = NULL;
modelica_string _tpstr = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_modelpath = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_str = omc_Interactive_getNthPublicConnectorStr(threadData, _modelpath, _cdef, _p, _n ,&_tp);
_tpstr = omc_AbsynUtil_pathString(threadData, _tp, _OMC_LIT93, 1, 0);
tmpMeta6 = mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_tpstr, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnector(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthConnector(threadData, _inModelPath, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getConnectorCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_integer _count;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_model_ = tmp4_1;
_p = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_count = omc_Interactive_countPublicConnectors(threadData, _modelpath, _p, _cdef);
tmp1 = intString(_count);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthConnectionAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inModelPath;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _citem = NULL;
modelica_string _s1 = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_modelpath = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_citem = listGet(omc_Interactive_getConnections(threadData, _cdef), _n);
_s1 = omc_Interactive_getConnectionAnnotationStr(threadData, _citem, _cdef, _p, _modelpath);
tmpMeta6 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthConnectionAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthConnectionAnnotation(threadData, _inModelPath, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInEquations(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4)
{
modelica_metatype _outAbsynEquationItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_string tmp4_4;
tmp4_1 = _inAbsynEquationItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inString4;
{
modelica_metatype _eqcmt_1 = NULL;
modelica_metatype _eqcmt = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _es = NULL;
modelica_metatype _es_1 = NULL;
modelica_string _cmt = NULL;
modelica_metatype _e = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_c1 = tmpMeta9;
_c2 = tmpMeta10;
_eqcmt = tmpMeta11;
_info = tmpMeta12;
_es = tmpMeta7;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
tmp13 = omc_AbsynUtil_crefEqual(threadData, _cr1, _c1);
if (1 != tmp13) goto goto_2;
tmp14 = omc_AbsynUtil_crefEqual(threadData, _cr2, _c2);
if (1 != tmp14) goto goto_2;
_eqcmt_1 = omc_Interactive_setClassCommentInCommentOpt(threadData, _eqcmt, _cmt);
tmpMeta16 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _c1, _c2);
tmpMeta17 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta16, _eqcmt_1, _info);
tmpMeta15 = mmc_mk_cons(tmpMeta17, _es);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmp4_1);
tmpMeta19 = MMC_CDR(tmp4_1);
_e = tmpMeta18;
_es = tmpMeta19;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_es_1 = omc_Interactive_setConnectionCommentInEquations(threadData, _es, _cr1, _cr2, _cmt);
tmpMeta20 = mmc_mk_cons(_e, _es_1);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynEquationItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynEquationItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_string tmp4_4;
tmp4_1 = _inAbsynClassPartLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inString4;
{
modelica_metatype _e_1 = NULL;
modelica_metatype _e = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _xs_1 = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_string _cmt = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_e = tmpMeta8;
_xs = tmpMeta7;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_e_1 = omc_Interactive_setConnectionCommentInEquations(threadData, _e, _cr1, _cr2, _cmt);
tmpMeta10 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, _e_1);
tmpMeta9 = mmc_mk_cons(tmpMeta10, _xs);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,3,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_e = tmpMeta13;
_xs = tmpMeta12;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_xs_1 = omc_Interactive_setConnectionCommentInParts(threadData, _xs, _cr1, _cr2, _cmt);
tmpMeta15 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, _e);
tmpMeta14 = mmc_mk_cons(tmpMeta15, _xs_1);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
_p = tmpMeta16;
_xs = tmpMeta17;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_xs_1 = omc_Interactive_setConnectionCommentInParts(threadData, _xs, _cr1, _cr2, _cmt);
tmpMeta18 = mmc_mk_cons(_p, _xs_1);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionCommentInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_string tmp4_4;
tmp4_1 = _inClass1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inString4;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _cmt = NULL;
modelica_string _bcname = NULL;
modelica_metatype _pcmt = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_pcmt = tmpMeta11;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_parts_1 = omc_Interactive_setConnectionCommentInParts(threadData, _parts, _cr1, _cr2, _cmt);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _pcmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_pcmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_parts_1 = omc_Interactive_setConnectionCommentInParts(threadData, _parts, _cr1, _cr2, _cmt);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _pcmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setConnectionComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_string _inString4, modelica_metatype _inProgram5, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_string tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inString4;
tmp4_5 = _inProgram5;
{
modelica_metatype _p_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_string _cmt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_class_ = tmp4_1;
_cr1 = tmp4_2;
_cr2 = tmp4_3;
_cmt = tmp4_4;
_p = tmp4_5;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_cdef_1 = omc_Interactive_setConnectionCommentInClass(threadData, _cdef, _cr1, _cr2, _cmt);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmpMeta[0+0] = _newp;
tmp1_c1 = _OMC_LIT60;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inProgram5;
tmp1_c1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inComponentRef, modelica_string _inString)
{
modelica_metatype _outAbsynComponentItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_string tmp4_3;
tmp4_1 = _inAbsynComponentItemLst;
tmp4_2 = _inComponentRef;
tmp4_3 = _inString;
{
modelica_metatype _compcmt_1 = NULL;
modelica_metatype _compcmt = NULL;
modelica_string _id = NULL;
modelica_string _cmt = NULL;
modelica_metatype _ad = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _cs = NULL;
modelica_metatype _cs_1 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _c = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_id = tmpMeta9;
_ad = tmpMeta10;
_mod = tmpMeta11;
_cond = tmpMeta12;
_compcmt = tmpMeta13;
_cs = tmpMeta7;
_cr = tmp4_2;
_cmt = tmp4_3;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, tmpMeta14);
tmp16 = omc_AbsynUtil_crefEqual(threadData, tmpMeta15, _cr);
if (1 != tmp16) goto goto_2;
_compcmt_1 = omc_Interactive_setClassCommentInCommentOpt(threadData, _compcmt, _cmt);
tmpMeta18 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _id, _ad, _mod);
tmpMeta19 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta18, _cond, _compcmt_1);
tmpMeta17 = mmc_mk_cons(tmpMeta19, _cs);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_c = tmpMeta20;
_cs = tmpMeta21;
_cr = tmp4_2;
_cmt = tmp4_3;
_cs_1 = omc_Interactive_setComponentCommentInCompitems(threadData, _cs, _cr, _cmt);
tmpMeta22 = mmc_mk_cons(_c, _cs_1);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inComponentRef, modelica_string _inString)
{
modelica_metatype _outElementSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
tmp4_1 = _inElementSpec;
tmp4_2 = _inComponentRef;
tmp4_3 = _inString;
{
modelica_metatype _citems_1 = NULL;
modelica_metatype _citems = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _cr = NULL;
modelica_string _cmt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_attr = tmpMeta6;
_tp = tmpMeta7;
_citems = tmpMeta8;
_cr = tmp4_2;
_cmt = tmp4_3;
_citems_1 = omc_Interactive_setComponentCommentInCompitems(threadData, _citems, _cr, _cmt);
tmpMeta9 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr, _tp, _citems_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElementSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponentRef, modelica_string _inString)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_string tmp4_3;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inComponentRef;
tmp4_3 = _inString;
{
modelica_metatype _spec_1 = NULL;
modelica_metatype _spec = NULL;
modelica_boolean _f;
modelica_metatype _r = NULL;
modelica_metatype _inout = NULL;
modelica_string _cmt = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
modelica_metatype _es = NULL;
modelica_metatype _es_1 = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 6));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 7));
_f = tmp10;
_r = tmpMeta11;
_inout = tmpMeta12;
_spec = tmpMeta13;
_info = tmpMeta14;
_constr = tmpMeta15;
_es = tmpMeta7;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_spec_1 = omc_Interactive_setComponentCommentInElementspec(threadData, _spec, _cr1, _cmt);
tmpMeta17 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_f), _r, _inout, _spec_1, _info, _constr);
tmpMeta18 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, tmpMeta17);
tmpMeta16 = mmc_mk_cons(tmpMeta18, _es);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_1);
tmpMeta20 = MMC_CDR(tmp4_1);
_e = tmpMeta19;
_es = tmpMeta20;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_es_1 = omc_Interactive_setComponentCommentInElementitems(threadData, _es, _cr1, _cmt);
tmpMeta21 = mmc_mk_cons(_e, _es_1);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponentRef, modelica_string _inString)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_string tmp4_3;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inComponentRef;
tmp4_3 = _inString;
{
modelica_metatype _elts_1 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _e = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _xs_1 = NULL;
modelica_metatype _cr1 = NULL;
modelica_string _cmt = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elts = tmpMeta8;
_xs = tmpMeta7;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_elts_1 = omc_Interactive_setComponentCommentInElementitems(threadData, _elts, _cr1, _cmt);
tmpMeta10 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elts_1);
tmpMeta9 = mmc_mk_cons(tmpMeta10, _xs);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_e = tmpMeta13;
_xs = tmpMeta12;
_cr1 = tmp4_2;
_cmt = tmp4_3;
tmp4 += 2;
_xs_1 = omc_Interactive_setComponentCommentInParts(threadData, _xs, _cr1, _cmt);
tmpMeta15 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _e);
tmpMeta14 = mmc_mk_cons(tmpMeta15, _xs_1);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
_elts = tmpMeta18;
_xs = tmpMeta17;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_elts_1 = omc_Interactive_setComponentCommentInElementitems(threadData, _elts, _cr1, _cmt);
tmpMeta20 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elts_1);
tmpMeta19 = mmc_mk_cons(tmpMeta20, _xs);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmp4_1);
tmpMeta22 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,1,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
_e = tmpMeta23;
_xs = tmpMeta22;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_xs_1 = omc_Interactive_setComponentCommentInParts(threadData, _xs, _cr1, _cmt);
tmpMeta25 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _e);
tmpMeta24 = mmc_mk_cons(tmpMeta25, _xs_1);
tmpMeta1 = tmpMeta24;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta26 = MMC_CAR(tmp4_1);
tmpMeta27 = MMC_CDR(tmp4_1);
_p = tmpMeta26;
_xs = tmpMeta27;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_xs_1 = omc_Interactive_setComponentCommentInParts(threadData, _xs, _cr1, _cmt);
tmpMeta28 = mmc_mk_cons(_p, _xs_1);
tmpMeta1 = tmpMeta28;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentRef, modelica_string _inString)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
tmp4_1 = _inClass;
tmp4_2 = _inComponentRef;
tmp4_3 = _inString;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _cmt = NULL;
modelica_string _bcname = NULL;
modelica_metatype _pcmt = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_pcmt = tmpMeta11;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_parts_1 = omc_Interactive_setComponentCommentInParts(threadData, _parts, _cr1, _cmt);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _pcmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_pcmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_parts_1 = omc_Interactive_setComponentCommentInParts(threadData, _parts, _cr1, _cmt);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _pcmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_setComponentComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_string _inString3, modelica_metatype _inProgram4, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_string tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inString3;
tmp4_4 = _inProgram4;
{
modelica_metatype _p_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _cr1 = NULL;
modelica_string _cmt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_class_ = tmp4_1;
_cr1 = tmp4_2;
_cmt = tmp4_3;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_cdef_1 = omc_Interactive_setComponentCommentInClass(threadData, _cdef, _cr1, _cmt);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = _inProgram4;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inComponentRef)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynComponentItemLst;
tmp4_2 = _inComponentRef;
{
modelica_metatype _compcmt = NULL;
modelica_string _id = NULL;
modelica_metatype _ad = NULL;
modelica_metatype _cs = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_id = tmpMeta9;
_ad = tmpMeta10;
_compcmt = tmpMeta11;
_cr = tmp4_2;
tmpMeta12 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, _ad);
tmp13 = omc_AbsynUtil_crefEqual(threadData, tmpMeta12, _cr);
if (1 != tmp13) goto goto_2;
tmp1 = omc_InteractiveUtil_getClassCommentInCommentOpt(threadData, _compcmt);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
_cs = tmpMeta15;
_cr = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInCompitems(threadData, _cs, _cr);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inComponentRef)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inElementSpec;
tmp4_2 = _inComponentRef;
{
modelica_metatype _citems = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_citems = tmpMeta6;
_cr = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInCompitems(threadData, _citems, _cr);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponentRef)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inComponentRef;
{
modelica_metatype _spec = NULL;
modelica_metatype _es = NULL;
modelica_metatype _cr1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_spec = tmpMeta9;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInElementspec(threadData, _spec, _cr1);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
_es = tmpMeta11;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInElementitems(threadData, _es, _cr1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponentRef)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inComponentRef;
{
modelica_metatype _elts = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _cr1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elts = tmpMeta8;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInElementitems(threadData, _elts, _cr1);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto tmp3_end;
_xs = tmpMeta10;
_cr1 = tmp4_2;
tmp4 += 2;
tmp1 = omc_Interactive_getComponentCommentInParts(threadData, _xs, _cr1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_elts = tmpMeta13;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInElementitems(threadData, _elts, _cr1);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,1,1) == 0) goto tmp3_end;
_xs = tmpMeta15;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInParts(threadData, _xs, _cr1);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
_xs = tmpMeta17;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInParts(threadData, _xs, _cr1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentRef)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inComponentRef;
{
modelica_metatype _parts = NULL;
modelica_metatype _cr1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInParts(threadData, _parts, _cr1);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_parts = tmpMeta9;
_cr1 = tmp4_2;
tmp1 = omc_Interactive_getComponentCommentInParts(threadData, _parts, _cr1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentComment(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inProgram4)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inProgram4;
{
modelica_metatype _p_class = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _cr1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_class_ = tmp4_1;
_cr1 = tmp4_2;
_p = tmp4_3;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
tmp1 = omc_Interactive_getComponentCommentInClass(threadData, _cdef, _cr1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_compareTransitionFuncArgs(threadData_t *threadData, modelica_metatype _args, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority)
{
modelica_boolean _b;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_string tmp4_3;volatile modelica_string tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_integer tmp4_8;
tmp4_1 = _args;
tmp4_2 = _from;
tmp4_3 = _to;
tmp4_4 = _condition;
tmp4_5 = _immediate;
tmp4_6 = _reset;
tmp4_7 = _synchronize;
tmp4_8 = _priority;
{
modelica_string _from1 = NULL;
modelica_string _to1 = NULL;
modelica_string _condition1 = NULL;
modelica_string _immediate1 = NULL;
modelica_string _reset1 = NULL;
modelica_string _synchronize1 = NULL;
modelica_string _priority1 = NULL;
modelica_string _from2 = NULL;
modelica_string _to2 = NULL;
modelica_string _condition2 = NULL;
modelica_boolean _immediate2;
modelica_boolean _reset2;
modelica_boolean _synchronize2;
modelica_integer _priority2;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
if (!listEmpty(tmpMeta11)) goto tmp3_end;
_from1 = tmpMeta6;
_to1 = tmpMeta8;
_condition1 = tmpMeta10;
_from2 = tmp4_2;
_to2 = tmp4_3;
_condition2 = tmp4_4;
tmp4 += 4;
if (!(((stringEqual(_from1, _from2)) && (stringEqual(_to1, _to2))) && (stringEqual(_condition1, _condition2)))) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (listEmpty(tmpMeta15)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (listEmpty(tmpMeta17)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmpMeta17);
tmpMeta19 = MMC_CDR(tmpMeta17);
if (!listEmpty(tmpMeta19)) goto tmp3_end;
_from1 = tmpMeta12;
_to1 = tmpMeta14;
_condition1 = tmpMeta16;
_immediate1 = tmpMeta18;
_from2 = tmp4_2;
_to2 = tmp4_3;
_condition2 = tmp4_4;
_immediate2 = tmp4_5;
tmp4 += 3;
if (!((((stringEqual(_from1, _from2)) && (stringEqual(_to1, _to2))) && (stringEqual(_condition1, _condition2))) && (stringEqual(_immediate1, (_immediate2?_OMC_LIT127:_OMC_LIT128))))) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmpMeta21);
tmpMeta23 = MMC_CDR(tmpMeta21);
if (listEmpty(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmpMeta23);
tmpMeta25 = MMC_CDR(tmpMeta23);
if (listEmpty(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_CAR(tmpMeta25);
tmpMeta27 = MMC_CDR(tmpMeta25);
if (listEmpty(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
if (!listEmpty(tmpMeta29)) goto tmp3_end;
_from1 = tmpMeta20;
_to1 = tmpMeta22;
_condition1 = tmpMeta24;
_immediate1 = tmpMeta26;
_reset1 = tmpMeta28;
_from2 = tmp4_2;
_to2 = tmp4_3;
_condition2 = tmp4_4;
_immediate2 = tmp4_5;
_reset2 = tmp4_6;
tmp4 += 2;
if (!(((((stringEqual(_from1, _from2)) && (stringEqual(_to1, _to2))) && (stringEqual(_condition1, _condition2))) && (stringEqual(_immediate1, (_immediate2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_reset1, (_reset2?_OMC_LIT127:_OMC_LIT128))))) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmp4_1);
tmpMeta31 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta31)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (listEmpty(tmpMeta33)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmpMeta33);
tmpMeta35 = MMC_CDR(tmpMeta33);
if (listEmpty(tmpMeta35)) goto tmp3_end;
tmpMeta36 = MMC_CAR(tmpMeta35);
tmpMeta37 = MMC_CDR(tmpMeta35);
if (listEmpty(tmpMeta37)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmpMeta37);
tmpMeta39 = MMC_CDR(tmpMeta37);
if (listEmpty(tmpMeta39)) goto tmp3_end;
tmpMeta40 = MMC_CAR(tmpMeta39);
tmpMeta41 = MMC_CDR(tmpMeta39);
if (!listEmpty(tmpMeta41)) goto tmp3_end;
_from1 = tmpMeta30;
_to1 = tmpMeta32;
_condition1 = tmpMeta34;
_immediate1 = tmpMeta36;
_reset1 = tmpMeta38;
_synchronize1 = tmpMeta40;
_from2 = tmp4_2;
_to2 = tmp4_3;
_condition2 = tmp4_4;
_immediate2 = tmp4_5;
_reset2 = tmp4_6;
_synchronize2 = tmp4_7;
tmp4 += 1;
if (!((((((stringEqual(_from1, _from2)) && (stringEqual(_to1, _to2))) && (stringEqual(_condition1, _condition2))) && (stringEqual(_immediate1, (_immediate2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_reset1, (_reset2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_synchronize1, (_synchronize2?_OMC_LIT127:_OMC_LIT128))))) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta42 = MMC_CAR(tmp4_1);
tmpMeta43 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta43)) goto tmp3_end;
tmpMeta44 = MMC_CAR(tmpMeta43);
tmpMeta45 = MMC_CDR(tmpMeta43);
if (listEmpty(tmpMeta45)) goto tmp3_end;
tmpMeta46 = MMC_CAR(tmpMeta45);
tmpMeta47 = MMC_CDR(tmpMeta45);
if (listEmpty(tmpMeta47)) goto tmp3_end;
tmpMeta48 = MMC_CAR(tmpMeta47);
tmpMeta49 = MMC_CDR(tmpMeta47);
if (listEmpty(tmpMeta49)) goto tmp3_end;
tmpMeta50 = MMC_CAR(tmpMeta49);
tmpMeta51 = MMC_CDR(tmpMeta49);
if (listEmpty(tmpMeta51)) goto tmp3_end;
tmpMeta52 = MMC_CAR(tmpMeta51);
tmpMeta53 = MMC_CDR(tmpMeta51);
if (listEmpty(tmpMeta53)) goto tmp3_end;
tmpMeta54 = MMC_CAR(tmpMeta53);
tmpMeta55 = MMC_CDR(tmpMeta53);
if (!listEmpty(tmpMeta55)) goto tmp3_end;
_from1 = tmpMeta42;
_to1 = tmpMeta44;
_condition1 = tmpMeta46;
_immediate1 = tmpMeta48;
_reset1 = tmpMeta50;
_synchronize1 = tmpMeta52;
_priority1 = tmpMeta54;
_from2 = tmp4_2;
_to2 = tmp4_3;
_condition2 = tmp4_4;
_immediate2 = tmp4_5;
_reset2 = tmp4_6;
_synchronize2 = tmp4_7;
_priority2 = tmp4_8;
if (!(((((((stringEqual(_from1, _from2)) && (stringEqual(_to1, _to2))) && (stringEqual(_condition1, _condition2))) && (stringEqual(_immediate1, (_immediate2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_reset1, (_reset2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_synchronize1, (_synchronize2?_OMC_LIT127:_OMC_LIT128)))) && (stringEqual(_priority1, intString(_priority2))))) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 5: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_b = tmp1;
_return: OMC_LABEL_UNUSED
return _b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_compareTransitionFuncArgs(threadData_t *threadData, modelica_metatype _args, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_boolean _b;
modelica_metatype out_b;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_b = omc_Interactive_compareTransitionFuncArgs(threadData, _args, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_namedArgValueAsString(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_string _inNamedArg, modelica_string _inDefaultValue, modelica_boolean *out_outDefault)
{
modelica_string _outNamedArg = NULL;
modelica_boolean _outDefault;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynNamedArgLst;
{
modelica_metatype _namedArg = NULL;
modelica_metatype _al = NULL;
modelica_string _namedArgName = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1_c0 = _inDefaultValue;
tmp1_c1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_namedArg = tmpMeta6;
_namedArgName = tmpMeta8;
if (!(stringEqual(_namedArgName, _inNamedArg))) goto tmp3_end;
tmp1_c0 = omc_Dump_printNamedArgValueStr(threadData, _namedArg);
tmp1_c1 = 0;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_al = tmpMeta10;
_inAbsynNamedArgLst = _al;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outNamedArg = tmp1_c0;
_outDefault = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outDefault) { *out_outDefault = _outDefault; }
return _outNamedArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_namedArgValueAsString(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inNamedArg, modelica_metatype _inDefaultValue, modelica_metatype *out_outDefault)
{
modelica_boolean _outDefault;
modelica_string _outNamedArg = NULL;
_outNamedArg = omc_Interactive_namedArgValueAsString(threadData, _inAbsynNamedArgLst, _inNamedArg, _inDefaultValue, &_outDefault);
if (out_outDefault) { *out_outDefault = mmc_mk_icon(_outDefault); }
return _outNamedArg;
}
DLLExport
modelica_metatype omc_Interactive_addOrUpdateNamedArg(threadData_t *threadData, modelica_metatype _inNamedArgLst, modelica_string _namedArg, modelica_string _defaultValue, modelica_metatype _inTransition, modelica_integer _position)
{
modelica_metatype _outTransition = NULL;
modelica_string _namedArgValue = NULL;
modelica_boolean _isDefault;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_namedArgValue = omc_Interactive_namedArgValueAsString(threadData, _inNamedArgLst, _namedArg, _defaultValue ,&_isDefault);
if((listLength(_inTransition) < _position))
{
_outTransition = omc_List_insert(threadData, _inTransition, _position, _namedArgValue);
}
else
{
if(((listLength(_inTransition) >= _position) && (!_isDefault)))
{
_outTransition = omc_List_replaceAt(threadData, _namedArgValue, _position, _inTransition);
}
else
{
_outTransition = _inTransition;
}
}
_return: OMC_LABEL_UNUSED
return _outTransition;
}
modelica_metatype boxptr_Interactive_addOrUpdateNamedArg(threadData_t *threadData, modelica_metatype _inNamedArgLst, modelica_metatype _namedArg, modelica_metatype _defaultValue, modelica_metatype _inTransition, modelica_metatype _position)
{
modelica_integer tmp1;
modelica_metatype _outTransition = NULL;
tmp1 = mmc_unbox_integer(_position);
_outTransition = omc_Interactive_addOrUpdateNamedArg(threadData, _inNamedArgLst, _namedArg, _defaultValue, _inTransition, tmp1);
return _outTransition;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteTransitionInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority)
{
modelica_metatype _outAbsynEquationItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_string tmp4_3;volatile modelica_string tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_integer tmp4_8;
tmp4_1 = _inAbsynEquationItemLst;
tmp4_2 = _from;
tmp4_3 = _to;
tmp4_4 = _condition;
tmp4_5 = _immediate;
tmp4_6 = _reset;
tmp4_7 = _synchronize;
tmp4_8 = _priority;
{
modelica_metatype _res = NULL;
modelica_metatype _xs = NULL;
modelica_string _from_ = NULL;
modelica_string _to_ = NULL;
modelica_string _condition_ = NULL;
modelica_boolean _immediate_;
modelica_boolean _reset_;
modelica_boolean _synchronize_;
modelica_integer _priority_;
modelica_metatype _name = NULL;
modelica_metatype _expArgs = NULL;
modelica_metatype _namedArgs = NULL;
modelica_metatype _args = NULL;
modelica_metatype _conditionExp = NULL;
modelica_metatype _x = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_boolean tmp19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,6,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_name = tmpMeta10;
_expArgs = tmpMeta12;
_namedArgs = tmpMeta13;
_xs = tmpMeta8;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
if (!omc_AbsynUtil_crefEqual(threadData, _name, _OMC_LIT192)) goto tmp3_end;
_args = omc_List_map(threadData, _expArgs, boxvar_Dump_printExpStr);
_args = omc_Interactive_addOrUpdateNamedArg(threadData, _namedArgs, _OMC_LIT185, _OMC_LIT127, _args, ((modelica_integer) 4));
_args = omc_Interactive_addOrUpdateNamedArg(threadData, _namedArgs, _OMC_LIT186, _OMC_LIT127, _args, ((modelica_integer) 5));
_args = omc_Interactive_addOrUpdateNamedArg(threadData, _namedArgs, _OMC_LIT187, _OMC_LIT128, _args, ((modelica_integer) 6));
_args = omc_Interactive_addOrUpdateNamedArg(threadData, _namedArgs, _OMC_LIT188, _OMC_LIT189, _args, ((modelica_integer) 7));
tmpMeta14 = omc_Parser_parsestringexp(threadData, _condition_, _OMC_LIT190);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
if (listEmpty(tmpMeta15)) goto goto_2;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,2) == 0) goto goto_2;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (!listEmpty(tmpMeta17)) goto goto_2;
_conditionExp = tmpMeta18;
_condition_ = omc_Dump_printExpStr(threadData, _conditionExp);
tmp19 = omc_Interactive_compareTransitionFuncArgs(threadData, _args, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
if (1 != tmp19) goto goto_2;
tmpMeta1 = omc_Interactive_deleteTransitionInEqlist(threadData, _xs, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_x = tmpMeta20;
_xs = tmpMeta21;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_res = omc_Interactive_deleteTransitionInEqlist(threadData, _xs, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
tmpMeta22 = mmc_mk_cons(_x, _res);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynEquationItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynEquationItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteTransitionInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outAbsynEquationItemLst = NULL;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_outAbsynEquationItemLst = omc_Interactive_deleteTransitionInEqlist(threadData, _inAbsynEquationItemLst, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4);
return _outAbsynEquationItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteTransitionInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_string tmp4_3;modelica_string tmp4_4;modelica_boolean tmp4_5;modelica_boolean tmp4_6;modelica_boolean tmp4_7;modelica_integer tmp4_8;
tmp4_1 = _inClass;
tmp4_2 = _from;
tmp4_3 = _to;
tmp4_4 = _condition;
tmp4_5 = _immediate;
tmp4_6 = _reset;
tmp4_7 = _synchronize;
tmp4_8 = _priority;
{
modelica_metatype _eqlst = NULL;
modelica_metatype _eqlst_1 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _bcname = NULL;
modelica_metatype _cmt = NULL;
modelica_string _from_ = NULL;
modelica_string _to_ = NULL;
modelica_string _condition_ = NULL;
modelica_boolean _immediate_;
modelica_boolean _reset_;
modelica_boolean _synchronize_;
modelica_integer _priority_;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
_eqlst_1 = omc_Interactive_deleteTransitionInEqlist(threadData, _eqlst, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst_1);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
_eqlst_1 = omc_Interactive_deleteTransitionInEqlist(threadData, _eqlst, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst_1);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _cmt, _parts2, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteTransitionInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outClass = NULL;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_outClass = omc_Interactive_deleteTransitionInClass(threadData, _inClass, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4);
return _outClass;
}
DLLExport
modelica_boolean omc_Interactive_deleteTransition(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_boolean _b;
modelica_metatype _outProgram = NULL;
modelica_boolean tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_string tmp4_3;volatile modelica_string tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_integer tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inComponentRef1;
tmp4_2 = _from;
tmp4_3 = _to;
tmp4_4 = _condition;
tmp4_5 = _immediate;
tmp4_6 = _reset;
tmp4_7 = _synchronize;
tmp4_8 = _priority;
tmp4_9 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _modelwithin = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _model_ = NULL;
modelica_string _from_ = NULL;
modelica_string _to_ = NULL;
modelica_string _condition_ = NULL;
modelica_boolean _immediate_;
modelica_boolean _reset_;
modelica_boolean _synchronize_;
modelica_integer _priority_;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_model_ = tmp4_1;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_p = tmp4_9;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_modelwithin = omc_AbsynUtil_stripLast(threadData, _modelpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteTransitionInClass(threadData, _cdef, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
tmpMeta6 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _modelwithin);
tmpMeta8 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, tmpMeta7);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta8, _p, 0);
tmp1_c0 = 1;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_model_ = tmp4_1;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_p = tmp4_9;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteTransitionInClass(threadData, _cdef, _from_, _to_, _condition_, _immediate_, _reset_, _synchronize_, _priority_);
tmpMeta9 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta9, _OMC_LIT177);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta10, _p, 0);
tmp1_c0 = 1;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 2: {
_p = tmp4_9;
tmp1_c0 = 0;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_b = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _b;
}
modelica_metatype boxptr_Interactive_deleteTransition(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_boolean _b;
modelica_metatype out_b;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_b = omc_Interactive_deleteTransition(threadData, _inComponentRef1, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4, _inProgram, out_outProgram);
out_b = mmc_mk_icon(_b);
return out_b;
}
DLLExport
modelica_boolean omc_Interactive_addTransitionWithAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority, modelica_metatype _inAnnotation, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_boolean _b;
modelica_metatype _outProgram = NULL;
modelica_boolean tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_string tmp4_3;modelica_string tmp4_4;modelica_boolean tmp4_5;modelica_boolean tmp4_6;modelica_boolean tmp4_7;modelica_integer tmp4_8;modelica_metatype tmp4_9;modelica_metatype tmp4_10;
tmp4_1 = _inComponentRef;
tmp4_2 = _from;
tmp4_3 = _to;
tmp4_4 = _condition;
tmp4_5 = _immediate;
tmp4_6 = _reset;
tmp4_7 = _synchronize;
tmp4_8 = _priority;
tmp4_9 = _inAnnotation;
tmp4_10 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _package_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _model_ = NULL;
modelica_string _from_ = NULL;
modelica_string _to_ = NULL;
modelica_string _condition_ = NULL;
modelica_boolean _immediate_;
modelica_boolean _reset_;
modelica_boolean _synchronize_;
modelica_integer _priority_;
modelica_metatype _ann = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _conditionExp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
_model_ = tmp4_1;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_ann = tmp4_9;
_p = tmp4_10;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta6 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, mmc_mk_some(_ann), mmc_mk_none());
_cmt = mmc_mk_some(tmpMeta6);
tmpMeta7 = omc_Parser_parsestringexp(threadData, _condition_, _OMC_LIT190);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (listEmpty(tmpMeta8)) goto goto_2;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,2) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (!listEmpty(tmpMeta10)) goto goto_2;
_conditionExp = tmpMeta11;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _from_, tmpMeta13);
tmpMeta15 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, tmpMeta14);
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _to_, tmpMeta16);
tmpMeta18 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, tmpMeta17);
tmpMeta12 = mmc_mk_cons(tmpMeta15, mmc_mk_cons(tmpMeta18, mmc_mk_cons(_conditionExp, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta20 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_immediate_));
tmpMeta21 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT185, tmpMeta20);
tmpMeta22 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_reset_));
tmpMeta23 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT186, tmpMeta22);
tmpMeta24 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_synchronize_));
tmpMeta25 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT187, tmpMeta24);
tmpMeta26 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(_priority_));
tmpMeta27 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT188, tmpMeta26);
tmpMeta19 = mmc_mk_cons(tmpMeta21, mmc_mk_cons(tmpMeta23, mmc_mk_cons(tmpMeta25, mmc_mk_cons(tmpMeta27, MMC_REFSTRUCTLIT(mmc_nil)))));
tmpMeta28 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, tmpMeta12, tmpMeta19);
tmpMeta29 = mmc_mk_box3(9, &Absyn_Equation_EQ__NORETCALL__desc, _OMC_LIT192, tmpMeta28);
tmpMeta30 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta29, _cmt, _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta30);
tmpMeta31 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta32 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta31, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 3))));
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta32, _p, 0);
tmp1_c0 = 1;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
_model_ = tmp4_1;
_from_ = tmp4_2;
_to_ = tmp4_3;
_condition_ = tmp4_4;
_immediate_ = tmp4_5;
_reset_ = tmp4_6;
_synchronize_ = tmp4_7;
_priority_ = tmp4_8;
_ann = tmp4_9;
_p = tmp4_10;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_package_ = omc_AbsynUtil_stripLast(threadData, _modelpath);
tmpMeta33 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, mmc_mk_some(_ann), mmc_mk_none());
_cmt = mmc_mk_some(tmpMeta33);
tmpMeta34 = omc_Parser_parsestringexp(threadData, _condition_, _OMC_LIT190);
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 2));
if (listEmpty(tmpMeta35)) goto goto_2;
tmpMeta36 = MMC_CAR(tmpMeta35);
tmpMeta37 = MMC_CDR(tmpMeta35);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta36,1,2) == 0) goto goto_2;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta36), 2));
if (!listEmpty(tmpMeta37)) goto goto_2;
_conditionExp = tmpMeta38;
tmpMeta40 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta41 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _from_, tmpMeta40);
tmpMeta42 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, tmpMeta41);
tmpMeta43 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta44 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _to_, tmpMeta43);
tmpMeta45 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, tmpMeta44);
tmpMeta39 = mmc_mk_cons(tmpMeta42, mmc_mk_cons(tmpMeta45, mmc_mk_cons(_conditionExp, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta47 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_immediate_));
tmpMeta48 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT185, tmpMeta47);
tmpMeta49 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_reset_));
tmpMeta50 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT186, tmpMeta49);
tmpMeta51 = mmc_mk_box2(7, &Absyn_Exp_BOOL__desc, mmc_mk_boolean(_synchronize_));
tmpMeta52 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT187, tmpMeta51);
tmpMeta53 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(_priority_));
tmpMeta54 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _OMC_LIT188, tmpMeta53);
tmpMeta46 = mmc_mk_cons(tmpMeta48, mmc_mk_cons(tmpMeta50, mmc_mk_cons(tmpMeta52, mmc_mk_cons(tmpMeta54, MMC_REFSTRUCTLIT(mmc_nil)))));
tmpMeta55 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, tmpMeta39, tmpMeta46);
tmpMeta56 = mmc_mk_box3(9, &Absyn_Equation_EQ__NORETCALL__desc, _OMC_LIT192, tmpMeta55);
tmpMeta57 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta56, _cmt, _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta57);
tmpMeta58 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta59 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _package_);
tmpMeta60 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta58, tmpMeta59);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta60, _p, 0);
tmp1_c0 = 1;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_b = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _b;
}
modelica_metatype boxptr_Interactive_addTransitionWithAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority, modelica_metatype _inAnnotation, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_boolean _b;
modelica_metatype out_b;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_b = omc_Interactive_addTransitionWithAnnotation(threadData, _inComponentRef, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4, _inAnnotation, _inProgram, out_outProgram);
out_b = mmc_mk_icon(_b);
return out_b;
}
DLLExport
modelica_boolean omc_Interactive_addTransition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_boolean _b;
modelica_metatype _outProgram = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_b = omc_Interactive_addTransitionWithAnnotation(threadData, _inComponentRef, _from, _to, _condition, _immediate, _reset, _synchronize, _priority, omc_InteractiveUtil_annotationListToAbsyn(threadData, _inAbsynNamedArgLst), _inProgram ,&_outProgram);
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _b;
}
modelica_metatype boxptr_Interactive_addTransition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_boolean _b;
modelica_metatype out_b;
tmp1 = mmc_unbox_integer(_immediate);
tmp2 = mmc_unbox_integer(_reset);
tmp3 = mmc_unbox_integer(_synchronize);
tmp4 = mmc_unbox_integer(_priority);
_b = omc_Interactive_addTransition(threadData, _inComponentRef, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4, _inAbsynNamedArgLst, _inProgram, out_outProgram);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteEquationInEqlist(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynEquationItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inAbsynEquationItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _res = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _cn1 = NULL;
modelica_metatype _cn2 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _x = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_cn1 = tmpMeta10;
_cn2 = tmpMeta11;
_xs = tmpMeta8;
_c1 = tmp4_2;
_c2 = tmp4_3;
if (!(omc_AbsynUtil_crefEqual(threadData, _c1, _cn1) && omc_AbsynUtil_crefEqual(threadData, _c2, _cn2))) goto tmp3_end;
_inAbsynEquationItemLst1 = _xs;
_inComponentRef2 = _c1;
_inComponentRef3 = _c2;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_x = tmpMeta12;
_xs = tmpMeta13;
_c1 = tmp4_2;
_c2 = tmp4_3;
_res = omc_Interactive_deleteEquationInEqlist(threadData, _xs, _c1, _c2);
tmpMeta14 = mmc_mk_cons(_x, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynEquationItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynEquationItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteEquationInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inClass1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _eqlst = NULL;
modelica_metatype _eqlst_1 = NULL;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _bcname = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_c1 = tmp4_2;
_c2 = tmp4_3;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
_eqlst_1 = omc_Interactive_deleteEquationInEqlist(threadData, _eqlst, _c1, _c2);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst_1);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_c1 = tmp4_2;
_c2 = tmp4_3;
_eqlst = omc_InteractiveUtil_getEquationList(threadData, _parts);
_eqlst_1 = omc_Interactive_deleteEquationInEqlist(threadData, _eqlst, _c1, _c2);
_parts2 = omc_InteractiveUtil_replaceEquationList(threadData, _parts, _eqlst_1);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _cmt, _parts2, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_deleteConnection(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inProgram4, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inProgram4;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _modelwithin = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_p = tmp4_4;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_modelwithin = omc_AbsynUtil_stripLast(threadData, _modelpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteEquationInClass(threadData, _cdef, _c1, _c2);
tmpMeta6 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _modelwithin);
tmpMeta8 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, tmpMeta7);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta8, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_p = tmp4_4;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteEquationInClass(threadData, _cdef, _c1, _c2);
tmpMeta9 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta9, _OMC_LIT177);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta10, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 2: {
_p = tmp4_4;
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_addConnection(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inAbsynNamedArgLst4, modelica_metatype _inProgram5, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inAbsynNamedArgLst4;
tmp4_5 = _inProgram5;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _package_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _nargs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_p = tmp4_5;
tmp4 += 1;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta6 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _c1, _c2);
tmpMeta7 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta6, mmc_mk_none(), _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta7);
tmpMeta8 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta8, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 3))));
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta9, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_p = tmp4_5;
tmp4 += 1;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_package_ = omc_AbsynUtil_stripLast(threadData, _modelpath);
tmpMeta10 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _c1, _c2);
tmpMeta11 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta10, mmc_mk_none(), _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta11);
tmpMeta12 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _package_);
tmpMeta14 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta12, tmpMeta13);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta14, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_nargs = tmp4_4;
_p = tmp4_5;
tmp4 += 1;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_cmt = omc_Interactive_annotationListToAbsynComment(threadData, _nargs, mmc_mk_none());
tmpMeta15 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _c1, _c2);
tmpMeta16 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta15, _cmt, _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta16);
tmpMeta17 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta18 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta17, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 3))));
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta18, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
_model_ = tmp4_1;
_c1 = tmp4_2;
_c2 = tmp4_3;
_nargs = tmp4_4;
_p = tmp4_5;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_package_ = omc_AbsynUtil_stripLast(threadData, _modelpath);
_cmt = omc_Interactive_annotationListToAbsynComment(threadData, _nargs, mmc_mk_none());
tmpMeta19 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _c1, _c2);
tmpMeta20 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, tmpMeta19, _cmt, _OMC_LIT120);
_newcdef = omc_Interactive_addToEquation(threadData, _cdef, tmpMeta20);
tmpMeta21 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta22 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _package_);
tmpMeta23 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta21, tmpMeta22);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta23, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
DLLExport
modelica_string omc_Interactive_getStringComment(threadData_t *threadData, modelica_metatype _inAbsynCommentOption)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynCommentOption;
{
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (optionNone(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
_str = tmpMeta8;
tmp1 = _str;
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_metatype omc_Interactive_getNthConnection(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _eq = NULL;
modelica_metatype _cmt = NULL;
modelica_string _str = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_model_ = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta6 = listGet(omc_Interactive_getConnections(threadData, _cdef), _n);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,3) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_eq = tmpMeta7;
_cmt = tmpMeta8;
_str = omc_Interactive_getStringComment(threadData, _cmt);
_s1 = omc_Interactive_getConnectionStr(threadData, _eq ,&_s2);
tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _s1);
tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _s2);
tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _str);
tmpMeta9 = mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outValue = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outValue;
}
modelica_metatype boxptr_Interactive_getNthConnection(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_metatype _outValue = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outValue = omc_Interactive_getNthConnection(threadData, _inComponentRef, _inProgram, tmp1);
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemsCondition(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynComponentItemLst;
{
modelica_metatype _cond = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_cond = tmpMeta8;
tmp1 = omc_Dump_unparseComponentCondition(threadData, _cond);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentCondition(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_lst = tmpMeta7;
tmp1 = omc_Interactive_getComponentitemsCondition(threadData, _lst);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentCondition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comp = NULL;
modelica_string _str = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_model_ = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_comp = omc_Interactive_getNthComponentInClass(threadData, _cdef, _n);
_str = omc_Interactive_getComponentCondition(threadData, _comp);
_str = omc_System_trim(threadData, _str, _OMC_LIT85);
tmpMeta6 = mmc_mk_cons(_OMC_LIT94, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT94, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentCondition(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthComponentCondition(threadData, _inComponentRef, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentModification(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comp = NULL;
modelica_string _str = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_model_ = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_comp = omc_Interactive_getNthComponentInClass(threadData, _cdef, _n);
_str = omc_Interactive_getComponentModification(threadData, _comp);
tmpMeta6 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentModification(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthComponentModification(threadData, _inComponentRef, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponentAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comp = NULL;
modelica_string _s1 = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_model_ = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_comp = omc_Interactive_getNthComponentInClass(threadData, _cdef, _n);
_s1 = omc_Interactive_getComponentAnnotation(threadData, _comp, _cdef, _p, _modelpath);
tmpMeta6 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponentAnnotation(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthComponentAnnotation(threadData, _inComponentRef, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentAnnotations(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inProgram, modelica_integer _inAccess)
{
modelica_string _outString = NULL;
modelica_metatype _model_path = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comps1 = NULL;
modelica_metatype _comps2 = NULL;
modelica_metatype _comps = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
_model_path = omc_AbsynUtil_crefToPath(threadData, _inClassPath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _model_path, _inProgram, 0, 0);
_comps1 = omc_Interactive_getPublicComponentsInClass(threadData, _cdef);
if((_inAccess >= ((modelica_integer) 4)))
{
_comps2 = omc_Interactive_getProtectedComponentsInClass(threadData, _cdef);
}
else
{
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
_comps2 = tmpMeta5;
}
_comps = listAppend(_comps1, _comps2);
_outString = omc_Interactive_getComponentAnnotationsFromElts(threadData, _comps, _cdef, _inProgram, _model_path);
tmpMeta6 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_outString, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
_outString = stringAppendList(tmpMeta6);
goto tmp2_done;
}
case 1: {
_outString = _OMC_LIT61;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentAnnotations(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inProgram, modelica_metatype _inAccess)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inAccess);
_outString = omc_Interactive_getComponentAnnotations(threadData, _inClassPath, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponents2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_boolean _inBoolean, modelica_integer _inAccess)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_boolean tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inBoolean;
tmp4_3 = _inAccess;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _str = NULL;
modelica_metatype _comps1 = NULL;
modelica_metatype _comps2 = NULL;
modelica_metatype _model_ = NULL;
modelica_boolean _b;
modelica_metatype _genv = NULL;
modelica_integer _access;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_model_ = tmp4_1;
_b = tmp4_2;
_access = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, omc_SymbolTable_getAbsyn(threadData), 0, 0);
_genv = omc_InteractiveUtil_createEnvironment(threadData, omc_SymbolTable_getAbsyn(threadData), mmc_mk_some(omc_SymbolTable_getSCode(threadData)), _modelpath);
_comps1 = omc_Interactive_getPublicComponentsInClass(threadData, _cdef);
_s1 = omc_Interactive_getComponentsInfo(threadData, _comps1, _b, _OMC_LIT193, _genv);
if((_access >= ((modelica_integer) 4)))
{
_comps2 = omc_Interactive_getProtectedComponentsInClass(threadData, _cdef);
_s2 = omc_Interactive_getComponentsInfo(threadData, _comps2, _b, _OMC_LIT194, _genv);
}
else
{
_s2 = _OMC_LIT55;
}
tmpMeta6 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
_str = omc_Util_stringDelimitListNonEmptyElts(threadData, tmpMeta6, _OMC_LIT73);
tmpMeta7 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta7);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponents2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inBoolean, modelica_metatype _inAccess)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
tmp2 = mmc_unbox_integer(_inAccess);
_outString = omc_Interactive_getComponents2(threadData, _inComponentRef, tmp1, tmp2);
return _outString;
}
DLLExport
modelica_string omc_Interactive_getComponents(threadData_t *threadData, modelica_metatype _cr, modelica_boolean _inBoolean, modelica_integer _inAccess)
{
modelica_string _outString = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outString = omc_Interactive_getComponents2(threadData, _cr, _inBoolean, _inAccess);
_return: OMC_LABEL_UNUSED
return _outString;
}
modelica_metatype boxptr_Interactive_getComponents(threadData_t *threadData, modelica_metatype _cr, modelica_metatype _inBoolean, modelica_metatype _inAccess)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
tmp2 = mmc_unbox_integer(_inAccess);
_outString = omc_Interactive_getComponents(threadData, _cr, tmp1, tmp2);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_insertQuotesToList(threadData_t *threadData, modelica_metatype _inStringList)
{
modelica_metatype _outStringList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inStringList;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_string _str_1 = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_str = tmpMeta7;
_rest = tmpMeta8;
tmpMeta9 = mmc_mk_cons(_OMC_LIT94, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT94, MMC_REFSTRUCTLIT(mmc_nil))));
_str_1 = stringAppendList(tmpMeta9);
_res = omc_Interactive_insertQuotesToList(threadData, _rest);
tmpMeta10 = mmc_mk_cons(_str_1, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStringList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringList;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_useQuotes(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynNamedArgLst;
{
modelica_metatype _al = NULL;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (9 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT195), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,4,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_b = tmp11;
tmp1 = _b;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_al = tmpMeta13;
_inAbsynNamedArgLst = _al;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_useQuotes(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_useQuotes(threadData, _inAbsynNamedArgLst);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponent2(threadData_t *threadData, modelica_metatype _inClass2, modelica_integer _inInteger3, modelica_metatype _genv)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_integer tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inClass2;
tmp4_2 = _inInteger3;
tmp4_3 = _genv;
{
modelica_metatype _env = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _cdef = NULL;
modelica_integer _n;
modelica_string _s1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_cdef = tmp4_1;
_n = tmp4_2;
_env = tmp4_3;
_comp = omc_Interactive_getNthComponentInClass(threadData, _cdef, _n);
tmpMeta6 = omc_Interactive_getComponentInfoOld(threadData, _comp, _env);
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (!listEmpty(tmpMeta8)) goto goto_2;
_s1 = tmpMeta7;
tmpMeta9 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta9);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponent2(threadData_t *threadData, modelica_metatype _inClass2, modelica_metatype _inInteger3, modelica_metatype _genv)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger3);
_outString = omc_Interactive_getNthComponent2(threadData, _inClass2, tmp1, _genv);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthComponent(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
tmp4_3 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _genv = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_model_ = tmp4_1;
_p = tmp4_2;
_n = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_p_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _p);
_genv = omc_InteractiveUtil_createEnvironment(threadData, omc_SymbolTable_getAbsyn(threadData), mmc_mk_some(_p_1), _modelpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp1 = omc_Interactive_getNthComponent2(threadData, _cdef, _n, _genv);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthComponent(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthComponent(threadData, _inComponentRef, _inProgram, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countComponentsInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_integer _inInteger)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementItemLst;
{
modelica_metatype _complst = NULL;
modelica_metatype _lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_complst = tmpMeta10;
_lst = tmpMeta7;
_inAbsynElementItemLst = _lst;
_inInteger = _inInteger + listLength(_complst);
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
_lst = tmpMeta12;
_inAbsynElementItemLst = _lst;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1 = _inInteger;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countComponentsInElts(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_integer _outInteger;
modelica_metatype out_outInteger;
tmp1 = mmc_unbox_integer(_inInteger);
_outInteger = omc_Interactive_countComponentsInElts(threadData, _inAbsynElementItemLst, tmp1);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_countComponents(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_integer _c1;
modelica_integer _c2;
modelica_metatype _elt = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _ann = NULL;
modelica_metatype _cdef = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_cdef = tmp4_1;
_elt = tmpMeta10;
_lst = tmpMeta9;
_ann = tmpMeta11;
_cmt = tmpMeta12;
tmp4 += 1;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta14, tmpMeta15, _lst, _ann, _cmt);
tmpMeta13 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta13), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta13))[7] = tmpMeta16;
_cdef = tmpMeta13;
_c1 = omc_Interactive_countComponents(threadData, _cdef);
_c2 = omc_Interactive_countComponentsInElts(threadData, _elt, ((modelica_integer) 0));
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,5) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 4));
if (listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,1,1) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 5));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 6));
_cdef = tmp4_1;
_elt = tmpMeta21;
_lst = tmpMeta20;
_ann = tmpMeta22;
_cmt = tmpMeta23;
tmpMeta25 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta26 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta27 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta25, tmpMeta26, _lst, _ann, _cmt);
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[7] = tmpMeta27;
_cdef = tmpMeta24;
_c1 = omc_Interactive_countComponents(threadData, _cdef);
_c2 = omc_Interactive_countComponentsInElts(threadData, _elt, ((modelica_integer) 0));
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,5) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 4));
if (listEmpty(tmpMeta29)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmpMeta29);
tmpMeta31 = MMC_CDR(tmpMeta29);
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 5));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 6));
_cdef = tmp4_1;
_lst = tmpMeta31;
_ann = tmpMeta32;
_cmt = tmpMeta33;
tmp4 += 6;
tmpMeta35 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta37 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta35, tmpMeta36, _lst, _ann, _cmt);
tmpMeta34 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta34), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta34))[7] = tmpMeta37;
_cdef = tmpMeta34;
tmp1 = omc_Interactive_countComponents(threadData, _cdef);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,0,5) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 4));
if (!listEmpty(tmpMeta39)) goto tmp3_end;
tmp4 += 5;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,4,5) == 0) goto tmp3_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 4));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 5));
if (listEmpty(tmpMeta42)) goto tmp3_end;
tmpMeta43 = MMC_CAR(tmpMeta42);
tmpMeta44 = MMC_CDR(tmpMeta42);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,0,1) == 0) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 6));
_cdef = tmp4_1;
_cmt = tmpMeta41;
_elt = tmpMeta45;
_lst = tmpMeta44;
_ann = tmpMeta46;
tmp4 += 1;
tmpMeta48 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta49 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta50 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta48, tmpMeta49, _lst, _ann, _cmt);
tmpMeta47 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta47), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta47))[7] = tmpMeta50;
_cdef = tmpMeta47;
_c1 = omc_Interactive_countComponents(threadData, _cdef);
_c2 = omc_Interactive_countComponentsInElts(threadData, _elt, ((modelica_integer) 0));
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,4,5) == 0) goto tmp3_end;
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 4));
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 5));
if (listEmpty(tmpMeta53)) goto tmp3_end;
tmpMeta54 = MMC_CAR(tmpMeta53);
tmpMeta55 = MMC_CDR(tmpMeta53);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta54,1,1) == 0) goto tmp3_end;
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta54), 2));
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 6));
_cdef = tmp4_1;
_cmt = tmpMeta52;
_elt = tmpMeta56;
_lst = tmpMeta55;
_ann = tmpMeta57;
tmpMeta59 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta60 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta61 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta59, tmpMeta60, _lst, _ann, _cmt);
tmpMeta58 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta58), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta58))[7] = tmpMeta61;
_cdef = tmpMeta58;
_c1 = omc_Interactive_countComponents(threadData, _cdef);
_c2 = omc_Interactive_countComponentsInElts(threadData, _elt, ((modelica_integer) 0));
tmp1 = _c1 + _c2;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta62,4,5) == 0) goto tmp3_end;
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 4));
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 5));
if (listEmpty(tmpMeta64)) goto tmp3_end;
tmpMeta65 = MMC_CAR(tmpMeta64);
tmpMeta66 = MMC_CDR(tmpMeta64);
tmpMeta67 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 6));
_cdef = tmp4_1;
_cmt = tmpMeta63;
_lst = tmpMeta66;
_ann = tmpMeta67;
tmp4 += 2;
tmpMeta69 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta70 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta71 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, tmpMeta69, tmpMeta70, _lst, _ann, _cmt);
tmpMeta68 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta68), MMC_UNTAGPTR(_cdef), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta68))[7] = tmpMeta71;
_cdef = tmpMeta68;
tmp1 = omc_Interactive_countComponents(threadData, _cdef);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta72,4,5) == 0) goto tmp3_end;
tmpMeta73 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta72), 5));
if (!listEmpty(tmpMeta73)) goto tmp3_end;
tmp4 += 1;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta74;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta74,1,4) == 0) goto tmp3_end;
tmp1 = ((modelica_integer) -1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 9) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_countComponents(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_countComponents(threadData, _inClass);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
DLLExport
modelica_integer omc_Interactive_getComponentCount(threadData_t *threadData, modelica_metatype _model_, modelica_metatype _p)
{
modelica_integer _count;
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_count = omc_Interactive_countComponents(threadData, _cdef);
_return: OMC_LABEL_UNUSED
return _count;
}
modelica_metatype boxptr_Interactive_getComponentCount(threadData_t *threadData, modelica_metatype _model_, modelica_metatype _p)
{
modelica_integer _count;
modelica_metatype out_count;
_count = omc_Interactive_getComponentCount(threadData, _model_, _p);
out_count = mmc_mk_icon(_count);
return out_count;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClass2(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_integer _inInteger3, modelica_metatype _inEnv4)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_integer tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inClass1;
tmp4_2 = _inClass2;
tmp4_3 = _inInteger3;
tmp4_4 = _inEnv4;
{
modelica_metatype _lst = NULL;
modelica_integer _n;
modelica_metatype _cref = NULL;
modelica_metatype _path = NULL;
modelica_string _id = NULL;
modelica_metatype _c = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _env = NULL;
modelica_metatype _env2 = NULL;
modelica_metatype _env_2 = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _encflag = NULL;
modelica_metatype _restr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_c = tmp4_1;
_id = tmpMeta6;
_encflag = tmpMeta7;
_restr = tmpMeta8;
_cdef = tmp4_2;
_n = tmp4_3;
_env = tmp4_4;
if(omc_SCodeUtil_isDerivedClass(threadData, _c))
{
_lst = omc_Interactive_getBaseClasses(threadData, _cdef, _env);
}
else
{
_env2 = omc_FGraph_openScope(threadData, _env, _encflag, _id, omc_FGraph_restrictionToScopeType(threadData, _restr));
_ci_state = omc_ClassInf_start(threadData, _restr, omc_FGraph_getGraphName(threadData, _env2));
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Inst_partialInstClassIn(threadData, omc_FCore_emptyCache(threadData), _env2, tmpMeta9, _OMC_LIT62, _OMC_LIT63, _ci_state, _c, _OMC_LIT64, tmpMeta10, ((modelica_integer) 0) ,&_env_2 ,NULL ,NULL ,NULL);
_lst = omc_Interactive_getBaseClasses(threadData, _cdef, _env_2);
}
_cref = listGet(_lst, _n);
_path = omc_AbsynUtil_crefToPath(threadData, _cref);
tmp1 = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClass2(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_metatype _inInteger3, modelica_metatype _inEnv4)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger3);
_outString = omc_Interactive_getNthInheritedClass2(threadData, _inClass1, _inClass2, tmp1, _inEnv4);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outAbsynElementSpecLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementItemLst;
{
modelica_metatype _res = NULL;
modelica_metatype _e = NULL;
modelica_metatype _es = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,3) == 0) goto tmp3_end;
_e = tmpMeta10;
_es = tmpMeta8;
_res = omc_Interactive_getExtendsInElementitems(threadData, _es);
tmpMeta11 = mmc_mk_cons(_e, _res);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_es = tmpMeta13;
tmpMeta1 = omc_Interactive_getExtendsInElementitems(threadData, _es);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementSpecLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementSpecLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst)
{
modelica_metatype _outAbsynElementSpecLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynClassPartLst;
{
modelica_metatype _l1 = NULL;
modelica_metatype _l2 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _parts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elts = tmpMeta9;
_parts = tmpMeta8;
tmp4 += 1;
_l1 = omc_Interactive_getExtendsInParts(threadData, _parts);
_l2 = omc_Interactive_getExtendsInElementitems(threadData, _elts);
tmpMeta1 = listAppend(_l1, _l2);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_elts = tmpMeta12;
_parts = tmpMeta11;
_l1 = omc_Interactive_getExtendsInParts(threadData, _parts);
_l2 = omc_Interactive_getExtendsInElementitems(threadData, _elts);
tmpMeta1 = listAppend(_l1, _l2);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_parts = tmpMeta14;
tmpMeta1 = omc_Interactive_getExtendsInParts(threadData, _parts);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementSpecLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementSpecLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getExtendsInClass(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outAbsynElementSpecLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _parts = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_parts = tmpMeta7;
tmpMeta1 = omc_Interactive_getExtendsInParts(threadData, _parts);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_parts = tmpMeta9;
tmpMeta1 = omc_Interactive_getExtendsInParts(threadData, _parts);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynElementSpecLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementSpecLst;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClassMapAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_integer _inInteger, modelica_metatype _inProgram, modelica_string _inMapType)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_integer tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inModelPath;
tmp4_2 = _inInteger;
tmp4_3 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_string _s = NULL;
modelica_string _annStr = NULL;
modelica_integer _n;
modelica_metatype _p = NULL;
modelica_metatype _elArgs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_string tmp9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
_modelpath = tmp4_1;
_n = tmp4_2;
_p = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp9 = omc_Interactive_getNthInheritedClassAnnotationOpt(threadData, _modelpath, _n, _cdef, _p, &tmpMeta6);
_s = tmp9;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elArgs = tmpMeta8;
_annStr = omc_Interactive_getMapAnnotationStr(threadData, _elArgs, _inMapType, _cdef, _p, _modelpath);
tmpMeta10 = stringAppend(_OMC_LIT125,_s);
tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT80);
tmpMeta12 = stringAppend(tmpMeta11,_annStr);
tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT126);
tmp1 = tmpMeta13;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_string tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_modelpath = tmp4_1;
_n = tmp4_2;
_p = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp15 = omc_Interactive_getNthInheritedClassAnnotationOpt(threadData, _modelpath, _n, _cdef, _p, &tmpMeta14);
_s = tmp15;
if (!optionNone(tmpMeta14)) goto goto_2;
tmpMeta16 = stringAppend(_OMC_LIT125,_s);
tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT196);
tmp1 = tmpMeta17;
goto tmp3_done;
}
case 2: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClassMapAnnotation(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inInteger, modelica_metatype _inProgram, modelica_metatype _inMapType)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthInheritedClassMapAnnotation(threadData, _inModelPath, tmp1, _inProgram, _inMapType);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getMapAnnotationStr(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_string _inMapType, modelica_metatype _inClass, modelica_metatype _inFullProgram, modelica_metatype _inModelPath)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementArgLst;
{
modelica_metatype _ann = NULL;
modelica_metatype _xs = NULL;
modelica_string _mapType = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_ann = tmpMeta6;
_mapType = tmpMeta9;
tmp10 = (stringEqual(_mapType, _inMapType));
if (1 != tmp10) goto goto_2;
tmpMeta11 = mmc_mk_cons(_ann, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta12 = mmc_mk_box2(3, &Absyn_Annotation_ANNOTATION__desc, tmpMeta11);
tmp1 = omc_Interactive_getAnnotationString(threadData, tmpMeta12, _inClass, _inFullProgram, _inModelPath);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_xs = tmpMeta14;
tmp1 = omc_Interactive_getMapAnnotationStr(threadData, _xs, _inMapType, _inClass, _inFullProgram, _inModelPath);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClassAnnotationOpt(threadData_t *threadData, modelica_metatype _inModelPath, modelica_integer _inInteger, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype *out_annotationOpt)
{
modelica_string _outString = NULL;
modelica_metatype _annotationOpt = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_integer tmp4_1;
tmp4_1 = _inInteger;
{
modelica_metatype _path = NULL;
modelica_metatype _cdef = NULL;
modelica_string _s = NULL;
modelica_integer _n;
modelica_metatype _extends_ = NULL;
modelica_metatype _annOpt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_n = tmp4_1;
_cdef = _inClass;
_extends_ = omc_Interactive_getExtendsInClass(threadData, _cdef);
tmpMeta6 = listGet(_extends_, _n);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,3) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_path = tmpMeta7;
_annOpt = tmpMeta8;
_s = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
tmp1_c0 = _s;
tmpMeta[0+1] = _annOpt;
goto tmp3_done;
}
case 1: {
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_annotationOpt = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_annotationOpt) { *out_annotationOpt = _annotationOpt; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClassAnnotationOpt(threadData_t *threadData, modelica_metatype _inModelPath, modelica_metatype _inInteger, modelica_metatype _inClass, modelica_metatype _inProgram, modelica_metatype *out_annotationOpt)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthInheritedClassAnnotationOpt(threadData, _inModelPath, tmp1, _inClass, _inProgram, out_annotationOpt);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getNthInheritedClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_integer _inInteger)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_integer tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inInteger;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _path = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _env_1 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _model_ = NULL;
modelica_integer _n;
modelica_metatype _extends_ = NULL;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_model_ = tmp4_1;
_n = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, omc_SymbolTable_getAbsyn(threadData), 0, 0);
_p_1 = omc_SymbolTable_getSCode(threadData);
_cache = omc_Inst_makeEnvFromProgram(threadData, _p_1 ,&_env);
omc_Lookup_lookupClass(threadData, _cache, _env, _modelpath, mmc_mk_none(), &tmpMeta6, &tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,8) == 0) goto goto_2;
_c = tmpMeta6;
_env_1 = tmpMeta7;
tmp1 = omc_Interactive_getNthInheritedClass2(threadData, _c, _cdef, _n, _env_1);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_model_ = tmp4_1;
_n = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, omc_SymbolTable_getAbsyn(threadData), 0, 0);
_extends_ = omc_Interactive_getExtendsInClass(threadData, _cdef);
tmpMeta8 = listGet(_extends_, _n);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,3) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_path = tmpMeta9;
tmp1 = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
goto tmp3_done;
}
case 2: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getNthInheritedClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outString = omc_Interactive_getNthInheritedClass(threadData, _inComponentRef, tmp1);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_getInheritanceCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_model_ = tmp4_1;
_p = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp1 = omc_Interactive_countBaseClasses(threadData, _cdef);
goto tmp3_done;
}
case 1: {
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getInheritanceCount(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_getInheritanceCount(threadData, _inComponentRef, _inProgram);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
DLLExport
modelica_metatype omc_Interactive_getInheritedClasses(threadData_t *threadData, modelica_metatype _inPath)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outPaths = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
_outPaths = omc_NFApi_getInheritedClasses(threadData, _inPath, omc_SymbolTable_getAbsyn(threadData));
goto _return;
}
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT197);
}
{
volatile modelica_metatype tmp8_1;
tmp8_1 = _inPath;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _env_1 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _extendsLst = NULL;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp8;
int tmp9;
tmp8 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp7_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp8 < 3; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_boolean tmp12;
modelica_metatype tmpMeta14;
_modelpath = tmp8_1;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, omc_SymbolTable_getAbsyn(threadData), 0, 0);
_p_1 = omc_SymbolTable_getSCode(threadData);
_cache = omc_Inst_makeEnvFromProgram(threadData, _p_1 ,&_env);
omc_Lookup_lookupClass(threadData, _cache, _env, _modelpath, mmc_mk_none(), &tmpMeta10, &tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,8) == 0) goto goto_6;
_c = tmpMeta10;
_env_1 = tmpMeta11;
_lst = omc_Interactive_getInheritedClassesHelper(threadData, _c, _cdef, _env_1);
tmp12 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta14 = _lst;
if (!listEmpty(tmpMeta14)) goto goto_13;
tmp12 = 1;
goto goto_13;
goto_13:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp12) {goto goto_6;}
tmpMeta5 = omc_List_map(threadData, _lst, boxvar_AbsynUtil_crefToPath);
goto tmp7_done;
}
case 1: {
_modelpath = tmp8_1;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, omc_SymbolTable_getAbsyn(threadData), 0, 0);
_extendsLst = omc_Interactive_getExtendsInClass(threadData, _cdef);
tmpMeta5 = omc_List_map(threadData, _extendsLst, boxvar_AbsynUtil_elementSpecToPath);
goto tmp7_done;
}
case 2: {
modelica_metatype tmpMeta15;
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta5 = tmpMeta15;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
tmp7_done:
(void)tmp8;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp7_done2;
goto_6:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp8 < 3) {
goto tmp7_top;
}
goto goto_1;
tmp7_done2:;
}
}
_outPaths = tmpMeta5;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT197);
}
goto tmp2_done;
}
case 1: {
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT197);
}
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
threadData->mmc_jumper = old_mmc_jumper;
return _outPaths;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getInheritedClassesHelper(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inClass2, modelica_metatype _inEnv4)
{
modelica_metatype _outAbsynComponentRefLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inClass1;
tmp4_2 = _inClass2;
tmp4_3 = _inEnv4;
{
modelica_metatype _lst = NULL;
modelica_string _id = NULL;
modelica_metatype _c = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _env = NULL;
modelica_metatype _env2 = NULL;
modelica_metatype _env_2 = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _encflag = NULL;
modelica_metatype _restr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_c = tmp4_1;
_id = tmpMeta6;
_encflag = tmpMeta7;
_restr = tmpMeta8;
_cdef = tmp4_2;
_env = tmp4_3;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT202);
if(omc_SCodeUtil_isDerivedClass(threadData, _c))
{
_env_2 = _env;
}
else
{
_env2 = omc_FGraph_openScope(threadData, _env, _encflag, _id, omc_FGraph_restrictionToScopeType(threadData, _restr));
_ci_state = omc_ClassInf_start(threadData, _restr, omc_FGraph_getGraphName(threadData, _env2));
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Inst_partialInstClassIn(threadData, omc_FCore_emptyCache(threadData), _env2, tmpMeta9, _OMC_LIT62, _OMC_LIT63, _ci_state, _c, _OMC_LIT64, tmpMeta10, ((modelica_integer) 0) ,&_env_2 ,NULL ,NULL ,NULL);
}
_lst = omc_Interactive_getBaseClasses(threadData, _cdef, _env_2);
omc_ErrorExt_rollBack(threadData, _OMC_LIT202);
tmpMeta1 = _lst;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
omc_ErrorExt_rollBack(threadData, _OMC_LIT202);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentRefLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentRefLst;
}
DLLExport
modelica_metatype omc_Interactive_addClassAnnotationToClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inAnnotation)
{
modelica_metatype _outClass = NULL;
modelica_metatype _body = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inClass;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 7));
_body = tmpMeta2;
{
modelica_metatype tmp6_1;
tmp6_1 = _body;
{
int tmp6;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp6_1))) {
case 3: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta8 = mmc_mk_cons(omc_List_fold(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 5))), boxvar_AbsynUtil_mergeAnnotations, _inAnnotation), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(7));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_body), 7*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[5] = tmpMeta8;
_body = tmpMeta7;
tmpMeta3 = _body;
goto tmp5_done;
}
case 4: {
modelica_metatype tmpMeta9;
tmpMeta9 = MMC_TAGPTR(mmc_alloc_words(6));
memcpy(MMC_UNTAGPTR(tmpMeta9), MMC_UNTAGPTR(_body), 6*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta9))[5] = omc_AbsynUtil_mergeCommentAnnotation(threadData, _inAnnotation, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 5))));
_body = tmpMeta9;
tmpMeta3 = _body;
goto tmp5_done;
}
case 5: {
modelica_metatype tmpMeta10;
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_body), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[3] = omc_AbsynUtil_mergeCommentAnnotation(threadData, _inAnnotation, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 3))));
_body = tmpMeta10;
tmpMeta3 = _body;
goto tmp5_done;
}
case 6: {
modelica_metatype tmpMeta11;
tmpMeta11 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta11), MMC_UNTAGPTR(_body), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta11))[3] = omc_AbsynUtil_mergeCommentAnnotation(threadData, _inAnnotation, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 3))));
_body = tmpMeta11;
tmpMeta3 = _body;
goto tmp5_done;
}
case 7: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta13 = mmc_mk_cons(omc_List_fold(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 6))), boxvar_AbsynUtil_mergeAnnotations, _inAnnotation), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(7));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_body), 7*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[6] = tmpMeta13;
_body = tmpMeta12;
tmpMeta3 = _body;
goto tmp5_done;
}
case 8: {
modelica_metatype tmpMeta14;
tmpMeta14 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta14), MMC_UNTAGPTR(_body), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta14))[4] = omc_AbsynUtil_mergeCommentAnnotation(threadData, _inAnnotation, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_body), 4))));
_body = tmpMeta14;
tmpMeta3 = _body;
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
goto_4:;
MMC_THROW_INTERNAL();
goto tmp5_done;
tmp5_done:;
}
}
_body = tmpMeta3;
_outClass = omc_AbsynUtil_setClassBody(threadData, _inClass, _body);
_return: OMC_LABEL_UNUSED
return _outClass;
}
DLLExport
modelica_metatype omc_Interactive_addClassAnnotation(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inAnnotation, modelica_metatype _inProgram)
{
modelica_metatype _outProgram = NULL;
modelica_metatype _class_path = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _class_within = NULL;
modelica_metatype tmpMeta1;
modelica_boolean tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_class_path = omc_AbsynUtil_crefToPath(threadData, _inClass);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _class_path, _inProgram, 0, 0);
_cls = omc_Interactive_addClassAnnotationToClass(threadData, _cls, omc_InteractiveUtil_annotationListToAbsyn(threadData, _inAnnotation));
tmp2 = (modelica_boolean)omc_AbsynUtil_pathIsIdent(threadData, _class_path);
if(tmp2)
{
tmpMeta3 = _OMC_LIT177;
}
else
{
tmpMeta1 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, omc_AbsynUtil_stripLast(threadData, _class_path));
tmpMeta3 = tmpMeta1;
}
_class_within = tmpMeta3;
tmpMeta4 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta4, _class_within);
_outProgram = omc_InteractiveUtil_updateProgram(threadData, tmpMeta5, _inProgram, 0);
_return: OMC_LABEL_UNUSED
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_updateComponent(threadData_t *threadData, modelica_string _inString1, modelica_metatype _inTypeCref, modelica_metatype _inComponentRef3, modelica_metatype _inAbsynNamedArgLst4, modelica_metatype _inProgram5, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inString1;
tmp4_2 = _inComponentRef3;
tmp4_3 = _inAbsynNamedArgLst4;
tmp4_4 = _inProgram5;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _tppath2 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _publst = NULL;
modelica_metatype _protlst = NULL;
modelica_string _name = NULL;
modelica_metatype _items = NULL;
modelica_metatype _arrayDimensions = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _modification = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _ann = NULL;
modelica_metatype _annotation_ = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _nargs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
_name = tmp4_1;
_model_ = tmp4_2;
_nargs = tmp4_3;
_p = tmp4_4;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_tppath2 = omc_AbsynUtil_crefToPath(threadData, _inTypeCref);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta10 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _name, tmpMeta9);
tmpMeta11 = omc_Interactive_getElementContainsName(threadData, tmpMeta10, listAppend(_publst, _protlst));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,6) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,3,3) == 0) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,2) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 4));
_items = tmpMeta14;
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _name, tmpMeta15);
tmpMeta17 = omc_Interactive_getCompitemNamed(threadData, tmpMeta16, _items);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 4));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 3));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 4));
_arrayDimensions = tmpMeta19;
_mod = tmpMeta20;
_cond = tmpMeta21;
_ann = tmpMeta22;
_annotation_ = omc_Interactive_annotationListToAbsynComment(threadData, _nargs, _ann);
_modification = omc_Interactive_modificationToAbsyn(threadData, _nargs, _mod);
tmpMeta23 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _name, _arrayDimensions, _modification);
tmpMeta24 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta23, _cond, _annotation_);
tmpMeta25 = mmc_mk_box2(0, _tppath2, tmpMeta24);
_newp = omc_Interactive_deleteOrUpdateComponent(threadData, _name, _model_, _p, mmc_mk_some(tmpMeta25));
tmpMeta[0+0] = _newp;
tmp1_c1 = _OMC_LIT127;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inProgram5;
tmp1_c1 = _OMC_LIT128;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getDefaultComponentPrefixesModStr(threadData_t *threadData, modelica_metatype _mod)
{
modelica_string _docStr = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _mod;
{
modelica_metatype _e = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_e = tmpMeta8;
tmp1 = omc_Dump_printExpStr(threadData, _e);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_docStr = tmp1;
_return: OMC_LABEL_UNUSED
return _docStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultAttr(threadData_t *threadData, modelica_string _str)
{
modelica_metatype _attr = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_integer tmp8;
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp8 = omc_System_stringFind(threadData, _str, _OMC_LIT203);
if (-1 != tmp8) goto goto_7;
tmp6 = 1;
goto goto_7;
goto_7:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp6) {goto goto_2;}
tmpMeta1 = _OMC_LIT208;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp9;
modelica_integer tmp11;
tmp9 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp11 = omc_System_stringFind(threadData, _str, _OMC_LIT209);
if (-1 != tmp11) goto goto_10;
tmp9 = 1;
goto goto_10;
goto_10:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp9) {goto goto_2;}
tmpMeta1 = _OMC_LIT211;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp12;
modelica_integer tmp14;
tmp12 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp14 = omc_System_stringFind(threadData, _str, _OMC_LIT212);
if (-1 != tmp14) goto goto_13;
tmp12 = 1;
goto goto_13;
goto_13:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp12) {goto goto_2;}
tmpMeta1 = _OMC_LIT214;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _OMC_LIT216;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_attr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _attr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultReplaceable(threadData_t *threadData, modelica_string _str)
{
modelica_metatype _repl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_integer tmp6;
tmp6 = omc_System_stringFind(threadData, _str, _OMC_LIT217);
if (-1 != tmp6) goto goto_2;
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_boolean tmp7;
modelica_integer tmp9;
tmp7 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp9 = omc_System_stringFind(threadData, _str, _OMC_LIT217);
if (-1 != tmp9) goto goto_8;
tmp7 = 1;
goto goto_8;
goto_8:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp7) {goto goto_2;}
tmpMeta1 = _OMC_LIT219;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_repl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _repl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultInnerOuter(threadData_t *threadData, modelica_string _str)
{
modelica_metatype _io = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_integer tmp6;
modelica_integer tmp7;
tmp6 = omc_System_stringFind(threadData, _str, _OMC_LIT220);
if (-1 != tmp6) goto goto_2;
tmp7 = omc_System_stringFind(threadData, _str, _OMC_LIT221);
if (-1 != tmp7) goto goto_2;
tmpMeta1 = _OMC_LIT222;
goto tmp3_done;
}
case 1: {
modelica_integer tmp8;
tmp8 = omc_System_stringFind(threadData, _str, _OMC_LIT221);
if (-1 != tmp8) goto goto_2;
tmpMeta1 = _OMC_LIT223;
goto tmp3_done;
}
case 2: {
modelica_integer tmp9;
tmp9 = omc_System_stringFind(threadData, _str, _OMC_LIT220);
if (-1 != tmp9) goto goto_2;
tmpMeta1 = _OMC_LIT224;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_io = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _io;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeReplaceableIfPartial(threadData_t *threadData, modelica_metatype _p, modelica_metatype _className, modelica_metatype _redecl)
{
modelica_metatype _new_redecl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _redecl;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!optionNone(tmp4_1)) goto tmp3_end;
if (!omc_Interactive_isPartial(threadData, _className, _p)) goto tmp3_end;
tmpMeta1 = _OMC_LIT219;
goto tmp3_done;
}
case 1: {
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = _redecl;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,0) == 0) goto tmp3_end;
tmpMeta1 = _redecl;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_new_redecl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _new_redecl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getDefaultPrefixes(threadData_t *threadData, modelica_metatype _p, modelica_metatype _className, modelica_metatype *out_redecl, modelica_metatype *out_attr)
{
modelica_metatype _io = NULL;
modelica_metatype _redecl = NULL;
modelica_metatype _attr = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_str = omc_Interactive_getNamedAnnotation(threadData, _className, _p, _OMC_LIT149, _OMC_LIT150, boxvar_Interactive_getDefaultComponentPrefixesModStr);
_io = omc_Interactive_getDefaultInnerOuter(threadData, _str);
_redecl = omc_Interactive_getDefaultReplaceable(threadData, _str);
_redecl = omc_Interactive_makeReplaceableIfPartial(threadData, _p, _className, _redecl);
_attr = omc_Interactive_getDefaultAttr(threadData, _str);
tmpMeta[0+0] = _io;
tmpMeta[0+1] = _redecl;
tmpMeta[0+2] = _attr;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_io = tmpMeta[0+0];
_redecl = tmpMeta[0+1];
_attr = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_redecl) { *out_redecl = _redecl; }
if (out_attr) { *out_attr = _attr; }
return _io;
}
DLLExport
modelica_metatype omc_Interactive_addComponent(threadData_t *threadData, modelica_string _inString1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inAbsynNamedArgLst4, modelica_metatype _inProgram5, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inString1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inAbsynNamedArgLst4;
tmp4_5 = _inProgram5;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _tppath = NULL;
modelica_string _name = NULL;
modelica_string _filename = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _nargs = NULL;
modelica_metatype _p = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
modelica_metatype _annotation_ = NULL;
modelica_metatype _modification = NULL;
modelica_metatype _w = NULL;
modelica_metatype _io = NULL;
modelica_metatype _redecl = NULL;
modelica_metatype _attr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_model_ = tmp4_3;
_p = tmp4_5;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp6 = 1;
goto goto_7;
goto_7:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp6) {goto goto_2;}
tmpMeta[0+0] = _p;
tmp1_c1 = _OMC_LIT225;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
_name = tmp4_1;
_tp = tmp4_2;
_model_ = tmp4_3;
_nargs = tmp4_4;
_p = tmp4_5;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
{
modelica_metatype tmp11_1;
tmp11_1 = _modelpath;
{
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
for (; tmp11 < 2; tmp11++) {
switch (MMC_SWITCH_CAST(tmp11)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,1) == 0) goto tmp10_end;
tmpMeta8 = _OMC_LIT177;
goto tmp10_done;
}
case 1: {
modelica_metatype tmpMeta13;
tmpMeta13 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, omc_AbsynUtil_stripLast(threadData, _modelpath));
tmpMeta8 = tmpMeta13;
goto tmp10_done;
}
}
goto tmp10_end;
tmp10_end: ;
}
goto goto_9;
goto_9:;
goto goto_2;
goto tmp10_done;
tmp10_done:;
}
}
_w = tmpMeta8;
tmpMeta14 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 10));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_cdef = tmpMeta14;
_filename = tmpMeta16;
_tppath = omc_AbsynUtil_crefToPath(threadData, _tp);
_annotation_ = omc_Interactive_annotationListToAbsynComment(threadData, _nargs, mmc_mk_none());
_modification = omc_Interactive_modificationToAbsyn(threadData, _nargs, mmc_mk_none());
_io = omc_Interactive_getDefaultPrefixes(threadData, _p, _tppath ,&_redecl ,&_attr);
tmpMeta17 = mmc_mk_box3(3, &Absyn_TypeSpec_TPATH__desc, omc_AbsynUtil_pathStripSamePrefix(threadData, _tppath, _modelpath), mmc_mk_none());
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _name, tmpMeta19, _modification);
tmpMeta21 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta20, mmc_mk_none(), _annotation_);
tmpMeta18 = mmc_mk_cons(tmpMeta21, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta22 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr, tmpMeta17, tmpMeta18);
tmpMeta23 = mmc_mk_box8(3, &SourceInfo_SOURCEINFO__desc, _filename, mmc_mk_boolean(0), mmc_mk_integer(((modelica_integer) 0)), mmc_mk_integer(((modelica_integer) 0)), mmc_mk_integer(((modelica_integer) 0)), mmc_mk_integer(((modelica_integer) 0)), _OMC_LIT119);
tmpMeta24 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(0), _redecl, _io, tmpMeta22, tmpMeta23, mmc_mk_none());
tmpMeta25 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, tmpMeta24);
_newcdef = omc_Interactive_addToPublic(threadData, _cdef, tmpMeta25);
tmpMeta26 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta27 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta26, _w);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta27, _p, 0);
tmpMeta[0+0] = _newp;
tmp1_c1 = _OMC_LIT226;
goto tmp3_done;
}
case 2: {
tmpMeta[0+0] = _inProgram5;
tmp1_c1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData_t *threadData, modelica_string _inString, modelica_metatype _inAbsynElementItemLst, modelica_metatype _item, modelica_boolean *out_success)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_boolean _success;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inString;
tmp4_2 = _inAbsynElementItemLst;
{
modelica_string _name = NULL;
modelica_string _name2 = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _res = NULL;
modelica_metatype _x = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _eltold = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _compitem = NULL;
modelica_metatype _spec = NULL;
modelica_metatype _tppath = NULL;
modelica_metatype _typeSpec = NULL;
modelica_boolean _hasOtherComponents;
modelica_boolean _successResult;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
modelica_boolean tmp22_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta82;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_2);
tmpMeta8 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,3,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_x = tmpMeta7;
_elt = tmpMeta9;
_spec = tmpMeta10;
_typeSpec = tmpMeta11;
_comps = tmpMeta12;
_xs = tmpMeta8;
_name = tmp4_1;
{
modelica_boolean __omcQ_24tmpVar11;
modelica_boolean tmp14 = 0;
modelica_boolean __omcQ_24tmpVar10;
modelica_integer tmp21;
modelica_metatype _c_loopVar = 0;
modelica_metatype _c;
_c_loopVar = _comps;
__omcQ_24tmpVar11 = 0;
while(1) {
tmp21 = 1;
if (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
tmp21--;
}
if (tmp21 == 0) {
{
modelica_metatype tmp17_1;
tmp17_1 = _c;
{
volatile mmc_switch_type tmp17;
int tmp18;
tmp17 = 0;
for (; tmp17 < 2; tmp17++) {
switch (MMC_SWITCH_CAST(tmp17)) {
case 0: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp17_1), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_name2 = tmpMeta20;
if (!(stringEqual(_name, _name2))) goto tmp16_end;
tmp14 = 1;
goto tmp16_done;
}
case 1: {
tmp14 = 0;
goto tmp16_done;
}
}
goto tmp16_end;
tmp16_end: ;
}
goto goto_15;
goto_15:;
goto goto_2;
goto tmp16_done;
tmp16_done:;
}
}__omcQ_24tmpVar10 = tmp14;
__omcQ_24tmpVar11 = (__omcQ_24tmpVar10 || __omcQ_24tmpVar11);
} else if (tmp21 == 1) {
break;
} else {
goto goto_2;
}
}
tmp13 = __omcQ_24tmpVar11;
}
if(tmp13)
{
{
modelica_metatype tmp25_1;
tmp25_1 = _item;
{
volatile mmc_switch_type tmp25;
int tmp26;
tmp25 = 0;
for (; tmp25 < 2; tmp25++) {
switch (MMC_SWITCH_CAST(tmp25)) {
case 0: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
if (optionNone(tmp25_1)) goto tmp24_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp25_1), 1));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 1));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
_tppath = tmpMeta28;
_compitem = tmpMeta29;
if(omc_AbsynUtil_pathEqual(threadData, _tppath, omc_AbsynUtil_typeSpecPath(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_spec), 3))))))
{
{
modelica_metatype __omcQ_24tmpVar13;
modelica_metatype* tmp32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype __omcQ_24tmpVar12;
modelica_integer tmp41;
modelica_metatype _c_loopVar = 0;
modelica_metatype _c;
_c_loopVar = _comps;
tmpMeta33 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar13 = tmpMeta33;
tmp32 = &__omcQ_24tmpVar13;
while(1) {
tmp41 = 1;
if (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
tmp41--;
}
if (tmp41 == 0) {
{
modelica_metatype tmp37_1;
tmp37_1 = _c;
{
volatile mmc_switch_type tmp37;
int tmp38;
tmp37 = 0;
for (; tmp37 < 2; tmp37++) {
switch (MMC_SWITCH_CAST(tmp37)) {
case 0: {
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp37_1), 2));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 2));
_name2 = tmpMeta40;
if (!(stringEqual(_name, _name2))) goto tmp36_end;
tmpMeta34 = _compitem;
goto tmp36_done;
}
case 1: {
tmpMeta34 = _c;
goto tmp36_done;
}
}
goto tmp36_end;
tmp36_end: ;
}
goto goto_35;
goto_35:;
goto goto_23;
goto tmp36_done;
tmp36_done:;
}
}__omcQ_24tmpVar12 = tmpMeta34;
*tmp32 = mmc_mk_cons(__omcQ_24tmpVar12,0);
tmp32 = &MMC_CDR(*tmp32);
} else if (tmp41 == 1) {
break;
} else {
goto goto_23;
}
}
*tmp32 = mmc_mk_nil();
tmpMeta31 = __omcQ_24tmpVar13;
}
tmpMeta30 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta30), MMC_UNTAGPTR(_spec), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta30))[4] = tmpMeta31;
_spec = tmpMeta30;
tmpMeta42 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta42), MMC_UNTAGPTR(_elt), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta42))[5] = _spec;
_elt = tmpMeta42;
tmpMeta44 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt);
tmpMeta43 = mmc_mk_cons(tmpMeta44, _xs);
_res = tmpMeta43;
_successResult = 1;
}
else
{
{
modelica_metatype __omcQ_24tmpVar15;
modelica_metatype* tmp47;
modelica_metatype tmpMeta48;
modelica_metatype __omcQ_24tmpVar14;
modelica_integer tmp49;
modelica_metatype _c_loopVar = 0;
modelica_boolean tmp50 = 0;
modelica_metatype _c;
_c_loopVar = _comps;
tmpMeta48 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar15 = tmpMeta48;
tmp47 = &__omcQ_24tmpVar15;
while(1) {
tmp49 = 1;
while (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
{
modelica_metatype tmp53_1;
tmp53_1 = _c;
{
volatile mmc_switch_type tmp53;
int tmp54;
tmp53 = 0;
for (; tmp53 < 2; tmp53++) {
switch (MMC_SWITCH_CAST(tmp53)) {
case 0: {
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp53_1), 2));
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 2));
_name2 = tmpMeta56;
tmp50 = (!(stringEqual(_name, _name2)));
goto tmp52_done;
}
case 1: {
tmp50 = 1;
goto tmp52_done;
}
}
goto tmp52_end;
tmp52_end: ;
}
goto goto_51;
goto_51:;
goto goto_23;
goto tmp52_done;
tmp52_done:;
}
}
if (tmp50) {
tmp49--;
break;
}
}
if (tmp49 == 0) {
__omcQ_24tmpVar14 = _c;
*tmp47 = mmc_mk_cons(__omcQ_24tmpVar14,0);
tmp47 = &MMC_CDR(*tmp47);
} else if (tmp49 == 1) {
break;
} else {
goto goto_23;
}
}
*tmp47 = mmc_mk_nil();
tmpMeta46 = __omcQ_24tmpVar15;
}
tmpMeta45 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta45), MMC_UNTAGPTR(_spec), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta45))[4] = tmpMeta46;
_spec = tmpMeta45;
_hasOtherComponents = (!listEmpty((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_spec), 4)))));
if(_hasOtherComponents)
{
tmpMeta57 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta57), MMC_UNTAGPTR(_elt), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta57))[5] = _spec;
_elt = tmpMeta57;
_eltold = _elt;
}
tmpMeta59 = mmc_mk_cons(_compitem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta58 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta58), MMC_UNTAGPTR(_spec), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta58))[4] = tmpMeta59;
_spec = tmpMeta58;
tmpMeta60 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta60), MMC_UNTAGPTR(_typeSpec), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta60))[2] = _tppath;
_typeSpec = tmpMeta60;
tmpMeta61 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta61), MMC_UNTAGPTR(_spec), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta61))[3] = _typeSpec;
_spec = tmpMeta61;
tmpMeta62 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta62), MMC_UNTAGPTR(_elt), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta62))[5] = _spec;
_elt = tmpMeta62;
tmpMeta64 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt);
tmpMeta63 = mmc_mk_cons(tmpMeta64, _xs);
_res = tmpMeta63;
if(_hasOtherComponents)
{
tmpMeta66 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _eltold);
tmpMeta65 = mmc_mk_cons(tmpMeta66, _res);
_res = tmpMeta65;
}
_successResult = 1;
}
tmpMeta[2+0] = _res;
tmp22_c1 = _successResult;
goto tmp24_done;
}
case 1: {
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
if((listLength(_comps) == ((modelica_integer) 1)))
{
_res = _xs;
_successResult = 1;
}
else
{
{
modelica_metatype __omcQ_24tmpVar17;
modelica_metatype* tmp69;
modelica_metatype tmpMeta70;
modelica_metatype __omcQ_24tmpVar16;
modelica_integer tmp71;
modelica_metatype _c_loopVar = 0;
modelica_boolean tmp72 = 0;
modelica_metatype _c;
_c_loopVar = _comps;
tmpMeta70 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar17 = tmpMeta70;
tmp69 = &__omcQ_24tmpVar17;
while(1) {
tmp71 = 1;
while (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
{
modelica_metatype tmp75_1;
tmp75_1 = _c;
{
volatile mmc_switch_type tmp75;
int tmp76;
tmp75 = 0;
for (; tmp75 < 2; tmp75++) {
switch (MMC_SWITCH_CAST(tmp75)) {
case 0: {
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp75_1), 2));
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta77), 2));
_name2 = tmpMeta78;
tmp72 = (!(stringEqual(_name, _name2)));
goto tmp74_done;
}
case 1: {
tmp72 = 1;
goto tmp74_done;
}
}
goto tmp74_end;
tmp74_end: ;
}
goto goto_73;
goto_73:;
goto goto_23;
goto tmp74_done;
tmp74_done:;
}
}
if (tmp72) {
tmp71--;
break;
}
}
if (tmp71 == 0) {
__omcQ_24tmpVar16 = _c;
*tmp69 = mmc_mk_cons(__omcQ_24tmpVar16,0);
tmp69 = &MMC_CDR(*tmp69);
} else if (tmp71 == 1) {
break;
} else {
goto goto_23;
}
}
*tmp69 = mmc_mk_nil();
tmpMeta68 = __omcQ_24tmpVar17;
}
tmpMeta67 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta67), MMC_UNTAGPTR(_spec), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta67))[4] = tmpMeta68;
_spec = tmpMeta67;
tmpMeta79 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta79), MMC_UNTAGPTR(_elt), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta79))[5] = _spec;
_elt = tmpMeta79;
tmpMeta81 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt);
tmpMeta80 = mmc_mk_cons(tmpMeta81, _xs);
_res = tmpMeta80;
_successResult = 1;
}
tmpMeta[2+0] = _res;
tmp22_c1 = _successResult;
goto tmp24_done;
}
}
goto tmp24_end;
tmp24_end: ;
}
goto goto_23;
goto_23:;
goto goto_2;
goto tmp24_done;
tmp24_done:;
}
}
_res = tmpMeta[2+0];
_successResult = tmp22_c1;
}
else
{
_res = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _xs, _item ,&_successResult);
tmpMeta82 = mmc_mk_cons(_x, _res);
_res = tmpMeta82;
}
tmpMeta[0+0] = _res;
tmp1_c1 = _successResult;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta83 = MMC_CAR(tmp4_2);
tmpMeta84 = MMC_CDR(tmp4_2);
_x = tmpMeta83;
_xs = tmpMeta84;
_name = tmp4_1;
_res = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _xs, _item ,&_successResult);
tmpMeta85 = mmc_mk_cons(_x, _res);
tmpMeta[0+0] = tmpMeta85;
tmp1_c1 = _successResult;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynElementItemLst = tmpMeta[0+0];
_success = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_success) { *out_success = _success; }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_deleteOrUpdateComponentFromElementitems(threadData_t *threadData, modelica_metatype _inString, modelica_metatype _inAbsynElementItemLst, modelica_metatype _item, modelica_metatype *out_success)
{
modelica_boolean _success;
modelica_metatype _outAbsynElementItemLst = NULL;
_outAbsynElementItemLst = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _inString, _inAbsynElementItemLst, _item, &_success);
if (out_success) { *out_success = mmc_mk_icon(_success); }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponentFromClass(threadData_t *threadData, modelica_string _inString, modelica_metatype _inClass, modelica_metatype _item)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inString;
tmp4_2 = _inClass;
{
modelica_metatype _publst = NULL;
modelica_metatype _publst2 = NULL;
modelica_metatype _protlst = NULL;
modelica_metatype _protlst2 = NULL;
modelica_integer _l2;
modelica_integer _l1;
modelica_integer _l1_1;
modelica_metatype _parts2 = NULL;
modelica_metatype _parts = NULL;
modelica_string _name = NULL;
modelica_boolean _success;
modelica_metatype _cmt = NULL;
modelica_string _bcpath = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_2;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_name = tmp4_1;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
_publst2 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _publst, _item ,&_success);
_l2 = listLength(_publst2);
_l1 = listLength(_publst);
_l1_1 = ((modelica_integer) -1) + _l1;
if(((((_l1_1 == _l2) && (!isSome(_item))) && _success) || (((!(_l1_1 == _l2)) && isSome(_item)) && _success)))
{
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
}
else
{
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
_protlst2 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _protlst, _item, NULL);
_parts2 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts, _protlst2);
}
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts2, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_2;
_bcpath = tmpMeta15;
_mod = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_name = tmp4_1;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
_publst2 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _publst, _item ,&_success);
_l2 = listLength(_publst2);
_l1 = listLength(_publst);
_l1_1 = ((modelica_integer) -1) + _l1;
if(((((_l1_1 == _l2) && (!isSome(_item))) && _success) || (((!(_l1_1 == _l2)) && isSome(_item)) && _success)))
{
_parts2 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst2);
}
else
{
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
_protlst2 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _name, _protlst, _item, NULL);
_parts2 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts, _protlst2);
}
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcpath, _mod, _cmt, _parts2, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteOrUpdateComponent(threadData_t *threadData, modelica_string _inString, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype _item)
{
modelica_metatype _outProgram = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inString;
tmp4_2 = _inComponentRef;
tmp4_3 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_metatype _modelwithin = NULL;
modelica_string _name = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newcdef = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
_model_ = tmp4_2;
_name = tmp4_1;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_modelwithin = omc_AbsynUtil_stripLast(threadData, _modelpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteOrUpdateComponentFromClass(threadData, _name, _cdef, _item);
tmpMeta6 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _modelwithin);
tmpMeta8 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, tmpMeta7);
tmpMeta1 = omc_InteractiveUtil_updateProgram(threadData, tmpMeta8, _p, 0);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,2) == 0) goto tmp3_end;
_model_ = tmp4_2;
_name = tmp4_1;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
_newcdef = omc_Interactive_deleteOrUpdateComponentFromClass(threadData, _name, _cdef, _item);
tmpMeta9 = mmc_mk_cons(_newcdef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta9, _OMC_LIT177);
tmpMeta1 = omc_InteractiveUtil_updateProgram(threadData, tmpMeta10, _p, 0);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outProgram = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_lookupClassdef(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2, modelica_metatype _inProgram3, modelica_metatype *out_outPath)
{
modelica_metatype _outClass = NULL;
modelica_metatype _outPath = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inPath1;
tmp4_2 = _inPath2;
tmp4_3 = _inProgram3;
{
modelica_metatype _inmodeldef = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _newpath = NULL;
modelica_metatype _path = NULL;
modelica_metatype _inmodel = NULL;
modelica_metatype _innewpath = NULL;
modelica_metatype _p = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_path = tmp4_1;
_inmodel = tmp4_2;
_p = tmp4_3;
_path = omc_InstUtil_removeSelfReference(threadData, omc_AbsynUtil_pathLastIdent(threadData, _inmodel), _path);
_inmodeldef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _inmodel, _p, 0, 0);
tmpMeta6 = mmc_mk_cons(_inmodeldef, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _OMC_LIT177);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, tmpMeta7, 0, 0);
_newpath = omc_AbsynUtil_joinPaths(threadData, _inmodel, _path);
tmpMeta[0+0] = _cdef;
tmpMeta[0+1] = _newpath;
goto tmp3_done;
}
case 1: {
_path = tmp4_1;
_inmodel = tmp4_2;
_p = tmp4_3;
_innewpath = omc_AbsynUtil_stripLast(threadData, _inmodel);
tmpMeta[0+0] = omc_Interactive_lookupClassdef(threadData, _path, _innewpath, _p, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
_path = tmp4_1;
_p = tmp4_3;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta[0+0] = _cdef;
tmpMeta[0+1] = _path;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT227), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmp4 += 4;
tmpMeta[0+0] = _OMC_LIT230;
tmpMeta[0+1] = _OMC_LIT231;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT232), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmp4 += 3;
tmpMeta[0+0] = _OMC_LIT234;
tmpMeta[0+1] = _OMC_LIT235;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (6 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT236), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmp4 += 2;
tmpMeta[0+0] = _OMC_LIT238;
tmpMeta[0+1] = _OMC_LIT239;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT240), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp3_end;
tmp4 += 1;
tmpMeta[0+0] = _OMC_LIT242;
tmpMeta[0+1] = _OMC_LIT243;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (5 != MMC_STRLEN(tmpMeta12) || strcmp(MMC_STRINGDATA(_OMC_LIT244), MMC_STRINGDATA(tmpMeta12)) != 0) goto tmp3_end;
tmp13 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp13) goto goto_2;
tmpMeta[0+0] = _OMC_LIT246;
tmpMeta[0+1] = _OMC_LIT247;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta14;
_path = tmp4_1;
_inmodel = tmp4_2;
_s1 = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
_s2 = omc_AbsynUtil_pathString(threadData, _inmodel, _OMC_LIT93, 1, 0);
tmpMeta14 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addMessage(threadData, _OMC_LIT252, tmpMeta14);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 9) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta[0+0];
_outPath = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outPath) { *out_outPath = _outPath; }
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getVariableValueLst(threadData_t *threadData, modelica_metatype _ids, modelica_metatype _vars)
{
modelica_metatype _val = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _ids;
tmp4_2 = _vars;
{
modelica_integer _ix;
modelica_string _id1 = NULL;
modelica_string _id2 = NULL;
modelica_string _id3 = NULL;
modelica_metatype _v = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _srest = NULL;
modelica_metatype _vals = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmp4_2);
tmpMeta9 = MMC_CDR(tmp4_2);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_id1 = tmpMeta6;
_id2 = tmpMeta10;
_rest = tmpMeta9;
tmp11 = (stringEqual(_id1, _id2));
if (0 != tmp11) goto goto_2;
tmpMeta1 = omc_Interactive_getVariableValueLst(threadData, _ids, _rest);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_boolean tmp22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_2);
tmpMeta17 = MMC_CDR(tmp4_2);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,10,4) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 4));
_id1 = tmpMeta12;
_id2 = tmpMeta14;
_srest = tmpMeta15;
_id3 = tmpMeta18;
_vals = tmpMeta20;
_comp = tmpMeta21;
tmp4 += 1;
tmp22 = (stringEqual(_id1, _id3));
if (1 != tmp22) goto goto_2;
_ix = omc_List_position1OnTrue(threadData, _comp, boxvar_stringEq, _id2);
_v = listGet(_vals, _ix);
tmpMeta23 = mmc_mk_cons(_id2, _srest);
tmpMeta25 = mmc_mk_box4(3, &GlobalScript_Variable_IVAR__desc, _id2, _v, _OMC_LIT253);
tmpMeta24 = mmc_mk_cons(tmpMeta25, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = omc_Interactive_getVariableValueLst(threadData, tmpMeta23, tmpMeta24);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_boolean tmp32;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta26 = MMC_CAR(tmp4_2);
tmpMeta27 = MMC_CDR(tmp4_2);
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmp4_1);
tmpMeta31 = MMC_CDR(tmp4_1);
if (!listEmpty(tmpMeta31)) goto tmp3_end;
_id2 = tmpMeta28;
_v = tmpMeta29;
_id1 = tmpMeta30;
tmp32 = (stringEqual(_id1, _id2));
if (1 != tmp32) goto goto_2;
tmpMeta1 = _v;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_val = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _val;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getVariableValue(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inVariableLst)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inIdent;
tmp4_2 = _inVariableLst;
{
modelica_string _id1 = NULL;
modelica_string _id2 = NULL;
modelica_metatype _v = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_boolean tmp10;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_id2 = tmpMeta8;
_v = tmpMeta9;
_id1 = tmp4_1;
tmp10 = (stringEqual(_id1, _id2));
if (1 != tmp10) goto goto_2;
tmpMeta1 = _v;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_2);
tmpMeta12 = MMC_CDR(tmp4_2);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_id2 = tmpMeta13;
_rest = tmpMeta12;
_id1 = tmp4_1;
tmp14 = (stringEqual(_id1, _id2));
if (0 != tmp14) goto goto_2;
tmpMeta1 = omc_Interactive_getVariableValue(threadData, _id1, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outValue = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outValue;
}
DLLExport
modelica_metatype omc_Interactive_addScope(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inVariableLst)
{
modelica_metatype _outProgram = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inProgram;
tmp4_2 = _inVariableLst;
{
modelica_metatype _path = NULL;
modelica_metatype _newpath = NULL;
modelica_metatype _path2 = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _vars = NULL;
modelica_metatype _w = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
_cls = tmpMeta6;
_vars = tmp4_2;
tmpMeta8 = omc_Interactive_getVariableValue(threadData, _OMC_LIT254, _vars);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,12,1) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_path = tmpMeta10;
tmpMeta11 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _path);
tmpMeta12 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _cls, tmpMeta11);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta17;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cls = tmpMeta13;
_w = tmpMeta14;
_vars = tmp4_2;
tmp15 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Interactive_getVariableValue(threadData, _OMC_LIT254, _vars);
tmp15 = 1;
goto goto_16;
goto_16:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp15) {goto goto_2;}
tmpMeta17 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _cls, _w);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,1) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_cls = tmpMeta18;
_path2 = tmpMeta20;
_vars = tmp4_2;
tmpMeta21 = omc_Interactive_getVariableValue(threadData, _OMC_LIT254, _vars);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,12,1) == 0) goto goto_2;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,1) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
_path = tmpMeta23;
_newpath = omc_AbsynUtil_joinPaths(threadData, _path, _path2);
tmpMeta24 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _newpath);
tmpMeta25 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, _cls, tmpMeta24);
tmpMeta1 = tmpMeta25;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inProgram;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outProgram;
}
DLLExport
modelica_metatype omc_Interactive_mergeProgram(threadData_t *threadData, modelica_metatype _newProgram, modelica_metatype _oldProgram)
{
modelica_metatype _program = NULL;
modelica_metatype _cl1 = NULL;
modelica_metatype _cl2 = NULL;
modelica_metatype _w = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _newProgram;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_cl1 = tmpMeta2;
_w = tmpMeta3;
tmpMeta4 = _oldProgram;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
_cl2 = tmpMeta5;
tmpMeta6 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, listAppend(_cl1, _cl2), _w);
_program = tmpMeta6;
_return: OMC_LABEL_UNUSED
return _program;
}
DLLExport
modelica_boolean omc_Interactive_isPrimitiveClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inProgram;
{
modelica_metatype _inmodel = NULL;
modelica_metatype _path = NULL;
modelica_metatype _cdef = NULL;
modelica_string _cname = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,13,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,14,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,15,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,16,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta10;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,18,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta11;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,7,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,0) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,1,4) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_cname = tmpMeta12;
_path = tmpMeta16;
_p = tmp4_2;
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta18 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _cname, tmpMeta17);
_inmodel = omc_AbsynUtil_crefToPath(threadData, tmpMeta18);
_cdef = omc_Interactive_lookupClassdef(threadData, _path, _inmodel, _p, NULL);
_inClass = _cdef;
_inProgram = _p;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isPrimitiveClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isPrimitiveClass(threadData, _inClass, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_existClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _path = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_cr = tmp4_1;
_p = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_existClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_existClass(threadData, _inComponentRef, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getCompitemNamed(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynComponentItemLst)
{
modelica_metatype _outComponentItem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inAbsynComponentItemLst;
{
modelica_string _id1 = NULL;
modelica_string _id2 = NULL;
modelica_metatype _x = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_2);
tmpMeta8 = MMC_CDR(tmp4_2);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_id1 = tmpMeta6;
_x = tmpMeta7;
_id2 = tmpMeta10;
tmp11 = (stringEqual(_id1, _id2));
if (1 != tmp11) goto goto_2;
tmpMeta1 = _x;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_2);
tmpMeta13 = MMC_CDR(tmp4_2);
_xs = tmpMeta13;
_cr = tmp4_1;
tmpMeta1 = omc_Interactive_getCompitemNamed(threadData, _cr, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentItem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentItem;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getElementContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outElement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inAbsynElementItemLst;
{
modelica_metatype _cr = NULL;
modelica_metatype _res = NULL;
modelica_metatype _ellst = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_res = tmpMeta8;
_ellst = tmpMeta10;
_cr = tmp4_1;
omc_Interactive_getCompitemNamed(threadData, _cr, _ellst);
tmpMeta1 = _res;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_2);
tmpMeta12 = MMC_CDR(tmp4_2);
_xs = tmpMeta12;
_cr = tmp4_1;
tmpMeta1 = omc_Interactive_getElementContainsName(threadData, _cr, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outElementSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inAbsynElementItemLst;
{
modelica_metatype _cr = NULL;
modelica_metatype _res = NULL;
modelica_metatype _ellst = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
_res = tmpMeta9;
_ellst = tmpMeta10;
_cr = tmp4_1;
omc_Interactive_getCompitemNamed(threadData, _cr, _ellst);
tmpMeta1 = _res;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_2);
tmpMeta12 = MMC_CDR(tmp4_2);
_xs = tmpMeta12;
_cr = tmp4_1;
tmpMeta1 = omc_Interactive_getComponentsContainsName(threadData, _cr, _xs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElementSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getElementitemContainsName(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inAbsynElementItemLst)
{
modelica_metatype _outElementItem = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inAbsynElementItemLst;
{
modelica_metatype _cr = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
_elt = tmpMeta6;
_cr = tmp4_1;
tmpMeta8 = mmc_mk_cons(_elt, MMC_REFSTRUCTLIT(mmc_nil));
omc_Interactive_getComponentsContainsName(threadData, _cr, tmpMeta8);
tmpMeta1 = _elt;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_2);
tmpMeta10 = MMC_CDR(tmp4_2);
_rest = tmpMeta10;
_cr = tmp4_1;
tmpMeta1 = omc_Interactive_getElementitemContainsName(threadData, _cr, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElementItem = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementItem;
}
DLLExport
modelica_string omc_Interactive_getDerivedClassModifierValue(threadData_t *threadData, modelica_metatype _cls, modelica_metatype _path)
{
modelica_string _value = NULL;
modelica_metatype _args = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta5 = _cls;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,4) == 0) goto goto_1;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_args = tmpMeta7;
_value = omc_Dump_printExpStr(threadData, omc_Interactive_getModificationValue(threadData, _args, _path));
goto tmp2_done;
}
case 1: {
_value = _OMC_LIT55;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _value;
}
DLLExport
modelica_metatype omc_Interactive_getDerivedClassModifierNames(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_metatype _outString = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _args = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,7,0) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_args = tmpMeta8;
tmpMeta1 = omc_Interactive_getModificationNames(threadData, _args);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getEnumLiterals(threadData_t *threadData, modelica_metatype _inClass)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inClass;
{
modelica_metatype _literals = NULL;
modelica_string _str = NULL;
modelica_metatype _enumList = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,7,0) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_literals = tmpMeta9;
_enumList = omc_List_map(threadData, _literals, boxvar_Interactive_getEnumerationLiterals);
_str = stringDelimitList(_enumList, _OMC_LIT73);
tmpMeta10 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta10);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isProtectedClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inString)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inString;
{
modelica_string _str = NULL;
modelica_string _id = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_boolean tmp12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_id = tmpMeta11;
_str = tmp4_2;
tmp12 = (stringEqual(_id, _str));
if (1 != tmp12) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_rest = tmpMeta14;
_str = tmp4_2;
tmp1 = omc_Interactive_isProtectedClassInElements(threadData, _rest, _str);
goto tmp3_done;
}
case 3: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isProtectedClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inString)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isProtectedClassInElements(threadData, _inAbsynElementItemLst, _inString);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isProtectedClass(threadData_t *threadData, modelica_metatype _path, modelica_string _inString, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inString;
tmp4_2 = _inProgram;
{
modelica_string _str = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _protected_elementitem_list = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_str = tmp4_1;
_p = tmp4_2;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmp1 = omc_Interactive_isProtectedClassInElements(threadData, _protected_elementitem_list, _str);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_str = tmp4_1;
_p = tmp4_2;
tmpMeta9 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,4,5) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
_parts = tmpMeta11;
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmp1 = omc_Interactive_isProtectedClassInElements(threadData, _protected_elementitem_list, _str);
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isProtectedClass(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inString, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isProtectedClass(threadData, _path, _inString, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReplaceableInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inString)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inString;
{
modelica_string _str = NULL;
modelica_string _id = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _r = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_r = tmpMeta9;
_id = tmpMeta12;
_str = tmp4_2;
tmp13 = (stringEqual(_id, _str));
if (1 != tmp13) goto goto_2;
tmp1 = omc_Interactive_keywordReplaceable(threadData, _r);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
_rest = tmpMeta15;
_str = tmp4_2;
tmp1 = omc_Interactive_isReplaceableInElements(threadData, _rest, _str);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReplaceableInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inString)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isReplaceableInElements(threadData, _inAbsynElementItemLst, _inString);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReplaceable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_string _inString, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inString;
tmp4_3 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_string _str = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _public_elementitem_list = NULL;
modelica_metatype _protected_elementitem_list = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_model_ = tmp4_1;
_str = tmp4_2;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_public_elementitem_list = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmp1 = omc_Interactive_isReplaceableInElements(threadData, _public_elementitem_list, _str);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_model_ = tmp4_1;
_str = tmp4_2;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta9 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,5) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_parts = tmpMeta11;
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmp1 = omc_Interactive_isReplaceableInElements(threadData, _protected_elementitem_list, _str);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
_model_ = tmp4_1;
_str = tmp4_2;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta12 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,4,5) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
_parts = tmpMeta14;
_public_elementitem_list = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmp1 = omc_Interactive_isReplaceableInElements(threadData, _public_elementitem_list, _str);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_model_ = tmp4_1;
_str = tmp4_2;
_p = tmp4_3;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta15 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,4,5) == 0) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
_parts = tmpMeta17;
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmp1 = omc_Interactive_isReplaceableInElements(threadData, _protected_elementitem_list, _str);
goto tmp3_done;
}
case 4: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReplaceable(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inString, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isReplaceable(threadData, _inComponentRef1, _inString, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isEnumeration(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,7,0) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,2) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isEnumeration(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isEnumeration(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isConstant(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
{
modelica_metatype _path = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _publst = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _classname = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta9 = omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,3,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta12 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,4,5) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
_parts = tmpMeta14;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta15 = omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,3,3) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,3,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isConstant(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isConstant(threadData, _inComponentRef1, _inComponentRef2, _p);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isProtected(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
{
modelica_metatype _path = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _publst = NULL;
modelica_metatype _protlst = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _classname = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta9 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,5) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_parts = tmpMeta11;
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
omc_Interactive_getComponentsContainsName(threadData, _cr, _protlst);
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta12 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,4,5) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
_parts = tmpMeta14;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
tmp1 = 0;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta15 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,4,5) == 0) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
_parts = tmpMeta17;
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
omc_Interactive_getComponentsContainsName(threadData, _cr, _protlst);
tmp1 = 1;
goto tmp3_done;
}
case 4: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isProtected(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isProtected(threadData, _inComponentRef1, _inComponentRef2, _p);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isParameter(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
{
modelica_metatype _path = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _publst = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _classname = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta9 = omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,3) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_cr = tmp4_1;
_classname = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _classname);
tmpMeta12 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,4,5) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
_parts = tmpMeta14;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta15 = omc_Interactive_getComponentsContainsName(threadData, _cr, _publst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,3,3) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,2,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isParameter(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _p)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isParameter(threadData, _inComponentRef1, _inComponentRef2, _p);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isPartial(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (1 != tmp8) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isPartial(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isPartial(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isClass(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isClass(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isClass(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isPackage(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,8,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isPackage(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isPackage(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isFunction(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,9,1) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isFunction(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isFunction(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isOptimization(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isOptimization(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isOptimization(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isBlock(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,4,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isBlock(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isBlock(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isRecord(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,3,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isRecord(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isRecord(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isOperatorFunction(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,9,1) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isOperatorFunction(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isOperatorFunction(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isOperatorRecord(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,11,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isOperatorRecord(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isOperatorRecord(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isOperator(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,10,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isOperator(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isOperator(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isModel(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isModel(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isModel(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isConnector(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,5,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta8 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,6,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isConnector(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isConnector(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_boolean omc_Interactive_isType(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,7,0) == 0) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isType(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isType(threadData, _path, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
DLLExport
modelica_string omc_Interactive_getClassRestriction(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_string _outRestriction = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_metatype _p = NULL;
modelica_metatype _restr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_p = tmp4_1;
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_restr = tmpMeta7;
tmp1 = omc_Dump_unparseRestrictionStr(threadData, _restr);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outRestriction = tmp1;
_return: OMC_LABEL_UNUSED
return _outRestriction;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getClassDimensions(threadData_t *threadData, modelica_metatype _cdef)
{
modelica_string _str = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _cdef;
{
modelica_metatype _ad = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (optionNone(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
_ad = tmpMeta8;
tmpMeta9 = stringAppend(_OMC_LIT125,stringDelimitList(omc_List_map(threadData, _ad, boxvar_Dump_printSubscriptStr), _OMC_LIT73));
tmpMeta10 = stringAppend(tmpMeta9,_OMC_LIT126);
tmp1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_str = tmp1;
_return: OMC_LABEL_UNUSED
return _str;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExternalFunctionSpecification(threadData_t *threadData, modelica_metatype _cr, modelica_metatype _p)
{
modelica_string _res_1 = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _path = NULL;
modelica_string _strLanguage = NULL;
modelica_string _strFuncName = NULL;
modelica_string _strOutput = NULL;
modelica_string _strArguments = NULL;
modelica_string _strAnn1 = NULL;
modelica_string _strAnn2 = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _funcName = NULL;
modelica_metatype _lang = NULL;
modelica_metatype _output_ = NULL;
modelica_metatype _args = NULL;
modelica_metatype _ann1 = NULL;
modelica_metatype _ann2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta6 = omc_AbsynUtil_getExternalDecl(threadData, _cls);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,7,2) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 6));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_funcName = tmpMeta8;
_lang = tmpMeta9;
_output_ = tmpMeta10;
_args = tmpMeta11;
_ann1 = tmpMeta12;
_ann2 = tmpMeta13;
tmpMeta14 = stringAppend(_OMC_LIT94,omc_Util_getOptionOrDefault(threadData, _lang, _OMC_LIT55));
tmpMeta15 = stringAppend(tmpMeta14,_OMC_LIT94);
_strLanguage = tmpMeta15;
tmpMeta16 = stringAppend(_OMC_LIT94,omc_Dump_printComponentRefStr(threadData, omc_Util_getOptionOrDefault(threadData, _output_, _OMC_LIT255)));
tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT94);
_strOutput = tmpMeta17;
tmpMeta18 = stringAppend(_OMC_LIT94,omc_Util_getOptionOrDefault(threadData, _funcName, _OMC_LIT55));
tmpMeta19 = stringAppend(tmpMeta18,_OMC_LIT94);
_strFuncName = tmpMeta19;
tmpMeta20 = stringAppend(_OMC_LIT94,omc_Dump_printExpLstStr(threadData, _args));
tmpMeta21 = stringAppend(tmpMeta20,_OMC_LIT94);
_strArguments = tmpMeta21;
tmpMeta22 = stringAppend(_OMC_LIT94,omc_Dump_unparseAnnotationOption(threadData, _ann1));
tmpMeta23 = stringAppend(tmpMeta22,_OMC_LIT94);
_strAnn1 = tmpMeta23;
tmpMeta24 = stringAppend(_OMC_LIT94,omc_Dump_unparseAnnotationOption(threadData, _ann2));
tmpMeta25 = stringAppend(tmpMeta24,_OMC_LIT94);
_strAnn2 = tmpMeta25;
tmpMeta26 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_strLanguage, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strOutput, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strFuncName, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strArguments, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strAnn1, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strAnn2, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))))))))))))));
tmp1 = stringAppendList(tmpMeta26);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res_1 = tmp1;
_return: OMC_LABEL_UNUSED
return _res_1;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getShortDefinitionBaseClassInformation(threadData_t *threadData, modelica_metatype _cr, modelica_metatype _p)
{
modelica_string _res_1 = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _path = NULL;
modelica_metatype _baseClassPath = NULL;
modelica_string _strFlow = NULL;
modelica_string _strStream = NULL;
modelica_string _strVariability = NULL;
modelica_string _strDirection = NULL;
modelica_string _dim_str = NULL;
modelica_string _strBaseClassPath = NULL;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_metatype _cdef = NULL;
modelica_metatype _attr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,4) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmp14 = mmc_unbox_integer(tmpMeta13);
_cdef = tmpMeta7;
_baseClassPath = tmpMeta9;
_attr = tmpMeta10;
_flowPrefix = tmp12;
_streamPrefix = tmp14;
_dim_str = omc_Interactive_getClassDimensions(threadData, _cdef);
_strBaseClassPath = omc_AbsynUtil_pathString(threadData, _baseClassPath, _OMC_LIT93, 1, 0);
_strFlow = (_flowPrefix?_OMC_LIT256:_OMC_LIT257);
_strStream = (_streamPrefix?_OMC_LIT258:_OMC_LIT257);
_strVariability = omc_InteractiveUtil_attrVariabilityStr(threadData, _attr);
_strDirection = omc_InteractiveUtil_attrDirectionStr(threadData, _attr);
tmpMeta15 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_strBaseClassPath, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strFlow, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strStream, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strVariability, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_strDirection, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_dim_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))))))))))))));
tmp1 = stringAppendList(tmpMeta15);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT140;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_res_1 = tmp1;
_return: OMC_LABEL_UNUSED
return _res_1;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInCommentOpt(threadData_t *threadData, modelica_metatype _inAbsynCommentOption, modelica_string _inString)
{
modelica_metatype _outAbsynCommentOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _inAbsynCommentOption;
tmp4_2 = _inString;
{
modelica_metatype _ann = NULL;
modelica_string _cmt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_ann = tmpMeta7;
tmpMeta8 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, _ann, mmc_mk_none());
tmpMeta1 = mmc_mk_some(tmpMeta8);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_ann = tmpMeta10;
_cmt = tmp4_2;
tmpMeta11 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, _ann, mmc_mk_some(_cmt));
tmpMeta1 = mmc_mk_some(tmpMeta11);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
if (!optionNone(tmp4_1)) goto tmp3_end;
_cmt = tmp4_2;
tmpMeta12 = mmc_mk_box3(3, &Absyn_Comment_COMMENT__desc, mmc_mk_none(), mmc_mk_some(_cmt));
tmpMeta1 = mmc_mk_some(tmpMeta12);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynCommentOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynCommentOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInClassdef(threadData_t *threadData, modelica_metatype _inClassDef, modelica_string _inString)
{
modelica_metatype _outClassDef = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;
tmp4_1 = _inClassDef;
tmp4_2 = _inString;
{
modelica_metatype _p = NULL;
modelica_string _strcmt = NULL;
modelica_string _id = NULL;
modelica_metatype _cmt_1 = NULL;
modelica_metatype _ad = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _arg = NULL;
modelica_metatype _args = NULL;
modelica_metatype _edef = NULL;
modelica_metatype _plst = NULL;
modelica_metatype _path = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_typeVars = tmpMeta6;
_classAttrs = tmpMeta7;
_p = tmpMeta8;
_ann = tmpMeta9;
tmpMeta10 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _p, _ann, mmc_mk_none());
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,5) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_typeVars = tmpMeta11;
_classAttrs = tmpMeta12;
_p = tmpMeta13;
_ann = tmpMeta14;
_strcmt = tmp4_2;
tmp4 += 5;
tmpMeta15 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _p, _ann, mmc_mk_some(_strcmt));
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,0,2) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 3));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_path = tmpMeta17;
_ad = tmpMeta18;
_attr = tmpMeta19;
_arg = tmpMeta20;
_cmt = tmpMeta21;
_strcmt = tmp4_2;
tmp4 += 4;
_cmt_1 = omc_Interactive_setClassCommentInCommentOpt(threadData, _cmt, _strcmt);
tmpMeta22 = mmc_mk_box3(3, &Absyn_TypeSpec_TPATH__desc, _path, _ad);
tmpMeta23 = mmc_mk_box5(4, &Absyn_ClassDef_DERIVED__desc, tmpMeta22, _attr, _arg, _cmt_1);
tmpMeta1 = tmpMeta23;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_edef = tmpMeta24;
_cmt = tmpMeta25;
_strcmt = tmp4_2;
tmp4 += 3;
_cmt_1 = omc_Interactive_setClassCommentInCommentOpt(threadData, _cmt, _strcmt);
tmpMeta26 = mmc_mk_box3(5, &Absyn_ClassDef_ENUMERATION__desc, _edef, _cmt_1);
tmpMeta1 = tmpMeta26;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_plst = tmpMeta27;
_cmt = tmpMeta28;
_strcmt = tmp4_2;
tmp4 += 2;
_cmt_1 = omc_Interactive_setClassCommentInCommentOpt(threadData, _cmt, _strcmt);
tmpMeta29 = mmc_mk_box3(6, &Absyn_ClassDef_OVERLOAD__desc, _plst, _cmt_1);
tmpMeta1 = tmpMeta29;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,5) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_id = tmpMeta30;
_args = tmpMeta31;
_p = tmpMeta32;
_ann = tmpMeta33;
tmpMeta34 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _id, _args, mmc_mk_none(), _p, _ann);
tmpMeta1 = tmpMeta34;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,5) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_id = tmpMeta35;
_args = tmpMeta36;
_p = tmpMeta37;
_ann = tmpMeta38;
_strcmt = tmp4_2;
tmpMeta39 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _id, _args, mmc_mk_some(_strcmt), _p, _ann);
tmpMeta1 = tmpMeta39;
goto tmp3_done;
}
case 7: {
tmpMeta1 = _inClassDef;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClassDef = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClassDef;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setClassCommentInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _inString)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inString;
{
modelica_metatype _cdef_1 = NULL;
modelica_metatype _cdef = NULL;
modelica_string _cmt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_outClass = tmp4_1;
_cdef = tmpMeta6;
_cmt = tmp4_2;
_cdef_1 = omc_Interactive_setClassCommentInClassdef(threadData, _cdef, _cmt);
tmpMeta7 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta7), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta7))[7] = _cdef_1;
_outClass = tmpMeta7;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
DLLExport
modelica_metatype omc_Interactive_setClassComment(threadData_t *threadData, modelica_metatype _path, modelica_string _inString, modelica_metatype _inProgram, modelica_boolean *out_success)
{
modelica_metatype _outProgram = NULL;
modelica_boolean _success;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _path;
tmp4_2 = _inString;
tmp4_3 = _inProgram;
{
modelica_metatype _p_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_p_class = tmp4_1;
_str = tmp4_2;
_p = tmp4_3;
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_cdef_1 = omc_Interactive_setClassCommentInClass(threadData, _cdef, _str);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmpMeta[0+0] = _newp;
tmp1_c1 = 1;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inProgram;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_success = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_success) { *out_success = _success; }
return _outProgram;
}
modelica_metatype boxptr_Interactive_setClassComment(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inString, modelica_metatype _inProgram, modelica_metatype *out_success)
{
modelica_boolean _success;
modelica_metatype _outProgram = NULL;
_outProgram = omc_Interactive_setClassComment(threadData, _path, _inString, _inProgram, &_success);
if (out_success) { *out_success = mmc_mk_icon(_success); }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_deleteClassFromList(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inAbsynClassLst)
{
modelica_metatype _outAbsynClassLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inClass;
tmp4_2 = _inAbsynClassLst;
{
modelica_string _name1 = NULL;
modelica_string _name2 = NULL;
modelica_metatype _xs = NULL;
modelica_metatype _res = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _x = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_2);
tmpMeta8 = MMC_CDR(tmp4_2);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_name2 = tmpMeta9;
_xs = tmpMeta8;
_name1 = tmpMeta10;
if (!(stringEqual(_name1, _name2))) goto tmp3_end;
tmpMeta1 = _xs;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_2);
tmpMeta12 = MMC_CDR(tmp4_2);
_x = tmpMeta11;
_xs = tmpMeta12;
_cdef = tmp4_1;
_res = omc_Interactive_deleteClassFromList(threadData, _cdef, _xs);
tmpMeta13 = mmc_mk_cons(_x, _res);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynClassLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassLst;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_deleteClass(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _cpath = NULL;
modelica_metatype _parentcpath = NULL;
modelica_metatype _parentparentcpath = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _parentcdef = NULL;
modelica_metatype _parentcdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_class_ = tmp4_1;
_p = tmp4_2;
_cpath = omc_AbsynUtil_crefToPath(threadData, _class_);
_parentcpath = omc_AbsynUtil_stripLast(threadData, _cpath);
_parentparentcpath = omc_AbsynUtil_stripLast(threadData, _parentcpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _cpath, _p, 0, 0);
_parentcdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _parentcpath, _p, 0, 0);
_parentcdef_1 = omc_InteractiveUtil_removeInnerClass(threadData, _cdef, _parentcdef);
tmpMeta6 = mmc_mk_cons(_parentcdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _parentparentcpath);
tmpMeta8 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, tmpMeta7);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta8, _p, 0);
tmp1_c0 = _OMC_LIT127;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_class_ = tmp4_1;
_p = tmp4_2;
_cpath = omc_AbsynUtil_crefToPath(threadData, _class_);
_parentcpath = omc_AbsynUtil_stripLast(threadData, _cpath);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _cpath, _p, 0, 0);
_parentcdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _parentcpath, _p, 0, 0);
_parentcdef_1 = omc_InteractiveUtil_removeInnerClass(threadData, _cdef, _parentcdef);
tmpMeta9 = mmc_mk_cons(_parentcdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta9, _OMC_LIT177);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta10, _p, 0);
tmp1_c0 = _OMC_LIT127;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
_class_ = tmp4_1;
_p = tmp4_2;
_cpath = omc_AbsynUtil_crefToPath(threadData, _class_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _cpath, _p, 0, 0);
tmpMeta11 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta11), MMC_UNTAGPTR(_p), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta11))[2] = omc_Interactive_deleteClassFromList(threadData, _cdef, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 2))));
_p = tmpMeta11;
tmp1_c0 = _OMC_LIT127;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
case 3: {
tmp1_c0 = _OMC_LIT128;
tmpMeta[0+1] = _inProgram;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_createModel(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_metatype _outProgram = NULL;
modelica_string _name = NULL;
modelica_metatype _w = NULL;
modelica_metatype _wp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_AbsynUtil_crefIsIdent(threadData, _inComponentRef))
{
_name = omc_AbsynUtil_crefFirstIdent(threadData, _inComponentRef);
_w = _OMC_LIT177;
}
else
{
_wp = omc_AbsynUtil_crefToPath(threadData, _inComponentRef);
tmpMeta3 = omc_AbsynUtil_splitQualAndIdentPath(threadData, _wp, &tmpMeta1);
_wp = tmpMeta3;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,1,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_name = tmpMeta2;
tmpMeta4 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _wp);
_w = tmpMeta4;
}
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta8 = mmc_mk_box10(3, &Absyn_Class_CLASS__desc, _name, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT259, _OMC_LIT229, tmpMeta6, tmpMeta7, _OMC_LIT120);
tmpMeta5 = mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta5, _w);
_outProgram = omc_InteractiveUtil_updateProgram(threadData, tmpMeta9, _inProgram, 0);
_return: OMC_LABEL_UNUSED
return _outProgram;
}
DLLExport
modelica_boolean omc_Interactive_isPrimitive(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _path = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (4 != MMC_STRLEN(tmpMeta6) || strcmp(MMC_STRINGDATA(_OMC_LIT227), MMC_STRINGDATA(tmpMeta6)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT232), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (6 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT236), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT240), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 4: {
_cr = tmp4_1;
_p = tmp4_2;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_class_ = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmp1 = omc_Interactive_isPrimitiveClass(threadData, _class_, _p);
goto tmp3_done;
}
case 5: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isPrimitive(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isPrimitive(threadData, _inComponentRef, _inProgram);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_changeLastIdent(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2)
{
modelica_metatype _outPath = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inPath1;
tmp4_2 = _inPath2;
{
modelica_string _b = NULL;
modelica_string _b_1 = NULL;
modelica_metatype _a_1 = NULL;
modelica_metatype _p1 = NULL;
modelica_metatype _p2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_b = tmpMeta6;
tmpMeta7 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _b);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
_p2 = tmp4_2;
_b_1 = omc_AbsynUtil_pathLastIdent(threadData, _p2);
tmpMeta8 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _b_1);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
_p1 = tmp4_1;
_p2 = tmp4_2;
_a_1 = omc_AbsynUtil_stripLast(threadData, _p1);
tmpMeta1 = omc_AbsynUtil_joinPaths(threadData, _a_1, _p2);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
_p1 = tmp4_1;
_p2 = tmp4_2;
_a_1 = omc_AbsynUtil_stripLast(threadData, _p1);
_b_1 = omc_AbsynUtil_pathLastIdent(threadData, _p2);
tmpMeta9 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _b_1);
tmpMeta1 = omc_AbsynUtil_joinPaths(threadData, _a_1, tmpMeta9);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outPath = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outPath;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInImport(threadData_t *threadData, modelica_metatype _inImport1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean)
{
modelica_metatype _outImport = NULL;
modelica_boolean _outBoolean;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inImport1;
tmp4_2 = _inPath2;
tmp4_3 = _inPath3;
tmp4_4 = _inEnv4;
{
modelica_metatype _cenv = NULL;
modelica_metatype _env = NULL;
modelica_metatype _path = NULL;
modelica_metatype _new_path = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_string _id = NULL;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta6;
_path_1 = tmpMeta7;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_cache = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none() ,NULL ,&_cenv);
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp8 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp8) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path_1, _new_comp);
tmpMeta9 = mmc_mk_box3(3, &Absyn_Import_NAMED__IMPORT__desc, _id, _new_path);
tmpMeta[0+0] = tmpMeta9;
tmp1_c1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path_1 = tmpMeta10;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_cache = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none() ,NULL ,&_cenv);
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp11 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp11) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path_1, _new_comp);
tmpMeta12 = mmc_mk_box2(4, &Absyn_Import_QUAL__IMPORT__desc, _new_path);
tmpMeta[0+0] = tmpMeta12;
tmp1_c1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_path_1 = tmpMeta13;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_cache = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none() ,NULL ,&_cenv);
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp14 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp14) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path_1, _new_comp);
tmpMeta15 = mmc_mk_box2(5, &Absyn_Import_UNQUAL__IMPORT__desc, _new_path);
tmpMeta[0+0] = tmpMeta15;
tmp1_c1 = 1;
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = _inImport1;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outImport = tmpMeta[0+0];
_outBoolean = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outBoolean) { *out_outBoolean = _outBoolean; }
return _outImport;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInImport(threadData_t *threadData, modelica_metatype _inImport1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean)
{
modelica_boolean _outBoolean;
modelica_metatype _outImport = NULL;
_outImport = omc_Interactive_renameClassInImport(threadData, _inImport1, _inPath2, _inPath3, _inEnv4, &_outBoolean);
if (out_outBoolean) { *out_outBoolean = mmc_mk_icon(_outBoolean); }
return _outImport;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean)
{
modelica_metatype _outElementSpec = NULL;
modelica_boolean _outBoolean;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inElementSpec1;
tmp4_2 = _inPath2;
tmp4_3 = _inPath3;
tmp4_4 = _inEnv4;
{
modelica_string _id = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _env = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _new_path = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _a = NULL;
modelica_metatype _comp_items = NULL;
modelica_metatype _import_1 = NULL;
modelica_metatype _import_ = NULL;
modelica_boolean _changed;
modelica_metatype _x = NULL;
modelica_metatype _annOpt = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _elargs = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_a = tmpMeta6;
_path_1 = tmpMeta8;
_x = tmpMeta9;
_comp_items = tmpMeta10;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 2;
tmpMeta14 = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none(), &tmpMeta11, &tmpMeta13);
_cache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,8) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_id = tmpMeta12;
_cenv = tmpMeta13;
tmpMeta15 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta15;
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp16 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp16) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path, _new_comp);
tmpMeta17 = mmc_mk_box3(3, &Absyn_TypeSpec_TPATH__desc, _new_path, _x);
tmpMeta18 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _a, tmpMeta17, _comp_items);
tmpMeta[0+0] = tmpMeta18;
tmp1_c1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_boolean tmp22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_path_1 = tmpMeta19;
_elargs = tmpMeta20;
_annOpt = tmpMeta21;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_cache = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none() ,NULL ,&_cenv);
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp22 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp22) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path_1, _new_comp);
tmpMeta23 = mmc_mk_box4(4, &Absyn_ElementSpec_EXTENDS__desc, _new_path, _elargs, _annOpt);
tmpMeta[0+0] = tmpMeta23;
tmp1_c1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_import_ = tmpMeta24;
_cmt = tmpMeta25;
_info = tmpMeta26;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_import_1 = omc_Interactive_renameClassInImport(threadData, _import_, _old_comp, _new_comp, _env ,&_changed);
tmpMeta27 = mmc_mk_box4(5, &Absyn_ElementSpec_IMPORT__desc, _import_1, _cmt, _info);
tmpMeta[0+0] = tmpMeta27;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = _inElementSpec1;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElementSpec = tmpMeta[0+0];
_outBoolean = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outBoolean) { *out_outBoolean = _outBoolean; }
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean)
{
modelica_boolean _outBoolean;
modelica_metatype _outElementSpec = NULL;
_outElementSpec = omc_Interactive_renameClassInElementSpec(threadData, _inElementSpec1, _inPath2, _inPath3, _inEnv4, &_outBoolean);
if (out_outBoolean) { *out_outBoolean = mmc_mk_icon(_outBoolean); }
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_boolean _outBoolean;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inAbsynElementItemLst1;
tmp4_2 = _inPath2;
tmp4_3 = _inPath3;
tmp4_4 = _inEnv4;
{
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_boolean _changed1;
modelica_boolean _changed2;
modelica_boolean _changed;
modelica_boolean _finalPrefix;
modelica_metatype _elementspec_1 = NULL;
modelica_metatype _elementspec = NULL;
modelica_metatype _element_1 = NULL;
modelica_metatype _element = NULL;
modelica_metatype _redeclare_ = NULL;
modelica_metatype _inner_outer = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constrainClass = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 6));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 7));
_finalPrefix = tmp11;
_redeclare_ = tmpMeta12;
_inner_outer = tmpMeta13;
_elementspec = tmpMeta14;
_info = tmpMeta15;
_constrainClass = tmpMeta16;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_res_1 = omc_Interactive_renameClassInElements(threadData, _res, _old_comp, _new_comp, _env ,&_changed1);
_elementspec_1 = omc_Interactive_renameClassInElementSpec(threadData, _elementspec, _old_comp, _new_comp, _env ,&_changed2);
tmpMeta17 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_finalPrefix), _redeclare_, _inner_outer, _elementspec_1, _info, _constrainClass);
tmpMeta18 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, tmpMeta17);
_element_1 = tmpMeta18;
_changed = (_changed1 || _changed2);
tmpMeta19 = mmc_mk_cons(_element_1, _res_1);
tmpMeta[0+0] = tmpMeta19;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_element = tmpMeta20;
_res = tmpMeta21;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_res_1 = omc_Interactive_renameClassInElements(threadData, _res, _old_comp, _new_comp, _env ,&_changed);
_element_1 = _element;
tmpMeta22 = mmc_mk_cons(_element_1, _res_1);
tmpMeta[0+0] = tmpMeta22;
tmp1_c1 = _changed;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta[0+0];
_outBoolean = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outBoolean) { *out_outBoolean = _outBoolean; }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean)
{
modelica_boolean _outBoolean;
modelica_metatype _outAbsynElementItemLst = NULL;
_outAbsynElementItemLst = omc_Interactive_renameClassInElements(threadData, _inAbsynElementItemLst1, _inPath2, _inPath3, _inEnv4, &_outBoolean);
if (out_outBoolean) { *out_outBoolean = mmc_mk_icon(_outBoolean); }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_boolean _outBoolean;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inAbsynClassPartLst1;
tmp4_2 = _inPath2;
tmp4_3 = _inPath3;
tmp4_4 = _inEnv4;
{
modelica_metatype _env = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_boolean _changed1;
modelica_boolean _changed2;
modelica_boolean _changed;
modelica_metatype _elements_1 = NULL;
modelica_metatype _elements = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _a = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elements = tmpMeta9;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_res_1 = omc_Interactive_renameClassInParts(threadData, _res, _old_comp, _new_comp, _env ,&_changed1);
_elements_1 = omc_Interactive_renameClassInElements(threadData, _elements, _old_comp, _new_comp, _env ,&_changed2);
_changed = (_changed1 || _changed2);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elements_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res_1);
tmpMeta[0+0] = tmpMeta10;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_elements = tmpMeta14;
_res = tmpMeta13;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_res_1 = omc_Interactive_renameClassInParts(threadData, _res, _old_comp, _new_comp, _env ,&_changed1);
_elements_1 = omc_Interactive_renameClassInElements(threadData, _elements, _old_comp, _new_comp, _env ,&_changed2);
_changed = (_changed1 || _changed2);
tmpMeta16 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elements_1);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _res_1);
tmpMeta[0+0] = tmpMeta15;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
_a = tmpMeta17;
_res = tmpMeta18;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
_res_1 = omc_Interactive_renameClassInParts(threadData, _res, _old_comp, _new_comp, _env ,&_changed);
tmpMeta19 = mmc_mk_cons(_a, _res_1);
tmpMeta[0+0] = tmpMeta19;
tmp1_c1 = _changed;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta[0+0];
_outBoolean = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outBoolean) { *out_outBoolean = _outBoolean; }
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean)
{
modelica_boolean _outBoolean;
modelica_metatype _outAbsynClassPartLst = NULL;
_outAbsynClassPartLst = omc_Interactive_renameClassInParts(threadData, _inAbsynClassPartLst1, _inPath2, _inPath3, _inEnv4, &_outBoolean);
if (out_outBoolean) { *out_outBoolean = mmc_mk_icon(_outBoolean); }
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_boolean *out_outBoolean)
{
modelica_metatype _outClass = NULL;
modelica_boolean _outBoolean;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inClass1;
tmp4_2 = _inPath2;
tmp4_3 = _inPath3;
tmp4_4 = _inEnv4;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_boolean _changed;
modelica_string _name = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _comment = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _new_path = NULL;
modelica_metatype _env = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _modifications = NULL;
modelica_metatype _elementarg = NULL;
modelica_metatype _co = NULL;
modelica_metatype _subscripts = NULL;
modelica_metatype _attrs = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_comment = tmpMeta11;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 2;
_parts_1 = omc_Interactive_renameClassInParts(threadData, _parts, _old_comp, _new_comp, _env ,&_changed);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _comment);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta[0+0] = _outClass;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta15;
_modifications = tmpMeta16;
_comment = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_parts_1 = omc_Interactive_renameClassInParts(threadData, _parts, _old_comp, _new_comp, _env ,&_changed);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _modifications, _comment, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta[0+0] = _outClass;
tmp1_c1 = _changed;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_boolean tmp35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,1,4) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,0,2) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 4));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 5));
_outClass = tmp4_1;
_name = tmpMeta22;
_path_1 = tmpMeta25;
_subscripts = tmpMeta26;
_attrs = tmpMeta27;
_elementarg = tmpMeta28;
_co = tmpMeta29;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_env = tmp4_4;
tmpMeta33 = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none(), &tmpMeta30, &tmpMeta32);
_cache = tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,2,8) == 0) goto goto_2;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
_name = tmpMeta31;
_cenv = tmpMeta32;
tmpMeta34 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _name);
_path_1 = tmpMeta34;
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmp35 = omc_AbsynUtil_pathEqual(threadData, _path, _old_comp);
if (1 != tmp35) goto goto_2;
_new_path = omc_Interactive_changeLastIdent(threadData, _path_1, _new_comp);
tmpMeta37 = mmc_mk_box3(3, &Absyn_TypeSpec_TPATH__desc, _new_path, _subscripts);
tmpMeta38 = mmc_mk_box5(4, &Absyn_ClassDef_DERIVED__desc, tmpMeta37, _attrs, _elementarg, _co);
tmpMeta36 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta36), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta36))[7] = tmpMeta38;
_outClass = tmpMeta36;
tmpMeta[0+0] = _outClass;
tmp1_c1 = 1;
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = _inClass1;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta[0+0];
_outBoolean = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outBoolean) { *out_outBoolean = _outBoolean; }
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_renameClassInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inPath2, modelica_metatype _inPath3, modelica_metatype _inEnv4, modelica_metatype *out_outBoolean)
{
modelica_boolean _outBoolean;
modelica_metatype _outClass = NULL;
_outClass = omc_Interactive_renameClassInClass(threadData, _inClass1, _inPath2, _inPath3, _inEnv4, &_outBoolean);
if (out_outBoolean) { *out_outBoolean = mmc_mk_icon(_outBoolean); }
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameClassVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv)
{
modelica_metatype _outTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv;
{
modelica_metatype _path_1 = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _old_class_path = NULL;
modelica_metatype _new_class_path = NULL;
modelica_string _new_name = NULL;
modelica_string _path_str = NULL;
modelica_string _id = NULL;
modelica_boolean _changed;
modelica_metatype _file_info = NULL;
modelica_metatype _p = NULL;
modelica_metatype _path_str_lst = NULL;
modelica_metatype _env = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _class_1 = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _args = NULL;
modelica_metatype _opath = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 10));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_class_ = tmpMeta6;
_file_info = tmpMeta7;
_opath = tmpMeta8;
_args = tmpMeta9;
tmp10 = omc_Interactive_isReadOnly(threadData, _file_info);
if (1 != tmp10) goto goto_2;
tmpMeta11 = mmc_mk_box3(0, _class_, _opath, _args);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_boolean tmp23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 3));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 4));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
_class_ = tmpMeta12;
_id = tmpMeta13;
_pa = tmpMeta15;
_old_class_path = tmpMeta17;
_new_class_path = tmpMeta18;
_p = tmpMeta19;
_path_str_lst = tmpMeta20;
_env = tmpMeta21;
tmp4 += 1;
tmpMeta22 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = omc_AbsynUtil_joinPaths(threadData, _pa, tmpMeta22);
tmp23 = omc_AbsynUtil_pathEqual(threadData, _old_class_path, _path_1);
if (1 != tmp23) goto goto_2;
_new_name = omc_AbsynUtil_pathLastIdent(threadData, _new_class_path);
_path_str = omc_AbsynUtil_pathString(threadData, _new_class_path, _OMC_LIT93, 1, 0);
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_class_), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[2] = _new_name;
_class_ = tmpMeta24;
tmpMeta25 = mmc_mk_cons(_path_str, _path_str_lst);
tmpMeta26 = mmc_mk_box5(0, _old_class_path, _new_class_path, _p, tmpMeta25, _env);
tmpMeta27 = mmc_mk_box3(0, _class_, mmc_mk_some(_pa), tmpMeta26);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_boolean tmp38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!optionNone(tmpMeta30)) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 1));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 4));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 5));
_class_ = tmpMeta28;
_id = tmpMeta29;
_old_class_path = tmpMeta32;
_new_class_path = tmpMeta33;
_p = tmpMeta34;
_path_str_lst = tmpMeta35;
_env = tmpMeta36;
tmp4 += 1;
tmpMeta37 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta37;
tmp38 = omc_AbsynUtil_pathEqual(threadData, _old_class_path, _path_1);
if (1 != tmp38) goto goto_2;
_new_name = omc_AbsynUtil_pathLastIdent(threadData, _new_class_path);
_path_str = omc_AbsynUtil_pathString(threadData, _new_class_path, _OMC_LIT93, 1, 0);
tmpMeta39 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta39), MMC_UNTAGPTR(_class_), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta39))[2] = _new_name;
_class_ = tmpMeta39;
tmpMeta40 = mmc_mk_cons(_path_str, _path_str_lst);
tmpMeta41 = mmc_mk_box5(0, _old_class_path, _new_class_path, _p, tmpMeta40, _env);
tmpMeta42 = mmc_mk_box3(0, _class_, mmc_mk_none(), tmpMeta41);
tmpMeta1 = tmpMeta42;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmpMeta45)) goto tmp3_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 1));
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 1));
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 2));
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 3));
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 4));
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 5));
_class_ = tmpMeta43;
_id = tmpMeta44;
_pa = tmpMeta46;
_old_class_path = tmpMeta48;
_new_class_path = tmpMeta49;
_p = tmpMeta50;
_path_str_lst = tmpMeta51;
_env = tmpMeta52;
tmp4 += 1;
tmpMeta53 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = omc_AbsynUtil_joinPaths(threadData, _pa, tmpMeta53);
_cenv = omc_Interactive_getClassEnvNoElaboration(threadData, _p, _path_1, _env);
_class_1 = omc_Interactive_renameClassInClass(threadData, _class_, _old_class_path, _new_class_path, _cenv ,&_changed);
_path_str = (_changed?omc_AbsynUtil_pathString(threadData, _path_1, _OMC_LIT93, 1, 0):_OMC_LIT55);
tmpMeta54 = mmc_mk_cons(_path_str, _path_str_lst);
tmpMeta55 = mmc_mk_box5(0, _old_class_path, _new_class_path, _p, tmpMeta54, _env);
tmpMeta56 = mmc_mk_box3(0, _class_1, mmc_mk_some(_pa), tmpMeta55);
tmpMeta1 = tmpMeta56;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta57), 2));
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!optionNone(tmpMeta59)) goto tmp3_end;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 1));
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 2));
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 3));
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 4));
tmpMeta65 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 5));
_class_ = tmpMeta57;
_id = tmpMeta58;
_old_class_path = tmpMeta61;
_new_class_path = tmpMeta62;
_p = tmpMeta63;
_path_str_lst = tmpMeta64;
_env = tmpMeta65;
tmpMeta66 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta66;
_cenv = omc_Interactive_getClassEnvNoElaboration(threadData, _p, _path_1, _env);
_class_1 = omc_Interactive_renameClassInClass(threadData, _class_, _old_class_path, _new_class_path, _cenv ,&_changed);
_path_str = (_changed?omc_AbsynUtil_pathString(threadData, _path_1, _OMC_LIT93, 1, 0):_OMC_LIT55);
tmpMeta67 = mmc_mk_cons(_path_str, _path_str_lst);
tmpMeta68 = mmc_mk_box5(0, _old_class_path, _new_class_path, _p, tmpMeta67, _env);
tmpMeta69 = mmc_mk_box3(0, _class_1, mmc_mk_none(), tmpMeta68);
tmpMeta1 = tmpMeta69;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
tmpMeta70 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_class_ = tmpMeta70;
_opath = tmpMeta71;
_args = tmpMeta72;
tmpMeta73 = mmc_mk_box3(0, _class_, _opath, _args);
tmpMeta1 = tmpMeta73;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynClassAbsynPathOptionTplAbsynPathAbsynPathAbsynProgramStringLstEnvEnv;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameClass(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inProgram1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _new_path = NULL;
modelica_metatype _old_path = NULL;
modelica_metatype _new_path_1 = NULL;
modelica_metatype _old_path_no_last = NULL;
modelica_string _tmp_str = NULL;
modelica_string _path_str_lst_no_empty = NULL;
modelica_string _res = NULL;
modelica_metatype _p = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _old_class = NULL;
modelica_metatype _new_name = NULL;
modelica_metatype _pa_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _path_str_lst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
_new_name = tmp4_3;
_p = tmp4_1;
_new_path = omc_AbsynUtil_crefToPath(threadData, _new_name);
_tmp_str = omc_AbsynUtil_pathString(threadData, _new_path, _OMC_LIT93, 1, 0);
fputs(MMC_STRINGDATA(_tmp_str),stdout);
fputs(MMC_STRINGDATA(_OMC_LIT72),stdout);
tmp1_c0 = _OMC_LIT260;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,2) == 0) goto tmp3_end;
_old_class = tmp4_2;
_p = tmp4_1;
_new_name = tmp4_3;
tmp4 += 1;
_old_path = omc_AbsynUtil_crefToPath(threadData, _old_class);
_new_path = omc_AbsynUtil_crefToPath(threadData, _new_name);
_pa_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _p);
omc_Inst_makeEnvFromProgram(threadData, _pa_1 ,&_env);
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = mmc_mk_box5(0, _old_path, _new_path, _p, tmpMeta6, _env);
tmpMeta8 = omc_AbsynUtil_traverseClasses(threadData, _p, mmc_mk_none(), boxvar_Interactive_renameClassVisitor, tmpMeta7, 1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_p_1 = tmpMeta9;
_path_str_lst = tmpMeta11;
_path_str_lst_no_empty = omc_Util_stringDelimitListNonEmptyElts(threadData, _path_str_lst, _OMC_LIT73);
tmpMeta12 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_path_str_lst_no_empty, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
_res = stringAppendList(tmpMeta12);
tmp1_c0 = _res;
tmpMeta[0+1] = _p_1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
_old_class = tmp4_2;
_p = tmp4_1;
_new_name = tmp4_3;
_old_path = omc_AbsynUtil_crefToPath(threadData, _old_class);
_new_path_1 = omc_AbsynUtil_crefToPath(threadData, _new_name);
_old_path_no_last = omc_AbsynUtil_stripLast(threadData, _old_path);
_new_path = omc_AbsynUtil_joinPaths(threadData, _old_path_no_last, _new_path_1);
_pa_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _p);
omc_Inst_makeEnvFromProgram(threadData, _pa_1 ,&_env);
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = mmc_mk_box5(0, _old_path, _new_path, _p, tmpMeta13, _env);
tmpMeta15 = omc_AbsynUtil_traverseClasses(threadData, _p, mmc_mk_none(), boxvar_Interactive_renameClassVisitor, tmpMeta14, 1);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 4));
_p_1 = tmpMeta16;
_path_str_lst = tmpMeta18;
_path_str_lst_no_empty = omc_Util_stringDelimitListNonEmptyElts(threadData, _path_str_lst, _OMC_LIT73);
tmpMeta19 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_path_str_lst_no_empty, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
_res = stringAppendList(tmpMeta19);
tmp1_c0 = _res;
tmpMeta[0+1] = _p_1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getComponentitemName(threadData_t *threadData, modelica_metatype _inComponentItem)
{
modelica_string _outIdent = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentItem;
{
modelica_string _id = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_id = tmpMeta7;
tmp1 = _id;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outIdent = tmp1;
_return: OMC_LABEL_UNUSED
return _outIdent;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade)
{
modelica_metatype _outAbsynComponentItemLst = NULL;
modelica_boolean _outChangeMade;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inAbsynComponentItemLst;
tmp4_2 = _inIdent;
tmp4_3 = _inExp;
{
modelica_string _id = NULL;
modelica_string _id2 = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _arg = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _res = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _item = NULL;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
if (optionNone(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_id = tmpMeta10;
_dim = tmpMeta11;
_arg = tmpMeta14;
_cond = tmpMeta15;
_cmt = tmpMeta16;
_rest = tmpMeta8;
_id2 = tmp4_2;
_exp = tmp4_3;
if (!(stringEqual(_id, _id2))) goto tmp3_end;
tmpMeta18 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _exp, _OMC_LIT120);
tmpMeta19 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _arg, tmpMeta18);
tmpMeta20 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _id, _dim, mmc_mk_some(tmpMeta19));
tmpMeta21 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta20, _cond, _cmt);
tmpMeta17 = mmc_mk_cons(tmpMeta21, _rest);
tmpMeta[0+0] = tmpMeta17;
tmp1_c1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 4));
if (!optionNone(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 4));
_id = tmpMeta25;
_dim = tmpMeta26;
_cond = tmpMeta28;
_cmt = tmpMeta29;
_rest = tmpMeta23;
_id2 = tmp4_2;
_exp = tmp4_3;
if (!(stringEqual(_id, _id2))) goto tmp3_end;
tmpMeta31 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta32 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _exp, _OMC_LIT120);
tmpMeta33 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, tmpMeta31, tmpMeta32);
tmpMeta34 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _id, _dim, mmc_mk_some(tmpMeta33));
tmpMeta35 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta34, _cond, _cmt);
tmpMeta30 = mmc_mk_cons(tmpMeta35, _rest);
tmpMeta[0+0] = tmpMeta30;
tmp1_c1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta36 = MMC_CAR(tmp4_1);
tmpMeta37 = MMC_CDR(tmp4_1);
_item = tmpMeta36;
_rest = tmpMeta37;
_id = tmp4_2;
_exp = tmp4_3;
_res = omc_Interactive_setVariableBindingInCompitems(threadData, _rest, _id, _exp ,&_b);
tmpMeta38 = mmc_mk_cons(_item, _res);
tmpMeta[0+0] = tmpMeta38;
tmp1_c1 = _b;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynComponentItemLst = tmpMeta[0+0];
_outChangeMade = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outChangeMade) { *out_outChangeMade = _outChangeMade; }
return _outAbsynComponentItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInCompitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade)
{
modelica_boolean _outChangeMade;
modelica_metatype _outAbsynComponentItemLst = NULL;
_outAbsynComponentItemLst = omc_Interactive_setVariableBindingInCompitems(threadData, _inAbsynComponentItemLst, _inIdent, _inExp, &_outChangeMade);
if (out_outChangeMade) { *out_outChangeMade = mmc_mk_icon(_outChangeMade); }
return _outAbsynComponentItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade)
{
modelica_metatype _outElement = NULL;
modelica_boolean _outChangeMade;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inElement;
tmp4_2 = _inIdent;
tmp4_3 = _inExp;
{
modelica_metatype _compitems_1 = NULL;
modelica_metatype _compitems = NULL;
modelica_boolean _f;
modelica_boolean _b;
modelica_metatype _r = NULL;
modelica_metatype _i = NULL;
modelica_string _id = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,3,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_f = tmp7;
_r = tmpMeta8;
_i = tmpMeta9;
_attr = tmpMeta11;
_tp = tmpMeta12;
_compitems = tmpMeta13;
_info = tmpMeta14;
_constr = tmpMeta15;
_id = tmp4_2;
_exp = tmp4_3;
_compitems_1 = omc_Interactive_setVariableBindingInCompitems(threadData, _compitems, _id, _exp ,&_b);
tmpMeta16 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr, _tp, _compitems_1);
tmpMeta17 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_f), _r, _i, tmpMeta16, _info, _constr);
tmpMeta[0+0] = tmpMeta17;
tmp1_c1 = _b;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inElement;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElement = tmpMeta[0+0];
_outChangeMade = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outChangeMade) { *out_outChangeMade = _outChangeMade; }
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade)
{
modelica_boolean _outChangeMade;
modelica_metatype _outElement = NULL;
_outElement = omc_Interactive_setVariableBindingInElement(threadData, _inElement, _inIdent, _inExp, &_outChangeMade);
if (out_outChangeMade) { *out_outChangeMade = mmc_mk_icon(_outChangeMade); }
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_boolean _outChangeMade;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inIdent;
tmp4_3 = _inExp;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elt_1 = NULL;
modelica_metatype _elt = NULL;
modelica_string _id = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _elitem = NULL;
modelica_boolean _b1;
modelica_boolean _b2;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elt = tmpMeta9;
_rest = tmpMeta8;
_id = tmp4_2;
_exp = tmp4_3;
_res = omc_Interactive_setVariableBindingInElementitems(threadData, _rest, _id, _exp ,&_b1);
_elt_1 = omc_Interactive_setVariableBindingInElement(threadData, _elt, _id, _exp ,&_b2);
_b = (_b1 || _b2);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta[0+0] = tmpMeta10;
tmp1_c1 = _b;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_elitem = tmpMeta12;
_rest = tmpMeta13;
_id = tmp4_2;
_exp = tmp4_3;
_res = omc_Interactive_setVariableBindingInElementitems(threadData, _rest, _id, _exp ,&_b);
tmpMeta14 = mmc_mk_cons(_elitem, _res);
tmpMeta[0+0] = tmpMeta14;
tmp1_c1 = _b;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta[0+0];
_outChangeMade = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outChangeMade) { *out_outChangeMade = _outChangeMade; }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade)
{
modelica_boolean _outChangeMade;
modelica_metatype _outAbsynElementItemLst = NULL;
_outAbsynElementItemLst = omc_Interactive_setVariableBindingInElementitems(threadData, _inAbsynElementItemLst, _inIdent, _inExp, &_outChangeMade);
if (out_outChangeMade) { *out_outChangeMade = mmc_mk_icon(_outChangeMade); }
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_boolean _outChangeMade;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inIdent;
tmp4_3 = _inExp;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elts_1 = NULL;
modelica_metatype _elts = NULL;
modelica_string _id = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _elt = NULL;
modelica_boolean _b1;
modelica_boolean _b2;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta6;
tmp1_c1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elts = tmpMeta9;
_rest = tmpMeta8;
_id = tmp4_2;
_exp = tmp4_3;
tmp4 += 1;
_res = omc_Interactive_setVariableBindingInClassparts(threadData, _rest, _id, _exp ,&_b1);
_elts_1 = omc_Interactive_setVariableBindingInElementitems(threadData, _elts, _id, _exp ,&_b2);
_b = (_b1 || _b2);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elts_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta[0+0] = tmpMeta10;
tmp1_c1 = _b;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_elts = tmpMeta14;
_rest = tmpMeta13;
_id = tmp4_2;
_exp = tmp4_3;
_res = omc_Interactive_setVariableBindingInClassparts(threadData, _rest, _id, _exp ,&_b1);
_elts_1 = omc_Interactive_setVariableBindingInElementitems(threadData, _elts, _id, _exp ,&_b2);
_b = (_b1 || _b2);
tmpMeta16 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elts_1);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _res);
tmpMeta[0+0] = tmpMeta15;
tmp1_c1 = _b;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
_elt = tmpMeta17;
_rest = tmpMeta18;
_id = tmp4_2;
_exp = tmp4_3;
_res = omc_Interactive_setVariableBindingInClassparts(threadData, _rest, _id, _exp ,&_b);
tmpMeta19 = mmc_mk_cons(_elt, _res);
tmpMeta[0+0] = tmpMeta19;
tmp1_c1 = _b;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta[0+0];
_outChangeMade = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outChangeMade) { *out_outChangeMade = _outChangeMade; }
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade)
{
modelica_boolean _outChangeMade;
modelica_metatype _outAbsynClassPartLst = NULL;
_outAbsynClassPartLst = omc_Interactive_setVariableBindingInClassparts(threadData, _inAbsynClassPartLst, _inIdent, _inExp, &_outChangeMade);
if (out_outChangeMade) { *out_outChangeMade = mmc_mk_icon(_outChangeMade); }
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setVariableBindingInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_string _inIdent, modelica_metatype _inExp, modelica_boolean *out_outChangeMade)
{
modelica_metatype _outClass = NULL;
modelica_boolean _outChangeMade;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inClass;
tmp4_2 = _inIdent;
tmp4_3 = _inExp;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _id2 = NULL;
modelica_string _bcname = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_boolean _b;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_id2 = tmp4_2;
_exp = tmp4_3;
_parts_1 = omc_Interactive_setVariableBindingInClassparts(threadData, _parts, _id2, _exp ,&_b);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta[0+0] = _outClass;
tmp1_c1 = _b;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_id2 = tmp4_2;
_exp = tmp4_3;
_parts_1 = omc_Interactive_setVariableBindingInClassparts(threadData, _parts, _id2, _exp ,&_b);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _cmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta[0+0] = _outClass;
tmp1_c1 = _b;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta[0+0];
_outChangeMade = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outChangeMade) { *out_outChangeMade = _outChangeMade; }
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setVariableBindingInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inIdent, modelica_metatype _inExp, modelica_metatype *out_outChangeMade)
{
modelica_boolean _outChangeMade;
modelica_metatype _outClass = NULL;
_outClass = omc_Interactive_setVariableBindingInClass(threadData, _inClass, _inIdent, _inExp, &_outChangeMade);
if (out_outChangeMade) { *out_outChangeMade = mmc_mk_icon(_outChangeMade); }
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setParameterValue(threadData_t *threadData, modelica_metatype _inComponentRefClass, modelica_metatype _inComponentRefComponentName, modelica_metatype _inBindingExp, modelica_metatype _inFullProgram, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRefClass;
tmp4_2 = _inComponentRefComponentName;
tmp4_3 = _inBindingExp;
tmp4_4 = _inFullProgram;
{
modelica_metatype _p_class = NULL;
modelica_string _varname = NULL;
modelica_string _str = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _name = NULL;
modelica_metatype _exp = NULL;
modelica_boolean _b;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_string tmp15;
_class_ = tmp4_1;
_name = tmp4_2;
_exp = tmp4_3;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta6 = omc_AbsynUtil_crefToPath(threadData, _name);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_varname = tmpMeta7;
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_cdef_1 = omc_Interactive_setVariableBindingInClass(threadData, _cdef, _varname, _exp ,&_b);
tmpMeta8 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta8, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta9, _p, 0);
tmp14 = (modelica_boolean)_b;
if(tmp14)
{
tmp15 = _OMC_LIT60;
}
else
{
tmpMeta10 = stringAppend(_OMC_LIT261,_varname);
tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT262);
tmpMeta12 = stringAppend(tmpMeta11,omc_AbsynUtil_pathString(threadData, _p_class, _OMC_LIT93, 1, 0));
tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT263);
tmp15 = tmpMeta13;
}
_str = tmp15;
tmpMeta[0+0] = _newp;
tmp1_c1 = _str;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_boolean tmp17;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
_class_ = tmp4_1;
_name = tmp4_2;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta16 = omc_AbsynUtil_crefToPath(threadData, _name);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto goto_2;
tmp17 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
tmp17 = 1;
goto goto_18;
goto_18:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp17) {goto goto_2;}
tmpMeta19 = stringAppend(_OMC_LIT264,omc_AbsynUtil_pathString(threadData, _p_class, _OMC_LIT93, 1, 0));
tmpMeta20 = stringAppend(tmpMeta19,_OMC_LIT263);
_str = tmpMeta20;
tmpMeta[0+0] = _p;
tmp1_c1 = _str;
goto tmp3_done;
}
case 2: {
tmpMeta[0+0] = _inFullProgram;
tmp1_c1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
DLLExport
modelica_string omc_Interactive_getComponentBinding(threadData_t *threadData, modelica_metatype _path, modelica_string _parameterName, modelica_metatype _program)
{
modelica_string _bindingStr = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _component = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _program, 0, 0);
_component = omc_InteractiveUtil_getComponentInClass(threadData, _cls, _parameterName);
_bindingStr = omc_Dump_printExpStr(threadData, omc_InteractiveUtil_getVariableBindingInComponentitem(threadData, _component));
goto tmp2_done;
}
case 1: {
_bindingStr = _OMC_LIT55;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _bindingStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getModificationNames(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAbsynElementArgLst;
{
modelica_metatype _names = NULL;
modelica_metatype _names2 = NULL;
modelica_metatype _res = NULL;
modelica_string _name = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _args = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 5;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (!optionNone(tmpMeta11)) goto tmp3_end;
_name = tmpMeta10;
_rest = tmpMeta8;
tmp4 += 3;
_names = omc_Interactive_getModificationNames(threadData, _rest);
tmpMeta12 = mmc_mk_cons(_name, _names);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,6) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
if (optionNone(tmpMeta16)) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
if (!listEmpty(tmpMeta18)) goto tmp3_end;
_p = tmpMeta15;
_rest = tmpMeta14;
_name = omc_AbsynUtil_pathString(threadData, _p, _OMC_LIT93, 1, 0);
_names = omc_Interactive_getModificationNames(threadData, _rest);
tmpMeta19 = mmc_mk_cons(_name, _names);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta33;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,0,6) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 4));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 5));
if (optionNone(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,1,2) == 0) goto tmp3_end;
_p = tmpMeta22;
_args = tmpMeta25;
_rest = tmpMeta21;
_name = omc_AbsynUtil_pathString(threadData, _p, _OMC_LIT93, 1, 0);
{
modelica_metatype __omcQ_24tmpVar19;
modelica_metatype* tmp28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_string __omcQ_24tmpVar18;
modelica_integer tmp32;
modelica_metatype _n_loopVar = 0;
modelica_metatype _n;
_n_loopVar = omc_Interactive_getModificationNames(threadData, _args);
tmpMeta29 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar19 = tmpMeta29;
tmp28 = &__omcQ_24tmpVar19;
while(1) {
tmp32 = 1;
if (!listEmpty(_n_loopVar)) {
_n = MMC_CAR(_n_loopVar);
_n_loopVar = MMC_CDR(_n_loopVar);
tmp32--;
}
if (tmp32 == 0) {
tmpMeta30 = stringAppend(_name,_OMC_LIT93);
tmpMeta31 = stringAppend(tmpMeta30,_n);
__omcQ_24tmpVar18 = tmpMeta31;
*tmp28 = mmc_mk_cons(__omcQ_24tmpVar18,0);
tmp28 = &MMC_CDR(*tmp28);
} else if (tmp32 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp28 = mmc_mk_nil();
tmpMeta27 = __omcQ_24tmpVar19;
}
_names2 = tmpMeta27;
_names = omc_Interactive_getModificationNames(threadData, _rest);
_res = listAppend(_names2, _names);
tmpMeta33 = mmc_mk_cons(_name, _res);
tmpMeta1 = tmpMeta33;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmp4_1);
tmpMeta35 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,0,6) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 4));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 5));
if (optionNone(tmpMeta37)) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 1));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
_p = tmpMeta36;
_args = tmpMeta39;
_rest = tmpMeta35;
_name = omc_AbsynUtil_pathString(threadData, _p, _OMC_LIT93, 1, 0);
{
modelica_metatype __omcQ_24tmpVar21;
modelica_metatype* tmp41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_string __omcQ_24tmpVar20;
modelica_integer tmp45;
modelica_metatype _n_loopVar = 0;
modelica_metatype _n;
_n_loopVar = omc_Interactive_getModificationNames(threadData, _args);
tmpMeta42 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar21 = tmpMeta42;
tmp41 = &__omcQ_24tmpVar21;
while(1) {
tmp45 = 1;
if (!listEmpty(_n_loopVar)) {
_n = MMC_CAR(_n_loopVar);
_n_loopVar = MMC_CDR(_n_loopVar);
tmp45--;
}
if (tmp45 == 0) {
tmpMeta43 = stringAppend(_name,_OMC_LIT93);
tmpMeta44 = stringAppend(tmpMeta43,_n);
__omcQ_24tmpVar20 = tmpMeta44;
*tmp41 = mmc_mk_cons(__omcQ_24tmpVar20,0);
tmp41 = &MMC_CDR(*tmp41);
} else if (tmp45 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp41 = mmc_mk_nil();
tmpMeta40 = __omcQ_24tmpVar21;
}
_names2 = tmpMeta40;
_names = omc_Interactive_getModificationNames(threadData, _rest);
tmpMeta1 = listAppend(_names2, _names);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta46 = MMC_CAR(tmp4_1);
tmpMeta47 = MMC_CDR(tmp4_1);
_rest = tmpMeta47;
tmpMeta1 = omc_Interactive_getModificationNames(threadData, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
DLLExport
modelica_metatype omc_Interactive_getComponentModifierNames(threadData_t *threadData, modelica_metatype _path, modelica_string _inComponentName, modelica_metatype _inProgram3)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram3;
{
modelica_metatype _cdef = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _compelts = NULL;
modelica_metatype _compelts_1 = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_p = tmp4_1;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_comps = omc_Interactive_getComponentsInClass(threadData, _cdef);
_compelts = omc_List_map(threadData, _comps, boxvar_InteractiveUtil_getComponentitemsInElement);
_compelts_1 = omc_List_flatten(threadData, _compelts);
tmpMeta6 = omc_List_select1(threadData, _compelts_1, boxvar_InteractiveUtil_componentitemNamed, _inComponentName);
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
if (optionNone(tmpMeta10)) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (!listEmpty(tmpMeta8)) goto goto_2;
_mod = tmpMeta12;
tmpMeta1 = omc_Interactive_getModificationNames(threadData, _mod);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getModificationValues(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inPath)
{
modelica_metatype _outModification = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inAbsynElementArgLst;
tmp4_2 = _inPath;
{
modelica_metatype _p1 = NULL;
modelica_metatype _p2 = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _args = NULL;
modelica_string _name1 = NULL;
modelica_string _name2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
_p1 = tmpMeta8;
_mod = tmpMeta10;
_p2 = tmp4_2;
if (!omc_AbsynUtil_pathEqual(threadData, _p1, _p2)) goto tmp3_end;
tmpMeta1 = _mod;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,6) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,1,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
if (optionNone(tmpMeta17)) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
_name2 = tmpMeta11;
_p2 = tmpMeta12;
_name1 = tmpMeta16;
_args = tmpMeta19;
if (!(stringEqual(_name1, _name2))) goto tmp3_end;
_inAbsynElementArgLst = _args;
_inPath = _p2;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_rest = tmpMeta21;
_inAbsynElementArgLst = _rest;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outModification = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outModification;
}
DLLExport
modelica_string omc_Interactive_getComponentModifierValues(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inProgram4)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inProgram4;
{
modelica_metatype _p_class = NULL;
modelica_string _name = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _compelts = NULL;
modelica_metatype _compelts_1 = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _ident = NULL;
modelica_metatype _subident = NULL;
modelica_metatype _p = NULL;
modelica_metatype _elementArgLst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
_class_ = tmp4_1;
_ident = tmp4_2;
_subident = tmp4_3;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta6 = omc_AbsynUtil_crefToPath(threadData, _ident);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_name = tmpMeta7;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_comps = omc_Interactive_getComponentsInClass(threadData, _cdef);
_compelts = omc_List_map(threadData, _comps, boxvar_InteractiveUtil_getComponentitemsInElement);
_compelts_1 = omc_List_flatten(threadData, _compelts);
tmpMeta8 = omc_List_select1(threadData, _compelts_1, boxvar_InteractiveUtil_componentitemNamed, _name);
if (listEmpty(tmpMeta8)) goto goto_2;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 4));
if (optionNone(tmpMeta12)) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (!listEmpty(tmpMeta10)) goto goto_2;
_elementArgLst = tmpMeta14;
_mod = omc_Interactive_getModificationValues(threadData, _elementArgLst, omc_AbsynUtil_crefToPath(threadData, _subident));
tmp1 = omc_Dump_unparseModificationStr(threadData, _mod);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_metatype omc_Interactive_getModificationValue(threadData_t *threadData, modelica_metatype _args, modelica_metatype _path)
{
modelica_metatype _value = NULL;
modelica_string _name = NULL;
modelica_metatype _rest_args = NULL;
modelica_metatype _arg = NULL;
modelica_boolean _found;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_boolean tmp4 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_rest_args = _args;
_found = 0;
while(1)
{
if(!(!_found)) break;
tmpMeta1 = _rest_args;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_arg = tmpMeta2;
_rest_args = tmpMeta3;
{
modelica_metatype tmp7_1;
tmp7_1 = _arg;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 3; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,0,6) == 0) goto tmp6_end;
if (!omc_AbsynUtil_pathEqual(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_arg), 4))), _path)) goto tmp6_end;
tmpMeta9 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_arg), 5)));
if (optionNone(tmpMeta9)) goto goto_5;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,2) == 0) goto goto_5;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_value = tmpMeta12;
tmp4 = 1;
goto tmp6_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,0,6) == 0) goto tmp6_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,1) == 0) goto tmp6_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
_name = tmpMeta14;
if (!(stringEqual(_name, omc_AbsynUtil_pathFirstIdent(threadData, _path)))) goto tmp6_end;
tmpMeta15 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_arg), 5)));
if (optionNone(tmpMeta15)) goto goto_5;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
_rest_args = tmpMeta17;
_value = omc_Interactive_getModificationValue(threadData, _rest_args, omc_AbsynUtil_pathRest(threadData, _path));
tmp4 = 1;
goto tmp6_done;
}
case 2: {
tmp4 = 0;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
_found = tmp4;
}
_return: OMC_LABEL_UNUSED
return _value;
}
DLLExport
modelica_string omc_Interactive_getComponentModifierValue(threadData_t *threadData, modelica_metatype _classRef, modelica_metatype _varRef, modelica_metatype _subModRef, modelica_metatype _program)
{
modelica_string _valueStr = NULL;
modelica_metatype _cls_path = NULL;
modelica_string _name = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _args = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_cls_path = omc_AbsynUtil_crefToPath(threadData, _classRef);
_name = omc_AbsynUtil_crefIdent(threadData, _varRef);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _cls_path, _program, 0, 0);
tmpMeta5 = omc_InteractiveUtil_getComponentInClass(threadData, _cls, _name);
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (optionNone(tmpMeta7)) goto goto_1;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_args = tmpMeta9;
_valueStr = omc_Dump_printExpStr(threadData, omc_Interactive_getModificationValue(threadData, _args, omc_AbsynUtil_crefToPath(threadData, _subModRef)));
goto tmp2_done;
}
case 1: {
_valueStr = _OMC_LIT55;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _valueStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_createNestedSubMod(threadData_t *threadData, modelica_metatype _inComponentName, modelica_metatype _inMod)
{
modelica_metatype _outSubMod = NULL;
modelica_metatype _e = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_AbsynUtil_pathIsIdent(threadData, _inComponentName))
{
{
modelica_metatype tmp4_1;
tmp4_1 = _inMod;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,6) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_e = tmpMeta7;
tmpMeta1 = _e;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
tmpMeta9 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(0), _OMC_LIT265, _inComponentName, mmc_mk_some(_inMod), mmc_mk_none(), _OMC_LIT120);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outSubMod = tmpMeta1;
}
else
{
_outSubMod = omc_Interactive_createNestedSubMod(threadData, omc_AbsynUtil_pathRest(threadData, _inComponentName), _inMod);
tmpMeta10 = mmc_mk_cons(_outSubMod, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, tmpMeta10, _OMC_LIT113);
tmpMeta12 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(0), _OMC_LIT265, omc_AbsynUtil_pathFirstPath(threadData, _inComponentName), mmc_mk_some(tmpMeta11), mmc_mk_none(), _OMC_LIT120);
_outSubMod = tmpMeta12;
}
_return: OMC_LABEL_UNUSED
return _outSubMod;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_propagateMod2(threadData_t *threadData, modelica_metatype _inComponentName, modelica_metatype _inSubMods, modelica_metatype _inNewMod)
{
modelica_metatype _outSubMods = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _submod = NULL;
modelica_metatype _rest_submods = NULL;
modelica_metatype _new_mod = NULL;
modelica_metatype _comp_name = NULL;
modelica_metatype _comp_rest = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outSubMods = tmpMeta1;
_rest_submods = _inSubMods;
while(1)
{
if(!(!listEmpty(_rest_submods))) break;
tmpMeta2 = _rest_submods;
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
_submod = tmpMeta3;
_rest_submods = tmpMeta4;
_comp_name = omc_AbsynUtil_pathRest(threadData, _inComponentName);
_comp_rest = _comp_name;
while(1)
{
if(!1) break;
if(omc_AbsynUtil_pathEqual(threadData, _comp_name, omc_AbsynUtil_elementArgName(threadData, _submod)))
{
{
modelica_metatype tmp7_1;
tmp7_1 = _submod;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 2; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,0,6) == 0) goto tmp6_end;
if((!omc_AbsynUtil_pathIsIdent(threadData, _comp_name)))
{
_comp_name = omc_AbsynUtil_pathPrefix(threadData, _comp_name);
_comp_rest = omc_AbsynUtil_removePrefix(threadData, _comp_name, _comp_rest);
}
tmpMeta9 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta9), MMC_UNTAGPTR(_submod), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta9))[5] = omc_Interactive_propagateMod(threadData, _comp_rest, _inNewMod, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_submod), 5))));
_submod = tmpMeta9;
if(isSome((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_submod), 5)))))
{
tmpMeta10 = mmc_mk_cons(_submod, _rest_submods);
_rest_submods = tmpMeta10;
}
goto tmp6_done;
}
case 1: {
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
;
_outSubMods = omc_List_append__reverse(threadData, _outSubMods, _rest_submods);
goto _return;
}
if(omc_AbsynUtil_pathIsIdent(threadData, _comp_name))
{
break;
}
else
{
_comp_name = omc_AbsynUtil_pathPrefix(threadData, _comp_name);
}
}
tmpMeta11 = mmc_mk_cons(_submod, _outSubMods);
_outSubMods = tmpMeta11;
}
if((!omc_AbsynUtil_isEmptyMod(threadData, _inNewMod)))
{
_submod = omc_Interactive_createNestedSubMod(threadData, omc_AbsynUtil_pathRest(threadData, _inComponentName), _inNewMod);
tmpMeta12 = mmc_mk_cons(_submod, _outSubMods);
_outSubMods = listReverse(tmpMeta12);
}
else
{
_outSubMods = _inSubMods;
}
_return: OMC_LABEL_UNUSED
return _outSubMods;
}
static modelica_metatype closure10_AbsynUtil_elementArgEqualName(threadData_t *thData, modelica_metatype closure, modelica_metatype inArg1)
{
modelica_metatype inArg2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
return boxptr_AbsynUtil_elementArgEqualName(thData, inArg1, inArg2);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_mergeElementArgs(threadData_t *threadData, modelica_metatype _inOldArgs, modelica_metatype _inNewArgs)
{
modelica_metatype _outArgs = NULL;
modelica_boolean _found;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outArgs = _inOldArgs;
if(listEmpty(_inOldArgs))
{
_outArgs = _inNewArgs;
}
else
{
if(listEmpty(_inNewArgs))
{
_outArgs = _inOldArgs;
}
else
{
{
modelica_metatype _narg;
for (tmpMeta1 = _inNewArgs; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_narg = MMC_CAR(tmpMeta1);
tmpMeta2 = mmc_mk_box1(0, _narg);
_outArgs = omc_List_replaceOnTrue(threadData, _narg, _outArgs, (modelica_fnptr) mmc_mk_box2(0,closure10_AbsynUtil_elementArgEqualName,tmpMeta2) ,&_found);
if((!_found))
{
tmpMeta3 = mmc_mk_cons(_narg, _outArgs);
_outArgs = tmpMeta3;
}
}
}
}
}
_return: OMC_LABEL_UNUSED
return _outArgs;
}
DLLExport
modelica_metatype omc_Interactive_propagateMod(threadData_t *threadData, modelica_metatype _inComponentName, modelica_metatype _inNewMod, modelica_metatype _inOldMod)
{
modelica_metatype _outMod = NULL;
modelica_metatype _new_args = NULL;
modelica_metatype _old_args = NULL;
modelica_metatype _new_eqmod = NULL;
modelica_metatype _old_eqmod = NULL;
modelica_metatype _mod = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(isSome(_inOldMod))
{
tmpMeta1 = _inOldMod;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_old_args = tmpMeta3;
_old_eqmod = tmpMeta4;
}
else
{
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
_old_args = tmpMeta5;
_old_eqmod = _OMC_LIT113;
}
if(omc_AbsynUtil_pathIsIdent(threadData, _inComponentName))
{
tmpMeta6 = _inNewMod;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_new_args = tmpMeta7;
_new_eqmod = tmpMeta8;
if((valueEq(_new_eqmod, _OMC_LIT113) && (!listEmpty(_new_args))))
{
_new_eqmod = _old_eqmod;
}
_new_args = omc_Interactive_mergeElementArgs(threadData, _old_args, _new_args);
tmpMeta9 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _new_args, _new_eqmod);
_mod = tmpMeta9;
}
else
{
_new_args = omc_Interactive_propagateMod2(threadData, _inComponentName, _old_args, _inNewMod);
tmpMeta10 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _new_args, _old_eqmod);
_mod = tmpMeta10;
}
_outMod = (omc_AbsynUtil_isEmptyMod(threadData, _mod)?mmc_mk_none():mmc_mk_some(_mod));
_return: OMC_LABEL_UNUSED
return _outMod;
}
DLLExport
modelica_metatype omc_Interactive_setComponentSubmodifierInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_boolean _inFound, modelica_metatype _inComponentName, modelica_metatype _inMod, modelica_boolean *out_outFound, modelica_boolean *out_outContinue)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
modelica_boolean _outFound;
modelica_boolean _outContinue;
modelica_metatype _item = NULL;
modelica_metatype _rest_items = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _args_old = NULL;
modelica_metatype _args_new = NULL;
modelica_metatype _eqmod_old = NULL;
modelica_metatype _eqmod_new = NULL;
modelica_string _comp_id = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outComponents = tmpMeta1;
_rest_items = _inComponents;
_comp_id = omc_AbsynUtil_crefFirstIdent(threadData, _inComponentName);
while(1)
{
if(!(!listEmpty(_rest_items))) break;
tmpMeta2 = _rest_items;
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
_item = tmpMeta3;
_rest_items = tmpMeta4;
if((stringEqual(omc_AbsynUtil_componentName(threadData, _item), _comp_id)))
{
{
modelica_metatype tmp7_1;
tmp7_1 = _item;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 1; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
_comp = tmpMeta9;
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_comp), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[4] = omc_Interactive_propagateMod(threadData, omc_AbsynUtil_crefToPath(threadData, _inComponentName), _inMod, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_comp), 4))));
_comp = tmpMeta10;
tmpMeta11 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta11), MMC_UNTAGPTR(_item), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta11))[2] = _comp;
_item = tmpMeta11;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
;
tmpMeta12 = mmc_mk_cons(_item, _rest_items);
_outComponents = omc_List_append__reverse(threadData, _outComponents, tmpMeta12);
_outFound = 1;
_outContinue = 0;
goto _return;
}
tmpMeta13 = mmc_mk_cons(_item, _outComponents);
_outComponents = tmpMeta13;
}
_outComponents = _inComponents;
_outFound = 0;
_outContinue = 1;
_return: OMC_LABEL_UNUSED
if (out_outFound) { *out_outFound = _outFound; }
if (out_outContinue) { *out_outContinue = _outContinue; }
return _outComponents;
}
modelica_metatype boxptr_Interactive_setComponentSubmodifierInCompitems(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inFound, modelica_metatype _inComponentName, modelica_metatype _inMod, modelica_metatype *out_outFound, modelica_metatype *out_outContinue)
{
modelica_integer tmp1;
modelica_boolean _outFound;
modelica_boolean _outContinue;
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta2;
tmp1 = mmc_unbox_integer(_inFound);
_outComponents = omc_Interactive_setComponentSubmodifierInCompitems(threadData, _inComponents, tmp1, _inComponentName, _inMod, &_outFound, &_outContinue);
if (out_outFound) { *out_outFound = mmc_mk_icon(_outFound); }
if (out_outContinue) { *out_outContinue = mmc_mk_icon(_outContinue); }
return _outComponents;
}
static modelica_metatype closure11_Interactive_setComponentSubmodifierInCompitems(threadData_t *thData, modelica_metatype closure, modelica_metatype inComponents, modelica_metatype inFound, modelica_metatype tmp3, modelica_metatype tmp4)
{
modelica_metatype inComponentName = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),1));
modelica_metatype inMod = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(closure),2));
return boxptr_Interactive_setComponentSubmodifierInCompitems(thData, inComponents, inFound, inComponentName, inMod, tmp3, tmp4);
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentSubmodifierInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inMod)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
modelica_integer tmp2;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outClass = _inClass;
tmpMeta5 = mmc_mk_box2(0, _inComponentName, _inMod);
tmpMeta6 = omc_AbsynUtil_traverseClassComponents(threadData, _inClass, (modelica_fnptr) mmc_mk_box2(0,closure11_Interactive_setComponentSubmodifierInCompitems,tmpMeta5), mmc_mk_boolean(0), &tmpMeta1);
_outClass = tmpMeta6;
tmp2 = mmc_unbox_integer(tmpMeta1);
if (1 != tmp2) MMC_THROW_INTERNAL();
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentModifier(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inComponentName, modelica_metatype _inMod, modelica_metatype _inProgram, modelica_string *out_outResult)
{
modelica_metatype _outProgram = NULL;
modelica_string _outResult = NULL;
modelica_metatype _p_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cls = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
_p_class = omc_AbsynUtil_crefToPath(threadData, _inClass);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _inProgram, 0, 0);
_cls = omc_Interactive_setComponentSubmodifierInClass(threadData, _cls, _inComponentName, _inMod);
tmpMeta5 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta5, _within_);
_outProgram = omc_InteractiveUtil_updateProgram(threadData, tmpMeta6, _inProgram, 0);
_outResult = _OMC_LIT60;
goto tmp2_done;
}
case 1: {
_outProgram = _inProgram;
_outResult = _OMC_LIT61;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outProgram;
}
DLLExport
modelica_metatype omc_Interactive_removeComponentModifiers(threadData_t *threadData, modelica_metatype _path, modelica_string _inComponentName, modelica_metatype _inProgram, modelica_boolean _keepRedeclares, modelica_boolean *out_outResult)
{
modelica_metatype _outProgram = NULL;
modelica_boolean _outResult;
modelica_metatype _within_ = NULL;
modelica_metatype _cls = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
_within_ = omc_InteractiveUtil_buildWithin(threadData, _path);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _inProgram, 0, 0);
_cls = omc_InteractiveUtil_clearComponentModifiersInClass(threadData, _cls, _inComponentName, _keepRedeclares);
tmpMeta5 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta5, _within_);
_outProgram = omc_InteractiveUtil_updateProgram(threadData, tmpMeta6, _inProgram, 0);
_outResult = 1;
goto tmp2_done;
}
case 1: {
_outProgram = _inProgram;
_outResult = 0;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outProgram;
}
modelica_metatype boxptr_Interactive_removeComponentModifiers(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inComponentName, modelica_metatype _inProgram, modelica_metatype _keepRedeclares, modelica_metatype *out_outResult)
{
modelica_integer tmp1;
modelica_boolean _outResult;
modelica_metatype _outProgram = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outProgram = omc_Interactive_removeComponentModifiers(threadData, _path, _inComponentName, _inProgram, tmp1, &_outResult);
if (out_outResult) { *out_outResult = mmc_mk_icon(_outResult); }
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extendsName(threadData_t *threadData, modelica_metatype _inElementSpec)
{
modelica_metatype _outPath = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElementSpec;
{
modelica_metatype _path = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta6;
tmpMeta1 = _path;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outPath = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outPath;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_extendsElementspecNamed(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inPath)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inElementSpec;
tmp4_2 = _inPath;
{
modelica_metatype _extpath = NULL;
modelica_metatype _path = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_extpath = tmpMeta6;
_path = tmp4_2;
tmp1 = omc_AbsynUtil_pathEqual(threadData, _path, _extpath);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_extendsElementspecNamed(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inPath)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_extendsElementspecNamed(threadData, _inElementSpec, _inPath);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_hasModifiers(threadData_t *threadData, modelica_metatype _exts)
{
modelica_boolean _b;
modelica_metatype _ext = NULL;
modelica_metatype tmpMeta1;
modelica_boolean tmp2 = 0;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_b = 0;
{
modelica_metatype _e;
for (tmpMeta1 = _exts; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_e = MMC_CAR(tmpMeta1);
{
modelica_metatype tmp5_1;
tmp5_1 = _e;
{
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
for (; tmp5 < 2; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp5_1,1,3) == 0) goto tmp4_end;
_ext = tmp5_1;
tmp2 = (!listEmpty((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ext), 3)))));
goto tmp4_done;
}
case 1: {
tmp2 = 0;
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
goto_3:;
MMC_THROW_INTERNAL();
goto tmp4_done;
tmp4_done:;
}
}
_b = tmp2;
if(_b)
{
break;
}
}
}
_return: OMC_LABEL_UNUSED
return _b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_hasModifiers(threadData_t *threadData, modelica_metatype _exts)
{
modelica_boolean _b;
modelica_metatype out_b;
_b = omc_Interactive_hasModifiers(threadData, _exts);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExtendsModifierNames(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_boolean _inBoolean, modelica_metatype _inProgram3)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inBoolean;
tmp4_4 = _inProgram3;
{
modelica_metatype _p_class = NULL;
modelica_metatype _name = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _exts = NULL;
modelica_metatype _exts_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _extmod = NULL;
modelica_metatype _res = NULL;
modelica_metatype _res1 = NULL;
modelica_string _res_1 = NULL;
modelica_boolean _b;
modelica_metatype _class_ = NULL;
modelica_metatype _inherit_name = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_class_ = tmp4_1;
_inherit_name = tmp4_2;
_b = tmp4_3;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_name = omc_AbsynUtil_crefToPath(threadData, _inherit_name);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_exts = omc_InteractiveUtil_getExtendsElementspecInClass(threadData, _cdef);
if(omc_Interactive_hasModifiers(threadData, _exts))
{
_env = omc_Interactive_getClassEnv(threadData, _p, _p_class);
_exts_1 = omc_List_map1(threadData, _exts, boxvar_Interactive_makeExtendsFullyQualified, _env);
tmpMeta6 = omc_List_select1(threadData, _exts_1, boxvar_Interactive_extendsElementspecNamed, _name);
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,3) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (!listEmpty(tmpMeta8)) goto goto_2;
_extmod = tmpMeta9;
_res = omc_Interactive_getModificationNames(threadData, _extmod);
_res1 = (_b?omc_Interactive_insertQuotesToList(threadData, _res):_res);
_res_1 = stringDelimitList(_res1, _OMC_LIT80);
}
else
{
_res_1 = _OMC_LIT55;
}
tmpMeta10 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_res_1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta10);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getExtendsModifierNames(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inBoolean, modelica_metatype _inProgram3)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outString = omc_Interactive_getExtendsModifierNames(threadData, _inComponentRef1, _inComponentRef2, tmp1, _inProgram3);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeExtendsFullyQualified(threadData_t *threadData, modelica_metatype _inElementSpec, modelica_metatype _inEnv)
{
modelica_metatype _outElementSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inElementSpec;
tmp4_2 = _inEnv;
{
modelica_metatype _path_1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _earg = NULL;
modelica_metatype _env = NULL;
modelica_metatype _annOpt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_path = tmpMeta6;
_earg = tmpMeta7;
_annOpt = tmpMeta8;
_env = tmp4_2;
omc_Interactive_mkFullyQual(threadData, _env, _path ,&_path_1);
tmpMeta9 = mmc_mk_box4(4, &Absyn_ElementSpec_EXTENDS__desc, _path_1, _earg, _annOpt);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElementSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementSpec;
}
DLLExport
modelica_boolean omc_Interactive_isModifierfinal(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inPath)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inAbsynElementArgLst;
tmp4_2 = _inPath;
{
modelica_boolean _f;
modelica_metatype _p1 = NULL;
modelica_metatype _p2 = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _args = NULL;
modelica_string _name1 = NULL;
modelica_string _name2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_integer tmp9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmp9 = mmc_unbox_integer(tmpMeta8);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
_f = tmp9;
_p1 = tmpMeta10;
_p2 = tmp4_2;
if (!omc_AbsynUtil_pathEqual(threadData, _p1, _p2)) goto tmp3_end;
tmp1 = _f;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_1);
tmpMeta16 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,6) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,1,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
if (optionNone(tmpMeta19)) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
_name2 = tmpMeta13;
_p2 = tmpMeta14;
_name1 = tmpMeta18;
_args = tmpMeta21;
if (!(stringEqual(_name1, _name2))) goto tmp3_end;
_inAbsynElementArgLst = _args;
_inPath = _p2;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
_rest = tmpMeta23;
_inAbsynElementArgLst = _rest;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
modelica_metatype boxptr_Interactive_isModifierfinal(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inPath)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isModifierfinal(threadData, _inAbsynElementArgLst, _inPath);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_isExtendsModifierFinal(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inProgram4)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inProgram4;
{
modelica_metatype _p_class = NULL;
modelica_metatype _name = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _env = NULL;
modelica_metatype _exts = NULL;
modelica_metatype _exts_1 = NULL;
modelica_metatype _extmod = NULL;
modelica_boolean _finalPrefix;
modelica_metatype _class_ = NULL;
modelica_metatype _inherit_name = NULL;
modelica_metatype _subident = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_class_ = tmp4_1;
_inherit_name = tmp4_2;
_subident = tmp4_3;
_p = tmp4_4;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_name = omc_AbsynUtil_crefToPath(threadData, _inherit_name);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_env = omc_Interactive_getClassEnv(threadData, _p, _p_class);
_exts = omc_InteractiveUtil_getExtendsElementspecInClass(threadData, _cdef);
_exts_1 = omc_List_map1(threadData, _exts, boxvar_Interactive_makeExtendsFullyQualified, _env);
tmpMeta6 = omc_List_select1(threadData, _exts_1, boxvar_Interactive_extendsElementspecNamed, _name);
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,3) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (!listEmpty(tmpMeta8)) goto goto_2;
_extmod = tmpMeta9;
_finalPrefix = omc_Interactive_isModifierfinal(threadData, _extmod, omc_AbsynUtil_crefToPath(threadData, _subident));
tmp1 = (_finalPrefix?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getExtendsModifierValue(threadData_t *threadData, modelica_metatype _classRef, modelica_metatype _extendsRef, modelica_metatype _varRef, modelica_metatype _program)
{
modelica_string _valueStr = NULL;
modelica_metatype _cls_path = NULL;
modelica_metatype _name = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _args = NULL;
modelica_metatype _env = NULL;
modelica_metatype _exts = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_cls_path = omc_AbsynUtil_crefToPath(threadData, _classRef);
_name = omc_AbsynUtil_crefToPath(threadData, _extendsRef);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _cls_path, _program, 0, 0);
_env = omc_Interactive_getClassEnv(threadData, _program, _cls_path);
{
modelica_metatype __omcQ_24tmpVar23;
modelica_metatype* tmp6;
modelica_metatype tmpMeta7;
modelica_metatype __omcQ_24tmpVar22;
modelica_integer tmp8;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = omc_InteractiveUtil_getExtendsElementspecInClass(threadData, _cls);
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar23 = tmpMeta7;
tmp6 = &__omcQ_24tmpVar23;
while(1) {
tmp8 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp8--;
}
if (tmp8 == 0) {
__omcQ_24tmpVar22 = omc_Interactive_makeExtendsFullyQualified(threadData, _e, _env);
*tmp6 = mmc_mk_cons(__omcQ_24tmpVar22,0);
tmp6 = &MMC_CDR(*tmp6);
} else if (tmp8 == 1) {
break;
} else {
goto goto_1;
}
}
*tmp6 = mmc_mk_nil();
tmpMeta5 = __omcQ_24tmpVar23;
}
_exts = tmpMeta5;
tmpMeta9 = omc_List_select1(threadData, _exts, boxvar_Interactive_extendsElementspecNamed, _name);
if (listEmpty(tmpMeta9)) goto goto_1;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,3) == 0) goto goto_1;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (!listEmpty(tmpMeta11)) goto goto_1;
_args = tmpMeta12;
_valueStr = omc_Dump_printExpStr(threadData, omc_Interactive_getModificationValue(threadData, _args, omc_AbsynUtil_crefToPath(threadData, _varRef)));
goto tmp2_done;
}
case 1: {
_valueStr = _OMC_LIT55;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return _valueStr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv)
{
modelica_metatype _outElement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inElement;
tmp4_2 = _inPath;
tmp4_3 = _inComponentRef;
tmp4_4 = _inModification;
tmp4_5 = _inEnv;
{
modelica_boolean _f;
modelica_metatype _r = NULL;
modelica_metatype _i = NULL;
modelica_metatype _path = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _eargs = NULL;
modelica_metatype _eargs_1 = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
modelica_metatype _submod = NULL;
modelica_metatype _env = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _annOpt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_f = tmp7;
_r = tmpMeta8;
_i = tmpMeta9;
_path = tmpMeta11;
_eargs = tmpMeta12;
_annOpt = tmpMeta13;
_info = tmpMeta14;
_constr = tmpMeta15;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
omc_Interactive_mkFullyQual(threadData, _env, _path ,&_path_1);
tmp16 = omc_AbsynUtil_pathEqual(threadData, _inherit, _path_1);
if (1 != tmp16) goto goto_2;
_eargs_1 = omc_InteractiveUtil_setSubmodifierInElementargs(threadData, _eargs, omc_AbsynUtil_crefToPath(threadData, _submod), _mod);
tmpMeta17 = mmc_mk_box4(4, &Absyn_ElementSpec_EXTENDS__desc, _path, _eargs_1, _annOpt);
tmpMeta18 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_f), _r, _i, tmpMeta17, _info, _constr);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inElement;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inPath;
tmp4_3 = _inComponentRef;
tmp4_4 = _inModification;
tmp4_5 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elt_1 = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _submod = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elitem = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elt = tmpMeta9;
_rest = tmpMeta8;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_res = omc_Interactive_setExtendsSubmodifierInElementitems(threadData, _rest, _inherit, _submod, _mod, _env);
_elt_1 = omc_Interactive_setExtendsSubmodifierInElement(threadData, _elt, _inherit, _submod, _mod, _env);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_elitem = tmpMeta12;
_rest = tmpMeta13;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_res = omc_Interactive_setExtendsSubmodifierInElementitems(threadData, _rest, _inherit, _submod, _mod, _env);
tmpMeta14 = mmc_mk_cons(_elitem, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inPath;
tmp4_3 = _inComponentRef;
tmp4_4 = _inModification;
tmp4_5 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elts_1 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _submod = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elts = tmpMeta9;
_rest = tmpMeta8;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
tmp4 += 1;
_res = omc_Interactive_setExtendsSubmodifierInClassparts(threadData, _rest, _inherit, _submod, _mod, _env);
_elts_1 = omc_Interactive_setExtendsSubmodifierInElementitems(threadData, _elts, _inherit, _submod, _mod, _env);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elts_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_elts = tmpMeta14;
_rest = tmpMeta13;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_res = omc_Interactive_setExtendsSubmodifierInClassparts(threadData, _rest, _inherit, _submod, _mod, _env);
_elts_1 = omc_Interactive_setExtendsSubmodifierInElementitems(threadData, _elts, _inherit, _submod, _mod, _env);
tmpMeta16 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elts_1);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _res);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
_elt = tmpMeta17;
_rest = tmpMeta18;
_inherit = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_res = omc_Interactive_setExtendsSubmodifierInClassparts(threadData, _rest, _inherit, _submod, _mod, _env);
tmpMeta19 = mmc_mk_cons(_elt, _res);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsSubmodifierInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inComponentRef, modelica_metatype _inModification, modelica_metatype _inEnv)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inClass;
tmp4_2 = _inPath;
tmp4_3 = _inComponentRef;
tmp4_4 = _inModification;
tmp4_5 = _inEnv;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _bcname = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _inherit_name = NULL;
modelica_metatype _submod = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _env = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_inherit_name = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_parts_1 = omc_Interactive_setExtendsSubmodifierInClassparts(threadData, _parts, _inherit_name, _submod, _mod, _env);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_inherit_name = tmp4_2;
_submod = tmp4_3;
_mod = tmp4_4;
_env = tmp4_5;
_parts_1 = omc_Interactive_setExtendsSubmodifierInClassparts(threadData, _parts, _inherit_name, _submod, _mod, _env);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _cmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setExtendsModifierValue(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inModification4, modelica_metatype _inProgram5, modelica_string *out_outString)
{
modelica_metatype _outProgram = NULL;
modelica_string _outString = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inModification4;
tmp4_5 = _inProgram5;
{
modelica_metatype _p_class = NULL;
modelica_metatype _inherit_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _inheritclass = NULL;
modelica_metatype _subident = NULL;
modelica_metatype _mod = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_class_ = tmp4_1;
_inheritclass = tmp4_2;
_subident = tmp4_3;
_mod = tmp4_4;
_p = tmp4_5;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_inherit_class = omc_AbsynUtil_crefToPath(threadData, _inheritclass);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_env = omc_Interactive_getClassEnv(threadData, _p, _p_class);
_cdef_1 = omc_Interactive_setExtendsSubmodifierInClass(threadData, _cdef, _inherit_class, _subident, _mod, _env);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmpMeta[0+0] = _newp;
tmp1_c1 = _OMC_LIT60;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inProgram5;
tmp1_c1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outString = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outString) { *out_outString = _outString; }
return _outProgram;
}
DLLExport
modelica_metatype omc_Interactive_mkFullyQual(threadData_t *threadData, modelica_metatype _env, modelica_metatype _ipath, modelica_metatype *out_opath)
{
modelica_metatype _ocache = NULL;
modelica_metatype _opath = NULL;
modelica_metatype _cpath = NULL;
modelica_metatype _program = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
_ocache = omc_Interactive_cacheFromGraphicEnvCache(threadData, _env);
_program = omc_Interactive_cacheProgramAndPath(threadData, _env ,&_cpath);
_opath = omc_NFApi_mkFullyQual(threadData, _program, _cpath, _ipath);
}
else
{
_ocache = omc_Inst_makeFullyQualified(threadData, omc_Interactive_cacheFromGraphicEnvCache(threadData, _env), omc_Interactive_envFromGraphicEnvCache(threadData, _env), _ipath ,&_opath);
}
_return: OMC_LABEL_UNUSED
if (out_opath) { *out_opath = _opath; }
return _ocache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares)
{
modelica_metatype _outElement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inElement;
tmp4_2 = _inPath;
tmp4_3 = _inEnv;
{
modelica_boolean _f;
modelica_metatype _r = NULL;
modelica_metatype _i = NULL;
modelica_metatype _path = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _eargs = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
modelica_metatype _env = NULL;
modelica_metatype _annOpt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_boolean tmp27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_f = tmp7;
_r = tmpMeta8;
_i = tmpMeta9;
_path = tmpMeta11;
_eargs = tmpMeta12;
_annOpt = tmpMeta13;
_info = tmpMeta14;
_constr = tmpMeta15;
_inherit = tmp4_2;
_env = tmp4_3;
omc_Interactive_mkFullyQual(threadData, _env, _path ,&_path_1);
tmp16 = omc_AbsynUtil_pathEqual(threadData, _inherit, _path_1);
if (1 != tmp16) goto goto_2;
tmp27 = (modelica_boolean)(!_keepRedeclares);
if(tmp27)
{
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta28 = tmpMeta17;
}
else
{
{
modelica_metatype __omcQ_24tmpVar25;
modelica_metatype* tmp19;
modelica_metatype tmpMeta20;
modelica_metatype __omcQ_24tmpVar24;
modelica_integer tmp21;
modelica_metatype _e_loopVar = 0;
modelica_boolean tmp22 = 0;
modelica_metatype _e;
_e_loopVar = _eargs;
tmpMeta20 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar25 = tmpMeta20;
tmp19 = &__omcQ_24tmpVar25;
while(1) {
tmp21 = 1;
while (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
{
modelica_metatype tmp25_1;
tmp25_1 = _e;
{
volatile mmc_switch_type tmp25;
int tmp26;
tmp25 = 0;
for (; tmp25 < 2; tmp25++) {
switch (MMC_SWITCH_CAST(tmp25)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp25_1,1,6) == 0) goto tmp24_end;
tmp22 = 1;
goto tmp24_done;
}
case 1: {
tmp22 = 0;
goto tmp24_done;
}
}
goto tmp24_end;
tmp24_end: ;
}
goto goto_23;
goto_23:;
goto goto_2;
goto tmp24_done;
tmp24_done:;
}
}
if (tmp22) {
tmp21--;
break;
}
}
if (tmp21 == 0) {
__omcQ_24tmpVar24 = _e;
*tmp19 = mmc_mk_cons(__omcQ_24tmpVar24,0);
tmp19 = &MMC_CDR(*tmp19);
} else if (tmp21 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp19 = mmc_mk_nil();
tmpMeta18 = __omcQ_24tmpVar25;
}
tmpMeta28 = tmpMeta18;
}
_eargs = tmpMeta28;
tmpMeta29 = mmc_mk_box4(4, &Absyn_ElementSpec_EXTENDS__desc, _path, _eargs, _annOpt);
tmpMeta30 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_f), _r, _i, tmpMeta29, _info, _constr);
tmpMeta1 = tmpMeta30;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inElement;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares)
{
modelica_integer tmp1;
modelica_metatype _outElement = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outElement = omc_Interactive_removeExtendsModifiersInElement(threadData, _inElement, _inPath, _inEnv, tmp1);
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynElementItemLst;
tmp4_2 = _inPath;
tmp4_3 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elt_1 = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elitem = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elt = tmpMeta9;
_rest = tmpMeta8;
_inherit = tmp4_2;
_env = tmp4_3;
_res = omc_Interactive_removeExtendsModifiersInElementitems(threadData, _rest, _inherit, _env, _keepRedeclares);
_elt_1 = omc_Interactive_removeExtendsModifiersInElement(threadData, _elt, _inherit, _env, _keepRedeclares);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_elitem = tmpMeta12;
_rest = tmpMeta13;
_inherit = tmp4_2;
_env = tmp4_3;
_res = omc_Interactive_removeExtendsModifiersInElementitems(threadData, _rest, _inherit, _env, _keepRedeclares);
tmpMeta14 = mmc_mk_cons(_elitem, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares)
{
modelica_integer tmp1;
modelica_metatype _outAbsynElementItemLst = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outAbsynElementItemLst = omc_Interactive_removeExtendsModifiersInElementitems(threadData, _inAbsynElementItemLst, _inPath, _inEnv, tmp1);
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynClassPartLst;
tmp4_2 = _inPath;
tmp4_3 = _inEnv;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elts_1 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _inherit = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elts = tmpMeta9;
_rest = tmpMeta8;
_inherit = tmp4_2;
_env = tmp4_3;
tmp4 += 1;
_res = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _rest, _inherit, _env, _keepRedeclares);
_elts_1 = omc_Interactive_removeExtendsModifiersInElementitems(threadData, _elts, _inherit, _env, _keepRedeclares);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elts_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_elts = tmpMeta14;
_rest = tmpMeta13;
_inherit = tmp4_2;
_env = tmp4_3;
_res = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _rest, _inherit, _env, _keepRedeclares);
_elts_1 = omc_Interactive_removeExtendsModifiersInElementitems(threadData, _elts, _inherit, _env, _keepRedeclares);
tmpMeta16 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elts_1);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _res);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
_elt = tmpMeta17;
_rest = tmpMeta18;
_inherit = tmp4_2;
_env = tmp4_3;
_res = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _rest, _inherit, _env, _keepRedeclares);
tmpMeta19 = mmc_mk_cons(_elt, _res);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares)
{
modelica_integer tmp1;
modelica_metatype _outAbsynClassPartLst = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outAbsynClassPartLst = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _inAbsynClassPartLst, _inPath, _inEnv, tmp1);
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_removeExtendsModifiersInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_boolean _keepRedeclares)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inClass;
tmp4_2 = _inPath;
tmp4_3 = _inEnv;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _bcname = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _inherit_name = NULL;
modelica_metatype _env = NULL;
modelica_metatype _modif = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_inherit_name = tmp4_2;
_env = tmp4_3;
_parts_1 = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _parts, _inherit_name, _env, _keepRedeclares);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_modif = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_inherit_name = tmp4_2;
_env = tmp4_3;
_parts_1 = omc_Interactive_removeExtendsModifiersInClassparts(threadData, _parts, _inherit_name, _env, _keepRedeclares);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _modif, _cmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_removeExtendsModifiersInClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inEnv, modelica_metatype _keepRedeclares)
{
modelica_integer tmp1;
modelica_metatype _outClass = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outClass = omc_Interactive_removeExtendsModifiersInClass(threadData, _inClass, _inPath, _inEnv, tmp1);
return _outClass;
}
DLLExport
modelica_metatype omc_Interactive_removeExtendsModifiers(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inBaseClassPath, modelica_metatype _inProgram, modelica_boolean _keepRedeclares, modelica_boolean *out_outResult)
{
modelica_metatype _outProgram = NULL;
modelica_boolean _outResult;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inClassPath;
tmp4_2 = _inBaseClassPath;
tmp4_3 = _inProgram;
{
modelica_metatype _p_class = NULL;
modelica_metatype _inherit_class = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_p_class = tmp4_1;
_inherit_class = tmp4_2;
_p = tmp4_3;
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_env = omc_Interactive_getClassEnv(threadData, _p, _p_class);
_cdef_1 = omc_Interactive_removeExtendsModifiersInClass(threadData, _cdef, _inherit_class, _env, _keepRedeclares);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmpMeta[0+0] = _newp;
tmp1_c1 = 1;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inProgram;
tmp1_c1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta[0+0];
_outResult = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outProgram;
}
modelica_metatype boxptr_Interactive_removeExtendsModifiers(threadData_t *threadData, modelica_metatype _inClassPath, modelica_metatype _inBaseClassPath, modelica_metatype _inProgram, modelica_metatype _keepRedeclares, modelica_metatype *out_outResult)
{
modelica_integer tmp1;
modelica_boolean _outResult;
modelica_metatype _outProgram = NULL;
tmp1 = mmc_unbox_integer(_keepRedeclares);
_outProgram = omc_Interactive_removeExtendsModifiers(threadData, _inClassPath, _inBaseClassPath, _inProgram, tmp1, &_outResult);
if (out_outResult) { *out_outResult = mmc_mk_icon(_outResult); }
return _outProgram;
}
DLLExport
modelica_boolean omc_Interactive_setSourceFile(threadData_t *threadData, modelica_metatype _path, modelica_string _inString, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_boolean _success;
modelica_metatype _outProgram = NULL;
modelica_boolean tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inString;
tmp4_2 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _within_ = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_string _filename = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_filename = tmp4_1;
_p = tmp4_2;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_within_ = omc_InteractiveUtil_buildWithin(threadData, _path);
_cdef_1 = omc_AbsynUtil_setClassFilename(threadData, _cdef, _filename);
tmpMeta6 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta6, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta7, _p, 0);
tmp1_c0 = 1;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
tmp1_c0 = 0;
tmpMeta[0+1] = _inProgram;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_success = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _success;
}
modelica_metatype boxptr_Interactive_setSourceFile(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inString, modelica_metatype _inProgram, modelica_metatype *out_outProgram)
{
modelica_boolean _success;
modelica_metatype out_success;
_success = omc_Interactive_setSourceFile(threadData, _path, _inString, _inProgram, out_outProgram);
out_success = mmc_mk_icon(_success);
return out_success;
}
DLLExport
modelica_string omc_Interactive_getSourceFile(threadData_t *threadData, modelica_metatype _p_class, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_p = tmp4_1;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
tmp1 = omc_AbsynUtil_classFilename(threadData, _cdef);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementsInfo(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _modelpath = NULL;
modelica_string _public_str = NULL;
modelica_string _protected_str = NULL;
modelica_string _elements_str = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _public_elementitem_list = NULL;
modelica_metatype _protected_elementitem_list = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_model_ = tmp4_1;
_p = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta6 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,5) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_parts = tmpMeta8;
_public_elementitem_list = omc_InteractiveUtil_getPublicList(threadData, _parts);
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
_public_str = omc_Interactive_constructElementsInfo(threadData, _OMC_LIT266, _public_elementitem_list);
_protected_str = omc_Interactive_constructElementsInfo(threadData, _OMC_LIT267, _protected_elementitem_list);
_elements_str = omc_Interactive_appendNonEmptyStrings(threadData, _public_str, _protected_str, _OMC_LIT80);
tmpMeta9 = mmc_mk_cons(_OMC_LIT268, mmc_mk_cons(_elements_str, mmc_mk_cons(_OMC_LIT269, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta9);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
_model_ = tmp4_1;
_p = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta10 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,4,5) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 5));
_parts = tmpMeta12;
_public_elementitem_list = omc_InteractiveUtil_getPublicList(threadData, _parts);
_protected_elementitem_list = omc_InteractiveUtil_getProtectedList(threadData, _parts);
_public_str = omc_Interactive_constructElementsInfo(threadData, _OMC_LIT266, _public_elementitem_list);
_protected_str = omc_Interactive_constructElementsInfo(threadData, _OMC_LIT267, _protected_elementitem_list);
_elements_str = omc_Interactive_appendNonEmptyStrings(threadData, _public_str, _protected_str, _OMC_LIT80);
tmpMeta13 = mmc_mk_cons(_OMC_LIT268, mmc_mk_cons(_elements_str, mmc_mk_cons(_OMC_LIT269, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta13);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
_model_ = tmp4_1;
_p = tmp4_2;
_modelpath = omc_AbsynUtil_crefToPath(threadData, _model_);
tmpMeta14 = omc_InteractiveUtil_getPathedClassInProgram(threadData, _modelpath, _p, 0, 0);
tmp1 = _OMC_LIT270;
goto tmp3_done;
}
case 3: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_appendNonEmptyStrings(threadData_t *threadData, modelica_string _inString1, modelica_string _inString2, modelica_string _inString3)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_string tmp4_2;modelica_string tmp4_3;
tmp4_1 = _inString1;
tmp4_2 = _inString2;
tmp4_3 = _inString3;
{
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _delimiter = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
_s1 = tmp4_1;
tmp1 = _s1;
goto tmp3_done;
}
case 2: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_s2 = tmp4_2;
tmp1 = _s2;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta6;
_s1 = tmp4_1;
_s2 = tmp4_2;
_delimiter = tmp4_3;
tmpMeta6 = mmc_mk_cons(_s1, mmc_mk_cons(_delimiter, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta6);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_constructElementsInfo(threadData_t *threadData, modelica_string _inString, modelica_metatype _inAbsynElementItemLst)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inString;
tmp4_2 = _inAbsynElementItemLst;
{
modelica_string _visibility_str = NULL;
modelica_string _s1 = NULL;
modelica_string _element_str = NULL;
modelica_string _s2 = NULL;
modelica_metatype _current = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmp4 += 2;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_current = tmpMeta6;
_visibility_str = tmp4_1;
_s1 = omc_Interactive_getElementInfo(threadData, _current);
tmpMeta8 = mmc_mk_cons(_OMC_LIT271, mmc_mk_cons(_visibility_str, mmc_mk_cons(_OMC_LIT80, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT272, MMC_REFSTRUCTLIT(mmc_nil))))));
_element_str = stringAppendList(tmpMeta8);
tmpMeta9 = stringAppend(_element_str,_OMC_LIT72);
tmp1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_2);
tmpMeta11 = MMC_CDR(tmp4_2);
_current = tmpMeta10;
_rest = tmpMeta11;
_visibility_str = tmp4_1;
_s1 = omc_Interactive_getElementInfo(threadData, _current);
tmpMeta12 = mmc_mk_cons(_OMC_LIT271, mmc_mk_cons(_visibility_str, mmc_mk_cons(_OMC_LIT80, mmc_mk_cons(_s1, mmc_mk_cons(_OMC_LIT272, MMC_REFSTRUCTLIT(mmc_nil))))));
_element_str = stringAppendList(tmpMeta12);
_s2 = omc_Interactive_constructElementsInfo(threadData, _visibility_str, _rest);
tmpMeta13 = mmc_mk_cons(_element_str, mmc_mk_cons(_OMC_LIT273, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta13);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementInfo(threadData_t *threadData, modelica_metatype _inElementItem)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inElementItem;
{
modelica_string _finalPrefix = NULL;
modelica_string _repl = NULL;
modelica_string _inout_str = NULL;
modelica_string _str_restriction = NULL;
modelica_string _element_str = NULL;
modelica_string _sline_str = NULL;
modelica_string _scol_str = NULL;
modelica_string _eline_str = NULL;
modelica_string _ecol_str = NULL;
modelica_string _readonly_str = NULL;
modelica_string _id = NULL;
modelica_string _file = NULL;
modelica_boolean _r_1;
modelica_boolean _f;
modelica_boolean _isReadOnly;
modelica_metatype _r = NULL;
modelica_metatype _inout = NULL;
modelica_metatype _restr = NULL;
modelica_integer _sline;
modelica_integer _scol;
modelica_integer _eline;
modelica_integer _ecol;
modelica_metatype _elementSpec = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_integer tmp18;
modelica_metatype tmpMeta19;
modelica_integer tmp20;
modelica_metatype tmpMeta21;
modelica_integer tmp22;
modelica_metatype tmpMeta23;
modelica_integer tmp24;
modelica_metatype tmpMeta25;
modelica_integer tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,6) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 6));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 10));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmp18 = mmc_unbox_integer(tmpMeta17);
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmp20 = mmc_unbox_integer(tmpMeta19);
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
tmp22 = mmc_unbox_integer(tmpMeta21);
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 6));
tmp24 = mmc_unbox_integer(tmpMeta23);
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 7));
tmp26 = mmc_unbox_integer(tmpMeta25);
_f = tmp8;
_r = tmpMeta9;
_inout = tmpMeta10;
_id = tmpMeta13;
_restr = tmpMeta14;
_file = tmpMeta16;
_isReadOnly = tmp18;
_sline = tmp20;
_scol = tmp22;
_eline = tmp24;
_ecol = tmp26;
_finalPrefix = (_f?_OMC_LIT127:_OMC_LIT128);
_r_1 = omc_Interactive_keywordReplaceable(threadData, _r);
_repl = (_r_1?_OMC_LIT127:_OMC_LIT128);
_inout_str = omc_InteractiveUtil_innerOuterStr(threadData, _inout);
_str_restriction = omc_AbsynUtil_restrString(threadData, _restr);
tmpMeta27 = mmc_mk_cons(_OMC_LIT274, mmc_mk_cons(_id, mmc_mk_cons(_OMC_LIT275, mmc_mk_cons(_str_restriction, MMC_REFSTRUCTLIT(mmc_nil)))));
_element_str = stringAppendList(tmpMeta27);
_file = omc_Testsuite_friendly(threadData, _file);
_sline_str = intString(_sline);
_scol_str = intString(_scol);
_eline_str = intString(_eline);
_ecol_str = intString(_ecol);
_readonly_str = omc_Interactive_selectString(threadData, _isReadOnly, _OMC_LIT276, _OMC_LIT277);
tmpMeta28 = mmc_mk_cons(_OMC_LIT278, mmc_mk_cons(_file, mmc_mk_cons(_OMC_LIT279, mmc_mk_cons(_readonly_str, mmc_mk_cons(_OMC_LIT280, mmc_mk_cons(_sline_str, mmc_mk_cons(_OMC_LIT281, mmc_mk_cons(_scol_str, mmc_mk_cons(_OMC_LIT282, mmc_mk_cons(_eline_str, mmc_mk_cons(_OMC_LIT283, mmc_mk_cons(_ecol_str, mmc_mk_cons(_OMC_LIT284, mmc_mk_cons(_finalPrefix, mmc_mk_cons(_OMC_LIT285, mmc_mk_cons(_repl, mmc_mk_cons(_OMC_LIT286, mmc_mk_cons(_inout_str, mmc_mk_cons(_OMC_LIT80, mmc_mk_cons(_element_str, MMC_REFSTRUCTLIT(mmc_nil)))))))))))))))))))));
tmp1 = stringAppendList(tmpMeta28);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_integer tmp31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_integer tmp38;
modelica_metatype tmpMeta39;
modelica_integer tmp40;
modelica_metatype tmpMeta41;
modelica_integer tmp42;
modelica_metatype tmpMeta43;
modelica_integer tmp44;
modelica_metatype tmpMeta45;
modelica_integer tmp46;
modelica_metatype tmpMeta47;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,0,6) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 2));
tmp31 = mmc_unbox_integer(tmpMeta30);
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 3));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 4));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 5));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 6));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 3));
tmp38 = mmc_unbox_integer(tmpMeta37);
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 4));
tmp40 = mmc_unbox_integer(tmpMeta39);
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 5));
tmp42 = mmc_unbox_integer(tmpMeta41);
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 6));
tmp44 = mmc_unbox_integer(tmpMeta43);
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 7));
tmp46 = mmc_unbox_integer(tmpMeta45);
_f = tmp31;
_r = tmpMeta32;
_inout = tmpMeta33;
_elementSpec = tmpMeta34;
_file = tmpMeta36;
_isReadOnly = tmp38;
_sline = tmp40;
_scol = tmp42;
_eline = tmp44;
_ecol = tmp46;
tmp4 += 1;
_finalPrefix = (_f?_OMC_LIT127:_OMC_LIT128);
_r_1 = omc_Interactive_keywordReplaceable(threadData, _r);
_repl = (_r_1?_OMC_LIT127:_OMC_LIT128);
_inout_str = omc_InteractiveUtil_innerOuterStr(threadData, _inout);
_element_str = omc_Interactive_getElementType(threadData, _elementSpec);
_sline_str = intString(_sline);
_scol_str = intString(_scol);
_eline_str = intString(_eline);
_ecol_str = intString(_ecol);
_readonly_str = omc_Interactive_selectString(threadData, _isReadOnly, _OMC_LIT276, _OMC_LIT277);
_file = omc_Testsuite_friendly(threadData, _file);
tmpMeta47 = mmc_mk_cons(_OMC_LIT278, mmc_mk_cons(_file, mmc_mk_cons(_OMC_LIT279, mmc_mk_cons(_readonly_str, mmc_mk_cons(_OMC_LIT280, mmc_mk_cons(_sline_str, mmc_mk_cons(_OMC_LIT281, mmc_mk_cons(_scol_str, mmc_mk_cons(_OMC_LIT282, mmc_mk_cons(_eline_str, mmc_mk_cons(_OMC_LIT283, mmc_mk_cons(_ecol_str, mmc_mk_cons(_OMC_LIT284, mmc_mk_cons(_finalPrefix, mmc_mk_cons(_OMC_LIT285, mmc_mk_cons(_repl, mmc_mk_cons(_OMC_LIT286, mmc_mk_cons(_inout_str, mmc_mk_cons(_OMC_LIT80, mmc_mk_cons(_element_str, MMC_REFSTRUCTLIT(mmc_nil)))))))))))))))))))));
tmp1 = stringAppendList(tmpMeta47);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmp1 = _OMC_LIT287;
goto tmp3_done;
}
case 3: {
tmp1 = _OMC_LIT288;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getElementType(threadData_t *threadData, modelica_metatype _inElementSpec)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElementSpec;
{
modelica_string _path_str = NULL;
modelica_string _import_str = NULL;
modelica_string _typename = NULL;
modelica_string _flowPrefixstr = NULL;
modelica_string _streamPrefixstr = NULL;
modelica_string _variability_str = NULL;
modelica_string _dir_str = NULL;
modelica_string _names_str = NULL;
modelica_metatype _path = NULL;
modelica_metatype _typeSpec = NULL;
modelica_metatype _import_ = NULL;
modelica_metatype _names = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _lst = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 4: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta5;
_path_str = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
tmpMeta6 = stringAppend(_OMC_LIT289,_path_str);
tmp1 = tmpMeta6;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_import_ = tmpMeta7;
_import_str = omc_Interactive_getImportString(threadData, _import_);
tmpMeta8 = stringAppend(_OMC_LIT290,_import_str);
tmp1 = tmpMeta8;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_attr = tmpMeta9;
_typeSpec = tmpMeta10;
_lst = tmpMeta11;
_typename = omc_Dump_unparseTypeSpec(threadData, _typeSpec);
_names = omc_InteractiveUtil_getComponentItemsNameAndComment(threadData, _lst, 0);
_flowPrefixstr = omc_InteractiveUtil_attrFlowStr(threadData, _attr);
_streamPrefixstr = omc_InteractiveUtil_attrStreamStr(threadData, _attr);
_variability_str = omc_InteractiveUtil_attrVariabilityStr(threadData, _attr);
_dir_str = omc_InteractiveUtil_attrDirectionStr(threadData, _attr);
_names_str = stringDelimitList(_names, _OMC_LIT80);
tmpMeta12 = mmc_mk_cons(_OMC_LIT291, mmc_mk_cons(_typename, mmc_mk_cons(_OMC_LIT292, mmc_mk_cons(_names_str, mmc_mk_cons(_OMC_LIT293, mmc_mk_cons(_flowPrefixstr, mmc_mk_cons(_OMC_LIT294, mmc_mk_cons(_streamPrefixstr, mmc_mk_cons(_OMC_LIT295, mmc_mk_cons(_variability_str, mmc_mk_cons(_OMC_LIT296, mmc_mk_cons(_dir_str, MMC_REFSTRUCTLIT(mmc_nil)))))))))))));
tmp1 = stringAppendList(tmpMeta12);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getImportString(threadData_t *threadData, modelica_metatype _inImport)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inImport;
{
modelica_string _path_str = NULL;
modelica_string _id = NULL;
modelica_metatype _path = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta5;
_path = tmpMeta6;
_path_str = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
tmpMeta7 = mmc_mk_cons(_OMC_LIT297, mmc_mk_cons(_id, mmc_mk_cons(_OMC_LIT298, mmc_mk_cons(_path_str, MMC_REFSTRUCTLIT(mmc_nil)))));
tmp1 = stringAppendList(tmpMeta7);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta8;
_path_str = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
tmpMeta9 = stringAppend(_OMC_LIT299,_path_str);
tmp1 = tmpMeta9;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta10;
_path_str = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
tmpMeta11 = stringAppend(_OMC_LIT300,_path_str);
tmp1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getCrefInfo(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inProgram)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inProgram;
{
modelica_metatype _p_class = NULL;
modelica_metatype _cdef = NULL;
modelica_string _filename = NULL;
modelica_string _str_sline = NULL;
modelica_string _str_scol = NULL;
modelica_string _str_eline = NULL;
modelica_string _str_ecol = NULL;
modelica_string _str_readonly = NULL;
modelica_boolean _isReadOnly;
modelica_integer _sline;
modelica_integer _scol;
modelica_integer _eline;
modelica_integer _ecol;
modelica_metatype _class_ = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_integer tmp16;
modelica_metatype tmpMeta17;
modelica_integer tmp18;
modelica_metatype tmpMeta19;
_class_ = tmp4_1;
_p = tmp4_2;
_p_class = omc_AbsynUtil_crefToPath(threadData, _class_);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
tmpMeta6 = _cdef;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 10));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
tmp12 = mmc_unbox_integer(tmpMeta11);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
tmp14 = mmc_unbox_integer(tmpMeta13);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 6));
tmp16 = mmc_unbox_integer(tmpMeta15);
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 7));
tmp18 = mmc_unbox_integer(tmpMeta17);
_filename = tmpMeta8;
_isReadOnly = tmp10;
_sline = tmp12;
_scol = tmp14;
_eline = tmp16;
_ecol = tmp18;
_filename = omc_Testsuite_friendly(threadData, _filename);
_str_sline = intString(_sline);
_str_scol = intString(_scol);
_str_eline = intString(_eline);
_str_ecol = intString(_ecol);
_str_readonly = omc_Interactive_selectString(threadData, _isReadOnly, _OMC_LIT276, _OMC_LIT277);
tmpMeta19 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_filename, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_str_readonly, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_str_sline, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_str_scol, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_str_eline, mmc_mk_cons(_OMC_LIT73, mmc_mk_cons(_str_ecol, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))))))))))))));
tmp1 = stringAppendList(tmpMeta19);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT61;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_selectString(threadData_t *threadData, modelica_boolean _inSelector, modelica_string _inString2, modelica_string _inString3)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_boolean tmp4_1;modelica_string tmp4_2;modelica_string tmp4_3;
tmp4_1 = _inSelector;
tmp4_2 = _inString2;
tmp4_3 = _inString3;
{
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_1) goto tmp3_end;
_s1 = tmp4_2;
tmp1 = _s1;
goto tmp3_done;
}
case 1: {
if (0 != tmp4_1) goto tmp3_end;
_s2 = tmp4_3;
tmp1 = _s2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_selectString(threadData_t *threadData, modelica_metatype _inSelector, modelica_metatype _inString2, modelica_metatype _inString3)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inSelector);
_outString = omc_Interactive_selectString(threadData, tmp1, _inString2, _inString3);
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementIsField(threadData_t *threadData, modelica_string _inString)
{
modelica_metatype _outIsField = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;
tmp4_1 = _inString;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT207;
goto tmp3_done;
}
case 1: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT337), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT207;
goto tmp3_done;
}
case 2: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT338), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if((!(omc_Flags_getConfigEnum(threadData, _OMC_LIT335) == ((modelica_integer) 5))))
{
omc_Error_addMessage(threadData, _OMC_LIT303, _OMC_LIT305);
goto goto_2;
}
tmpMeta1 = _OMC_LIT336;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outIsField = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outIsField;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementCausality(threadData_t *threadData, modelica_string _inString)
{
modelica_metatype _outDirection = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;
tmp4_1 = _inString;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT206;
goto tmp3_done;
}
case 1: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT341), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT339;
goto tmp3_done;
}
case 2: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT342), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT340;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDirection = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDirection;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementVariability(threadData_t *threadData, modelica_string _inString)
{
modelica_metatype _outVariability = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;
tmp4_1 = _inString;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT215;
goto tmp3_done;
}
case 1: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT212), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT213;
goto tmp3_done;
}
case 2: {
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT203), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT205;
goto tmp3_done;
}
case 3: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT209), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT210;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outVariability = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outVariability;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementParallelism(threadData_t *threadData, modelica_string _inString)
{
modelica_metatype _outParallelism = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;
tmp4_1 = _inString;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT55), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT204;
goto tmp3_done;
}
case 1: {
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT343;
goto tmp3_done;
}
case 2: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT344;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outParallelism = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outParallelism;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setElementAttributes(threadData_t *threadData, modelica_metatype _inElementAttributes1, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_string _inString2, modelica_string _inString3, modelica_string _inString4, modelica_string _inString5)
{
modelica_metatype _outElementAttributes = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_boolean tmp4_3;modelica_string tmp4_4;modelica_string tmp4_5;modelica_string tmp4_6;modelica_string tmp4_7;
tmp4_1 = _inElementAttributes1;
tmp4_2 = _inFlow;
tmp4_3 = _inStream;
tmp4_4 = _inString2;
tmp4_5 = _inString3;
tmp4_6 = _inString4;
tmp4_7 = _inString5;
{
modelica_metatype _pa_1 = NULL;
modelica_metatype _va_1 = NULL;
modelica_metatype _cau_1 = NULL;
modelica_metatype _fi_1 = NULL;
modelica_metatype _dim = NULL;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_string _va = NULL;
modelica_string _cau = NULL;
modelica_string _prl = NULL;
modelica_string _fi = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 8));
_dim = tmpMeta6;
_flowPrefix = tmp4_2;
_streamPrefix = tmp4_3;
_prl = tmp4_4;
_va = tmp4_5;
_cau = tmp4_6;
_fi = tmp4_7;
_pa_1 = omc_Interactive_setElementParallelism(threadData, _prl);
_va_1 = omc_Interactive_setElementVariability(threadData, _va);
_cau_1 = omc_Interactive_setElementCausality(threadData, _cau);
_fi_1 = omc_Interactive_setElementIsField(threadData, _fi);
tmpMeta7 = mmc_mk_box8(3, &Absyn_ElementAttributes_ATTR__desc, mmc_mk_boolean(_flowPrefix), mmc_mk_boolean(_streamPrefix), _pa_1, _va_1, _cau_1, _fi_1, _dim);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElementAttributes = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementAttributes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setElementAttributes(threadData_t *threadData, modelica_metatype _inElementAttributes1, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inString2, modelica_metatype _inString3, modelica_metatype _inString4, modelica_metatype _inString5)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outElementAttributes = NULL;
tmp1 = mmc_unbox_integer(_inFlow);
tmp2 = mmc_unbox_integer(_inStream);
_outElementAttributes = omc_Interactive_setElementAttributes(threadData, _inElementAttributes1, tmp1, tmp2, _inString2, _inString3, _inString4, _inString5);
return _outElementAttributes;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_itemsContainCompname(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst, modelica_string _inIdent)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_string tmp3_2;
tmp3_1 = _inAbsynComponentItemLst;
tmp3_2 = _inIdent;
{
modelica_string _cr1 = NULL;
modelica_string _cr2 = NULL;
modelica_string _cr = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_cr1 = tmpMeta8;
_cr2 = tmp3_2;
tmp9 = (stringEqual(_cr1, _cr2));
if (1 != tmp9) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta10 = MMC_CAR(tmp3_1);
tmpMeta11 = MMC_CDR(tmp3_1);
_rest = tmpMeta11;
_cr = tmp3_2;
omc_Interactive_itemsContainCompname(threadData, _rest, _cr);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_string _inIdent2, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_string _inString3, modelica_string _inString4, modelica_string _inString5, modelica_string _inString6)
{
modelica_metatype _outElementSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_string tmp4_5;volatile modelica_string tmp4_6;volatile modelica_string tmp4_7;volatile modelica_string tmp4_8;
tmp4_1 = _inElementSpec1;
tmp4_2 = _inIdent2;
tmp4_3 = _inFlow;
tmp4_4 = _inStream;
tmp4_5 = _inString3;
tmp4_6 = _inString4;
tmp4_7 = _inString5;
tmp4_8 = _inString6;
{
modelica_metatype _attr_1 = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _path = NULL;
modelica_metatype _items = NULL;
modelica_string _cr = NULL;
modelica_string _va = NULL;
modelica_string _cau = NULL;
modelica_string _prl = NULL;
modelica_string _isf = NULL;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_attr = tmpMeta6;
_path = tmpMeta7;
_items = tmpMeta8;
_cr = tmp4_2;
_flowPrefix = tmp4_3;
_streamPrefix = tmp4_4;
_prl = tmp4_5;
_va = tmp4_6;
_cau = tmp4_7;
_isf = tmp4_8;
omc_Interactive_itemsContainCompname(threadData, _items, _cr);
_attr_1 = omc_Interactive_setElementAttributes(threadData, _attr, _flowPrefix, _streamPrefix, _prl, _va, _cau, _isf);
tmpMeta9 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr_1, _path, _items);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inElementSpec1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElementSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElementspec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inIdent2, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inString3, modelica_metatype _inString4, modelica_metatype _inString5, modelica_metatype _inString6)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outElementSpec = NULL;
tmp1 = mmc_unbox_integer(_inFlow);
tmp2 = mmc_unbox_integer(_inStream);
_outElementSpec = omc_Interactive_setComponentPropertiesInElementspec(threadData, _inElementSpec1, _inIdent2, tmp1, tmp2, _inString3, _inString4, _inString5, _inString6);
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setInnerOuterAttributes(threadData_t *threadData, modelica_metatype _inBooleanLst)
{
modelica_metatype _outInnerOuter = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inBooleanLst;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmp8 = mmc_unbox_integer(tmpMeta6);
if (0 != tmp8) goto tmp3_end;
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta7);
tmpMeta10 = MMC_CDR(tmpMeta7);
tmp11 = mmc_unbox_integer(tmpMeta9);
if (0 != tmp11) goto tmp3_end;
if (!listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta1 = _OMC_LIT222;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
tmp14 = mmc_unbox_integer(tmpMeta12);
if (1 != tmp14) goto tmp3_end;
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta13);
tmpMeta16 = MMC_CDR(tmpMeta13);
tmp17 = mmc_unbox_integer(tmpMeta15);
if (0 != tmp17) goto tmp3_end;
if (!listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta1 = _OMC_LIT223;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_integer tmp20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_integer tmp23;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmp4_1);
tmpMeta19 = MMC_CDR(tmp4_1);
tmp20 = mmc_unbox_integer(tmpMeta18);
if (0 != tmp20) goto tmp3_end;
if (listEmpty(tmpMeta19)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmpMeta19);
tmpMeta22 = MMC_CDR(tmpMeta19);
tmp23 = mmc_unbox_integer(tmpMeta21);
if (1 != tmp23) goto tmp3_end;
if (!listEmpty(tmpMeta22)) goto tmp3_end;
tmpMeta1 = _OMC_LIT224;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_integer tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_integer tmp29;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_1);
tmpMeta25 = MMC_CDR(tmp4_1);
tmp26 = mmc_unbox_integer(tmpMeta24);
if (1 != tmp26) goto tmp3_end;
if (listEmpty(tmpMeta25)) goto tmp3_end;
tmpMeta27 = MMC_CAR(tmpMeta25);
tmpMeta28 = MMC_CDR(tmpMeta25);
tmp29 = mmc_unbox_integer(tmpMeta27);
if (1 != tmp29) goto tmp3_end;
if (!listEmpty(tmpMeta28)) goto tmp3_end;
tmpMeta1 = _OMC_LIT347;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInnerOuter = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outInnerOuter;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setReplaceableKeywordAttributes(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption, modelica_boolean _inBoolean)
{
modelica_metatype _outAbsynRedeclareKeywordsOption = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _inAbsynRedeclareKeywordsOption;
tmp4_2 = _inBoolean;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != tmp4_2) goto tmp3_end;
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
if (0 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,0) == 0) goto tmp3_end;
tmpMeta1 = mmc_mk_none();
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta7;
if (0 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT349;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta8;
if (0 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT349;
goto tmp3_done;
}
case 4: {
if (1 != tmp4_2) goto tmp3_end;
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = _OMC_LIT219;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta9;
if (1 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT351;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta10;
if (1 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT219;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta11;
if (1 != tmp4_2) goto tmp3_end;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT351;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynRedeclareKeywordsOption = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynRedeclareKeywordsOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setReplaceableKeywordAttributes(threadData_t *threadData, modelica_metatype _inAbsynRedeclareKeywordsOption, modelica_metatype _inBoolean)
{
modelica_integer tmp1;
modelica_metatype _outAbsynRedeclareKeywordsOption = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outAbsynRedeclareKeywordsOption = omc_Interactive_setReplaceableKeywordAttributes(threadData, _inAbsynRedeclareKeywordsOption, tmp1);
return _outAbsynRedeclareKeywordsOption;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElement(threadData_t *threadData, modelica_metatype _inElement1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inReplaceable, modelica_string _inString5, modelica_string _inString6, modelica_metatype _inBooleanLst7, modelica_string _inString8, modelica_string _inString9)
{
modelica_metatype _outElement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_string tmp4_7;volatile modelica_string tmp4_8;volatile modelica_metatype tmp4_9;volatile modelica_string tmp4_10;volatile modelica_string tmp4_11;
tmp4_1 = _inElement1;
tmp4_2 = _inIdent2;
tmp4_3 = _inFinal;
tmp4_4 = _inFlow;
tmp4_5 = _inStream;
tmp4_6 = _inReplaceable;
tmp4_7 = _inString5;
tmp4_8 = _inString6;
tmp4_9 = _inBooleanLst7;
tmp4_10 = _inString8;
tmp4_11 = _inString9;
{
modelica_metatype _redeclkw_1 = NULL;
modelica_metatype _redeclkw = NULL;
modelica_metatype _inout_1 = NULL;
modelica_metatype _spec_1 = NULL;
modelica_metatype _spec = NULL;
modelica_string _cr = NULL;
modelica_string _va = NULL;
modelica_string _cau = NULL;
modelica_string _prl = NULL;
modelica_string _isf = NULL;
modelica_metatype _ellst = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constr = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _repl;
modelica_metatype _dr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,3,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_redeclkw = tmpMeta6;
_spec = tmpMeta7;
_ellst = tmpMeta8;
_info = tmpMeta9;
_constr = tmpMeta10;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_repl = tmp4_6;
_prl = tmp4_7;
_va = tmp4_8;
_dr = tmp4_9;
_cau = tmp4_10;
_isf = tmp4_11;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _cr, tmpMeta11);
omc_Interactive_getCompitemNamed(threadData, tmpMeta12, _ellst);
_redeclkw_1 = omc_Interactive_setReplaceableKeywordAttributes(threadData, _redeclkw, _repl);
_inout_1 = omc_Interactive_setInnerOuterAttributes(threadData, _dr);
_spec_1 = omc_Interactive_setComponentPropertiesInElementspec(threadData, _spec, _cr, _flowPrefix, _streamPrefix, _prl, _va, _cau, _isf);
tmpMeta13 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_finalPrefix), _redeclkw_1, _inout_1, _spec_1, _info, _constr);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inElement1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElement(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inReplaceable, modelica_metatype _inString5, modelica_metatype _inString6, modelica_metatype _inBooleanLst7, modelica_metatype _inString8, modelica_metatype _inString9)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outElement = NULL;
tmp1 = mmc_unbox_integer(_inFinal);
tmp2 = mmc_unbox_integer(_inFlow);
tmp3 = mmc_unbox_integer(_inStream);
tmp4 = mmc_unbox_integer(_inReplaceable);
_outElement = omc_Interactive_setComponentPropertiesInElement(threadData, _inElement1, _inIdent2, tmp1, tmp2, tmp3, tmp4, _inString5, _inString6, _inBooleanLst7, _inString8, _inString9);
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inReplaceable, modelica_string _inString5, modelica_string _inString6, modelica_metatype _inBooleanLst7, modelica_string _inString8, modelica_string _inString9)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_string tmp4_7;volatile modelica_string tmp4_8;volatile modelica_metatype tmp4_9;volatile modelica_string tmp4_10;volatile modelica_string tmp4_11;
tmp4_1 = _inAbsynElementItemLst1;
tmp4_2 = _inIdent2;
tmp4_3 = _inFinal;
tmp4_4 = _inFlow;
tmp4_5 = _inStream;
tmp4_6 = _inReplaceable;
tmp4_7 = _inString5;
tmp4_8 = _inString6;
tmp4_9 = _inBooleanLst7;
tmp4_10 = _inString8;
tmp4_11 = _inString9;
{
modelica_metatype _res = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _elt_1 = NULL;
modelica_metatype _elt = NULL;
modelica_string _cr = NULL;
modelica_string _prl = NULL;
modelica_string _va = NULL;
modelica_string _cau = NULL;
modelica_string _isf = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _repl;
modelica_metatype _dr = NULL;
modelica_metatype _elitem = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elt = tmpMeta9;
_rest = tmpMeta8;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_repl = tmp4_6;
_prl = tmp4_7;
_va = tmp4_8;
_dr = tmp4_9;
_cau = tmp4_10;
_isf = tmp4_11;
_res = omc_Interactive_setComponentPropertiesInElementitems(threadData, _rest, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _prl, _va, _dr, _cau, _isf);
_elt_1 = omc_Interactive_setComponentPropertiesInElement(threadData, _elt, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _prl, _va, _dr, _cau, _isf);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
_elitem = tmpMeta12;
_rest = tmpMeta13;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_repl = tmp4_6;
_prl = tmp4_7;
_va = tmp4_8;
_dr = tmp4_9;
_cau = tmp4_10;
_isf = tmp4_11;
_res = omc_Interactive_setComponentPropertiesInElementitems(threadData, _rest, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _prl, _va, _dr, _cau, _isf);
tmpMeta14 = mmc_mk_cons(_elitem, _res);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInElementitems(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inReplaceable, modelica_metatype _inString5, modelica_metatype _inString6, modelica_metatype _inBooleanLst7, modelica_metatype _inString8, modelica_metatype _inString9)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outAbsynElementItemLst = NULL;
tmp1 = mmc_unbox_integer(_inFinal);
tmp2 = mmc_unbox_integer(_inFlow);
tmp3 = mmc_unbox_integer(_inStream);
tmp4 = mmc_unbox_integer(_inReplaceable);
_outAbsynElementItemLst = omc_Interactive_setComponentPropertiesInElementitems(threadData, _inAbsynElementItemLst1, _inIdent2, tmp1, tmp2, tmp3, tmp4, _inString5, _inString6, _inBooleanLst7, _inString8, _inString9);
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_string _inIdent2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString6, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_string _inString10)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_string tmp4_8;volatile modelica_string tmp4_9;volatile modelica_metatype tmp4_10;volatile modelica_string tmp4_11;volatile modelica_string tmp4_12;
tmp4_1 = _inAbsynClassPartLst1;
tmp4_2 = _inIdent2;
tmp4_3 = _inFinal;
tmp4_4 = _inFlow;
tmp4_5 = _inStream;
tmp4_6 = _inProtected;
tmp4_7 = _inReplaceable;
tmp4_8 = _inString6;
tmp4_9 = _inString7;
tmp4_10 = _inBooleanLst8;
tmp4_11 = _inString9;
tmp4_12 = _inString10;
{
modelica_metatype _publst = NULL;
modelica_metatype _publst_1 = NULL;
modelica_metatype _protlst = NULL;
modelica_metatype _protlst_1 = NULL;
modelica_metatype _elts_1 = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _elt_1 = NULL;
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _rest_1 = NULL;
modelica_string _cr = NULL;
modelica_string _parallelism = NULL;
modelica_string _variability = NULL;
modelica_string _causality = NULL;
modelica_string _isField = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _repl;
modelica_boolean _prot;
modelica_metatype _dyn_ref = NULL;
modelica_metatype _part = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (1 != tmp4_6) goto tmp3_end;
_parts = tmp4_1;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
tmp4 += 1;
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta8 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _cr, tmpMeta7);
tmpMeta9 = omc_Interactive_getElementitemContainsName(threadData, tmpMeta8, _publst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_elt = tmpMeta10;
_elt_1 = omc_Interactive_setComponentPropertiesInElement(threadData, _elt, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
_publst_1 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _cr, _publst, mmc_mk_none(), NULL);
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmpMeta12 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
_protlst_1 = listAppend(_protlst, tmpMeta11);
_parts_1 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts, _protlst_1);
tmpMeta1 = omc_InteractiveUtil_replacePublicList(threadData, _parts_1, _publst_1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (0 != tmp4_6) goto tmp3_end;
_parts = tmp4_1;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
_protlst = omc_InteractiveUtil_getProtectedList(threadData, _parts);
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _cr, tmpMeta13);
tmpMeta15 = omc_Interactive_getElementitemContainsName(threadData, tmpMeta14, _protlst);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_elt = tmpMeta16;
_elt_1 = omc_Interactive_setComponentPropertiesInElement(threadData, _elt, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
_protlst_1 = omc_Interactive_deleteOrUpdateComponentFromElementitems(threadData, _cr, _protlst, mmc_mk_none(), NULL);
_publst = omc_InteractiveUtil_getPublicList(threadData, _parts);
tmpMeta18 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, _elt_1);
tmpMeta17 = mmc_mk_cons(tmpMeta18, MMC_REFSTRUCTLIT(mmc_nil));
_publst_1 = listAppend(_publst, tmpMeta17);
_parts_1 = omc_InteractiveUtil_replacePublicList(threadData, _parts, _publst_1);
tmpMeta1 = omc_InteractiveUtil_replaceProtectedList(threadData, _parts_1, _protlst_1);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_1);
tmpMeta20 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,1) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_elts = tmpMeta21;
_rest = tmpMeta20;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
tmp4 += 1;
_rest = omc_Interactive_setComponentPropertiesInClassparts(threadData, _rest, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
_elts_1 = omc_Interactive_setComponentPropertiesInElementitems(threadData, _elts, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
tmpMeta23 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elts_1);
tmpMeta22 = mmc_mk_cons(tmpMeta23, _rest);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_1);
tmpMeta25 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,1,1) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
_elts = tmpMeta26;
_rest = tmpMeta25;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
_rest = omc_Interactive_setComponentPropertiesInClassparts(threadData, _rest, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
_elts_1 = omc_Interactive_setComponentPropertiesInElementitems(threadData, _elts, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
tmpMeta28 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elts_1);
tmpMeta27 = mmc_mk_cons(tmpMeta28, _rest);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmp4_1);
tmpMeta30 = MMC_CDR(tmp4_1);
_part = tmpMeta29;
_rest = tmpMeta30;
_cr = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
_rest_1 = omc_Interactive_setComponentPropertiesInClassparts(threadData, _rest, _cr, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
tmpMeta31 = mmc_mk_cons(_part, _rest_1);
tmpMeta1 = tmpMeta31;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInClassparts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inIdent2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString6, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inString10)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_metatype _outAbsynClassPartLst = NULL;
tmp1 = mmc_unbox_integer(_inFinal);
tmp2 = mmc_unbox_integer(_inFlow);
tmp3 = mmc_unbox_integer(_inStream);
tmp4 = mmc_unbox_integer(_inProtected);
tmp5 = mmc_unbox_integer(_inReplaceable);
_outAbsynClassPartLst = omc_Interactive_setComponentPropertiesInClassparts(threadData, _inAbsynClassPartLst1, _inIdent2, tmp1, tmp2, tmp3, tmp4, tmp5, _inString6, _inString7, _inBooleanLst8, _inString9, _inString10);
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_setComponentPropertiesInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_string _inString2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString6, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_string _inString10)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_boolean tmp4_3;modelica_boolean tmp4_4;modelica_boolean tmp4_5;modelica_boolean tmp4_6;modelica_boolean tmp4_7;modelica_string tmp4_8;modelica_string tmp4_9;modelica_metatype tmp4_10;modelica_string tmp4_11;modelica_string tmp4_12;
tmp4_1 = _inClass1;
tmp4_2 = _inString2;
tmp4_3 = _inFinal;
tmp4_4 = _inFlow;
tmp4_5 = _inStream;
tmp4_6 = _inProtected;
tmp4_7 = _inReplaceable;
tmp4_8 = _inString6;
tmp4_9 = _inString7;
tmp4_10 = _inBooleanLst8;
tmp4_11 = _inString9;
tmp4_12 = _inString10;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _varname = NULL;
modelica_string _parallelism = NULL;
modelica_string _variability = NULL;
modelica_string _causality = NULL;
modelica_string _bcname = NULL;
modelica_string _isField = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _prot;
modelica_boolean _repl;
modelica_metatype _cmt = NULL;
modelica_metatype _dyn_ref = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_cmt = tmpMeta11;
_varname = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
_parts_1 = omc_Interactive_setComponentPropertiesInClassparts(threadData, _parts, _varname, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _cmt);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_bcname = tmpMeta15;
_mod = tmpMeta16;
_cmt = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_varname = tmp4_2;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_parallelism = tmp4_8;
_variability = tmp4_9;
_dyn_ref = tmp4_10;
_causality = tmp4_11;
_isField = tmp4_12;
_parts_1 = omc_Interactive_setComponentPropertiesInClassparts(threadData, _parts, _varname, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _parallelism, _variability, _dyn_ref, _causality, _isField);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _bcname, _mod, _cmt, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentPropertiesInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inString2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString6, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inString10)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_metatype _outClass = NULL;
tmp1 = mmc_unbox_integer(_inFinal);
tmp2 = mmc_unbox_integer(_inFlow);
tmp3 = mmc_unbox_integer(_inStream);
tmp4 = mmc_unbox_integer(_inProtected);
tmp5 = mmc_unbox_integer(_inReplaceable);
_outClass = omc_Interactive_setComponentPropertiesInClass(threadData, _inClass1, _inString2, tmp1, tmp2, tmp3, tmp4, tmp5, _inString6, _inString7, _inBooleanLst8, _inString9, _inString10);
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_setComponentProperties(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inComponentRef2, modelica_boolean _inFinal, modelica_boolean _inFlow, modelica_boolean _inStream, modelica_boolean _inProtected, modelica_boolean _inReplaceable, modelica_string _inString7, modelica_metatype _inBooleanLst8, modelica_string _inString9, modelica_metatype _inProgram10, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_string tmp4_8;volatile modelica_metatype tmp4_9;volatile modelica_string tmp4_10;volatile modelica_metatype tmp4_11;
tmp4_1 = _inPath1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inFinal;
tmp4_4 = _inFlow;
tmp4_5 = _inStream;
tmp4_6 = _inProtected;
tmp4_7 = _inReplaceable;
tmp4_8 = _inString7;
tmp4_9 = _inBooleanLst8;
tmp4_10 = _inString9;
tmp4_11 = _inProgram10;
{
modelica_metatype _within_ = NULL;
modelica_metatype _cdef = NULL;
modelica_metatype _cdef_1 = NULL;
modelica_metatype _newp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _p_class = NULL;
modelica_string _varname = NULL;
modelica_string _variability = NULL;
modelica_string _causality = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _prot;
modelica_boolean _repl;
modelica_metatype _dyn_ref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_varname = tmpMeta6;
_p_class = tmp4_1;
_finalPrefix = tmp4_3;
_flowPrefix = tmp4_4;
_streamPrefix = tmp4_5;
_prot = tmp4_6;
_repl = tmp4_7;
_variability = tmp4_8;
_dyn_ref = tmp4_9;
_causality = tmp4_10;
_p = tmp4_11;
_within_ = omc_InteractiveUtil_buildWithin(threadData, _p_class);
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _p_class, _p, 0, 0);
_cdef_1 = omc_Interactive_setComponentPropertiesInClass(threadData, _cdef, _varname, _finalPrefix, _flowPrefix, _streamPrefix, _prot, _repl, _OMC_LIT55, _variability, _dyn_ref, _causality, _OMC_LIT55);
tmpMeta7 = mmc_mk_cons(_cdef_1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta8 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta7, _within_);
_newp = omc_InteractiveUtil_updateProgram(threadData, tmpMeta8, _p, 0);
tmp1_c0 = _OMC_LIT60;
tmpMeta[0+1] = _newp;
goto tmp3_done;
}
case 1: {
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = _inProgram10;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_setComponentProperties(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inComponentRef2, modelica_metatype _inFinal, modelica_metatype _inFlow, modelica_metatype _inStream, modelica_metatype _inProtected, modelica_metatype _inReplaceable, modelica_metatype _inString7, modelica_metatype _inBooleanLst8, modelica_metatype _inString9, modelica_metatype _inProgram10, modelica_metatype *out_outProgram)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inFinal);
tmp2 = mmc_unbox_integer(_inFlow);
tmp3 = mmc_unbox_integer(_inStream);
tmp4 = mmc_unbox_integer(_inProtected);
tmp5 = mmc_unbox_integer(_inReplaceable);
_outString = omc_Interactive_setComponentProperties(threadData, _inPath1, _inComponentRef2, tmp1, tmp2, tmp3, tmp4, tmp5, _inString7, _inBooleanLst8, _inString9, _inProgram10, out_outProgram);
return _outString;
}
DLLExport
modelica_metatype omc_Interactive_getClassEnv__dispatch(threadData_t *threadData, modelica_metatype _p, modelica_metatype _p_class, modelica_metatype *out_env_2)
{
modelica_metatype _cache = NULL;
modelica_metatype _env_2 = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _env_1 = NULL;
modelica_metatype _env2 = NULL;
modelica_metatype _cl = NULL;
modelica_string _id = NULL;
modelica_metatype _encflag = NULL;
modelica_metatype _restr = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_p_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _p);
_cache = omc_Inst_makeEnvFromProgram(threadData, _p_1 ,&_env);
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _p_class, mmc_mk_none() ,&_cl ,&_env_1);
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _cl;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) goto tmp3_end;
_id = tmpMeta6;
_encflag = tmpMeta7;
_restr = tmpMeta8;
tmpMeta1 = _env_1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,8) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_id = tmpMeta11;
_encflag = tmpMeta12;
_restr = tmpMeta13;
_env2 = omc_FGraph_openScope(threadData, _env_1, _encflag, _id, omc_FGraph_restrictionToScopeType(threadData, _restr));
_ci_state = omc_ClassInf_start(threadData, _restr, omc_FGraph_getGraphName(threadData, _env2));
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_Inst_partialInstClassIn(threadData, _cache, _env2, tmpMeta14, _OMC_LIT62, _OMC_LIT63, _ci_state, _cl, _OMC_LIT64, tmpMeta15, ((modelica_integer) 0) ,&_env_2 ,NULL ,NULL ,NULL);
tmpMeta1 = _env_2;
goto tmp3_done;
}
case 2: {
tmpMeta1 = omc_FGraph_empty(threadData);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_env_2 = tmpMeta1;
_return: OMC_LABEL_UNUSED
if (out_env_2) { *out_env_2 = _env_2; }
return _cache;
}
DLLExport
modelica_boolean omc_Interactive_matchPath(threadData_t *threadData, modelica_metatype _p, modelica_metatype _entry)
{
modelica_boolean _matches;
modelica_metatype _po = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _entry;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_po = tmpMeta2;
_matches = omc_AbsynUtil_pathEqual(threadData, _po, _p);
_return: OMC_LABEL_UNUSED
return _matches;
}
modelica_metatype boxptr_Interactive_matchPath(threadData_t *threadData, modelica_metatype _p, modelica_metatype _entry)
{
modelica_boolean _matches;
modelica_metatype out_matches;
_matches = omc_Interactive_matchPath(threadData, _p, _entry);
out_matches = mmc_mk_icon(_matches);
return out_matches;
}
DLLExport
modelica_metatype omc_Interactive_getClassEnv(threadData_t *threadData, modelica_metatype _p, modelica_metatype _p_class)
{
modelica_metatype _env_2 = NULL;
modelica_metatype _ocache = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _lcache = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _po = NULL;
modelica_metatype _patho = NULL;
modelica_metatype _envo = NULL;
modelica_boolean _invalidate;
modelica_metatype _fcache = NULL;
modelica_metatype _env = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_lcache = tmpMeta1;
_invalidate = 0;
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
tmpMeta2 = mmc_mk_box5(5, &Interactive_GraphicEnvCache_GRAPHIC__ENV__FULL__CACHE__desc, _p, _p_class, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData));
_env_2 = tmpMeta2;
goto _return;
}
_ocache = getGlobalRoot(((modelica_integer) 26));
if(isSome(_ocache))
{
tmpMeta3 = _ocache;
if (optionNone(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 1));
_cache = tmpMeta4;
{
modelica_metatype _x;
for (tmpMeta5 = _cache; !listEmpty(tmpMeta5); tmpMeta5=MMC_CDR(tmpMeta5))
{
_x = MMC_CAR(tmpMeta5);
tmpMeta6 = _x;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_po = tmpMeta7;
_patho = tmpMeta8;
_envo = tmpMeta9;
if(omc_AbsynUtil_pathEqual(threadData, _patho, _p_class))
{
if(referenceEq(_po, _p))
{
_env_2 = _envo;
goto _return;
}
else
{
_invalidate = 1;
break;
}
}
}
}
if(_invalidate)
{
tmpMeta11 = _ocache;
if (optionNone(tmpMeta11)) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
_cache = tmpMeta12;
_cache = omc_List_deleteMemberOnTrue(threadData, _p_class, _cache, boxvar_Interactive_matchPath, NULL);
setGlobalRoot(((modelica_integer) 26), mmc_mk_some(_cache));
}
}
_fcache = omc_Interactive_getClassEnv__dispatch(threadData, _p, _p_class ,&_env);
tmpMeta13 = mmc_mk_box5(5, &Interactive_GraphicEnvCache_GRAPHIC__ENV__FULL__CACHE__desc, _p, _p_class, _fcache, _env);
_env_2 = tmpMeta13;
_ocache = getGlobalRoot(((modelica_integer) 26));
if(isSome(_ocache))
{
tmpMeta14 = _ocache;
if (optionNone(tmpMeta14)) MMC_THROW_INTERNAL();
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
_cache = tmpMeta15;
tmpMeta17 = mmc_mk_box3(0, _p, _p_class, _env_2);
tmpMeta16 = mmc_mk_cons(tmpMeta17, _cache);
setGlobalRoot(((modelica_integer) 26), mmc_mk_some(tmpMeta16));
}
else
{
tmpMeta19 = mmc_mk_box3(0, _p, _p_class, _env_2);
tmpMeta18 = mmc_mk_cons(tmpMeta19, MMC_REFSTRUCTLIT(mmc_nil));
setGlobalRoot(((modelica_integer) 26), mmc_mk_some(tmpMeta18));
}
_return: OMC_LABEL_UNUSED
return _env_2;
}
DLLExport
modelica_metatype omc_Interactive_getParameterNames(threadData_t *threadData, modelica_metatype _path, modelica_metatype _inProgram)
{
modelica_metatype _outList = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProgram;
{
modelica_metatype _cdef = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _compelts = NULL;
modelica_metatype _compelts_1 = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_p = tmp4_1;
_cdef = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_comps = omc_Interactive_getComponentsInClass(threadData, _cdef);
{
modelica_metatype __omcQ_24tmpVar27;
modelica_metatype* tmp7;
modelica_metatype tmpMeta8;
modelica_metatype __omcQ_24tmpVar26;
modelica_integer tmp9;
modelica_metatype _c_loopVar = 0;
modelica_metatype _c;
_c_loopVar = _comps;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar27 = tmpMeta8;
tmp7 = &__omcQ_24tmpVar27;
while(1) {
tmp9 = 1;
while (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
if (omc_Interactive_isParameterElement(threadData, _c)) {
tmp9--;
break;
}
}
if (tmp9 == 0) {
__omcQ_24tmpVar26 = omc_InteractiveUtil_getComponentitemsInElement(threadData, _c);
*tmp7 = mmc_mk_cons(__omcQ_24tmpVar26,0);
tmp7 = &MMC_CDR(*tmp7);
} else if (tmp9 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp7 = mmc_mk_nil();
tmpMeta6 = __omcQ_24tmpVar27;
}
_compelts = tmpMeta6;
_compelts_1 = omc_List_flatten(threadData, _compelts);
tmpMeta1 = omc_List_map(threadData, _compelts_1, boxvar_Interactive_getComponentitemName);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outList = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outList;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isParameterElement(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isParameterElement(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_isParameterElement(threadData, _inElement);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_addComponentToComponents(threadData_t *threadData, modelica_metatype _inComponent, modelica_metatype _inComponents)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inComponent;
tmp4_2 = _inComponents;
{
modelica_integer _len_1;
modelica_integer _len;
modelica_metatype _comp = NULL;
modelica_metatype _comps = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
_comp = tmp4_1;
_comps = tmpMeta6;
_len = tmp8;
_len_1 = ((modelica_integer) 1) + _len;
tmpMeta9 = mmc_mk_cons(_comp, _comps);
tmpMeta10 = mmc_mk_box3(3, &GlobalScript_Components_COMPONENTS__desc, tmpMeta9, mmc_mk_integer(_len_1));
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_lengthComponents(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponents;
{
modelica_integer _len;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp7 = mmc_unbox_integer(tmpMeta6);
_len = tmp7;
tmp1 = _len;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_lengthComponents(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_lengthComponents(threadData, _inComponents);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_restComponents(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponents;
{
modelica_integer _len_1;
modelica_integer _len;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta1 = _OMC_LIT352;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp11 = mmc_unbox_integer(tmpMeta10);
_res = tmpMeta9;
_len = tmp11;
_len_1 = ((modelica_integer) -1) + _len;
tmpMeta12 = mmc_mk_box3(3, &GlobalScript_Components_COMPONENTS__desc, _res, mmc_mk_integer(_len_1));
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_firstComponent(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_metatype _outComponent = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponents;
{
modelica_metatype _comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
fputs(MMC_STRINGDATA(_OMC_LIT353),stdout);
goto goto_2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_comp = tmpMeta8;
tmpMeta1 = _comp;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponent = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponent;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_emptyComponents(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponents;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_emptyComponents(threadData_t *threadData, modelica_metatype _inComponents)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_emptyComponents(threadData, _inComponents);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromModificationOption(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynModificationOption, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inAbsynModificationOption;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _pa = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elementargs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!optionNone(tmp4_2)) goto tmp3_end;
_comps = tmp4_3;
tmpMeta1 = _comps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elementargs = tmpMeta7;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _elementargs, _comps, _env);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElementargs(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynElementArgLst, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inAbsynElementArgLst;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _pa = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comps_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elementspec = NULL;
modelica_metatype _elementspec2 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _mod_opt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_comps = tmp4_3;
tmp4 += 4;
tmpMeta1 = _comps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,6) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_elementspec = tmpMeta8;
_elementspec2 = tmpMeta11;
_res = tmpMeta7;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
_comps_1 = omc_Interactive_extractComponentsFromElementspec(threadData, _pa, _elementspec, _comps, _env);
_comps_2 = omc_Interactive_extractComponentsFromElementspec(threadData, _pa, _elementspec2, _comps_1, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _res, _comps_2, _env);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_2);
tmpMeta13 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,6) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 5));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 6));
if (optionNone(tmpMeta15)) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
_elementspec = tmpMeta14;
_res = tmpMeta13;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_comps_1 = omc_Interactive_extractComponentsFromElementspec(threadData, _pa, _elementspec, _comps, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _res, _comps_1, _env);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_2);
tmpMeta18 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,6) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 5));
_mod_opt = tmpMeta19;
_res = tmpMeta18;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
_comps_1 = omc_Interactive_extractComponentsFromModificationOption(threadData, _pa, _mod_opt, _comps, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _res, _comps_1, _env);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_2);
tmpMeta21 = MMC_CDR(tmp4_2);
_res = tmpMeta21;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _res, _comps, _env);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromComponentitems(threadData_t *threadData, modelica_metatype _inPath1, modelica_metatype _inPath2, modelica_metatype _inAbsynComponentItemLst3, modelica_metatype _inComponents4, modelica_metatype _inEnv5)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inPath1;
tmp4_2 = _inPath2;
tmp4_3 = _inAbsynComponentItemLst3;
tmp4_4 = _inComponents4;
tmp4_5 = _inEnv5;
{
modelica_metatype _comps = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comps_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _path = NULL;
modelica_string _id = NULL;
modelica_metatype _mod_opt = NULL;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_3)) goto tmp3_end;
_comps = tmp4_4;
tmp4 += 1;
tmpMeta1 = _comps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
_id = tmpMeta9;
_mod_opt = tmpMeta10;
_res = tmpMeta7;
_pa = tmp4_1;
_path = tmp4_2;
_comps = tmp4_4;
_env = tmp4_5;
_comps_1 = omc_Interactive_extractComponentsFromComponentitems(threadData, _pa, _path, _res, _comps, _env);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, tmpMeta11);
_comp = tmpMeta12;
tmpMeta13 = mmc_mk_box4(3, &GlobalScript_Component_COMPONENTITEM__desc, _pa, _path, _comp);
_comps_2 = omc_Interactive_addComponentToComponents(threadData, tmpMeta13, _comps_1);
tmpMeta1 = omc_Interactive_extractComponentsFromModificationOption(threadData, _pa, _mod_opt, _comps_2, _env);
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT354),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElementspec(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inElementSpec, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inElementSpec;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_string _id = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _env = NULL;
modelica_metatype _path_1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _comp_items = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _elementargs = NULL;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_path_1 = tmpMeta7;
_comp_items = tmpMeta8;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
tmpMeta12 = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none(), &tmpMeta9, &tmpMeta11);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,8) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_id = tmpMeta10;
_cenv = tmpMeta11;
tmpMeta13 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta13;
_cache = omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmpMeta1 = omc_Interactive_extractComponentsFromComponentitems(threadData, _pa, _path, _comp_items, _comps, _env);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_path_1 = tmpMeta14;
_elementargs = tmpMeta15;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
_cache = omc_Lookup_lookupClass(threadData, omc_FCore_emptyCache(threadData), _env, _path_1, mmc_mk_none() ,NULL ,&_cenv);
omc_Inst_makeFullyQualified(threadData, _cache, _cenv, _path_1 ,&_path);
tmpMeta16 = mmc_mk_box3(4, &GlobalScript_Component_EXTENDSITEM__desc, _pa, _path);
_comp = tmpMeta16;
_comps_1 = omc_Interactive_addComponentToComponents(threadData, _comp, _comps);
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _elementargs, _comps_1, _env);
goto tmp3_done;
}
case 2: {
tmpMeta1 = _inComponents;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromElements(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynElementItemLst, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inAbsynElementItemLst;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _comps = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _elementspec = NULL;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_comps = tmp4_3;
tmp4 += 2;
tmpMeta1 = _comps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,6) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_elementspec = tmpMeta9;
_res = tmpMeta7;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
_comps_1 = omc_Interactive_extractComponentsFromElements(threadData, _pa, _res, _comps, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElementspec(threadData, _pa, _elementspec, _comps_1, _env);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_2);
tmpMeta11 = MMC_CDR(tmp4_2);
_res = tmpMeta11;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmpMeta1 = omc_Interactive_extractComponentsFromElements(threadData, _pa, _res, _comps, _env);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClassparts(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inAbsynClassPartLst, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inAbsynClassPartLst;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _comps = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _elements = NULL;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_comps = tmp4_3;
tmp4 += 2;
tmpMeta1 = _comps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_elements = tmpMeta8;
_res = tmpMeta7;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
_comps_1 = omc_Interactive_extractComponentsFromClassparts(threadData, _pa, _res, _comps, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElements(threadData, _pa, _elements, _comps_1, _env);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_2);
tmpMeta10 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_elements = tmpMeta11;
_res = tmpMeta10;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
_comps_1 = omc_Interactive_extractComponentsFromClassparts(threadData, _pa, _res, _comps, _env);
tmpMeta1 = omc_Interactive_extractComponentsFromElements(threadData, _pa, _elements, _comps_1, _env);
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inComponents;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClassdef(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inClassDef, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inPath;
tmp4_2 = _inClassDef;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _comps = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _parts = NULL;
modelica_metatype _env = NULL;
modelica_metatype _elementargs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_parts = tmpMeta6;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmp4 += 2;
tmpMeta1 = omc_Interactive_extractComponentsFromClassparts(threadData, _pa, _parts, _comps, _env);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,4) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_elementargs = tmpMeta8;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmp4 += 1;
tmpMeta1 = omc_Interactive_extractComponentsFromElementargs(threadData, _pa, _elementargs, _comps, _env);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,4,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
_parts = tmpMeta9;
_pa = tmp4_1;
_comps = tmp4_3;
_env = tmp4_4;
tmpMeta1 = omc_Interactive_extractComponentsFromClassparts(threadData, _pa, _parts, _comps, _env);
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inComponents;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractComponentsFromClass(threadData_t *threadData, modelica_metatype _inClass, modelica_metatype _inPath, modelica_metatype _inComponents, modelica_metatype _inEnv)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inClass;
tmp4_2 = _inPath;
tmp4_3 = _inComponents;
tmp4_4 = _inEnv;
{
modelica_metatype _comps = NULL;
modelica_metatype _classdef = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_classdef = tmpMeta6;
_pa = tmp4_2;
_comps = tmp4_3;
_env = tmp4_4;
tmpMeta1 = omc_Interactive_extractComponentsFromClassdef(threadData, _pa, _classdef, _comps, _env);
goto tmp3_done;
}
case 1: {
fputs(MMC_STRINGDATA(_OMC_LIT355),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isReadOnly(threadData_t *threadData, modelica_metatype _file_info)
{
modelica_boolean _res;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _file_info;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp7 = mmc_unbox_integer(tmpMeta6);
_res = tmp7;
tmp1 = _res;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_res = tmp1;
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isReadOnly(threadData_t *threadData, modelica_metatype _file_info)
{
modelica_boolean _res;
modelica_metatype out_res;
_res = omc_Interactive_isReadOnly(threadData, _file_info);
out_res = mmc_mk_icon(_res);
return out_res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponentsVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv)
{
modelica_metatype _outTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv;
{
modelica_metatype _path_1 = NULL;
modelica_metatype _pa_1 = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _paOpt = NULL;
modelica_metatype _cenv = NULL;
modelica_metatype _env = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _class_ = NULL;
modelica_string _id = NULL;
modelica_metatype _file_info = NULL;
modelica_metatype _p = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 10));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_class_ = tmpMeta6;
_id = tmpMeta7;
_file_info = tmpMeta8;
_pa = tmpMeta10;
_comps = tmpMeta12;
_p = tmpMeta13;
_env = tmpMeta14;
tmp4 += 1;
tmp15 = omc_Interactive_isReadOnly(threadData, _file_info);
if (0 != tmp15) goto goto_2;
tmpMeta16 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = omc_AbsynUtil_joinPaths(threadData, _pa, tmpMeta16);
_cenv = omc_Interactive_getClassEnvNoElaboration(threadData, _p, _path_1, _env);
omc_Inst_makeFullyQualified(threadData, omc_FCore_emptyCache(threadData), _cenv, _path_1 ,&_pa_1);
_comps_1 = omc_Interactive_extractComponentsFromClass(threadData, _class_, _pa_1, _comps, _cenv);
tmpMeta17 = mmc_mk_box3(0, _comps_1, _p, _env);
tmpMeta18 = mmc_mk_box3(0, _class_, mmc_mk_some(_pa), tmpMeta17);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_boolean tmp27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 10));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!optionNone(tmpMeta22)) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
_class_ = tmpMeta19;
_id = tmpMeta20;
_file_info = tmpMeta21;
_comps = tmpMeta24;
_p = tmpMeta25;
_env = tmpMeta26;
tmp27 = omc_Interactive_isReadOnly(threadData, _file_info);
if (0 != tmp27) goto goto_2;
tmpMeta28 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta28;
_cenv = omc_Interactive_getClassEnvNoElaboration(threadData, _p, _path_1, _env);
omc_Inst_makeFullyQualified(threadData, omc_FCore_emptyCache(threadData), _cenv, _path_1 ,&_pa_1);
_comps_1 = omc_Interactive_extractComponentsFromClass(threadData, _class_, _pa_1, _comps, _cenv);
tmpMeta29 = mmc_mk_box3(0, _comps_1, _p, _env);
tmpMeta30 = mmc_mk_box3(0, _class_, mmc_mk_none(), tmpMeta29);
tmpMeta1 = tmpMeta30;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 1));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 3));
_class_ = tmpMeta31;
_paOpt = tmpMeta32;
_comps = tmpMeta34;
_p = tmpMeta35;
_env = tmpMeta36;
tmpMeta37 = mmc_mk_box3(0, _comps, _p, _env);
tmpMeta38 = mmc_mk_box3(0, _class_, _paOpt, tmpMeta37);
tmpMeta1 = tmpMeta38;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynClassAbsynPathOptionTplComponentsAbsynProgramEnvEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponents(threadData_t *threadData, modelica_metatype _p, modelica_metatype _path)
{
modelica_metatype _comps = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _p_1 = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_p_1 = omc_AbsynToSCode_translateAbsyn2SCode(threadData, _p);
omc_Inst_makeEnvFromProgram(threadData, _p_1 ,&_env);
tmpMeta6 = mmc_mk_box3(0, _OMC_LIT352, _p, _env);
tmpMeta7 = omc_AbsynUtil_traverseClasses(threadData, _p, mmc_mk_none(), boxvar_Interactive_extractAllComponentsVisitor, tmpMeta6, 1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
_comps = tmpMeta9;
tmpMeta1 = _comps;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_comps = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _comps;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentsWithType(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inPath)
{
modelica_metatype _outComponents = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponents;
tmp4_2 = _inPath;
{
modelica_metatype _comps = NULL;
modelica_metatype _res = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _comp_path = NULL;
modelica_metatype _path = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_comps = tmp4_1;
tmp6 = omc_Interactive_emptyComponents(threadData, _comps);
if (1 != tmp6) goto goto_2;
tmpMeta1 = _OMC_LIT352;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
_comps = tmp4_1;
_path = tmp4_2;
tmpMeta7 = omc_Interactive_firstComponent(threadData, _comps);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,3) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
_comp = tmpMeta7;
_comp_path = tmpMeta8;
tmp9 = omc_AbsynUtil_pathEqual(threadData, _comp_path, _path);
if (1 != tmp9) goto goto_2;
_res = omc_Interactive_restComponents(threadData, _comps);
_comps_1 = omc_Interactive_getComponentsWithType(threadData, _res, _path);
tmpMeta1 = omc_Interactive_addComponentToComponents(threadData, _comp, _comps_1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_boolean tmp12;
_comps = tmp4_1;
_path = tmp4_2;
tmpMeta10 = omc_Interactive_firstComponent(threadData, _comps);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,2) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
_comp = tmpMeta10;
_comp_path = tmpMeta11;
tmp12 = omc_AbsynUtil_pathEqual(threadData, _comp_path, _path);
if (1 != tmp12) goto goto_2;
_res = omc_Interactive_restComponents(threadData, _comps);
_comps_1 = omc_Interactive_getComponentsWithType(threadData, _res, _path);
tmpMeta1 = omc_Interactive_addComponentToComponents(threadData, _comp, _comps_1);
goto tmp3_done;
}
case 3: {
_comps = tmp4_1;
_path = tmp4_2;
_res = omc_Interactive_restComponents(threadData, _comps);
tmpMeta1 = omc_Interactive_getComponentsWithType(threadData, _res, _path);
goto tmp3_done;
}
case 4: {
fputs(MMC_STRINGDATA(_OMC_LIT356),stdout);
tmpMeta1 = _OMC_LIT352;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponents = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponents;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_restComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_metatype _outComponentReplacementRules = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentReplacementRules;
{
modelica_integer _len_1;
modelica_integer _len;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta1 = _OMC_LIT357;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp11 = mmc_unbox_integer(tmpMeta10);
_res = tmpMeta9;
_len = tmp11;
_len_1 = ((modelica_integer) -1) + _len;
tmpMeta12 = mmc_mk_box3(3, &GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc, _res, mmc_mk_integer(_len_1));
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponentReplacementRules = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_firstComponentReplacement(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_metatype _outComponentReplacement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentReplacementRules;
{
modelica_metatype _comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
fputs(MMC_STRINGDATA(_OMC_LIT358),stdout);
goto goto_2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_comp = tmpMeta8;
tmpMeta1 = _comp;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponentReplacement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacement;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Interactive_lengthComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_integer _outInteger;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentReplacementRules;
{
modelica_integer _len;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp7 = mmc_unbox_integer(tmpMeta6);
_len = tmp7;
tmp1 = _len;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInteger = tmp1;
_return: OMC_LABEL_UNUSED
return _outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_lengthComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_integer _outInteger;
modelica_metatype out_outInteger;
_outInteger = omc_Interactive_lengthComponentReplacementRules(threadData, _inComponentReplacementRules);
out_outInteger = mmc_mk_icon(_outInteger);
return out_outInteger;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_joinComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules1, modelica_metatype _inComponentReplacementRules2)
{
modelica_metatype _outComponentReplacementRules = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inComponentReplacementRules1;
tmp4_2 = _inComponentReplacementRules2;
{
modelica_metatype _comps = NULL;
modelica_metatype _comps1 = NULL;
modelica_metatype _comps2 = NULL;
modelica_integer _len;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_comps1 = tmpMeta6;
_comps2 = tmpMeta7;
_comps = omc_List_union(threadData, _comps1, _comps2);
_len = listLength(_comps);
tmpMeta8 = mmc_mk_box3(3, &GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc, _comps, mmc_mk_integer(_len));
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponentReplacementRules = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_emptyComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentReplacementRules;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_emptyComponentReplacementRules(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_emptyComponentReplacementRules(threadData, _inComponentReplacementRules);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeComponentsReplacementRulesFromComponents(threadData_t *threadData, modelica_metatype _inComponents1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outComponentReplacementRules = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inComponents1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _comps = NULL;
modelica_metatype _res = NULL;
modelica_metatype _cr_from = NULL;
modelica_metatype _cr_to = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr_from_1 = NULL;
modelica_metatype _cr_to_1 = NULL;
modelica_metatype _path_class = NULL;
modelica_metatype _comp_rep = NULL;
modelica_metatype _comps_1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_comps = tmp4_1;
tmp6 = omc_Interactive_emptyComponents(threadData, _comps);
if (1 != tmp6) goto goto_2;
tmpMeta1 = _OMC_LIT357;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_comps = tmp4_1;
_cr_from = tmp4_2;
_cr_to = tmp4_3;
tmpMeta7 = omc_Interactive_firstComponent(threadData, _comps);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,3) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_path_class = tmpMeta8;
_cr = tmpMeta9;
_cr_from_1 = omc_AbsynUtil_joinCrefs(threadData, _cr, _cr_from);
_cr_to_1 = omc_AbsynUtil_joinCrefs(threadData, _cr, _cr_to);
tmpMeta10 = mmc_mk_box4(3, &GlobalScript_ComponentReplacement_COMPONENTREPLACEMENT__desc, _path_class, _cr_from_1, _cr_to_1);
_comp_rep = tmpMeta10;
_res = omc_Interactive_restComponents(threadData, _comps);
_comps_1 = omc_Interactive_makeComponentsReplacementRulesFromComponents(threadData, _res, _cr_from, _cr_to);
tmpMeta11 = mmc_mk_cons(_comp_rep, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta12 = mmc_mk_box3(3, &GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc, tmpMeta11, mmc_mk_integer(((modelica_integer) 1)));
tmpMeta1 = omc_Interactive_joinComponentReplacementRules(threadData, _comps_1, tmpMeta12);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_comps = tmp4_1;
_cr_from = tmp4_2;
_cr_to = tmp4_3;
tmpMeta13 = omc_Interactive_firstComponent(threadData, _comps);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,2) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
_path_class = tmpMeta14;
tmpMeta15 = mmc_mk_box4(3, &GlobalScript_ComponentReplacement_COMPONENTREPLACEMENT__desc, _path_class, _cr_from, _cr_to);
_comp_rep = tmpMeta15;
_res = omc_Interactive_restComponents(threadData, _comps);
_comps_1 = omc_Interactive_makeComponentsReplacementRulesFromComponents(threadData, _res, _cr_from, _cr_to);
tmpMeta16 = mmc_mk_cons(_comp_rep, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta17 = mmc_mk_box3(3, &GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc, tmpMeta16, mmc_mk_integer(((modelica_integer) 1)));
tmpMeta1 = omc_Interactive_joinComponentReplacementRules(threadData, _comps_1, tmpMeta17);
goto tmp3_done;
}
case 3: {
fputs(MMC_STRINGDATA(_OMC_LIT359),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentReplacementRules = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getNewComponentreplacementsrulesForEachRule(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules)
{
modelica_metatype _outComponentReplacementRules = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponents;
tmp4_2 = _inComponentReplacementRules;
{
modelica_metatype _comps = NULL;
modelica_metatype _comps_1 = NULL;
modelica_metatype _comp_reps = NULL;
modelica_metatype _comp_reps_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _comp_reps_2 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_comp_reps = tmp4_2;
tmp6 = omc_Interactive_emptyComponentReplacementRules(threadData, _comp_reps);
if (1 != tmp6) goto goto_2;
tmpMeta1 = _comp_reps;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_comps = tmp4_1;
_comp_reps = tmp4_2;
tmpMeta7 = omc_Interactive_firstComponentReplacement(threadData, _comp_reps);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_path = tmpMeta8;
_cr1 = tmpMeta9;
_cr2 = tmpMeta10;
_comps_1 = omc_Interactive_getComponentsWithType(threadData, _comps, _path);
_comp_reps_1 = omc_Interactive_makeComponentsReplacementRulesFromComponents(threadData, _comps_1, _cr1, _cr2);
_res = omc_Interactive_restComponentReplacementRules(threadData, _comp_reps);
_comp_reps_2 = omc_Interactive_getNewComponentreplacementsrulesForEachRule(threadData, _comps, _res);
tmpMeta1 = omc_Interactive_joinComponentReplacementRules(threadData, _comp_reps_1, _comp_reps_2);
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT360),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentReplacementRules = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getComponentreplacementsrules(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules, modelica_integer _inInteger)
{
modelica_metatype _outComponentReplacementRules = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_integer tmp4_3;
tmp4_1 = _inComponents;
tmp4_2 = _inComponentReplacementRules;
tmp4_3 = _inInteger;
{
modelica_integer _len;
modelica_integer _old_len;
modelica_metatype _comps = NULL;
modelica_metatype _comp_reps = NULL;
modelica_metatype _comp_reps_1 = NULL;
modelica_metatype _comp_reps_2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_comp_reps = tmp4_2;
_old_len = tmp4_3;
_len = omc_Interactive_lengthComponentReplacementRules(threadData, _comp_reps);
if((!(_len == _old_len)))
{
goto goto_2;
}
tmpMeta1 = _comp_reps;
goto tmp3_done;
}
case 1: {
_comps = tmp4_1;
_comp_reps = tmp4_2;
_old_len = omc_Interactive_lengthComponentReplacementRules(threadData, _comp_reps);
_comp_reps_1 = omc_Interactive_getNewComponentreplacementsrulesForEachRule(threadData, _comps, _comp_reps);
_comp_reps_2 = omc_Interactive_joinComponentReplacementRules(threadData, _comp_reps_1, _comp_reps);
tmpMeta1 = omc_Interactive_getComponentreplacementsrules(threadData, _comps, _comp_reps_2, _old_len);
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT361),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentReplacementRules = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getComponentreplacementsrules(threadData_t *threadData, modelica_metatype _inComponents, modelica_metatype _inComponentReplacementRules, modelica_metatype _inInteger)
{
modelica_integer tmp1;
modelica_metatype _outComponentReplacementRules = NULL;
tmp1 = mmc_unbox_integer(_inInteger);
_outComponentReplacementRules = omc_Interactive_getComponentreplacementsrules(threadData, _inComponents, _inComponentReplacementRules, tmp1);
return _outComponentReplacementRules;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_replaceStartInComponentRef2(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outComponentRef = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_string _id = NULL;
modelica_string _id2 = NULL;
modelica_string _id3 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _cr3 = NULL;
modelica_metatype _a = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
_id = tmpMeta6;
_id2 = tmpMeta7;
_res = tmp4_3;
tmp4 += 2;
tmp8 = (stringEqual(_id, _id2));
if (1 != tmp8) goto goto_2;
tmpMeta1 = _res;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_id = tmpMeta9;
_a = tmpMeta10;
_cr1 = tmpMeta11;
_id2 = tmpMeta12;
_id3 = tmpMeta13;
tmp4 += 1;
tmp14 = (stringEqual(_id, _id2));
if (1 != tmp14) goto goto_2;
tmpMeta15 = mmc_mk_box4(4, &Absyn_ComponentRef_CREF__QUAL__desc, _id3, _a, _cr1);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_boolean tmp23;
modelica_metatype tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_id = tmpMeta16;
_a = tmpMeta17;
_cr1 = tmpMeta18;
_id2 = tmpMeta19;
_cr2 = tmpMeta20;
_id3 = tmpMeta21;
_cr3 = tmpMeta22;
tmp23 = (stringEqual(_id, _id2));
if (1 != tmp23) goto goto_2;
_cr = omc_Interactive_replaceStartInComponentRef2(threadData, _cr1, _cr2, _cr3);
tmpMeta24 = mmc_mk_box4(4, &Absyn_ComponentRef_CREF__QUAL__desc, _id3, _a, _cr);
tmpMeta1 = tmpMeta24;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inComponentRef1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentRef = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentRef;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_replaceStartInComponentRef(threadData_t *threadData, modelica_metatype _cr1, modelica_metatype _cr2, modelica_metatype _cr3)
{
modelica_metatype _res = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_res = omc_Interactive_replaceStartInComponentRef2(threadData, _cr1, _cr2, _cr3);
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExternalDecl(threadData_t *threadData, modelica_metatype _external_, modelica_metatype _old_comp, modelica_metatype _new_comp)
{
modelica_metatype _external_1 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
fputs(MMC_STRINGDATA(_OMC_LIT362),stdout);
_external_1 = _external_;
_return: OMC_LABEL_UNUSED
return _external_1;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInNamedArgs(threadData_t *threadData, modelica_metatype _inAbsynNamedArgLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynNamedArgLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynNamedArgLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_string _id = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
_id = tmpMeta9;
_exp = tmpMeta10;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInNamedArgs(threadData, _res, _old_comp, _new_comp);
tmpMeta12 = mmc_mk_box3(3, &Absyn_NamedArg_NAMEDARG__desc, _id, _exp_1);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _res_1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT363),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynNamedArgLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynNamedArgLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInIterators(threadData_t *threadData, modelica_metatype _iterators, modelica_metatype _oldComp, modelica_metatype _newComp)
{
modelica_metatype _iteratorsRenamed = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar29;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype __omcQ_24tmpVar28;
modelica_integer tmp18;
modelica_metatype _it_loopVar = 0;
modelica_metatype _it;
_it_loopVar = _iterators;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar29 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar29;
while(1) {
tmp18 = 1;
if (!listEmpty(_it_loopVar)) {
_it = MMC_CAR(_it_loopVar);
_it_loopVar = MMC_CDR(_it_loopVar);
tmp18--;
}
if (tmp18 == 0) {
{
modelica_metatype tmp7_1;
tmp7_1 = _it;
{
modelica_metatype _exp = NULL;
modelica_string _i = NULL;
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 2; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 3));
if (!optionNone(tmpMeta10)) goto tmp6_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 4));
if (optionNone(tmpMeta11)) goto tmp6_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
_i = tmpMeta9;
_exp = tmpMeta12;
_exp = omc_Interactive_renameComponentInExp(threadData, _exp, _oldComp, _newComp);
tmpMeta13 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _i, mmc_mk_none(), mmc_mk_some(_exp));
tmpMeta4 = tmpMeta13;
goto tmp6_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 3));
if (!optionNone(tmpMeta15)) goto tmp6_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 4));
if (!optionNone(tmpMeta16)) goto tmp6_end;
_i = tmpMeta14;
tmpMeta17 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _i, mmc_mk_none(), mmc_mk_none());
tmpMeta4 = tmpMeta17;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}__omcQ_24tmpVar28 = tmpMeta4;
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar28,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp18 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar29;
}
_iteratorsRenamed = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _iteratorsRenamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInFunctionArgs(threadData_t *threadData, modelica_metatype _inFunctionArgs1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outFunctionArgs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inFunctionArgs1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exps_1 = NULL;
modelica_metatype _exps = NULL;
modelica_metatype _namedArg_1 = NULL;
modelica_metatype _namedArg = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _iterators = NULL;
modelica_metatype _iteratorsRenamed = NULL;
modelica_metatype _iterType = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exps = tmpMeta6;
_namedArg = tmpMeta7;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 1;
_exps_1 = omc_Interactive_renameComponentInExpList(threadData, _exps, _old_comp, _new_comp);
_namedArg_1 = omc_Interactive_renameComponentInNamedArgs(threadData, _namedArg, _old_comp, _new_comp);
tmpMeta8 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _exps_1, _namedArg_1);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta9;
_iterType = tmpMeta10;
_iterators = tmpMeta11;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_iteratorsRenamed = omc_Interactive_renameComponentInIterators(threadData, _iterators, _old_comp, _new_comp);
tmpMeta12 = mmc_mk_box4(4, &Absyn_FunctionArgs_FOR__ITER__FARG__desc, _exp1_1, _iterType, _iteratorsRenamed);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT364),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outFunctionArgs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outFunctionArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpAlgoritmsList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outTplAbsynExpAbsynAlgorithmItemLstLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inTplAbsynExpAbsynAlgorithmItemLstLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _algs_1 = NULL;
modelica_metatype _algs = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_exp = tmpMeta9;
_algs = tmpMeta10;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_algs_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInExpAlgoritmsList(threadData, _res, _old_comp, _new_comp);
tmpMeta12 = mmc_mk_box2(0, _exp_1, _algs_1);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _res_1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT365),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynExpAbsynAlgorithmItemLstLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynExpAbsynAlgorithmItemLstLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInAlgorithm(threadData_t *threadData, modelica_metatype _inAlgorithm1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAlgorithm = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inAlgorithm1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _cr_1 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp2_1 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _algs1_1 = NULL;
modelica_metatype _algs2_1 = NULL;
modelica_metatype _algs1 = NULL;
modelica_metatype _algs2 = NULL;
modelica_metatype _algs_1 = NULL;
modelica_metatype _algs = NULL;
modelica_metatype _exp_algs_list_1 = NULL;
modelica_metatype _exp_algs_list = NULL;
modelica_string _id = NULL;
modelica_metatype _func_args_1 = NULL;
modelica_metatype _func_args = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr = tmpMeta7;
_exp = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_cr_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cr, _old_comp, _new_comp);
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr_1);
tmpMeta10 = mmc_mk_box3(3, &Absyn_Algorithm_ALG__ASSIGN__desc, tmpMeta9, _exp_1);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,16,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp1 = tmpMeta11;
_exp2 = tmpMeta12;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
tmpMeta13 = mmc_mk_box3(3, &Absyn_Algorithm_ALG__ASSIGN__desc, _exp1_1, _exp2_1);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_exp = tmpMeta14;
_algs1 = tmpMeta15;
_exp_algs_list = tmpMeta16;
_algs2 = tmpMeta17;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_algs1_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs1, _old_comp, _new_comp);
_exp_algs_list_1 = omc_Interactive_renameComponentInExpAlgoritmsList(threadData, _exp_algs_list, _old_comp, _new_comp);
_algs2_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs2, _old_comp, _new_comp);
tmpMeta18 = mmc_mk_box5(4, &Absyn_Algorithm_ALG__IF__desc, _exp_1, _algs1_1, _exp_algs_list_1, _algs2_1);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta19)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmpMeta19);
tmpMeta21 = MMC_CDR(tmpMeta19);
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
if (!optionNone(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 4));
if (optionNone(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 1));
if (!listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_id = tmpMeta22;
_exp = tmpMeta25;
_algs = tmpMeta26;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_algs_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs, _old_comp, _new_comp);
tmpMeta28 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _id, mmc_mk_none(), mmc_mk_some(_exp_1));
tmpMeta27 = mmc_mk_cons(tmpMeta28, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta29 = mmc_mk_box3(5, &Absyn_Algorithm_ALG__FOR__desc, tmpMeta27, _algs_1);
tmpMeta1 = tmpMeta29;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp = tmpMeta30;
_algs = tmpMeta31;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_algs_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs, _old_comp, _new_comp);
tmpMeta32 = mmc_mk_box3(7, &Absyn_Algorithm_ALG__WHILE__desc, _exp_1, _algs_1);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta33;
_algs = tmpMeta34;
_exp_algs_list = tmpMeta35;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_algs_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs, _old_comp, _new_comp);
_exp_algs_list_1 = omc_Interactive_renameComponentInExpAlgoritmsList(threadData, _exp_algs_list, _old_comp, _new_comp);
tmpMeta36 = mmc_mk_box4(8, &Absyn_Algorithm_ALG__WHEN__A__desc, _exp_1, _algs_1, _exp_algs_list_1);
tmpMeta1 = tmpMeta36;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cr = tmpMeta37;
_func_args = tmpMeta38;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_cr_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cr, _old_comp, _new_comp);
_func_args_1 = omc_Interactive_renameComponentInFunctionArgs(threadData, _func_args, _old_comp, _new_comp);
tmpMeta39 = mmc_mk_box3(9, &Absyn_Algorithm_ALG__NORETCALL__desc, _cr_1, _func_args_1);
tmpMeta1 = tmpMeta39;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAlgorithm = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAlgorithm;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInAlgorithms(threadData_t *threadData, modelica_metatype _inAbsynAlgorithmItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynAlgorithmItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inAbsynAlgorithmItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _algorithm_1 = NULL;
modelica_metatype _algorithm_ = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_algorithm_ = tmpMeta7;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _res, _old_comp, _new_comp);
_algorithm_1 = _algorithm_;
tmpMeta9 = mmc_mk_cons(_algorithm_1, _res_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outAbsynAlgorithmItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynAlgorithmItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExp(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _oldPrefix, modelica_metatype _newPrefix)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inExp1;
tmp4_2 = _oldPrefix;
tmp4_3 = _newPrefix;
{
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _cr_1 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp2_1 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _exp3_1 = NULL;
modelica_metatype _exp3 = NULL;
modelica_metatype _op = NULL;
modelica_metatype _exp_tuple_list_1 = NULL;
modelica_metatype _exp_tuple_list = NULL;
modelica_metatype _func_args = NULL;
modelica_metatype _exp_list_1 = NULL;
modelica_metatype _exp_list = NULL;
modelica_metatype _exp_list_list_1 = NULL;
modelica_metatype _exp_list_list = NULL;
modelica_metatype _code_1 = NULL;
modelica_metatype _code = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 20; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmp4 += 18;
tmpMeta1 = _inExp1;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmp4 += 17;
tmpMeta1 = _inExp1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta6;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 16;
_cr_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cr, _old_comp, _new_comp);
tmpMeta7 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr_1);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmp4 += 15;
tmpMeta1 = _inExp1;
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,1) == 0) goto tmp3_end;
tmp4 += 14;
tmpMeta1 = _inExp1;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta8;
_op = tmpMeta9;
_exp2 = tmpMeta10;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 13;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
tmpMeta11 = mmc_mk_box4(8, &Absyn_Exp_BINARY__desc, _exp1_1, _op, _exp2_1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_op = tmpMeta12;
_exp = tmpMeta13;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 12;
_exp = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
tmpMeta14 = mmc_mk_box3(9, &Absyn_Exp_UNARY__desc, _op, _exp);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta15;
_op = tmpMeta16;
_exp2 = tmpMeta17;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 11;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
tmpMeta18 = mmc_mk_box4(10, &Absyn_Exp_LBINARY__desc, _exp1_1, _op, _exp2_1);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_op = tmpMeta19;
_exp = tmpMeta20;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 10;
_exp = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
tmpMeta21 = mmc_mk_box3(11, &Absyn_Exp_LUNARY__desc, _op, _exp);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta22;
_op = tmpMeta23;
_exp2 = tmpMeta24;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 9;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
tmpMeta25 = mmc_mk_box4(12, &Absyn_Exp_RELATION__desc, _exp1_1, _op, _exp2_1);
tmpMeta1 = tmpMeta25;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,10,4) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_exp1 = tmpMeta26;
_exp2 = tmpMeta27;
_exp3 = tmpMeta28;
_exp_tuple_list = tmpMeta29;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 8;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
_exp3_1 = omc_Interactive_renameComponentInExp(threadData, _exp3, _old_comp, _new_comp);
_exp_tuple_list_1 = omc_Interactive_renameComponentInExpTupleList(threadData, _exp_tuple_list, _old_comp, _new_comp);
tmpMeta30 = mmc_mk_box5(13, &Absyn_Exp_IFEXP__desc, _exp1_1, _exp2_1, _exp3_1, _exp_tuple_list_1);
tmpMeta1 = tmpMeta30;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,3) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cref = tmpMeta31;
_func_args = tmpMeta32;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 7;
_cref = omc_Interactive_replaceStartInComponentRef(threadData, _cref, _old_comp, _new_comp);
_func_args = omc_Interactive_renameComponentInFunctionArgs(threadData, _func_args, _old_comp, _new_comp);
tmpMeta33 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, _cref, _func_args, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp1), 4))));
tmpMeta1 = tmpMeta33;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_exp_list = tmpMeta34;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 6;
_exp_list_1 = omc_Interactive_renameComponentInExpList(threadData, _exp_list, _old_comp, _new_comp);
tmpMeta35 = mmc_mk_box2(16, &Absyn_Exp_ARRAY__desc, _exp_list_1);
tmpMeta1 = tmpMeta35;
goto tmp3_done;
}
case 13: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,14,1) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_exp_list_list = tmpMeta36;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 5;
_exp_list_list_1 = omc_Interactive_renameComponentInExpListList(threadData, _exp_list_list, _old_comp, _new_comp);
tmpMeta37 = mmc_mk_box2(17, &Absyn_Exp_MATRIX__desc, _exp_list_list_1);
tmpMeta1 = tmpMeta37;
goto tmp3_done;
}
case 14: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,15,3) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (optionNone(tmpMeta39)) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 1));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta38;
_exp2 = tmpMeta40;
_exp3 = tmpMeta41;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 4;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
_exp3_1 = omc_Interactive_renameComponentInExp(threadData, _exp3, _old_comp, _new_comp);
tmpMeta42 = mmc_mk_box4(18, &Absyn_Exp_RANGE__desc, _exp1_1, mmc_mk_some(_exp2_1), _exp3_1);
tmpMeta1 = tmpMeta42;
goto tmp3_done;
}
case 15: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,15,3) == 0) goto tmp3_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!optionNone(tmpMeta44)) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta43;
_exp3 = tmpMeta45;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 3;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp3_1 = omc_Interactive_renameComponentInExp(threadData, _exp3, _old_comp, _new_comp);
tmpMeta46 = mmc_mk_box4(18, &Absyn_Exp_RANGE__desc, _exp1_1, mmc_mk_none(), _exp3_1);
tmpMeta1 = tmpMeta46;
goto tmp3_done;
}
case 16: {
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,1) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_exp_list = tmpMeta47;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 2;
_exp_list_1 = omc_Interactive_renameComponentInExpList(threadData, _exp_list, _old_comp, _new_comp);
tmpMeta48 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _exp_list_1);
tmpMeta1 = tmpMeta48;
goto tmp3_done;
}
case 17: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,0) == 0) goto tmp3_end;
tmp4 += 1;
tmpMeta1 = _OMC_LIT366;
goto tmp3_done;
}
case 18: {
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,18,1) == 0) goto tmp3_end;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_code = tmpMeta49;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_code_1 = omc_Interactive_renameComponentInCode(threadData, _code, _old_comp, _new_comp);
tmpMeta50 = mmc_mk_box2(21, &Absyn_Exp_CODE__desc, _code_1);
tmpMeta1 = tmpMeta50;
goto tmp3_done;
}
case 19: {
fputs(MMC_STRINGDATA(_OMC_LIT367),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 20) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInCode(threadData_t *threadData, modelica_metatype _inCode1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outCode = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inCode1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _path = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _cr_1 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _eqn_items_1 = NULL;
modelica_metatype _eqn_items = NULL;
modelica_boolean _b;
modelica_boolean _finalPrefix;
modelica_metatype _algs_1 = NULL;
modelica_metatype _algs = NULL;
modelica_metatype _elementspec_1 = NULL;
modelica_metatype _elementspec = NULL;
modelica_metatype _redeclare_ = NULL;
modelica_metatype _inner_outer = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constrainClass = NULL;
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _element_args_1 = NULL;
modelica_metatype _element_args = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta6;
tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, _path);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_cr_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cr, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_box2(4, &Absyn_CodeNode_C__VARIABLENAME__desc, _cr_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_b = tmp11;
_eqn_items = tmpMeta12;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_eqn_items_1 = omc_Interactive_renameComponentInEquationList(threadData, _eqn_items, _old_comp, _new_comp);
tmpMeta13 = mmc_mk_box3(6, &Absyn_CodeNode_C__EQUATIONSECTION__desc, mmc_mk_boolean(_b), _eqn_items_1);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
modelica_integer tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp15 = mmc_unbox_integer(tmpMeta14);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_b = tmp15;
_algs = tmpMeta16;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_algs_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algs, _old_comp, _new_comp);
tmpMeta17 = mmc_mk_box3(7, &Absyn_CodeNode_C__ALGORITHMSECTION__desc, mmc_mk_boolean(_b), _algs_1);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_integer tmp20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,6) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
tmp20 = mmc_unbox_integer(tmpMeta19);
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 4));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 5));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 6));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 7));
_finalPrefix = tmp20;
_redeclare_ = tmpMeta21;
_inner_outer = tmpMeta22;
_elementspec = tmpMeta23;
_info = tmpMeta24;
_constrainClass = tmpMeta25;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_elementspec_1 = omc_Interactive_renameComponentInElementSpec(threadData, _elementspec, _old_comp, _new_comp);
tmpMeta26 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_finalPrefix), _redeclare_, _inner_outer, _elementspec_1, _info, _constrainClass);
tmpMeta27 = mmc_mk_box2(8, &Absyn_CodeNode_C__ELEMENT__desc, tmpMeta26);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,1) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_exp = tmpMeta28;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
tmpMeta29 = mmc_mk_box2(9, &Absyn_CodeNode_C__EXPRESSION__desc, _exp_1);
tmpMeta1 = tmpMeta29;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,1) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,1,2) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 3));
_element_args = tmpMeta31;
_exp = tmpMeta33;
_info = tmpMeta34;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_element_args_1 = omc_Interactive_renameComponentInElementArgList(threadData, _element_args, _old_comp, _new_comp);
tmpMeta35 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _exp_1, _info);
tmpMeta36 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _element_args_1, tmpMeta35);
tmpMeta37 = mmc_mk_box2(10, &Absyn_CodeNode_C__MODIFICATION__desc, tmpMeta36);
tmpMeta1 = tmpMeta37;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,1) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,0,0) == 0) goto tmp3_end;
_element_args = tmpMeta39;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_element_args_1 = omc_Interactive_renameComponentInElementArgList(threadData, _element_args, _old_comp, _new_comp);
tmpMeta41 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _element_args_1, _OMC_LIT113);
tmpMeta42 = mmc_mk_box2(10, &Absyn_CodeNode_C__MODIFICATION__desc, tmpMeta41);
tmpMeta1 = tmpMeta42;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCode = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCode;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementArg(threadData_t *threadData, modelica_metatype _inElementArg1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outElementArg = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inElementArg1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _p = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _element_args_1 = NULL;
modelica_metatype _element_args = NULL;
modelica_boolean _b;
modelica_metatype _each_ = NULL;
modelica_metatype _str = NULL;
modelica_metatype _element_spec_1 = NULL;
modelica_metatype _element_spec2_1 = NULL;
modelica_metatype _element_spec = NULL;
modelica_metatype _element_spec2 = NULL;
modelica_metatype _redecl = NULL;
modelica_metatype _c = NULL;
modelica_metatype _info = NULL;
modelica_metatype _mod_info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (optionNone(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_b = tmp7;
_each_ = tmpMeta8;
_p = tmpMeta9;
_element_args = tmpMeta12;
_exp = tmpMeta14;
_info = tmpMeta15;
_str = tmpMeta16;
_mod_info = tmpMeta17;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_p_1 = omc_AbsynUtil_crefToPath(threadData, omc_Interactive_replaceStartInComponentRef(threadData, omc_AbsynUtil_pathToCref(threadData, _p), _old_comp, _new_comp));
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_element_args_1 = omc_Interactive_renameComponentInElementArgList(threadData, _element_args, _old_comp, _new_comp);
tmpMeta18 = mmc_mk_box3(4, &Absyn_EqMod_EQMOD__desc, _exp_1, _info);
tmpMeta19 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _element_args_1, tmpMeta18);
tmpMeta20 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(_b), _each_, _p_1, mmc_mk_some(tmpMeta19), _str, _mod_info);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta21;
modelica_integer tmp22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp22 = mmc_unbox_integer(tmpMeta21);
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (optionNone(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 1));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,0) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_b = tmp22;
_each_ = tmpMeta23;
_p = tmpMeta24;
_element_args = tmpMeta27;
_str = tmpMeta29;
_mod_info = tmpMeta30;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_p_1 = omc_AbsynUtil_crefToPath(threadData, omc_Interactive_replaceStartInComponentRef(threadData, omc_AbsynUtil_pathToCref(threadData, _p), _old_comp, _new_comp));
_element_args_1 = omc_Interactive_renameComponentInElementArgList(threadData, _element_args, _old_comp, _new_comp);
tmpMeta31 = mmc_mk_box3(3, &Absyn_Modification_CLASSMOD__desc, _element_args_1, _OMC_LIT113);
tmpMeta32 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(_b), _each_, _p_1, mmc_mk_some(tmpMeta31), _str, _mod_info);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta33;
modelica_integer tmp34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,6) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp34 = mmc_unbox_integer(tmpMeta33);
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
if (!optionNone(tmpMeta37)) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_b = tmp34;
_each_ = tmpMeta35;
_p = tmpMeta36;
_str = tmpMeta38;
_mod_info = tmpMeta39;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_p_1 = omc_AbsynUtil_crefToPath(threadData, omc_Interactive_replaceStartInComponentRef(threadData, omc_AbsynUtil_pathToCref(threadData, _p), _old_comp, _new_comp));
tmpMeta40 = mmc_mk_box7(3, &Absyn_ElementArg_MODIFICATION__desc, mmc_mk_boolean(_b), _each_, _p_1, mmc_mk_none(), _str, _mod_info);
tmpMeta1 = tmpMeta40;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta41;
modelica_integer tmp42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,6) == 0) goto tmp3_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp42 = mmc_unbox_integer(tmpMeta41);
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (optionNone(tmpMeta46)) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 1));
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 2));
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 3));
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_b = tmp42;
_redecl = tmpMeta43;
_each_ = tmpMeta44;
_element_spec = tmpMeta45;
_element_spec2 = tmpMeta48;
_c = tmpMeta49;
_info = tmpMeta50;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_element_spec_1 = omc_Interactive_renameComponentInElementSpec(threadData, _element_spec, _old_comp, _new_comp);
_element_spec2_1 = omc_Interactive_renameComponentInElementSpec(threadData, _element_spec2, _old_comp, _new_comp);
tmpMeta51 = mmc_mk_box3(3, &Absyn_ConstrainClass_CONSTRAINCLASS__desc, _element_spec2_1, _c);
tmpMeta52 = mmc_mk_box7(4, &Absyn_ElementArg_REDECLARATION__desc, mmc_mk_boolean(_b), _redecl, _each_, _element_spec_1, mmc_mk_some(tmpMeta51), _info);
tmpMeta1 = tmpMeta52;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta53;
modelica_integer tmp54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,6) == 0) goto tmp3_end;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp54 = mmc_unbox_integer(tmpMeta53);
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
if (!optionNone(tmpMeta58)) goto tmp3_end;
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_b = tmp54;
_redecl = tmpMeta55;
_each_ = tmpMeta56;
_element_spec = tmpMeta57;
_info = tmpMeta59;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_element_spec_1 = omc_Interactive_renameComponentInElementSpec(threadData, _element_spec, _old_comp, _new_comp);
tmpMeta60 = mmc_mk_box7(4, &Absyn_ElementArg_REDECLARATION__desc, mmc_mk_boolean(_b), _redecl, _each_, _element_spec_1, mmc_mk_none(), _info);
tmpMeta1 = tmpMeta60;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outElementArg = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementArgList(threadData_t *threadData, modelica_metatype _inAbsynElementArgLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynElementArgLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynElementArgLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _element_arg_1 = NULL;
modelica_metatype _element_arg = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_element_arg = tmpMeta7;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_element_arg_1 = omc_Interactive_renameComponentInElementArg(threadData, _element_arg, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInElementArgList(threadData, _res, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_cons(_element_arg_1, _res_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT368),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementArgLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementArgLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpTupleList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynExpLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outTplAbsynExpAbsynExpLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inTplAbsynExpAbsynExpLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp2_1 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_exp1 = tmpMeta9;
_exp2 = tmpMeta10;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInExpTupleList(threadData, _res, _old_comp, _new_comp);
tmpMeta12 = mmc_mk_box2(0, _exp1_1, _exp2_1);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _res_1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT369),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynExpAbsynExpLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynExpAbsynExpLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpListList(threadData_t *threadData, modelica_metatype _inAbsynExpLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynExpLstLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynExpLstLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_exp = tmpMeta7;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExpList(threadData, _exp, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInExpListList(threadData, _res, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_cons(_exp_1, _res_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT370),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynExpLstLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynExpLstLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpList(threadData_t *threadData, modelica_metatype _inAbsynExpLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynExpLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynExpLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_exp = tmpMeta7;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInExpList(threadData, _res, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_cons(_exp_1, _res_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT371),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynExpLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynExpLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInEquation(threadData_t *threadData, modelica_metatype _inEquation1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outEquation = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inEquation1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp2_1 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _true_items_1 = NULL;
modelica_metatype _elses_1 = NULL;
modelica_metatype _true_items = NULL;
modelica_metatype _elses = NULL;
modelica_metatype _equations_1 = NULL;
modelica_metatype _equations = NULL;
modelica_metatype _exp_elseifs_1 = NULL;
modelica_metatype _exp_elseifs = NULL;
modelica_metatype _exp_equations_1 = NULL;
modelica_metatype _exp_equations = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _cref1_1 = NULL;
modelica_metatype _cref2_1 = NULL;
modelica_metatype _cref1 = NULL;
modelica_metatype _cref2 = NULL;
modelica_metatype _cref = NULL;
modelica_string _ident = NULL;
modelica_metatype _function_args = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_exp = tmpMeta6;
_true_items = tmpMeta7;
_exp_elseifs = tmpMeta8;
_elses = tmpMeta9;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 6;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_true_items_1 = omc_Interactive_renameComponentInEquationList(threadData, _true_items, _old_comp, _new_comp);
_exp_elseifs_1 = omc_Interactive_renameComponentInExpEquationitemList(threadData, _exp_elseifs, _old_comp, _new_comp);
_elses_1 = omc_Interactive_renameComponentInEquationList(threadData, _elses, _old_comp, _new_comp);
tmpMeta10 = mmc_mk_box5(3, &Absyn_Equation_EQ__IF__desc, _exp_1, _true_items_1, _exp_elseifs_1, _elses_1);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp1 = tmpMeta11;
_exp2 = tmpMeta12;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 5;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
tmpMeta13 = mmc_mk_box3(4, &Absyn_Equation_EQ__EQUALS__desc, _exp1_1, _exp2_1);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta14;
_exp2 = tmpMeta15;
_cref1 = tmpMeta16;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 4;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_exp2_1 = omc_Interactive_renameComponentInExp(threadData, _exp2, _old_comp, _new_comp);
_cref1_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cref1, _old_comp, _new_comp);
tmpMeta17 = mmc_mk_box4(5, &Absyn_Equation_EQ__PDE__desc, _exp1_1, _exp2_1, _cref1_1);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,2) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cref1 = tmpMeta18;
_cref2 = tmpMeta19;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 3;
_cref1_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cref1, _old_comp, _new_comp);
_cref2_1 = omc_Interactive_replaceStartInComponentRef(threadData, _cref2, _old_comp, _new_comp);
tmpMeta20 = mmc_mk_box3(6, &Absyn_Equation_EQ__CONNECT__desc, _cref1_1, _cref2_1);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmpMeta21);
tmpMeta23 = MMC_CDR(tmpMeta21);
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
if (!optionNone(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 4));
if (optionNone(tmpMeta26)) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 1));
if (!listEmpty(tmpMeta23)) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_ident = tmpMeta24;
_exp = tmpMeta27;
_equations = tmpMeta28;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 2;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_equations_1 = omc_Interactive_renameComponentInEquationList(threadData, _equations, _old_comp, _new_comp);
tmpMeta30 = mmc_mk_box4(3, &Absyn_ForIterator_ITERATOR__desc, _ident, mmc_mk_none(), mmc_mk_some(_exp_1));
tmpMeta29 = mmc_mk_cons(tmpMeta30, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta31 = mmc_mk_box3(7, &Absyn_Equation_EQ__FOR__desc, tmpMeta29, _equations_1);
tmpMeta1 = tmpMeta31;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta32;
_equations = tmpMeta33;
_exp_equations = tmpMeta34;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 1;
_exp_1 = omc_Interactive_renameComponentInExp(threadData, _exp, _old_comp, _new_comp);
_equations_1 = omc_Interactive_renameComponentInEquationList(threadData, _equations, _old_comp, _new_comp);
_exp_equations_1 = omc_Interactive_renameComponentInExpEquationitemList(threadData, _exp_equations, _old_comp, _new_comp);
tmpMeta35 = mmc_mk_box4(8, &Absyn_Equation_EQ__WHEN__E__desc, _exp_1, _equations_1, _exp_equations_1);
tmpMeta1 = tmpMeta35;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cref = tmpMeta36;
_function_args = tmpMeta37;
fputs(MMC_STRINGDATA(_OMC_LIT372),stdout);
tmpMeta38 = mmc_mk_box3(9, &Absyn_Equation_EQ__NORETCALL__desc, _cref, _function_args);
tmpMeta1 = tmpMeta38;
goto tmp3_done;
}
case 7: {
fputs(MMC_STRINGDATA(_OMC_LIT373),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outEquation = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEquation;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInExpEquationitemList(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynEquationItemLstLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outTplAbsynExpAbsynEquationItemLstLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inTplAbsynExpAbsynEquationItemLstLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _exp1_1 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _eqn_item_1 = NULL;
modelica_metatype _eqn_item = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_exp1 = tmpMeta9;
_eqn_item = tmpMeta10;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_exp1_1 = omc_Interactive_renameComponentInExp(threadData, _exp1, _old_comp, _new_comp);
_eqn_item_1 = omc_Interactive_renameComponentInEquationList(threadData, _eqn_item, _old_comp, _new_comp);
_res_1 = omc_Interactive_renameComponentInExpEquationitemList(threadData, _res, _old_comp, _new_comp);
tmpMeta12 = mmc_mk_box2(0, _exp1_1, _eqn_item_1);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _res_1);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT374),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynExpAbsynEquationItemLstLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynExpAbsynEquationItemLstLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInEquationList(threadData_t *threadData, modelica_metatype _inAbsynEquationItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynEquationItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynEquationItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _equation_1 = NULL;
modelica_metatype _equation_ = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _info = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _equation_item = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_equation_ = tmpMeta9;
_cmt = tmpMeta10;
_info = tmpMeta11;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInEquationList(threadData, _res, _old_comp, _new_comp);
_equation_1 = omc_Interactive_renameComponentInEquation(threadData, _equation_, _old_comp, _new_comp);
tmpMeta13 = mmc_mk_box4(3, &Absyn_EquationItem_EQUATIONITEM__desc, _equation_1, _cmt, _info);
tmpMeta12 = mmc_mk_cons(tmpMeta13, _res_1);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
_equation_item = tmpMeta14;
_res = tmpMeta15;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInEquationList(threadData, _res, _old_comp, _new_comp);
tmpMeta16 = mmc_mk_cons(_equation_item, _res_1);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynEquationItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynEquationItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInComponentitems(threadData_t *threadData, modelica_metatype _inAbsynComponentItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynComponentItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynComponentItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _old_comp_path = NULL;
modelica_metatype _new_comp_path = NULL;
modelica_string _old_comp_string = NULL;
modelica_string _new_comp_string = NULL;
modelica_string _name = NULL;
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _comp_1 = NULL;
modelica_metatype _comp = NULL;
modelica_metatype _arrayDim = NULL;
modelica_metatype _mod = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _comment = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_name = tmpMeta10;
_arrayDim = tmpMeta11;
_mod = tmpMeta12;
_cond = tmpMeta13;
_comment = tmpMeta14;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_old_comp_path = omc_AbsynUtil_crefToPath(threadData, _old_comp);
_old_comp_string = omc_AbsynUtil_pathString(threadData, _old_comp_path, _OMC_LIT93, 1, 0);
tmp15 = (stringEqual(_name, _old_comp_string));
if (1 != tmp15) goto goto_2;
_new_comp_path = omc_AbsynUtil_crefToPath(threadData, _new_comp);
_new_comp_string = omc_AbsynUtil_pathString(threadData, _new_comp_path, _OMC_LIT93, 1, 0);
_res_1 = omc_Interactive_renameComponentInComponentitems(threadData, _res, _old_comp, _new_comp);
tmpMeta16 = mmc_mk_box4(3, &Absyn_Component_COMPONENT__desc, _new_comp_string, _arrayDim, _mod);
tmpMeta17 = mmc_mk_box4(3, &Absyn_ComponentItem_COMPONENTITEM__desc, tmpMeta16, _cond, _comment);
_comp_1 = tmpMeta17;
tmpMeta18 = mmc_mk_cons(_comp_1, _res_1);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_1);
tmpMeta20 = MMC_CDR(tmp4_1);
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_comp = tmpMeta19;
_res = tmpMeta20;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInComponentitems(threadData, _res, _old_comp, _new_comp);
tmpMeta22 = mmc_mk_cons(_comp, _res_1);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
case 3: {
fputs(MMC_STRINGDATA(_OMC_LIT375),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynComponentItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynComponentItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElementSpec(threadData_t *threadData, modelica_metatype _inElementSpec1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outElementSpec = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inElementSpec1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _comps_1 = NULL;
modelica_metatype _comps = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _path = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_attr = tmpMeta6;
_path = tmpMeta7;
_comps = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_comps_1 = omc_Interactive_renameComponentInComponentitems(threadData, _comps, _old_comp, _new_comp);
tmpMeta9 = mmc_mk_box4(6, &Absyn_ElementSpec_COMPONENTS__desc, _attr, _path, _comps_1);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inElementSpec1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outElementSpec = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outElementSpec;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInElements(threadData_t *threadData, modelica_metatype _inAbsynElementItemLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynElementItemLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynElementItemLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _elementspec_1 = NULL;
modelica_metatype _elementspec = NULL;
modelica_metatype _element_1 = NULL;
modelica_metatype _element = NULL;
modelica_boolean _finalPrefix;
modelica_metatype _redeclare_ = NULL;
modelica_metatype _inner_outer = NULL;
modelica_metatype _info = NULL;
modelica_metatype _constrainClass = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 5));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 6));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 7));
_finalPrefix = tmp11;
_redeclare_ = tmpMeta12;
_inner_outer = tmpMeta13;
_elementspec = tmpMeta14;
_info = tmpMeta15;
_constrainClass = tmpMeta16;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInElements(threadData, _res, _old_comp, _new_comp);
_elementspec_1 = omc_Interactive_renameComponentInElementSpec(threadData, _elementspec, _old_comp, _new_comp);
tmpMeta17 = mmc_mk_box7(3, &Absyn_Element_ELEMENT__desc, mmc_mk_boolean(_finalPrefix), _redeclare_, _inner_outer, _elementspec_1, _info, _constrainClass);
tmpMeta18 = mmc_mk_box2(3, &Absyn_ElementItem_ELEMENTITEM__desc, tmpMeta17);
_element_1 = tmpMeta18;
tmpMeta19 = mmc_mk_cons(_element_1, _res_1);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_1);
tmpMeta21 = MMC_CDR(tmp4_1);
_element = tmpMeta20;
_res = tmpMeta21;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInElements(threadData, _res, _old_comp, _new_comp);
_element_1 = _element;
tmpMeta22 = mmc_mk_cons(_element_1, _res_1);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynElementItemLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynElementItemLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInParts(threadData_t *threadData, modelica_metatype _inAbsynClassPartLst1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outAbsynClassPartLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inAbsynClassPartLst1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _res_1 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _elements_1 = NULL;
modelica_metatype _elements = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _equations_1 = NULL;
modelica_metatype _equations = NULL;
modelica_metatype _algorithms_1 = NULL;
modelica_metatype _algorithms = NULL;
modelica_metatype _external_decl_1 = NULL;
modelica_metatype _external_decl = NULL;
modelica_metatype _ano = NULL;
modelica_metatype _a = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 8;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_elements = tmpMeta9;
_res = tmpMeta8;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 6;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_elements_1 = omc_Interactive_renameComponentInElements(threadData, _elements, _old_comp, _new_comp);
tmpMeta11 = mmc_mk_box2(3, &Absyn_ClassPart_PUBLIC__desc, _elements_1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _res_1);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_1);
tmpMeta13 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_elements = tmpMeta14;
_res = tmpMeta13;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 5;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_elements_1 = omc_Interactive_renameComponentInElements(threadData, _elements, _old_comp, _new_comp);
tmpMeta16 = mmc_mk_box2(4, &Absyn_ClassPart_PROTECTED__desc, _elements_1);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _res_1);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,3,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_equations = tmpMeta19;
_res = tmpMeta18;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 4;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_equations_1 = omc_Interactive_renameComponentInEquationList(threadData, _equations, _old_comp, _new_comp);
tmpMeta21 = mmc_mk_box2(6, &Absyn_ClassPart_EQUATIONS__desc, _equations_1);
tmpMeta20 = mmc_mk_cons(tmpMeta21, _res_1);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,4,1) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
_equations = tmpMeta24;
_res = tmpMeta23;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 3;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_equations_1 = omc_Interactive_renameComponentInEquationList(threadData, _equations, _old_comp, _new_comp);
tmpMeta26 = mmc_mk_box2(7, &Absyn_ClassPart_INITIALEQUATIONS__desc, _equations_1);
tmpMeta25 = mmc_mk_cons(tmpMeta26, _res_1);
tmpMeta1 = tmpMeta25;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta27 = MMC_CAR(tmp4_1);
tmpMeta28 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,5,1) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
_algorithms = tmpMeta29;
_res = tmpMeta28;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 2;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_algorithms_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algorithms, _old_comp, _new_comp);
tmpMeta31 = mmc_mk_box2(8, &Absyn_ClassPart_ALGORITHMS__desc, _algorithms_1);
tmpMeta30 = mmc_mk_cons(tmpMeta31, _res_1);
tmpMeta1 = tmpMeta30;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmp4_1);
tmpMeta33 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,6,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
_algorithms = tmpMeta34;
_res = tmpMeta33;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 1;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_algorithms_1 = omc_Interactive_renameComponentInAlgorithms(threadData, _algorithms, _old_comp, _new_comp);
tmpMeta36 = mmc_mk_box2(9, &Absyn_ClassPart_INITIALALGORITHMS__desc, _algorithms_1);
tmpMeta35 = mmc_mk_cons(tmpMeta36, _res_1);
tmpMeta1 = tmpMeta35;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta37 = MMC_CAR(tmp4_1);
tmpMeta38 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta37,7,2) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 2));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 3));
_external_decl = tmpMeta39;
_ano = tmpMeta40;
_res = tmpMeta38;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
_external_decl_1 = omc_Interactive_renameComponentInExternalDecl(threadData, _external_decl, _old_comp, _new_comp);
tmpMeta42 = mmc_mk_box3(10, &Absyn_ClassPart_EXTERNAL__desc, _external_decl_1, _ano);
tmpMeta41 = mmc_mk_cons(tmpMeta42, _res_1);
tmpMeta1 = tmpMeta41;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta43 = MMC_CAR(tmp4_1);
tmpMeta44 = MMC_CDR(tmp4_1);
_a = tmpMeta43;
_res = tmpMeta44;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_res_1 = omc_Interactive_renameComponentInParts(threadData, _res, _old_comp, _new_comp);
tmpMeta45 = mmc_mk_cons(_a, _res_1);
tmpMeta1 = tmpMeta45;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 9) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outAbsynClassPartLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outAbsynClassPartLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentInClass(threadData_t *threadData, modelica_metatype _inClass1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3)
{
modelica_metatype _outClass = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inClass1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
{
modelica_metatype _parts_1 = NULL;
modelica_metatype _parts = NULL;
modelica_string _baseClassName = NULL;
modelica_metatype _a = NULL;
modelica_metatype _c = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _b = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _classAttrs = NULL;
modelica_metatype _ann = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
_outClass = tmp4_1;
_typeVars = tmpMeta7;
_classAttrs = tmpMeta8;
_parts = tmpMeta9;
_ann = tmpMeta10;
_a = tmpMeta11;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
tmp4 += 1;
_parts_1 = omc_Interactive_renameComponentInParts(threadData, _parts, _old_comp, _new_comp);
tmpMeta13 = mmc_mk_box6(3, &Absyn_ClassDef_PARTS__desc, _typeVars, _classAttrs, _parts_1, _ann, _a);
tmpMeta12 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta12), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta12))[7] = tmpMeta13;
_outClass = tmpMeta12;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,5) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
_outClass = tmp4_1;
_baseClassName = tmpMeta15;
_b = tmpMeta16;
_c = tmpMeta17;
_parts = tmpMeta18;
_ann = tmpMeta19;
_old_comp = tmp4_2;
_new_comp = tmp4_3;
_parts_1 = omc_Interactive_renameComponentInParts(threadData, _parts, _old_comp, _new_comp);
tmpMeta21 = mmc_mk_box6(7, &Absyn_ClassDef_CLASS__EXTENDS__desc, _baseClassName, _b, _c, _parts_1, _ann);
tmpMeta20 = MMC_TAGPTR(mmc_alloc_words(11));
memcpy(MMC_UNTAGPTR(tmpMeta20), MMC_UNTAGPTR(_outClass), 11*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta20))[7] = tmpMeta21;
_outClass = tmpMeta20;
tmpMeta1 = _outClass;
goto tmp3_done;
}
case 2: {
tmpMeta1 = _inClass1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outClass = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outClass;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentVisitor(threadData_t *threadData, modelica_metatype _inTplAbsynClassAbsynPathOptionComponentReplacement)
{
modelica_metatype _outTplAbsynClassAbsynPathOptionComponentReplacement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inTplAbsynClassAbsynPathOptionComponentReplacement;
{
modelica_metatype _path_1 = NULL;
modelica_metatype _pa = NULL;
modelica_metatype _class_id = NULL;
modelica_metatype _class_1 = NULL;
modelica_metatype _class_ = NULL;
modelica_string _id = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _args = NULL;
modelica_metatype _opath = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_class_ = tmpMeta6;
_id = tmpMeta7;
_pa = tmpMeta9;
_class_id = tmpMeta11;
_old_comp = tmpMeta12;
_new_comp = tmpMeta13;
tmp4 += 1;
tmpMeta14 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = omc_AbsynUtil_joinPaths(threadData, _pa, tmpMeta14);
tmp15 = omc_AbsynUtil_pathEqual(threadData, _class_id, _path_1);
if (1 != tmp15) goto goto_2;
_class_1 = omc_Interactive_renameComponentInClass(threadData, _class_, _old_comp, _new_comp);
tmpMeta16 = mmc_mk_box4(3, &GlobalScript_ComponentReplacement_COMPONENTREPLACEMENT__desc, _class_id, _old_comp, _new_comp);
tmpMeta17 = mmc_mk_box3(0, _class_1, mmc_mk_some(_pa), tmpMeta16);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_boolean tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!optionNone(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 4));
_class_ = tmpMeta18;
_id = tmpMeta19;
_class_id = tmpMeta22;
_old_comp = tmpMeta23;
_new_comp = tmpMeta24;
tmpMeta25 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
_path_1 = tmpMeta25;
tmp26 = omc_AbsynUtil_pathEqual(threadData, _class_id, _path_1);
if (1 != tmp26) goto goto_2;
_class_1 = omc_Interactive_renameComponentInClass(threadData, _class_, _old_comp, _new_comp);
tmpMeta27 = mmc_mk_box4(3, &GlobalScript_ComponentReplacement_COMPONENTREPLACEMENT__desc, _class_id, _old_comp, _new_comp);
tmpMeta28 = mmc_mk_box3(0, _class_1, mmc_mk_none(), tmpMeta27);
tmpMeta1 = tmpMeta28;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_class_ = tmpMeta29;
_opath = tmpMeta30;
_args = tmpMeta31;
tmpMeta32 = mmc_mk_box3(0, _class_, _opath, _args);
tmpMeta1 = tmpMeta32;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outTplAbsynClassAbsynPathOptionComponentReplacement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTplAbsynClassAbsynPathOptionComponentReplacement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_renameComponentFromComponentreplacements(threadData_t *threadData, modelica_metatype _inProgram, modelica_metatype _inComponentReplacementRules)
{
modelica_metatype _outProgram = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inProgram;
tmp4_2 = _inComponentReplacementRules;
{
modelica_metatype _p = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _comp_reps = NULL;
modelica_metatype _res = NULL;
modelica_metatype _comp_rep = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
_p = tmp4_1;
_comp_reps = tmp4_2;
tmp6 = omc_Interactive_emptyComponentReplacementRules(threadData, _comp_reps);
if (1 != tmp6) goto goto_2;
tmpMeta1 = _p;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_p = tmp4_1;
_comp_reps = tmp4_2;
_comp_rep = omc_Interactive_firstComponentReplacement(threadData, _comp_reps);
tmpMeta7 = omc_AbsynUtil_traverseClasses(threadData, _p, mmc_mk_none(), boxvar_Interactive_renameComponentVisitor, _comp_rep, 1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
_p_1 = tmpMeta8;
_res = omc_Interactive_restComponentReplacementRules(threadData, _comp_reps);
tmpMeta1 = omc_Interactive_renameComponentFromComponentreplacements(threadData, _p_1, _res);
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT376),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outProgram = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outProgram;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractRenamedClassesAsStringList(threadData_t *threadData, modelica_metatype _inComponentReplacementRules)
{
modelica_metatype _outStringLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inComponentReplacementRules;
{
modelica_metatype _comp_reps = NULL;
modelica_metatype _res = NULL;
modelica_metatype _path = NULL;
modelica_string _path_str = NULL;
modelica_metatype _res_1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
_comp_reps = tmp4_1;
tmp6 = omc_Interactive_emptyComponentReplacementRules(threadData, _comp_reps);
if (1 != tmp6) goto goto_2;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
_comp_reps = tmp4_1;
tmpMeta8 = omc_Interactive_firstComponentReplacement(threadData, _comp_reps);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_path = tmpMeta9;
_path_str = omc_AbsynUtil_pathString(threadData, _path, _OMC_LIT93, 1, 0);
_res = omc_Interactive_restComponentReplacementRules(threadData, _comp_reps);
_res_1 = omc_Interactive_extractRenamedClassesAsStringList(threadData, _res);
tmpMeta10 = mmc_mk_cons(_path_str, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = omc_List_union(threadData, tmpMeta10, _res_1);
goto tmp3_done;
}
case 2: {
fputs(MMC_STRINGDATA(_OMC_LIT377),stdout);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outStringLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStringLst;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameComponentOnlyInClass(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inComponentRef4, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inProgram1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inComponentRef4;
{
modelica_metatype _p = NULL;
modelica_string _paths_2 = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _cl = NULL;
modelica_metatype _model_path = NULL;
modelica_string _str = NULL;
modelica_metatype _w = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_p = tmp4_1;
_class_ = tmp4_2;
_model_path = omc_AbsynUtil_crefToPath(threadData, _class_);
tmp6 = omc_Interactive_isClassReadOnly(threadData, omc_InteractiveUtil_getPathedClassInProgram(threadData, _model_path, _p, 0, 0));
if (1 != tmp6) goto goto_2;
_str = omc_AbsynUtil_pathString(threadData, _model_path, _OMC_LIT93, 1, 0);
tmpMeta7 = stringAppend(_OMC_LIT264,_str);
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT378);
_str = tmpMeta8;
tmp1_c0 = _str;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_p = tmp4_1;
_class_ = tmp4_2;
_old_comp = tmp4_3;
_new_comp = tmp4_4;
_model_path = omc_AbsynUtil_crefToPath(threadData, _class_);
_cl = omc_InteractiveUtil_getPathedClassInProgram(threadData, _model_path, _p, 0, 0);
_cl = omc_Interactive_renameComponentInClass(threadData, _cl, _old_comp, _new_comp);
_w = omc_InteractiveUtil_buildWithin(threadData, omc_AbsynUtil_makeFullyQualified(threadData, _model_path));
tmpMeta9 = mmc_mk_cons(_cl, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta9, _w);
_p = omc_InteractiveUtil_updateProgram(threadData, tmpMeta10, _p, 0);
_str = omc_AbsynUtil_pathString(threadData, _model_path, _OMC_LIT93, 1, 0);
tmpMeta11 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
_paths_2 = stringAppendList(tmpMeta11);
tmp1_c0 = _paths_2;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
case 2: {
if(omc_Flags_isSet(threadData, _OMC_LIT383))
{
omc_Debug_trace(threadData, _OMC_LIT379);
}
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = _inProgram1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_renameComponent(threadData_t *threadData, modelica_metatype _inProgram1, modelica_metatype _inComponentRef2, modelica_metatype _inComponentRef3, modelica_metatype _inComponentRef4, modelica_metatype *out_outProgram)
{
modelica_string _outString = NULL;
modelica_metatype _outProgram = NULL;
modelica_string tmp1_c0 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inProgram1;
tmp4_2 = _inComponentRef2;
tmp4_3 = _inComponentRef3;
tmp4_4 = _inComponentRef4;
{
modelica_metatype _comp_reps = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _p = NULL;
modelica_metatype _paths = NULL;
modelica_string _paths_1 = NULL;
modelica_string _paths_2 = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _old_comp = NULL;
modelica_metatype _new_comp = NULL;
modelica_metatype _model_path = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
_p = tmp4_1;
_class_ = tmp4_2;
_model_path = omc_AbsynUtil_crefToPath(threadData, _class_);
tmp6 = omc_Interactive_isClassReadOnly(threadData, omc_InteractiveUtil_getPathedClassInProgram(threadData, _model_path, _p, 0, 0));
if (1 != tmp6) goto goto_2;
_str = omc_AbsynUtil_pathString(threadData, _model_path, _OMC_LIT93, 1, 0);
tmpMeta7 = stringAppend(_OMC_LIT264,_str);
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT378);
_str = tmpMeta8;
tmp1_c0 = _str;
tmpMeta[0+1] = _p;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
_p = tmp4_1;
_class_ = tmp4_2;
_old_comp = tmp4_3;
_new_comp = tmp4_4;
_comp_reps = omc_Interactive_extractAllComponentreplacements(threadData, _p, _class_, _old_comp, _new_comp);
_p_1 = omc_Interactive_renameComponentFromComponentreplacements(threadData, _p, _comp_reps);
_paths = omc_Interactive_extractRenamedClassesAsStringList(threadData, _comp_reps);
_paths_1 = stringDelimitList(_paths, _OMC_LIT73);
tmpMeta9 = mmc_mk_cons(_OMC_LIT125, mmc_mk_cons(_paths_1, mmc_mk_cons(_OMC_LIT126, MMC_REFSTRUCTLIT(mmc_nil))));
_paths_2 = stringAppendList(tmpMeta9);
tmp1_c0 = _paths_2;
tmpMeta[0+1] = _p_1;
goto tmp3_done;
}
case 2: {
if(omc_Flags_isSet(threadData, _OMC_LIT383))
{
omc_Debug_trace(threadData, _OMC_LIT384);
}
tmp1_c0 = _OMC_LIT61;
tmpMeta[0+1] = _inProgram1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1_c0;
_outProgram = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProgram) { *out_outProgram = _outProgram; }
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_isClassReadOnly(threadData_t *threadData, modelica_metatype _cl)
{
modelica_boolean _readOnly;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _cl;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 10));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
_readOnly = tmp8;
tmp1 = _readOnly;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_readOnly = tmp1;
_return: OMC_LABEL_UNUSED
return _readOnly;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_isClassReadOnly(threadData_t *threadData, modelica_metatype _cl)
{
modelica_boolean _readOnly;
modelica_metatype out_readOnly;
_readOnly = omc_Interactive_isClassReadOnly(threadData, _cl);
out_readOnly = mmc_mk_icon(_readOnly);
return out_readOnly;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_extractAllComponentreplacements(threadData_t *threadData, modelica_metatype _p, modelica_metatype _class_, modelica_metatype _cref1, modelica_metatype _cref2)
{
modelica_metatype _comp_reps = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _comps = NULL;
modelica_metatype _class_path = NULL;
modelica_metatype _comp_repsrules = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT385);
_comps = omc_Interactive_extractAllComponents(threadData, _p, omc_AbsynUtil_crefToPath(threadData, _class_));
omc_ErrorExt_rollBack(threadData, _OMC_LIT385);
tmp6 = omc_Interactive_isClassReadOnly(threadData, omc_InteractiveUtil_getPathedClassInProgram(threadData, omc_AbsynUtil_crefToPath(threadData, _class_), _p, 0, 0));
if (0 != tmp6) goto goto_2;
_class_path = omc_AbsynUtil_crefToPath(threadData, _class_);
tmpMeta8 = mmc_mk_box4(3, &GlobalScript_ComponentReplacement_COMPONENTREPLACEMENT__desc, _class_path, _cref1, _cref2);
tmpMeta7 = mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box3(3, &GlobalScript_ComponentReplacementRules_COMPONENTREPLACEMENTRULES__desc, tmpMeta7, mmc_mk_integer(((modelica_integer) 1)));
_comp_repsrules = tmpMeta9;
tmpMeta1 = omc_Interactive_getComponentreplacementsrules(threadData, _comps, _comp_repsrules, ((modelica_integer) 0));
goto tmp3_done;
}
case 1: {
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT385);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_comp_reps = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _comp_reps;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateGraphicalApi__dispatch(threadData_t *threadData, modelica_metatype _inStatement)
{
modelica_string _outResult = NULL;
modelica_string _fn_name = NULL;
modelica_string _name = NULL;
modelica_metatype _old_p = NULL;
modelica_metatype _p = NULL;
modelica_metatype _p_1 = NULL;
modelica_metatype _s = NULL;
modelica_metatype _args = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _model_ = NULL;
modelica_metatype _class_ = NULL;
modelica_metatype _old_cname = NULL;
modelica_metatype _new_cname = NULL;
modelica_metatype _crident = NULL;
modelica_metatype _subident = NULL;
modelica_metatype _path = NULL;
modelica_metatype _nargs = NULL;
modelica_integer _n;
modelica_integer _access;
modelica_string _cmt = NULL;
modelica_string _variability = NULL;
modelica_string _causality = NULL;
modelica_metatype _cls = NULL;
modelica_metatype _mod = NULL;
modelica_boolean _finalPrefix;
modelica_boolean _flowPrefix;
modelica_boolean _streamPrefix;
modelica_boolean _protected_;
modelica_boolean _repl;
modelica_boolean _dref1;
modelica_boolean _dref2;
modelica_boolean _evalParamAnn;
modelica_boolean _addFunctions;
modelica_boolean _graphicsExpMode;
modelica_boolean _warningsAsErrors;
modelica_metatype _env = NULL;
modelica_metatype _genv = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _dimensions = NULL;
modelica_metatype _cn = NULL;
modelica_metatype _el = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_fn_name = omc_Interactive_getApiFunctionNameInfo(threadData, _inStatement, NULL);
_p = omc_SymbolTable_getAbsyn(threadData);
_args = omc_Interactive_getApiFunctionArgs(threadData, _inStatement);
{
modelica_string tmp4_1;
tmp4_1 = _fn_name;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 66; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (25 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT408), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta6 = _args;
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (listEmpty(tmpMeta8)) goto goto_2;
tmpMeta10 = MMC_CAR(tmpMeta8);
tmpMeta11 = MMC_CDR(tmpMeta8);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,1) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (listEmpty(tmpMeta11)) goto goto_2;
tmpMeta13 = MMC_CAR(tmpMeta11);
tmpMeta14 = MMC_CDR(tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,18,1) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,7,1) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (!listEmpty(tmpMeta14)) goto goto_2;
_class_ = tmpMeta9;
_cr = tmpMeta12;
_mod = tmpMeta16;
_p = omc_Interactive_setComponentModifier(threadData, _class_, _cr, _mod, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT409), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta17 = _args;
if (listEmpty(tmpMeta17)) goto goto_2;
tmpMeta18 = MMC_CAR(tmpMeta17);
tmpMeta19 = MMC_CDR(tmpMeta17);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,2,1) == 0) goto goto_2;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
if (listEmpty(tmpMeta19)) goto goto_2;
tmpMeta21 = MMC_CAR(tmpMeta19);
tmpMeta22 = MMC_CDR(tmpMeta19);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,2,1) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (listEmpty(tmpMeta22)) goto goto_2;
tmpMeta24 = MMC_CAR(tmpMeta22);
tmpMeta25 = MMC_CDR(tmpMeta22);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,18,1) == 0) goto goto_2;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
if (!listEmpty(tmpMeta25)) goto goto_2;
_class_ = tmpMeta20;
_cr = tmpMeta23;
_cn = tmpMeta26;
{
modelica_metatype tmp30_1;
tmp30_1 = _cn;
{
volatile mmc_switch_type tmp30;
int tmp31;
tmp30 = 0;
for (; tmp30 < 1; tmp30++) {
switch (MMC_SWITCH_CAST(tmp30)) {
case 0: {
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp30_1,7,1) == 0) goto tmp29_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp30_1), 2));
_mod = tmpMeta32;
tmpMeta27 = _mod;
goto tmp29_done;
}
}
goto tmp29_end;
tmp29_end: ;
}
goto goto_28;
goto_28:;
goto goto_2;
goto tmp29_done;
tmp29_done:;
}
}
_mod = tmpMeta27;
_p = omc_InteractiveUtil_setElementModifier(threadData, _class_, _cr, _mod, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
if (17 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT410), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta33 = _args;
if (listEmpty(tmpMeta33)) goto goto_2;
tmpMeta34 = MMC_CAR(tmpMeta33);
tmpMeta35 = MMC_CDR(tmpMeta33);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,2,1) == 0) goto goto_2;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 2));
if (listEmpty(tmpMeta35)) goto goto_2;
tmpMeta37 = MMC_CAR(tmpMeta35);
tmpMeta38 = MMC_CDR(tmpMeta35);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta37,2,1) == 0) goto goto_2;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 2));
if (listEmpty(tmpMeta38)) goto goto_2;
tmpMeta40 = MMC_CAR(tmpMeta38);
tmpMeta41 = MMC_CDR(tmpMeta38);
if (!listEmpty(tmpMeta41)) goto goto_2;
_class_ = tmpMeta36;
_crident = tmpMeta39;
_exp = tmpMeta40;
_p = omc_Interactive_setParameterValue(threadData, _class_, _crident, _exp, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT411), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta42 = _args;
if (listEmpty(tmpMeta42)) goto goto_2;
tmpMeta43 = MMC_CAR(tmpMeta42);
tmpMeta44 = MMC_CDR(tmpMeta42);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,2,1) == 0) goto goto_2;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
if (listEmpty(tmpMeta44)) goto goto_2;
tmpMeta46 = MMC_CAR(tmpMeta44);
tmpMeta47 = MMC_CDR(tmpMeta44);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,2,1) == 0) goto goto_2;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 2));
if (listEmpty(tmpMeta47)) goto goto_2;
tmpMeta49 = MMC_CAR(tmpMeta47);
tmpMeta50 = MMC_CDR(tmpMeta47);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,13,1) == 0) goto goto_2;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 2));
if (!listEmpty(tmpMeta50)) goto goto_2;
_class_ = tmpMeta45;
_cr = tmpMeta48;
_dimensions = tmpMeta51;
_p = omc_Interactive_setComponentDimensions(threadData, _class_, _cr, _dimensions, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT412), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta52 = _args;
if (listEmpty(tmpMeta52)) goto goto_2;
tmpMeta53 = MMC_CAR(tmpMeta52);
tmpMeta54 = MMC_CDR(tmpMeta52);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta53,2,1) == 0) goto goto_2;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta53), 2));
if (!listEmpty(tmpMeta54)) goto goto_2;
_cr = tmpMeta55;
_p = omc_Interactive_createModel(threadData, _cr, _p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _OMC_LIT127;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT413), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta56 = _args;
if (listEmpty(tmpMeta56)) goto goto_2;
tmpMeta57 = MMC_CAR(tmpMeta56);
tmpMeta58 = MMC_CDR(tmpMeta56);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,2,1) == 0) goto goto_2;
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta57), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta59,2,2) == 0) goto goto_2;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta59), 2));
if (listEmpty(tmpMeta58)) goto goto_2;
tmpMeta61 = MMC_CAR(tmpMeta58);
tmpMeta62 = MMC_CDR(tmpMeta58);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta61,2,1) == 0) goto goto_2;
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 2));
if (!listEmpty(tmpMeta62)) goto goto_2;
_name = tmpMeta60;
_cr = tmpMeta63;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmpMeta65 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta66 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta67 = mmc_mk_box10(3, &Absyn_Class_CLASS__desc, _name, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT259, _OMC_LIT229, tmpMeta65, tmpMeta66, _OMC_LIT120);
tmpMeta64 = mmc_mk_cons(tmpMeta67, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta68 = mmc_mk_box2(3, &Absyn_Within_WITHIN__desc, _path);
tmpMeta69 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta64, tmpMeta68);
_p = omc_InteractiveUtil_updateProgram(threadData, tmpMeta69, _p, 0);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _OMC_LIT127;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT414), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta70 = _args;
if (listEmpty(tmpMeta70)) goto goto_2;
tmpMeta71 = MMC_CAR(tmpMeta70);
tmpMeta72 = MMC_CDR(tmpMeta70);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta71,2,1) == 0) goto goto_2;
tmpMeta73 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 2));
if (!listEmpty(tmpMeta72)) goto goto_2;
_cr = tmpMeta73;
_outResult = omc_Interactive_deleteClass(threadData, _cr, _p ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
if (12 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT415), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta74 = _args;
if (listEmpty(tmpMeta74)) goto goto_2;
tmpMeta75 = MMC_CAR(tmpMeta74);
tmpMeta76 = MMC_CDR(tmpMeta74);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta75,2,1) == 0) goto goto_2;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta75), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta77,2,2) == 0) goto goto_2;
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta77), 2));
if (listEmpty(tmpMeta76)) goto goto_2;
tmpMeta79 = MMC_CAR(tmpMeta76);
tmpMeta80 = MMC_CDR(tmpMeta76);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta79,2,1) == 0) goto goto_2;
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta79), 2));
if (listEmpty(tmpMeta80)) goto goto_2;
tmpMeta82 = MMC_CAR(tmpMeta80);
tmpMeta83 = MMC_CDR(tmpMeta80);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta82,2,1) == 0) goto goto_2;
tmpMeta84 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta82), 2));
if (!listEmpty(tmpMeta83)) goto goto_2;
_name = tmpMeta78;
_tp = tmpMeta81;
_model_ = tmpMeta84;
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
_p = omc_Interactive_addComponent(threadData, _name, _tp, _model_, _nargs, _p, NULL);
omc_SymbolTable_setAbsyn(threadData, _p);
omc_Print_clearBuf(threadData);
tmp1 = _OMC_LIT127;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_metatype tmpMeta95;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT416), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta85 = _args;
if (listEmpty(tmpMeta85)) goto goto_2;
tmpMeta86 = MMC_CAR(tmpMeta85);
tmpMeta87 = MMC_CDR(tmpMeta85);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta86,2,1) == 0) goto goto_2;
tmpMeta88 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta86), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta88,2,2) == 0) goto goto_2;
tmpMeta89 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta88), 2));
if (listEmpty(tmpMeta87)) goto goto_2;
tmpMeta90 = MMC_CAR(tmpMeta87);
tmpMeta91 = MMC_CDR(tmpMeta87);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta90,2,1) == 0) goto goto_2;
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 2));
if (listEmpty(tmpMeta91)) goto goto_2;
tmpMeta93 = MMC_CAR(tmpMeta91);
tmpMeta94 = MMC_CDR(tmpMeta91);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta93,2,1) == 0) goto goto_2;
tmpMeta95 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta93), 2));
if (!listEmpty(tmpMeta94)) goto goto_2;
_name = tmpMeta89;
_tp = tmpMeta92;
_model_ = tmpMeta95;
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
_p = omc_Interactive_updateComponent(threadData, _name, _tp, _model_, _nargs, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
modelica_metatype tmpMeta99;
modelica_metatype tmpMeta100;
modelica_metatype tmpMeta101;
modelica_metatype tmpMeta102;
modelica_metatype tmpMeta103;
modelica_metatype tmpMeta104;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT417), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta96 = _args;
if (listEmpty(tmpMeta96)) goto goto_2;
tmpMeta97 = MMC_CAR(tmpMeta96);
tmpMeta98 = MMC_CDR(tmpMeta96);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta97,2,1) == 0) goto goto_2;
tmpMeta99 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta97), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta99,2,2) == 0) goto goto_2;
tmpMeta100 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta99), 2));
if (listEmpty(tmpMeta98)) goto goto_2;
tmpMeta101 = MMC_CAR(tmpMeta98);
tmpMeta102 = MMC_CDR(tmpMeta98);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta101,2,1) == 0) goto goto_2;
tmpMeta103 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta101), 2));
if (!listEmpty(tmpMeta102)) goto goto_2;
_name = tmpMeta100;
_model_ = tmpMeta103;
tmpMeta104 = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
if (!listEmpty(tmpMeta104)) goto goto_2;
_p = omc_Interactive_deleteOrUpdateComponent(threadData, _name, _model_, _p, mmc_mk_none());
omc_SymbolTable_setAbsyn(threadData, _p);
omc_Print_clearBuf(threadData);
tmp1 = _OMC_LIT127;
goto tmp3_done;
}
case 10: {
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT417), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = _OMC_LIT128;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta105;
modelica_metatype tmpMeta106;
modelica_metatype tmpMeta107;
modelica_metatype tmpMeta108;
if (17 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT418), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta105 = _args;
if (listEmpty(tmpMeta105)) goto goto_2;
tmpMeta106 = MMC_CAR(tmpMeta105);
tmpMeta107 = MMC_CDR(tmpMeta105);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta106,2,1) == 0) goto goto_2;
tmpMeta108 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta106), 2));
if (!listEmpty(tmpMeta107)) goto goto_2;
_cr = tmpMeta108;
tmp1 = intString(omc_Interactive_getComponentCount(threadData, _cr, _p));
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta109;
modelica_metatype tmpMeta110;
modelica_metatype tmpMeta111;
modelica_metatype tmpMeta112;
modelica_metatype tmpMeta113;
modelica_metatype tmpMeta114;
modelica_metatype tmpMeta115;
modelica_integer tmp116;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT419), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta109 = _args;
if (listEmpty(tmpMeta109)) goto goto_2;
tmpMeta110 = MMC_CAR(tmpMeta109);
tmpMeta111 = MMC_CDR(tmpMeta109);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta110,2,1) == 0) goto goto_2;
tmpMeta112 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta110), 2));
if (listEmpty(tmpMeta111)) goto goto_2;
tmpMeta113 = MMC_CAR(tmpMeta111);
tmpMeta114 = MMC_CDR(tmpMeta111);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta113,0,1) == 0) goto goto_2;
tmpMeta115 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta113), 2));
tmp116 = mmc_unbox_integer(tmpMeta115);
if (!listEmpty(tmpMeta114)) goto goto_2;
_cr = tmpMeta112;
_n = tmp116;
tmp1 = omc_Interactive_getNthComponent(threadData, _cr, _p, _n);
goto tmp3_done;
}
case 13: {
modelica_metatype tmpMeta117;
modelica_metatype tmpMeta118;
modelica_metatype tmpMeta119;
modelica_metatype tmpMeta120;
modelica_metatype tmpMeta121;
modelica_metatype tmpMeta122;
modelica_integer tmp123;
modelica_metatype tmpMeta124;
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT390), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta117 = _args;
if (listEmpty(tmpMeta117)) goto goto_2;
tmpMeta118 = MMC_CAR(tmpMeta117);
tmpMeta119 = MMC_CDR(tmpMeta117);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta118,2,1) == 0) goto goto_2;
tmpMeta120 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta118), 2));
if (!listEmpty(tmpMeta119)) goto goto_2;
_cr = tmpMeta120;
tmpMeta121 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta121,4,2) == 0) goto goto_2;
tmpMeta122 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta121), 3));
tmp123 = mmc_unbox_integer(tmpMeta122);
_access = tmp123;
if((_access >= ((modelica_integer) 2)))
{
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT390);
}
_outResult = omc_Interactive_getComponents(threadData, _cr, omc_Interactive_useQuotes(threadData, _nargs), _access);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT390);
}
}
else
{
tmpMeta124 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta124);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 14: {
modelica_metatype tmpMeta125;
modelica_metatype tmpMeta126;
modelica_metatype tmpMeta127;
modelica_metatype tmpMeta128;
modelica_metatype tmpMeta129;
modelica_metatype tmpMeta130;
modelica_integer tmp131;
modelica_metatype tmpMeta132;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT391), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta125 = _args;
if (listEmpty(tmpMeta125)) goto goto_2;
tmpMeta126 = MMC_CAR(tmpMeta125);
tmpMeta127 = MMC_CDR(tmpMeta125);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta126,2,1) == 0) goto goto_2;
tmpMeta128 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta126), 2));
if (!listEmpty(tmpMeta127)) goto goto_2;
_cr = tmpMeta128;
tmpMeta129 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta129,4,2) == 0) goto goto_2;
tmpMeta130 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta129), 3));
tmp131 = mmc_unbox_integer(tmpMeta130);
_access = tmp131;
if((_access >= ((modelica_integer) 2)))
{
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT391);
}
_outResult = omc_InteractiveUtil_getElements(threadData, _cr, omc_Interactive_useQuotes(threadData, _nargs), _access);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT391);
}
}
else
{
tmpMeta132 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta132);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 15: {
modelica_metatype tmpMeta133;
modelica_metatype tmpMeta134;
modelica_metatype tmpMeta135;
modelica_metatype tmpMeta136;
modelica_metatype tmpMeta137;
modelica_metatype tmpMeta138;
modelica_integer tmp139;
modelica_metatype tmpMeta140;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT392), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta133 = _args;
if (listEmpty(tmpMeta133)) goto goto_2;
tmpMeta134 = MMC_CAR(tmpMeta133);
tmpMeta135 = MMC_CDR(tmpMeta133);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta134,2,1) == 0) goto goto_2;
tmpMeta136 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta134), 2));
if (!listEmpty(tmpMeta135)) goto goto_2;
_cr = tmpMeta136;
tmpMeta137 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta137,4,2) == 0) goto goto_2;
tmpMeta138 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta137), 3));
tmp139 = mmc_unbox_integer(tmpMeta138);
_access = tmp139;
if((_access >= ((modelica_integer) 2)))
{
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT392);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getComponentAnnotations(threadData, _cr, _p, _access);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT392);
}
}
else
{
tmpMeta140 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta140);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 16: {
modelica_metatype tmpMeta141;
modelica_metatype tmpMeta142;
modelica_metatype tmpMeta143;
modelica_metatype tmpMeta144;
modelica_metatype tmpMeta145;
modelica_metatype tmpMeta146;
modelica_integer tmp147;
modelica_metatype tmpMeta148;
if (21 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT393), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta141 = _args;
if (listEmpty(tmpMeta141)) goto goto_2;
tmpMeta142 = MMC_CAR(tmpMeta141);
tmpMeta143 = MMC_CDR(tmpMeta141);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta142,2,1) == 0) goto goto_2;
tmpMeta144 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta142), 2));
if (!listEmpty(tmpMeta143)) goto goto_2;
_cr = tmpMeta144;
tmpMeta145 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta145,4,2) == 0) goto goto_2;
tmpMeta146 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta145), 3));
tmp147 = mmc_unbox_integer(tmpMeta146);
_access = tmp147;
if((_access >= ((modelica_integer) 2)))
{
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT393);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_InteractiveUtil_getElementAnnotations(threadData, _cr, _p, _access);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT393);
}
}
else
{
tmpMeta148 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta148);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 17: {
modelica_metatype tmpMeta149;
modelica_metatype tmpMeta150;
modelica_metatype tmpMeta151;
modelica_metatype tmpMeta152;
modelica_metatype tmpMeta153;
modelica_metatype tmpMeta154;
modelica_metatype tmpMeta155;
modelica_integer tmp156;
if (25 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT394), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta149 = _args;
if (listEmpty(tmpMeta149)) goto goto_2;
tmpMeta150 = MMC_CAR(tmpMeta149);
tmpMeta151 = MMC_CDR(tmpMeta149);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta150,2,1) == 0) goto goto_2;
tmpMeta152 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta150), 2));
if (listEmpty(tmpMeta151)) goto goto_2;
tmpMeta153 = MMC_CAR(tmpMeta151);
tmpMeta154 = MMC_CDR(tmpMeta151);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta153,0,1) == 0) goto goto_2;
tmpMeta155 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta153), 2));
tmp156 = mmc_unbox_integer(tmpMeta155);
if (!listEmpty(tmpMeta154)) goto goto_2;
_cr = tmpMeta152;
_n = tmp156;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT394);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getNthComponentAnnotation(threadData, _cr, _p, _n);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT394);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 18: {
modelica_metatype tmpMeta157;
modelica_metatype tmpMeta158;
modelica_metatype tmpMeta159;
modelica_metatype tmpMeta160;
modelica_metatype tmpMeta161;
modelica_metatype tmpMeta162;
modelica_metatype tmpMeta163;
modelica_integer tmp164;
if (27 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT420), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta157 = _args;
if (listEmpty(tmpMeta157)) goto goto_2;
tmpMeta158 = MMC_CAR(tmpMeta157);
tmpMeta159 = MMC_CDR(tmpMeta157);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta158,2,1) == 0) goto goto_2;
tmpMeta160 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta158), 2));
if (listEmpty(tmpMeta159)) goto goto_2;
tmpMeta161 = MMC_CAR(tmpMeta159);
tmpMeta162 = MMC_CDR(tmpMeta159);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta161,0,1) == 0) goto goto_2;
tmpMeta163 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta161), 2));
tmp164 = mmc_unbox_integer(tmpMeta163);
if (!listEmpty(tmpMeta162)) goto goto_2;
_cr = tmpMeta160;
_n = tmp164;
tmp1 = omc_Interactive_getNthComponentModification(threadData, _cr, _p, _n);
goto tmp3_done;
}
case 19: {
modelica_metatype tmpMeta165;
modelica_metatype tmpMeta166;
modelica_metatype tmpMeta167;
modelica_metatype tmpMeta168;
modelica_metatype tmpMeta169;
modelica_metatype tmpMeta170;
modelica_metatype tmpMeta171;
modelica_integer tmp172;
if (24 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT421), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta165 = _args;
if (listEmpty(tmpMeta165)) goto goto_2;
tmpMeta166 = MMC_CAR(tmpMeta165);
tmpMeta167 = MMC_CDR(tmpMeta165);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta166,2,1) == 0) goto goto_2;
tmpMeta168 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta166), 2));
if (listEmpty(tmpMeta167)) goto goto_2;
tmpMeta169 = MMC_CAR(tmpMeta167);
tmpMeta170 = MMC_CDR(tmpMeta167);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta169,0,1) == 0) goto goto_2;
tmpMeta171 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta169), 2));
tmp172 = mmc_unbox_integer(tmpMeta171);
if (!listEmpty(tmpMeta170)) goto goto_2;
_cr = tmpMeta168;
_n = tmp172;
tmp1 = omc_Interactive_getNthComponentCondition(threadData, _cr, _p, _n);
goto tmp3_done;
}
case 20: {
modelica_metatype tmpMeta173;
modelica_metatype tmpMeta174;
modelica_metatype tmpMeta175;
modelica_metatype tmpMeta176;
if (19 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT422), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta173 = _args;
if (listEmpty(tmpMeta173)) goto goto_2;
tmpMeta174 = MMC_CAR(tmpMeta173);
tmpMeta175 = MMC_CDR(tmpMeta173);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta174,2,1) == 0) goto goto_2;
tmpMeta176 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta174), 2));
if (!listEmpty(tmpMeta175)) goto goto_2;
_cr = tmpMeta176;
tmp1 = intString(omc_Interactive_getInheritanceCount(threadData, _cr, _p));
goto tmp3_done;
}
case 21: {
modelica_metatype tmpMeta177;
modelica_metatype tmpMeta178;
modelica_metatype tmpMeta179;
modelica_metatype tmpMeta180;
modelica_metatype tmpMeta181;
modelica_metatype tmpMeta182;
modelica_metatype tmpMeta183;
modelica_integer tmp184;
if (20 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT423), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta177 = _args;
if (listEmpty(tmpMeta177)) goto goto_2;
tmpMeta178 = MMC_CAR(tmpMeta177);
tmpMeta179 = MMC_CDR(tmpMeta177);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta178,2,1) == 0) goto goto_2;
tmpMeta180 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta178), 2));
if (listEmpty(tmpMeta179)) goto goto_2;
tmpMeta181 = MMC_CAR(tmpMeta179);
tmpMeta182 = MMC_CDR(tmpMeta179);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta181,0,1) == 0) goto goto_2;
tmpMeta183 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta181), 2));
tmp184 = mmc_unbox_integer(tmpMeta183);
if (!listEmpty(tmpMeta182)) goto goto_2;
_cr = tmpMeta180;
_n = tmp184;
tmp1 = omc_Interactive_getNthInheritedClass(threadData, _cr, _n);
goto tmp3_done;
}
case 22: {
modelica_metatype tmpMeta185;
modelica_metatype tmpMeta186;
modelica_metatype tmpMeta187;
modelica_metatype tmpMeta188;
modelica_metatype tmpMeta189;
modelica_metatype tmpMeta190;
modelica_metatype tmpMeta191;
modelica_metatype tmpMeta192;
modelica_metatype tmpMeta193;
modelica_metatype tmpMeta194;
modelica_metatype tmpMeta195;
modelica_metatype tmpMeta196;
modelica_metatype tmpMeta197;
if (20 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT424), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta185 = _args;
if (listEmpty(tmpMeta185)) goto goto_2;
tmpMeta186 = MMC_CAR(tmpMeta185);
tmpMeta187 = MMC_CDR(tmpMeta185);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta186,2,1) == 0) goto goto_2;
tmpMeta188 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta186), 2));
if (listEmpty(tmpMeta187)) goto goto_2;
tmpMeta189 = MMC_CAR(tmpMeta187);
tmpMeta190 = MMC_CDR(tmpMeta187);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta189,2,1) == 0) goto goto_2;
tmpMeta191 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta189), 2));
if (listEmpty(tmpMeta190)) goto goto_2;
tmpMeta192 = MMC_CAR(tmpMeta190);
tmpMeta193 = MMC_CDR(tmpMeta190);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta192,2,1) == 0) goto goto_2;
tmpMeta194 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta192), 2));
if (listEmpty(tmpMeta193)) goto goto_2;
tmpMeta195 = MMC_CAR(tmpMeta193);
tmpMeta196 = MMC_CDR(tmpMeta193);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta195,3,1) == 0) goto goto_2;
tmpMeta197 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta195), 2));
if (!listEmpty(tmpMeta196)) goto goto_2;
_cr = tmpMeta188;
_cr1 = tmpMeta191;
_cr2 = tmpMeta194;
_cmt = tmpMeta197;
_p = omc_Interactive_setConnectionComment(threadData, _cr, _cr1, _cr2, _cmt, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 23: {
modelica_metatype tmpMeta198;
modelica_metatype tmpMeta199;
modelica_metatype tmpMeta200;
modelica_metatype tmpMeta201;
modelica_metatype tmpMeta202;
modelica_metatype tmpMeta203;
modelica_metatype tmpMeta204;
modelica_metatype tmpMeta205;
modelica_metatype tmpMeta206;
modelica_metatype tmpMeta207;
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT425), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta198 = _args;
if (listEmpty(tmpMeta198)) goto goto_2;
tmpMeta199 = MMC_CAR(tmpMeta198);
tmpMeta200 = MMC_CDR(tmpMeta198);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta199,2,1) == 0) goto goto_2;
tmpMeta201 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta199), 2));
if (listEmpty(tmpMeta200)) goto goto_2;
tmpMeta202 = MMC_CAR(tmpMeta200);
tmpMeta203 = MMC_CDR(tmpMeta200);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta202,2,1) == 0) goto goto_2;
tmpMeta204 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta202), 2));
if (listEmpty(tmpMeta203)) goto goto_2;
tmpMeta205 = MMC_CAR(tmpMeta203);
tmpMeta206 = MMC_CDR(tmpMeta203);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta205,2,1) == 0) goto goto_2;
tmpMeta207 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta205), 2));
if (!listEmpty(tmpMeta206)) goto goto_2;
_cr1 = tmpMeta201;
_cr2 = tmpMeta204;
_cr = tmpMeta207;
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
_outResult = omc_Interactive_addConnection(threadData, _cr, _cr1, _cr2, _nargs, _p ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 24: {
modelica_metatype tmpMeta208;
modelica_metatype tmpMeta209;
modelica_metatype tmpMeta210;
modelica_metatype tmpMeta211;
modelica_metatype tmpMeta212;
modelica_metatype tmpMeta213;
modelica_metatype tmpMeta214;
modelica_metatype tmpMeta215;
modelica_metatype tmpMeta216;
modelica_metatype tmpMeta217;
if (16 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT426), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta208 = _args;
if (listEmpty(tmpMeta208)) goto goto_2;
tmpMeta209 = MMC_CAR(tmpMeta208);
tmpMeta210 = MMC_CDR(tmpMeta208);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta209,2,1) == 0) goto goto_2;
tmpMeta211 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta209), 2));
if (listEmpty(tmpMeta210)) goto goto_2;
tmpMeta212 = MMC_CAR(tmpMeta210);
tmpMeta213 = MMC_CDR(tmpMeta210);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta212,2,1) == 0) goto goto_2;
tmpMeta214 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta212), 2));
if (listEmpty(tmpMeta213)) goto goto_2;
tmpMeta215 = MMC_CAR(tmpMeta213);
tmpMeta216 = MMC_CDR(tmpMeta213);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta215,2,1) == 0) goto goto_2;
tmpMeta217 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta215), 2));
if (!listEmpty(tmpMeta216)) goto goto_2;
_cr1 = tmpMeta211;
_cr2 = tmpMeta214;
_cr = tmpMeta217;
_outResult = omc_Interactive_deleteConnection(threadData, _cr, _cr1, _cr2, _p ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 25: {
modelica_metatype tmpMeta218;
modelica_metatype tmpMeta219;
modelica_metatype tmpMeta220;
modelica_metatype tmpMeta221;
modelica_metatype tmpMeta222;
modelica_metatype tmpMeta223;
modelica_metatype tmpMeta224;
modelica_integer tmp225;
modelica_metatype tmpMeta226;
modelica_metatype tmpMeta227;
modelica_integer tmp228;
modelica_metatype tmpMeta229;
if (26 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT395), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta218 = _args;
if (listEmpty(tmpMeta218)) goto goto_2;
tmpMeta219 = MMC_CAR(tmpMeta218);
tmpMeta220 = MMC_CDR(tmpMeta218);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta219,2,1) == 0) goto goto_2;
tmpMeta221 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta219), 2));
if (listEmpty(tmpMeta220)) goto goto_2;
tmpMeta222 = MMC_CAR(tmpMeta220);
tmpMeta223 = MMC_CDR(tmpMeta220);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta222,0,1) == 0) goto goto_2;
tmpMeta224 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta222), 2));
tmp225 = mmc_unbox_integer(tmpMeta224);
if (!listEmpty(tmpMeta223)) goto goto_2;
_cr = tmpMeta221;
_n = tmp225;
tmpMeta226 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta226,4,2) == 0) goto goto_2;
tmpMeta227 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta226), 3));
tmp228 = mmc_unbox_integer(tmpMeta227);
_access = tmp228;
if((_access >= ((modelica_integer) 4)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT395);
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getNthConnectionAnnotation(threadData, _path, _p, _n);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
omc_ErrorExt_rollBack(threadData, _OMC_LIT395);
}
else
{
tmpMeta229 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta229);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 26: {
modelica_metatype tmpMeta230;
modelica_metatype tmpMeta231;
modelica_metatype tmpMeta232;
modelica_metatype tmpMeta233;
if (17 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT427), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta230 = _args;
if (listEmpty(tmpMeta230)) goto goto_2;
tmpMeta231 = MMC_CAR(tmpMeta230);
tmpMeta232 = MMC_CDR(tmpMeta230);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta231,2,1) == 0) goto goto_2;
tmpMeta233 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta231), 2));
if (!listEmpty(tmpMeta232)) goto goto_2;
_cr = tmpMeta233;
tmp1 = omc_Interactive_getConnectorCount(threadData, _cr, _p);
goto tmp3_done;
}
case 27: {
modelica_metatype tmpMeta234;
modelica_metatype tmpMeta235;
modelica_metatype tmpMeta236;
modelica_metatype tmpMeta237;
modelica_metatype tmpMeta238;
modelica_metatype tmpMeta239;
modelica_metatype tmpMeta240;
modelica_integer tmp241;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT428), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta234 = _args;
if (listEmpty(tmpMeta234)) goto goto_2;
tmpMeta235 = MMC_CAR(tmpMeta234);
tmpMeta236 = MMC_CDR(tmpMeta234);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta235,2,1) == 0) goto goto_2;
tmpMeta237 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta235), 2));
if (listEmpty(tmpMeta236)) goto goto_2;
tmpMeta238 = MMC_CAR(tmpMeta236);
tmpMeta239 = MMC_CDR(tmpMeta236);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta238,0,1) == 0) goto goto_2;
tmpMeta240 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta238), 2));
tmp241 = mmc_unbox_integer(tmpMeta240);
if (!listEmpty(tmpMeta239)) goto goto_2;
_cr = tmpMeta237;
_n = tmp241;
tmp1 = omc_Interactive_getNthConnector(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p, _n);
goto tmp3_done;
}
case 28: {
modelica_metatype tmpMeta242;
modelica_metatype tmpMeta243;
modelica_metatype tmpMeta244;
modelica_metatype tmpMeta245;
modelica_metatype tmpMeta246;
modelica_metatype tmpMeta247;
modelica_metatype tmpMeta248;
modelica_integer tmp249;
if (29 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT396), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta242 = _args;
if (listEmpty(tmpMeta242)) goto goto_2;
tmpMeta243 = MMC_CAR(tmpMeta242);
tmpMeta244 = MMC_CDR(tmpMeta242);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta243,2,1) == 0) goto goto_2;
tmpMeta245 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta243), 2));
if (listEmpty(tmpMeta244)) goto goto_2;
tmpMeta246 = MMC_CAR(tmpMeta244);
tmpMeta247 = MMC_CDR(tmpMeta244);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta246,0,1) == 0) goto goto_2;
tmpMeta248 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta246), 2));
tmp249 = mmc_unbox_integer(tmpMeta248);
if (!listEmpty(tmpMeta247)) goto goto_2;
_cr = tmpMeta245;
_n = tmp249;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT396);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getNthConnectorIconAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p, _n);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT396);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 29: {
modelica_metatype tmpMeta250;
modelica_metatype tmpMeta251;
modelica_metatype tmpMeta252;
modelica_metatype tmpMeta253;
modelica_metatype tmpMeta254;
modelica_metatype tmpMeta255;
modelica_integer tmp256;
modelica_metatype tmpMeta257;
if (17 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT397), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta250 = _args;
if (listEmpty(tmpMeta250)) goto goto_2;
tmpMeta251 = MMC_CAR(tmpMeta250);
tmpMeta252 = MMC_CDR(tmpMeta250);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta251,2,1) == 0) goto goto_2;
tmpMeta253 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta251), 2));
if (!listEmpty(tmpMeta252)) goto goto_2;
_cr = tmpMeta253;
tmpMeta254 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta254,4,2) == 0) goto goto_2;
tmpMeta255 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta254), 3));
tmp256 = mmc_unbox_integer(tmpMeta255);
_access = tmp256;
if((_access >= ((modelica_integer) 2)))
{
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT397);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
_graphicsExpMode = omc_Config_getGraphicsExpMode(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
omc_Config_setGraphicsExpMode(threadData, 1);
_outResult = omc_Interactive_getIconAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
omc_Config_setGraphicsExpMode(threadData, _graphicsExpMode);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT397);
}
}
else
{
tmpMeta257 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta257);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 30: {
modelica_metatype tmpMeta258;
modelica_metatype tmpMeta259;
modelica_metatype tmpMeta260;
modelica_metatype tmpMeta261;
modelica_metatype tmpMeta262;
modelica_metatype tmpMeta263;
modelica_integer tmp264;
modelica_metatype tmpMeta265;
if (20 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT398), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta258 = _args;
if (listEmpty(tmpMeta258)) goto goto_2;
tmpMeta259 = MMC_CAR(tmpMeta258);
tmpMeta260 = MMC_CDR(tmpMeta258);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta259,2,1) == 0) goto goto_2;
tmpMeta261 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta259), 2));
if (!listEmpty(tmpMeta260)) goto goto_2;
_cr = tmpMeta261;
tmpMeta262 = omc_Interactive_checkAccessAnnotationAndEncryption(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta262,4,2) == 0) goto goto_2;
tmpMeta263 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta262), 3));
tmp264 = mmc_unbox_integer(tmpMeta263);
_access = tmp264;
if((_access >= ((modelica_integer) 4)))
{
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT398);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
_graphicsExpMode = omc_Config_getGraphicsExpMode(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
omc_Config_setGraphicsExpMode(threadData, 1);
_outResult = omc_Interactive_getDiagramAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
omc_Config_setGraphicsExpMode(threadData, _graphicsExpMode);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT398);
}
}
else
{
tmpMeta265 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addMessage(threadData, _OMC_LIT389, tmpMeta265);
_outResult = _OMC_LIT55;
}
tmp1 = _outResult;
goto tmp3_done;
}
case 31: {
modelica_metatype tmpMeta266;
modelica_metatype tmpMeta267;
modelica_metatype tmpMeta268;
modelica_metatype tmpMeta269;
modelica_metatype tmpMeta270;
modelica_metatype tmpMeta271;
modelica_metatype tmpMeta272;
modelica_integer tmp273;
if (37 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT399), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta266 = _args;
if (listEmpty(tmpMeta266)) goto goto_2;
tmpMeta267 = MMC_CAR(tmpMeta266);
tmpMeta268 = MMC_CDR(tmpMeta266);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta267,2,1) == 0) goto goto_2;
tmpMeta269 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta267), 2));
if (listEmpty(tmpMeta268)) goto goto_2;
tmpMeta270 = MMC_CAR(tmpMeta268);
tmpMeta271 = MMC_CDR(tmpMeta268);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta270,0,1) == 0) goto goto_2;
tmpMeta272 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta270), 2));
tmp273 = mmc_unbox_integer(tmpMeta272);
if (!listEmpty(tmpMeta271)) goto goto_2;
_cr = tmpMeta269;
_n = tmp273;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT399);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getNthInheritedClassMapAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _n, _p, _OMC_LIT400);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT399);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 32: {
modelica_metatype tmpMeta274;
modelica_metatype tmpMeta275;
modelica_metatype tmpMeta276;
modelica_metatype tmpMeta277;
modelica_metatype tmpMeta278;
modelica_metatype tmpMeta279;
modelica_metatype tmpMeta280;
modelica_integer tmp281;
if (40 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT401), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta274 = _args;
if (listEmpty(tmpMeta274)) goto goto_2;
tmpMeta275 = MMC_CAR(tmpMeta274);
tmpMeta276 = MMC_CDR(tmpMeta274);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta275,2,1) == 0) goto goto_2;
tmpMeta277 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta275), 2));
if (listEmpty(tmpMeta276)) goto goto_2;
tmpMeta278 = MMC_CAR(tmpMeta276);
tmpMeta279 = MMC_CDR(tmpMeta276);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta278,0,1) == 0) goto goto_2;
tmpMeta280 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta278), 2));
tmp281 = mmc_unbox_integer(tmpMeta280);
if (!listEmpty(tmpMeta279)) goto goto_2;
_cr = tmpMeta277;
_n = tmp281;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT401);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
_outResult = omc_Interactive_getNthInheritedClassMapAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _n, _p, _OMC_LIT402);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT401);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 33: {
modelica_metatype tmpMeta282;
modelica_metatype tmpMeta283;
modelica_metatype tmpMeta284;
modelica_metatype tmpMeta285;
modelica_metatype tmpMeta286;
modelica_metatype tmpMeta287;
modelica_metatype tmpMeta288;
modelica_metatype tmpMeta289;
modelica_metatype tmpMeta290;
modelica_metatype tmpMeta291;
if (18 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT403), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta282 = _args;
if (listEmpty(tmpMeta282)) goto goto_2;
tmpMeta283 = MMC_CAR(tmpMeta282);
tmpMeta284 = MMC_CDR(tmpMeta282);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta283,2,1) == 0) goto goto_2;
tmpMeta285 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta283), 2));
if (listEmpty(tmpMeta284)) goto goto_2;
tmpMeta286 = MMC_CAR(tmpMeta284);
tmpMeta287 = MMC_CDR(tmpMeta284);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta286,2,1) == 0) goto goto_2;
tmpMeta288 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta286), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta288,2,2) == 0) goto goto_2;
tmpMeta289 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta288), 2));
tmpMeta290 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta288), 3));
if (!listEmpty(tmpMeta290)) goto goto_2;
if (!listEmpty(tmpMeta287)) goto goto_2;
_cr = tmpMeta285;
_name = tmpMeta289;
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT403);
}
_evalParamAnn = omc_Config_getEvaluateParametersInAnnotations(threadData);
omc_Config_setEvaluateParametersInAnnotations(threadData, 1);
tmpMeta291 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _name);
_outResult = omc_Interactive_getNamedAnnotation(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p, tmpMeta291, _OMC_LIT150, boxvar_Interactive_getAnnotationValue);
omc_Config_setEvaluateParametersInAnnotations(threadData, _evalParamAnn);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT403);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 34: {
modelica_metatype tmpMeta292;
modelica_metatype tmpMeta293;
modelica_metatype tmpMeta294;
modelica_metatype tmpMeta295;
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT429), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta292 = _args;
if (listEmpty(tmpMeta292)) goto goto_2;
tmpMeta293 = MMC_CAR(tmpMeta292);
tmpMeta294 = MMC_CDR(tmpMeta292);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta293,2,1) == 0) goto goto_2;
tmpMeta295 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta293), 2));
if (!listEmpty(tmpMeta294)) goto goto_2;
_cr = tmpMeta295;
{
{
volatile mmc_switch_type tmp298;
int tmp299;
tmp298 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp297_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp298 < 2; tmp298++) {
switch (MMC_SWITCH_CAST(tmp298)) {
case 0: {
modelica_metatype tmpMeta300;
modelica_metatype tmpMeta301;
modelica_metatype tmpMeta302;
modelica_metatype tmpMeta303;
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p, 0, 0);
_cls = omc_Refactor_refactorGraphicalAnnotation(threadData, _p, _cls);
tmpMeta300 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta301 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta300, _OMC_LIT177);
_p = omc_InteractiveUtil_updateProgram(threadData, tmpMeta301, _p, 0);
omc_SymbolTable_setAbsyn(threadData, _p);
tmpMeta302 = mmc_mk_cons(_cls, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta303 = mmc_mk_box3(3, &Absyn_Program_PROGRAM__desc, tmpMeta302, _OMC_LIT177);
_outResult = omc_Dump_unparseStr(threadData, tmpMeta303, 0, _OMC_LIT404);
goto tmp297_done;
}
case 1: {
modelica_metatype tmpMeta304;
modelica_metatype tmpMeta305;
tmpMeta304 = stringAppend(_OMC_LIT405,omc_Dump_printComponentRefStr(threadData, _cr));
tmpMeta305 = stringAppend(tmpMeta304,_OMC_LIT406);
_outResult = tmpMeta305;
goto tmp297_done;
}
}
goto tmp297_end;
tmp297_end: ;
}
goto goto_296;
tmp297_done:
(void)tmp298;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp297_done2;
goto_296:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp298 < 2) {
goto tmp297_top;
}
goto goto_2;
tmp297_done2:;
}
}
;
tmp1 = _outResult;
goto tmp3_done;
}
case 35: {
modelica_metatype tmpMeta306;
modelica_metatype tmpMeta307;
modelica_metatype tmpMeta308;
modelica_metatype tmpMeta309;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT430), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta306 = _args;
if (listEmpty(tmpMeta306)) goto goto_2;
tmpMeta307 = MMC_CAR(tmpMeta306);
tmpMeta308 = MMC_CDR(tmpMeta306);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta307,2,1) == 0) goto goto_2;
tmpMeta309 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta307), 2));
if (!listEmpty(tmpMeta308)) goto goto_2;
_cr = tmpMeta309;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_cls = omc_Refactor_refactorGraphicalAnnotation(threadData, _p, _cls);
tmp1 = omc_Interactive_getAnnotationInClass(threadData, _cls, _OMC_LIT158, _p, _path);
goto tmp3_done;
}
case 36: {
modelica_metatype tmpMeta310;
modelica_metatype tmpMeta311;
modelica_metatype tmpMeta312;
modelica_metatype tmpMeta313;
if (25 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT431), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta310 = _args;
if (listEmpty(tmpMeta310)) goto goto_2;
tmpMeta311 = MMC_CAR(tmpMeta310);
tmpMeta312 = MMC_CDR(tmpMeta310);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta311,2,1) == 0) goto goto_2;
tmpMeta313 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta311), 2));
if (!listEmpty(tmpMeta312)) goto goto_2;
_cr = tmpMeta313;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_cls = omc_Refactor_refactorGraphicalAnnotation(threadData, _p, _cls);
tmp1 = omc_Interactive_getAnnotationInClass(threadData, _cls, _OMC_LIT184, _p, _path);
goto tmp3_done;
}
case 37: {
modelica_metatype tmpMeta314;
modelica_metatype tmpMeta315;
modelica_metatype tmpMeta316;
modelica_metatype tmpMeta317;
if (38 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT432), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta314 = _args;
if (listEmpty(tmpMeta314)) goto goto_2;
tmpMeta315 = MMC_CAR(tmpMeta314);
tmpMeta316 = MMC_CDR(tmpMeta314);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta315,2,1) == 0) goto goto_2;
tmpMeta317 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta315), 2));
if (!listEmpty(tmpMeta316)) goto goto_2;
_cr = tmpMeta317;
tmp1 = omc_Interactive_getShortDefinitionBaseClassInformation(threadData, _cr, _p);
goto tmp3_done;
}
case 38: {
modelica_metatype tmpMeta318;
modelica_metatype tmpMeta319;
modelica_metatype tmpMeta320;
modelica_metatype tmpMeta321;
if (32 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT433), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta318 = _args;
if (listEmpty(tmpMeta318)) goto goto_2;
tmpMeta319 = MMC_CAR(tmpMeta318);
tmpMeta320 = MMC_CDR(tmpMeta318);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta319,2,1) == 0) goto goto_2;
tmpMeta321 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta319), 2));
if (!listEmpty(tmpMeta320)) goto goto_2;
_cr = tmpMeta321;
tmp1 = omc_Interactive_getExternalFunctionSpecification(threadData, _cr, _p);
goto tmp3_done;
}
case 39: {
modelica_metatype tmpMeta322;
modelica_metatype tmpMeta323;
modelica_metatype tmpMeta324;
modelica_metatype tmpMeta325;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT434), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta322 = _args;
if (listEmpty(tmpMeta322)) goto goto_2;
tmpMeta323 = MMC_CAR(tmpMeta322);
tmpMeta324 = MMC_CDR(tmpMeta322);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta323,2,1) == 0) goto goto_2;
tmpMeta325 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta323), 2));
if (!listEmpty(tmpMeta324)) goto goto_2;
_cr = tmpMeta325;
tmp1 = (omc_Interactive_isPrimitive(threadData, _cr, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 40: {
modelica_metatype tmpMeta326;
modelica_metatype tmpMeta327;
modelica_metatype tmpMeta328;
modelica_metatype tmpMeta329;
modelica_metatype tmpMeta330;
modelica_metatype tmpMeta331;
modelica_metatype tmpMeta332;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT435), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta326 = _args;
if (listEmpty(tmpMeta326)) goto goto_2;
tmpMeta327 = MMC_CAR(tmpMeta326);
tmpMeta328 = MMC_CDR(tmpMeta326);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta327,2,1) == 0) goto goto_2;
tmpMeta329 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta327), 2));
if (listEmpty(tmpMeta328)) goto goto_2;
tmpMeta330 = MMC_CAR(tmpMeta328);
tmpMeta331 = MMC_CDR(tmpMeta328);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta330,2,1) == 0) goto goto_2;
tmpMeta332 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta330), 2));
if (!listEmpty(tmpMeta331)) goto goto_2;
_cr = tmpMeta329;
_class_ = tmpMeta332;
tmp1 = (omc_Interactive_isParameter(threadData, _cr, _class_, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 41: {
modelica_metatype tmpMeta333;
modelica_metatype tmpMeta334;
modelica_metatype tmpMeta335;
modelica_metatype tmpMeta336;
modelica_metatype tmpMeta337;
modelica_metatype tmpMeta338;
modelica_metatype tmpMeta339;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT436), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta333 = _args;
if (listEmpty(tmpMeta333)) goto goto_2;
tmpMeta334 = MMC_CAR(tmpMeta333);
tmpMeta335 = MMC_CDR(tmpMeta333);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta334,2,1) == 0) goto goto_2;
tmpMeta336 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta334), 2));
if (listEmpty(tmpMeta335)) goto goto_2;
tmpMeta337 = MMC_CAR(tmpMeta335);
tmpMeta338 = MMC_CDR(tmpMeta335);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta337,2,1) == 0) goto goto_2;
tmpMeta339 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta337), 2));
if (!listEmpty(tmpMeta338)) goto goto_2;
_cr = tmpMeta336;
_class_ = tmpMeta339;
tmp1 = (omc_Interactive_isProtected(threadData, _cr, _class_, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 42: {
modelica_metatype tmpMeta340;
modelica_metatype tmpMeta341;
modelica_metatype tmpMeta342;
modelica_metatype tmpMeta343;
modelica_metatype tmpMeta344;
modelica_metatype tmpMeta345;
modelica_metatype tmpMeta346;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT437), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta340 = _args;
if (listEmpty(tmpMeta340)) goto goto_2;
tmpMeta341 = MMC_CAR(tmpMeta340);
tmpMeta342 = MMC_CDR(tmpMeta340);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta341,2,1) == 0) goto goto_2;
tmpMeta343 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta341), 2));
if (listEmpty(tmpMeta342)) goto goto_2;
tmpMeta344 = MMC_CAR(tmpMeta342);
tmpMeta345 = MMC_CDR(tmpMeta342);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta344,2,1) == 0) goto goto_2;
tmpMeta346 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta344), 2));
if (!listEmpty(tmpMeta345)) goto goto_2;
_cr = tmpMeta343;
_class_ = tmpMeta346;
tmp1 = (omc_Interactive_isConstant(threadData, _cr, _class_, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 43: {
modelica_metatype tmpMeta347;
modelica_metatype tmpMeta348;
modelica_metatype tmpMeta349;
modelica_metatype tmpMeta350;
modelica_metatype tmpMeta351;
modelica_metatype tmpMeta352;
modelica_metatype tmpMeta353;
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT438), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta347 = _args;
if (listEmpty(tmpMeta347)) goto goto_2;
tmpMeta348 = MMC_CAR(tmpMeta347);
tmpMeta349 = MMC_CDR(tmpMeta347);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta348,2,1) == 0) goto goto_2;
tmpMeta350 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta348), 2));
if (listEmpty(tmpMeta349)) goto goto_2;
tmpMeta351 = MMC_CAR(tmpMeta349);
tmpMeta352 = MMC_CDR(tmpMeta349);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta351,3,1) == 0) goto goto_2;
tmpMeta353 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta351), 2));
if (!listEmpty(tmpMeta352)) goto goto_2;
_class_ = tmpMeta350;
_name = tmpMeta353;
tmp1 = (omc_Interactive_isReplaceable(threadData, _class_, _name, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 44: {
modelica_metatype tmpMeta354;
modelica_metatype tmpMeta355;
modelica_metatype tmpMeta356;
modelica_metatype tmpMeta357;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT439), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta354 = _args;
if (listEmpty(tmpMeta354)) goto goto_2;
tmpMeta355 = MMC_CAR(tmpMeta354);
tmpMeta356 = MMC_CDR(tmpMeta354);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta355,2,1) == 0) goto goto_2;
tmpMeta357 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta355), 2));
if (!listEmpty(tmpMeta356)) goto goto_2;
_cr = tmpMeta357;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
tmp1 = omc_Interactive_getEnumLiterals(threadData, _cls);
goto tmp3_done;
}
case 45: {
modelica_metatype tmpMeta358;
modelica_metatype tmpMeta359;
modelica_metatype tmpMeta360;
modelica_metatype tmpMeta361;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT440), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta358 = _args;
if (listEmpty(tmpMeta358)) goto goto_2;
tmpMeta359 = MMC_CAR(tmpMeta358);
tmpMeta360 = MMC_CDR(tmpMeta358);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta359,2,1) == 0) goto goto_2;
tmpMeta361 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta359), 2));
if (!listEmpty(tmpMeta360)) goto goto_2;
_cr = tmpMeta361;
tmp1 = (omc_Interactive_existClass(threadData, _cr, _p)?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 46: {
modelica_metatype tmpMeta362;
modelica_metatype tmpMeta363;
modelica_metatype tmpMeta364;
modelica_metatype tmpMeta365;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT441), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta362 = _args;
if (listEmpty(tmpMeta362)) goto goto_2;
tmpMeta363 = MMC_CAR(tmpMeta362);
tmpMeta364 = MMC_CDR(tmpMeta362);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta363,2,1) == 0) goto goto_2;
tmpMeta365 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta363), 2));
if (!listEmpty(tmpMeta364)) goto goto_2;
_cr = tmpMeta365;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmp1 = ((omc_Interactive_existClass(threadData, _cr, _p) && omc_Interactive_isModel(threadData, _path, _p))?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 47: {
modelica_metatype tmpMeta366;
modelica_metatype tmpMeta367;
modelica_metatype tmpMeta368;
modelica_metatype tmpMeta369;
if (12 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT442), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta366 = _args;
if (listEmpty(tmpMeta366)) goto goto_2;
tmpMeta367 = MMC_CAR(tmpMeta366);
tmpMeta368 = MMC_CDR(tmpMeta366);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta367,2,1) == 0) goto goto_2;
tmpMeta369 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta367), 2));
if (!listEmpty(tmpMeta368)) goto goto_2;
_cr = tmpMeta369;
tmp1 = ((omc_Interactive_existClass(threadData, _cr, _p) && omc_Interactive_isPackage(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p))?_OMC_LIT127:_OMC_LIT128);
goto tmp3_done;
}
case 48: {
modelica_metatype tmpMeta370;
modelica_metatype tmpMeta371;
modelica_metatype tmpMeta372;
modelica_metatype tmpMeta373;
modelica_metatype tmpMeta374;
modelica_metatype tmpMeta375;
modelica_metatype tmpMeta376;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT443), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta370 = _args;
if (listEmpty(tmpMeta370)) goto goto_2;
tmpMeta371 = MMC_CAR(tmpMeta370);
tmpMeta372 = MMC_CDR(tmpMeta370);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta371,2,1) == 0) goto goto_2;
tmpMeta373 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta371), 2));
if (listEmpty(tmpMeta372)) goto goto_2;
tmpMeta374 = MMC_CAR(tmpMeta372);
tmpMeta375 = MMC_CDR(tmpMeta372);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta374,2,1) == 0) goto goto_2;
tmpMeta376 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta374), 2));
if (!listEmpty(tmpMeta375)) goto goto_2;
_old_cname = tmpMeta373;
_new_cname = tmpMeta376;
_outResult = omc_Interactive_renameClass(threadData, _p, _old_cname, _new_cname ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 49: {
modelica_metatype tmpMeta377;
modelica_metatype tmpMeta378;
modelica_metatype tmpMeta379;
modelica_metatype tmpMeta380;
modelica_metatype tmpMeta381;
modelica_metatype tmpMeta382;
modelica_metatype tmpMeta383;
modelica_metatype tmpMeta384;
modelica_metatype tmpMeta385;
modelica_metatype tmpMeta386;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT444), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta377 = _args;
if (listEmpty(tmpMeta377)) goto goto_2;
tmpMeta378 = MMC_CAR(tmpMeta377);
tmpMeta379 = MMC_CDR(tmpMeta377);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta378,2,1) == 0) goto goto_2;
tmpMeta380 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta378), 2));
if (listEmpty(tmpMeta379)) goto goto_2;
tmpMeta381 = MMC_CAR(tmpMeta379);
tmpMeta382 = MMC_CDR(tmpMeta379);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta381,2,1) == 0) goto goto_2;
tmpMeta383 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta381), 2));
if (listEmpty(tmpMeta382)) goto goto_2;
tmpMeta384 = MMC_CAR(tmpMeta382);
tmpMeta385 = MMC_CDR(tmpMeta382);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta384,2,1) == 0) goto goto_2;
tmpMeta386 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta384), 2));
if (!listEmpty(tmpMeta385)) goto goto_2;
_cr = tmpMeta380;
_old_cname = tmpMeta383;
_new_cname = tmpMeta386;
_outResult = omc_Interactive_renameComponent(threadData, _p, _cr, _old_cname, _new_cname ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 50: {
modelica_metatype tmpMeta387;
modelica_metatype tmpMeta388;
modelica_metatype tmpMeta389;
modelica_metatype tmpMeta390;
modelica_metatype tmpMeta391;
modelica_metatype tmpMeta392;
modelica_metatype tmpMeta393;
modelica_metatype tmpMeta394;
modelica_metatype tmpMeta395;
modelica_metatype tmpMeta396;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT445), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta387 = _args;
if (listEmpty(tmpMeta387)) goto goto_2;
tmpMeta388 = MMC_CAR(tmpMeta387);
tmpMeta389 = MMC_CDR(tmpMeta387);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta388,2,1) == 0) goto goto_2;
tmpMeta390 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta388), 2));
if (listEmpty(tmpMeta389)) goto goto_2;
tmpMeta391 = MMC_CAR(tmpMeta389);
tmpMeta392 = MMC_CDR(tmpMeta389);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta391,2,1) == 0) goto goto_2;
tmpMeta393 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta391), 2));
if (listEmpty(tmpMeta392)) goto goto_2;
tmpMeta394 = MMC_CAR(tmpMeta392);
tmpMeta395 = MMC_CDR(tmpMeta392);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta394,2,1) == 0) goto goto_2;
tmpMeta396 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta394), 2));
if (!listEmpty(tmpMeta395)) goto goto_2;
_cr = tmpMeta390;
_old_cname = tmpMeta393;
_new_cname = tmpMeta396;
_outResult = omc_Interactive_renameComponentOnlyInClass(threadData, _p, _cr, _old_cname, _new_cname ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 51: {
modelica_metatype tmpMeta397;
modelica_metatype tmpMeta398;
modelica_metatype tmpMeta399;
modelica_metatype tmpMeta400;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT446), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta397 = _args;
if (listEmpty(tmpMeta397)) goto goto_2;
tmpMeta398 = MMC_CAR(tmpMeta397);
tmpMeta399 = MMC_CDR(tmpMeta397);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta398,2,1) == 0) goto goto_2;
tmpMeta400 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta398), 2));
if (!listEmpty(tmpMeta399)) goto goto_2;
_cr = tmpMeta400;
tmp1 = omc_Interactive_getCrefInfo(threadData, _cr, _p);
goto tmp3_done;
}
case 52: {
modelica_metatype tmpMeta401;
modelica_metatype tmpMeta402;
modelica_metatype tmpMeta403;
modelica_metatype tmpMeta404;
modelica_metatype tmpMeta405;
modelica_metatype tmpMeta406;
modelica_metatype tmpMeta407;
modelica_metatype tmpMeta408;
modelica_metatype tmpMeta409;
modelica_metatype tmpMeta410;
modelica_metatype tmpMeta411;
modelica_metatype tmpMeta412;
modelica_metatype tmpMeta413;
modelica_metatype tmpMeta414;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT447), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta401 = _args;
if (listEmpty(tmpMeta401)) goto goto_2;
tmpMeta402 = MMC_CAR(tmpMeta401);
tmpMeta403 = MMC_CDR(tmpMeta401);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta402,2,1) == 0) goto goto_2;
tmpMeta404 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta402), 2));
if (listEmpty(tmpMeta403)) goto goto_2;
tmpMeta405 = MMC_CAR(tmpMeta403);
tmpMeta406 = MMC_CDR(tmpMeta403);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta405,2,1) == 0) goto goto_2;
tmpMeta407 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta405), 2));
if (listEmpty(tmpMeta406)) goto goto_2;
tmpMeta408 = MMC_CAR(tmpMeta406);
tmpMeta409 = MMC_CDR(tmpMeta406);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta408,2,1) == 0) goto goto_2;
tmpMeta410 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta408), 2));
if (listEmpty(tmpMeta409)) goto goto_2;
tmpMeta411 = MMC_CAR(tmpMeta409);
tmpMeta412 = MMC_CDR(tmpMeta409);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta411,18,1) == 0) goto goto_2;
tmpMeta413 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta411), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta413,7,1) == 0) goto goto_2;
tmpMeta414 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta413), 2));
if (!listEmpty(tmpMeta412)) goto goto_2;
_class_ = tmpMeta404;
_crident = tmpMeta407;
_subident = tmpMeta410;
_mod = tmpMeta414;
_p = omc_Interactive_setExtendsModifierValue(threadData, _class_, _crident, _subident, _mod, _p ,&_outResult);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 53: {
modelica_metatype tmpMeta415;
modelica_metatype tmpMeta416;
modelica_metatype tmpMeta417;
modelica_metatype tmpMeta418;
modelica_metatype tmpMeta419;
modelica_metatype tmpMeta420;
modelica_metatype tmpMeta421;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT407), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta415 = _args;
if (listEmpty(tmpMeta415)) goto goto_2;
tmpMeta416 = MMC_CAR(tmpMeta415);
tmpMeta417 = MMC_CDR(tmpMeta415);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta416,2,1) == 0) goto goto_2;
tmpMeta418 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta416), 2));
if (listEmpty(tmpMeta417)) goto goto_2;
tmpMeta419 = MMC_CAR(tmpMeta417);
tmpMeta420 = MMC_CDR(tmpMeta417);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta419,2,1) == 0) goto goto_2;
tmpMeta421 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta419), 2));
if (!listEmpty(tmpMeta420)) goto goto_2;
_class_ = tmpMeta418;
_cr = tmpMeta421;
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT407);
}
_outResult = omc_Interactive_getExtendsModifierNames(threadData, _class_, _cr, omc_Interactive_useQuotes(threadData, _nargs), _p);
if((!omc_Flags_isSet(threadData, _OMC_LIT201)))
{
omc_ErrorExt_rollBack(threadData, _OMC_LIT407);
}
tmp1 = _outResult;
goto tmp3_done;
}
case 54: {
modelica_metatype tmpMeta422;
modelica_metatype tmpMeta423;
modelica_metatype tmpMeta424;
modelica_metatype tmpMeta425;
modelica_metatype tmpMeta426;
modelica_metatype tmpMeta427;
modelica_metatype tmpMeta428;
modelica_metatype tmpMeta429;
modelica_metatype tmpMeta430;
modelica_metatype tmpMeta431;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT448), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta422 = _args;
if (listEmpty(tmpMeta422)) goto goto_2;
tmpMeta423 = MMC_CAR(tmpMeta422);
tmpMeta424 = MMC_CDR(tmpMeta422);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta423,2,1) == 0) goto goto_2;
tmpMeta425 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta423), 2));
if (listEmpty(tmpMeta424)) goto goto_2;
tmpMeta426 = MMC_CAR(tmpMeta424);
tmpMeta427 = MMC_CDR(tmpMeta424);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta426,2,1) == 0) goto goto_2;
tmpMeta428 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta426), 2));
if (listEmpty(tmpMeta427)) goto goto_2;
tmpMeta429 = MMC_CAR(tmpMeta427);
tmpMeta430 = MMC_CDR(tmpMeta427);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta429,2,1) == 0) goto goto_2;
tmpMeta431 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta429), 2));
if (!listEmpty(tmpMeta430)) goto goto_2;
_class_ = tmpMeta425;
_crident = tmpMeta428;
_subident = tmpMeta431;
tmp1 = omc_Interactive_getExtendsModifierValue(threadData, _class_, _crident, _subident, _p);
goto tmp3_done;
}
case 55: {
modelica_metatype tmpMeta432;
modelica_metatype tmpMeta433;
modelica_metatype tmpMeta434;
modelica_metatype tmpMeta435;
modelica_metatype tmpMeta436;
modelica_metatype tmpMeta437;
modelica_metatype tmpMeta438;
modelica_metatype tmpMeta439;
modelica_metatype tmpMeta440;
modelica_metatype tmpMeta441;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT449), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta432 = _args;
if (listEmpty(tmpMeta432)) goto goto_2;
tmpMeta433 = MMC_CAR(tmpMeta432);
tmpMeta434 = MMC_CDR(tmpMeta432);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta433,2,1) == 0) goto goto_2;
tmpMeta435 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta433), 2));
if (listEmpty(tmpMeta434)) goto goto_2;
tmpMeta436 = MMC_CAR(tmpMeta434);
tmpMeta437 = MMC_CDR(tmpMeta434);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta436,2,1) == 0) goto goto_2;
tmpMeta438 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta436), 2));
if (listEmpty(tmpMeta437)) goto goto_2;
tmpMeta439 = MMC_CAR(tmpMeta437);
tmpMeta440 = MMC_CDR(tmpMeta437);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta439,2,1) == 0) goto goto_2;
tmpMeta441 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta439), 2));
if (!listEmpty(tmpMeta440)) goto goto_2;
_class_ = tmpMeta435;
_crident = tmpMeta438;
_subident = tmpMeta441;
tmp1 = omc_Interactive_isExtendsModifierFinal(threadData, _class_, _crident, _subident, _p);
goto tmp3_done;
}
case 56: {
modelica_metatype tmpMeta442;
modelica_metatype tmpMeta443;
modelica_metatype tmpMeta444;
modelica_metatype tmpMeta445;
if (23 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT450), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta442 = _args;
if (listEmpty(tmpMeta442)) goto goto_2;
tmpMeta443 = MMC_CAR(tmpMeta442);
tmpMeta444 = MMC_CDR(tmpMeta442);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta443,2,1) == 0) goto goto_2;
tmpMeta445 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta443), 2));
if (!listEmpty(tmpMeta444)) goto goto_2;
_class_ = tmpMeta445;
tmp1 = omc_Interactive_getDefaultComponentName(threadData, omc_AbsynUtil_crefToPath(threadData, _class_), _p);
goto tmp3_done;
}
case 57: {
modelica_metatype tmpMeta446;
modelica_metatype tmpMeta447;
modelica_metatype tmpMeta448;
modelica_metatype tmpMeta449;
if (27 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT451), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta446 = _args;
if (listEmpty(tmpMeta446)) goto goto_2;
tmpMeta447 = MMC_CAR(tmpMeta446);
tmpMeta448 = MMC_CDR(tmpMeta446);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta447,2,1) == 0) goto goto_2;
tmpMeta449 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta447), 2));
if (!listEmpty(tmpMeta448)) goto goto_2;
_class_ = tmpMeta449;
tmp1 = omc_Interactive_getDefaultComponentPrefixes(threadData, omc_AbsynUtil_crefToPath(threadData, _class_), _p);
goto tmp3_done;
}
case 58: {
modelica_metatype tmpMeta450;
modelica_metatype tmpMeta451;
modelica_metatype tmpMeta452;
modelica_metatype tmpMeta453;
modelica_metatype tmpMeta454;
modelica_metatype tmpMeta455;
modelica_metatype tmpMeta456;
modelica_metatype tmpMeta457;
if (19 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT452), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta450 = _args;
if (listEmpty(tmpMeta450)) goto goto_2;
tmpMeta451 = MMC_CAR(tmpMeta450);
tmpMeta452 = MMC_CDR(tmpMeta450);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta451,2,1) == 0) goto goto_2;
tmpMeta453 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta451), 2));
if (listEmpty(tmpMeta452)) goto goto_2;
tmpMeta454 = MMC_CAR(tmpMeta452);
tmpMeta455 = MMC_CDR(tmpMeta452);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta454,2,1) == 0) goto goto_2;
tmpMeta456 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta454), 2));
if (!listEmpty(tmpMeta455)) goto goto_2;
_class_ = tmpMeta453;
_cr = tmpMeta456;
_outResult = omc_Interactive_getComponentComment(threadData, _class_, _cr, _p);
tmpMeta457 = mmc_mk_cons(_OMC_LIT94, mmc_mk_cons(_outResult, mmc_mk_cons(_OMC_LIT94, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta457);
goto tmp3_done;
}
case 59: {
modelica_metatype tmpMeta458;
modelica_metatype tmpMeta459;
modelica_metatype tmpMeta460;
modelica_metatype tmpMeta461;
modelica_metatype tmpMeta462;
modelica_metatype tmpMeta463;
modelica_metatype tmpMeta464;
modelica_metatype tmpMeta465;
modelica_metatype tmpMeta466;
modelica_metatype tmpMeta467;
if (19 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT453), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta458 = _args;
if (listEmpty(tmpMeta458)) goto goto_2;
tmpMeta459 = MMC_CAR(tmpMeta458);
tmpMeta460 = MMC_CDR(tmpMeta458);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta459,2,1) == 0) goto goto_2;
tmpMeta461 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta459), 2));
if (listEmpty(tmpMeta460)) goto goto_2;
tmpMeta462 = MMC_CAR(tmpMeta460);
tmpMeta463 = MMC_CDR(tmpMeta460);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta462,2,1) == 0) goto goto_2;
tmpMeta464 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta462), 2));
if (listEmpty(tmpMeta463)) goto goto_2;
tmpMeta465 = MMC_CAR(tmpMeta463);
tmpMeta466 = MMC_CDR(tmpMeta463);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta465,3,1) == 0) goto goto_2;
tmpMeta467 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta465), 2));
if (!listEmpty(tmpMeta466)) goto goto_2;
_class_ = tmpMeta461;
_cr = tmpMeta464;
_cmt = tmpMeta467;
_outResult = omc_Interactive_setComponentComment(threadData, _class_, _cr, _cmt, _p ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 60: {
modelica_metatype tmpMeta468;
modelica_metatype tmpMeta469;
modelica_metatype tmpMeta470;
modelica_metatype tmpMeta471;
modelica_metatype tmpMeta472;
modelica_metatype tmpMeta473;
modelica_metatype tmpMeta474;
modelica_metatype tmpMeta475;
modelica_metatype tmpMeta476;
modelica_metatype tmpMeta477;
modelica_metatype tmpMeta478;
modelica_metatype tmpMeta479;
modelica_metatype tmpMeta480;
modelica_metatype tmpMeta481;
modelica_metatype tmpMeta482;
modelica_metatype tmpMeta483;
modelica_metatype tmpMeta484;
modelica_metatype tmpMeta485;
modelica_metatype tmpMeta486;
modelica_metatype tmpMeta487;
modelica_metatype tmpMeta488;
modelica_metatype tmpMeta489;
modelica_integer tmp490;
modelica_metatype tmpMeta491;
modelica_metatype tmpMeta492;
modelica_metatype tmpMeta493;
modelica_integer tmp494;
modelica_metatype tmpMeta495;
modelica_metatype tmpMeta496;
modelica_metatype tmpMeta497;
modelica_metatype tmpMeta498;
modelica_metatype tmpMeta499;
modelica_metatype tmpMeta500;
modelica_metatype tmpMeta501;
modelica_metatype tmpMeta502;
modelica_metatype tmpMeta503;
modelica_metatype tmpMeta504;
modelica_integer tmp505;
modelica_metatype tmpMeta506;
modelica_metatype tmpMeta507;
modelica_metatype tmpMeta508;
modelica_integer tmp509;
modelica_metatype tmpMeta510;
modelica_metatype tmpMeta511;
modelica_metatype tmpMeta512;
modelica_integer tmp513;
modelica_metatype tmpMeta514;
modelica_metatype tmpMeta515;
modelica_metatype tmpMeta516;
modelica_integer tmp517;
modelica_metatype tmpMeta518;
modelica_metatype tmpMeta519;
modelica_metatype tmpMeta520;
modelica_integer tmp521;
modelica_metatype tmpMeta522;
modelica_metatype tmpMeta523;
modelica_metatype tmpMeta524;
modelica_metatype tmpMeta525;
modelica_integer tmp526;
modelica_metatype tmpMeta527;
modelica_metatype tmpMeta528;
modelica_metatype tmpMeta529;
modelica_integer tmp530;
modelica_metatype tmpMeta531;
modelica_metatype tmpMeta532;
modelica_metatype tmpMeta533;
modelica_integer tmp534;
modelica_metatype tmpMeta535;
modelica_metatype tmpMeta536;
modelica_metatype tmpMeta537;
modelica_integer tmp538;
modelica_metatype tmpMeta539;
if (22 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT454), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta468 = _args;
if (listEmpty(tmpMeta468)) goto goto_2;
tmpMeta469 = MMC_CAR(tmpMeta468);
tmpMeta470 = MMC_CDR(tmpMeta468);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta469,2,1) == 0) goto goto_2;
tmpMeta471 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta469), 2));
if (listEmpty(tmpMeta470)) goto goto_2;
tmpMeta472 = MMC_CAR(tmpMeta470);
tmpMeta473 = MMC_CDR(tmpMeta470);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta472,2,1) == 0) goto goto_2;
tmpMeta474 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta472), 2));
if (listEmpty(tmpMeta473)) goto goto_2;
tmpMeta475 = MMC_CAR(tmpMeta473);
tmpMeta476 = MMC_CDR(tmpMeta473);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta475,13,1) == 0) goto goto_2;
tmpMeta477 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta475), 2));
if (listEmpty(tmpMeta476)) goto goto_2;
tmpMeta478 = MMC_CAR(tmpMeta476);
tmpMeta479 = MMC_CDR(tmpMeta476);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta478,13,1) == 0) goto goto_2;
tmpMeta480 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta478), 2));
if (listEmpty(tmpMeta480)) goto goto_2;
tmpMeta481 = MMC_CAR(tmpMeta480);
tmpMeta482 = MMC_CDR(tmpMeta480);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta481,3,1) == 0) goto goto_2;
tmpMeta483 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta481), 2));
if (!listEmpty(tmpMeta482)) goto goto_2;
if (listEmpty(tmpMeta479)) goto goto_2;
tmpMeta484 = MMC_CAR(tmpMeta479);
tmpMeta485 = MMC_CDR(tmpMeta479);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta484,13,1) == 0) goto goto_2;
tmpMeta486 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta484), 2));
if (listEmpty(tmpMeta486)) goto goto_2;
tmpMeta487 = MMC_CAR(tmpMeta486);
tmpMeta488 = MMC_CDR(tmpMeta486);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta487,4,1) == 0) goto goto_2;
tmpMeta489 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta487), 2));
tmp490 = mmc_unbox_integer(tmpMeta489);
if (listEmpty(tmpMeta488)) goto goto_2;
tmpMeta491 = MMC_CAR(tmpMeta488);
tmpMeta492 = MMC_CDR(tmpMeta488);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta491,4,1) == 0) goto goto_2;
tmpMeta493 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta491), 2));
tmp494 = mmc_unbox_integer(tmpMeta493);
if (!listEmpty(tmpMeta492)) goto goto_2;
if (listEmpty(tmpMeta485)) goto goto_2;
tmpMeta495 = MMC_CAR(tmpMeta485);
tmpMeta496 = MMC_CDR(tmpMeta485);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta495,13,1) == 0) goto goto_2;
tmpMeta497 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta495), 2));
if (listEmpty(tmpMeta497)) goto goto_2;
tmpMeta498 = MMC_CAR(tmpMeta497);
tmpMeta499 = MMC_CDR(tmpMeta497);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta498,3,1) == 0) goto goto_2;
tmpMeta500 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta498), 2));
if (!listEmpty(tmpMeta499)) goto goto_2;
if (!listEmpty(tmpMeta496)) goto goto_2;
_class_ = tmpMeta471;
_cr = tmpMeta474;
_expl = tmpMeta477;
_variability = tmpMeta483;
_dref1 = tmp490;
_dref2 = tmp494;
_causality = tmpMeta500;
if((listLength(_expl) == ((modelica_integer) 5)))
{
tmpMeta501 = _expl;
if (listEmpty(tmpMeta501)) goto goto_2;
tmpMeta502 = MMC_CAR(tmpMeta501);
tmpMeta503 = MMC_CDR(tmpMeta501);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta502,4,1) == 0) goto goto_2;
tmpMeta504 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta502), 2));
tmp505 = mmc_unbox_integer(tmpMeta504);
if (listEmpty(tmpMeta503)) goto goto_2;
tmpMeta506 = MMC_CAR(tmpMeta503);
tmpMeta507 = MMC_CDR(tmpMeta503);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta506,4,1) == 0) goto goto_2;
tmpMeta508 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta506), 2));
tmp509 = mmc_unbox_integer(tmpMeta508);
if (listEmpty(tmpMeta507)) goto goto_2;
tmpMeta510 = MMC_CAR(tmpMeta507);
tmpMeta511 = MMC_CDR(tmpMeta507);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta510,4,1) == 0) goto goto_2;
tmpMeta512 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta510), 2));
tmp513 = mmc_unbox_integer(tmpMeta512);
if (listEmpty(tmpMeta511)) goto goto_2;
tmpMeta514 = MMC_CAR(tmpMeta511);
tmpMeta515 = MMC_CDR(tmpMeta511);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta514,4,1) == 0) goto goto_2;
tmpMeta516 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta514), 2));
tmp517 = mmc_unbox_integer(tmpMeta516);
if (listEmpty(tmpMeta515)) goto goto_2;
tmpMeta518 = MMC_CAR(tmpMeta515);
tmpMeta519 = MMC_CDR(tmpMeta515);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta518,4,1) == 0) goto goto_2;
tmpMeta520 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta518), 2));
tmp521 = mmc_unbox_integer(tmpMeta520);
if (!listEmpty(tmpMeta519)) goto goto_2;
_finalPrefix = tmp505;
_flowPrefix = tmp509;
_streamPrefix = tmp513;
_protected_ = tmp517;
_repl = tmp521;
}
else
{
tmpMeta522 = _expl;
if (listEmpty(tmpMeta522)) goto goto_2;
tmpMeta523 = MMC_CAR(tmpMeta522);
tmpMeta524 = MMC_CDR(tmpMeta522);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta523,4,1) == 0) goto goto_2;
tmpMeta525 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta523), 2));
tmp526 = mmc_unbox_integer(tmpMeta525);
if (listEmpty(tmpMeta524)) goto goto_2;
tmpMeta527 = MMC_CAR(tmpMeta524);
tmpMeta528 = MMC_CDR(tmpMeta524);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta527,4,1) == 0) goto goto_2;
tmpMeta529 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta527), 2));
tmp530 = mmc_unbox_integer(tmpMeta529);
if (listEmpty(tmpMeta528)) goto goto_2;
tmpMeta531 = MMC_CAR(tmpMeta528);
tmpMeta532 = MMC_CDR(tmpMeta528);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta531,4,1) == 0) goto goto_2;
tmpMeta533 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta531), 2));
tmp534 = mmc_unbox_integer(tmpMeta533);
if (listEmpty(tmpMeta532)) goto goto_2;
tmpMeta535 = MMC_CAR(tmpMeta532);
tmpMeta536 = MMC_CDR(tmpMeta532);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta535,4,1) == 0) goto goto_2;
tmpMeta537 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta535), 2));
tmp538 = mmc_unbox_integer(tmpMeta537);
if (!listEmpty(tmpMeta536)) goto goto_2;
_finalPrefix = tmp526;
_flowPrefix = tmp530;
_protected_ = tmp534;
_repl = tmp538;
_streamPrefix = 0;
}
tmpMeta539 = mmc_mk_cons(mmc_mk_boolean(_dref1), mmc_mk_cons(mmc_mk_boolean(_dref2), MMC_REFSTRUCTLIT(mmc_nil)));
_outResult = omc_Interactive_setComponentProperties(threadData, omc_AbsynUtil_crefToPath(threadData, _class_), _cr, _finalPrefix, _flowPrefix, _streamPrefix, _protected_, _repl, _variability, tmpMeta539, _causality, _p ,&_p);
omc_SymbolTable_setAbsyn(threadData, _p);
tmp1 = _outResult;
goto tmp3_done;
}
case 61: {
modelica_metatype tmpMeta540;
modelica_metatype tmpMeta541;
modelica_metatype tmpMeta542;
modelica_metatype tmpMeta543;
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT455), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta540 = _args;
if (listEmpty(tmpMeta540)) goto goto_2;
tmpMeta541 = MMC_CAR(tmpMeta540);
tmpMeta542 = MMC_CDR(tmpMeta540);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta541,2,1) == 0) goto goto_2;
tmpMeta543 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta541), 2));
if (!listEmpty(tmpMeta542)) goto goto_2;
_cr = tmpMeta543;
tmp1 = omc_Interactive_getElementsInfo(threadData, _cr, _p);
goto tmp3_done;
}
case 62: {
modelica_metatype tmpMeta544;
modelica_metatype tmpMeta545;
modelica_metatype tmpMeta546;
modelica_metatype tmpMeta547;
if (20 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT456), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta544 = _args;
if (listEmpty(tmpMeta544)) goto goto_2;
tmpMeta545 = MMC_CAR(tmpMeta544);
tmpMeta546 = MMC_CDR(tmpMeta544);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta545,2,1) == 0) goto goto_2;
tmpMeta547 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta545), 2));
if (!listEmpty(tmpMeta546)) goto goto_2;
_cr = tmpMeta547;
omc_Interactive_getElementsOfVisType(threadData, omc_AbsynUtil_crefToPath(threadData, _cr), _p ,&_outResult);
tmp1 = _outResult;
goto tmp3_done;
}
case 63: {
modelica_metatype tmpMeta548;
modelica_metatype tmpMeta549;
modelica_metatype tmpMeta550;
modelica_metatype tmpMeta551;
modelica_integer tmp552;
if (14 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT457), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta548 = _args;
if (listEmpty(tmpMeta548)) goto goto_2;
tmpMeta549 = MMC_CAR(tmpMeta548);
tmpMeta550 = MMC_CDR(tmpMeta548);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta549,4,1) == 0) goto goto_2;
tmpMeta551 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta549), 2));
tmp552 = mmc_unbox_integer(tmpMeta551);
if (!listEmpty(tmpMeta550)) goto goto_2;
_addFunctions = tmp552;
tmp1 = omc_Interactive_getDefinitions(threadData, _p, _addFunctions);
goto tmp3_done;
}
case 64: {
modelica_metatype tmpMeta553;
modelica_metatype tmpMeta554;
modelica_metatype tmpMeta555;
modelica_metatype tmpMeta556;
modelica_metatype tmpMeta557;
modelica_metatype tmpMeta558;
if (17 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT458), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta553 = _args;
if (listEmpty(tmpMeta553)) goto goto_2;
tmpMeta554 = MMC_CAR(tmpMeta553);
tmpMeta555 = MMC_CDR(tmpMeta553);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta554,2,1) == 0) goto goto_2;
tmpMeta556 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta554), 2));
if (!listEmpty(tmpMeta555)) goto goto_2;
_cr = tmpMeta556;
_nargs = omc_Interactive_getApiFunctionNamedArgs(threadData, _inStatement);
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cls = omc_InteractiveUtil_getPathedClassInProgram(threadData, _path, _p, 0, 0);
_env = omc_SymbolTable_buildEnv(threadData);
if(omc_Flags_isSet(threadData, _OMC_LIT132))
{
tmpMeta557 = mmc_mk_box5(5, &Interactive_GraphicEnvCache_GRAPHIC__ENV__FULL__CACHE__desc, _p, _path, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData));
_genv = tmpMeta557;
}
else
{
tmpMeta558 = mmc_mk_box5(5, &Interactive_GraphicEnvCache_GRAPHIC__ENV__FULL__CACHE__desc, _p, _path, omc_FCore_emptyCache(threadData), _env);
_genv = tmpMeta558;
}
tmp1 = omc_InteractiveUtil_getLocalVariables(threadData, _cls, omc_Interactive_useQuotes(threadData, _nargs), _genv);
goto tmp3_done;
}
case 65: {
modelica_boolean tmp559 = 0;
modelica_metatype tmpMeta568;
if (14 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT459), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
{
modelica_metatype tmp562_1;
tmp562_1 = _args;
{
volatile mmc_switch_type tmp562;
int tmp563;
tmp562 = 0;
for (; tmp562 < 2; tmp562++) {
switch (MMC_SWITCH_CAST(tmp562)) {
case 0: {
modelica_metatype tmpMeta564;
modelica_metatype tmpMeta565;
modelica_metatype tmpMeta566;
modelica_integer tmp567;
if (listEmpty(tmp562_1)) goto tmp561_end;
tmpMeta564 = MMC_CAR(tmp562_1);
tmpMeta565 = MMC_CDR(tmp562_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta564,4,1) == 0) goto tmp561_end;
tmpMeta566 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta564), 2));
tmp567 = mmc_unbox_integer(tmpMeta566);
if (!listEmpty(tmpMeta565)) goto tmp561_end;
_warningsAsErrors = tmp567;
tmp559 = _warningsAsErrors;
goto tmp561_done;
}
case 1: {
tmp559 = 0;
goto tmp561_done;
}
}
goto tmp561_end;
tmp561_end: ;
}
goto goto_560;
goto_560:;
goto goto_2;
goto tmp561_done;
tmp561_done:;
}
}
_warningsAsErrors = tmp559;
_outResult = omc_Error_printMessagesStr(threadData, _warningsAsErrors);
_outResult = omc_System_escapedString(threadData, _outResult, 0);
tmpMeta568 = mmc_mk_cons(_OMC_LIT94, mmc_mk_cons(_outResult, mmc_mk_cons(_OMC_LIT94, MMC_REFSTRUCTLIT(mmc_nil))));
tmp1 = stringAppendList(tmpMeta568);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outResult = tmp1;
_return: OMC_LABEL_UNUSED
return _outResult;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateGraphicalApi(threadData_t *threadData, modelica_metatype _inStatement, modelica_boolean _isPartialInst, modelica_boolean _flagGen, modelica_boolean _flagEvalFunc, modelica_boolean _flagKeepArrays)
{
modelica_string _outResult = NULL;
modelica_string _fn_name = NULL;
modelica_metatype _info = NULL;
modelica_boolean _failed;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_failed = 0;
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
_outResult = omc_Interactive_evaluateGraphicalApi__dispatch(threadData, _inStatement);
goto tmp2_done;
}
case 1: {
_failed = 1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
omc_System_setPartialInstantiation(threadData, _isPartialInst);
omc_FlagsUtil_set(threadData, _OMC_LIT463, _flagGen);
omc_FlagsUtil_set(threadData, _OMC_LIT467, _flagEvalFunc);
omc_FlagsUtil_setConfigBool(threadData, _OMC_LIT474, _flagKeepArrays);
if(_failed)
{
MMC_THROW_INTERNAL();
}
_return: OMC_LABEL_UNUSED
return _outResult;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_evaluateGraphicalApi(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _isPartialInst, modelica_metatype _flagGen, modelica_metatype _flagEvalFunc, modelica_metatype _flagKeepArrays)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_string _outResult = NULL;
tmp1 = mmc_unbox_integer(_isPartialInst);
tmp2 = mmc_unbox_integer(_flagGen);
tmp3 = mmc_unbox_integer(_flagEvalFunc);
tmp4 = mmc_unbox_integer(_flagKeepArrays);
_outResult = omc_Interactive_evaluateGraphicalApi(threadData, _inStatement, tmp1, tmp2, tmp3, tmp4);
return _outResult;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getApiFunctionNamedArgs(threadData_t *threadData, modelica_metatype _inStmt)
{
modelica_metatype _outArgs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inStmt;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,1,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,11,3) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 3));
_outArgs = tmpMeta4;
_return: OMC_LABEL_UNUSED
return _outArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_getApiFunctionArgs(threadData_t *threadData, modelica_metatype _inStmt)
{
modelica_metatype _outArgs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inStmt;
{
modelica_metatype _args = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,11,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_args = tmpMeta8;
{
modelica_metatype __omcQ_24tmpVar31;
modelica_metatype* tmp10;
modelica_metatype tmpMeta11;
modelica_metatype __omcQ_24tmpVar30;
modelica_integer tmp12;
modelica_metatype _arg_loopVar = 0;
modelica_metatype _arg;
_arg_loopVar = _args;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar31 = tmpMeta11;
tmp10 = &__omcQ_24tmpVar31;
while(1) {
tmp12 = 1;
if (!listEmpty(_arg_loopVar)) {
_arg = MMC_CAR(_arg_loopVar);
_arg_loopVar = MMC_CDR(_arg_loopVar);
tmp12--;
}
if (tmp12 == 0) {
__omcQ_24tmpVar30 = omc_AbsynUtil_stripCommentExpressions(threadData, _arg);
*tmp10 = mmc_mk_cons(__omcQ_24tmpVar30,0);
tmp10 = &MMC_CDR(*tmp10);
} else if (tmp12 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp10 = mmc_mk_nil();
tmpMeta9 = __omcQ_24tmpVar31;
}
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outArgs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outArgs;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_getApiFunctionNameInfo(threadData_t *threadData, modelica_metatype _inStmt, modelica_metatype *out_outInfo)
{
modelica_string _outName = NULL;
modelica_metatype _outInfo = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inStmt;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,1,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,11,3) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,2) == 0) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_outName = tmpMeta4;
_outInfo = tmpMeta5;
_return: OMC_LABEL_UNUSED
if (out_outInfo) { *out_outInfo = _outInfo; }
return _outName;
}
DLLExport
modelica_metatype omc_Interactive_getTypeOfVariable(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inVariableLst)
{
modelica_metatype _outType = NULL;
modelica_string _id = NULL;
modelica_metatype _tp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype _var;
for (tmpMeta1 = _inVariableLst; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_var = MMC_CAR(tmpMeta1);
tmpMeta2 = _var;
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 4));
_id = tmpMeta3;
_tp = tmpMeta4;
if((stringEqual(_inIdent, _id)))
{
_outType = _tp;
goto _return;
}
}
}
MMC_THROW_INTERNAL();
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeTupleCref(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo)
{
modelica_metatype _outCref = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCref;
{
modelica_string _id = NULL;
modelica_metatype _asubs = NULL;
modelica_metatype _dsubs = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_id = tmpMeta7;
_asubs = tmpMeta8;
omc_Static_elabSubscripts(threadData, _inCache, _inEnv, _asubs, 1, _OMC_LIT63, _inInfo ,&_dsubs ,NULL);
tmpMeta9 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _id, _inType, _dsubs);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
_str = omc_Dump_printExpStr(threadData, _inCref);
tmpMeta10 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addMessage(threadData, _OMC_LIT477, tmpMeta10);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCref = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_makeTupleCrefs(threadData_t *threadData, modelica_metatype _inCrefs, modelica_metatype _inTypes, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo)
{
modelica_metatype _outCrefs = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCrefs = omc_List_threadMap3(threadData, _inCrefs, _inTypes, boxvar_Interactive_makeTupleCref, _inEnv, _inCache, _inInfo);
_return: OMC_LABEL_UNUSED
return _outCrefs;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateExprToStr(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _info)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _value = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
_exp = tmp4_1;
_value = omc_Interactive_evaluateExpr(threadData, _exp, _info);
tmp1 = omc_ValuesUtil_valString(threadData, _value);
goto tmp3_done;
}
case 1: {
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_stringRepresOfExpr(threadData_t *threadData, modelica_metatype _exp)
{
modelica_string _estr = NULL;
modelica_metatype _env = NULL;
modelica_metatype _sexp = NULL;
modelica_metatype _prop = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_env = omc_SymbolTable_buildEnv(threadData);
omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _exp, 1, 1, _OMC_LIT63, _OMC_LIT120 ,&_sexp ,&_prop);
omc_Ceval_cevalIfConstant(threadData, omc_FCore_emptyCache(threadData), _env, _sexp, _prop, 1, _OMC_LIT120 ,&_sexp ,&_prop);
_estr = omc_ExpressionDump_printExpStr(threadData, _sexp);
_return: OMC_LABEL_UNUSED
return _estr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Interactive_evaluateExpr(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _info)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _env = NULL;
modelica_metatype _sexp = NULL;
modelica_metatype _value = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta6;
tmpMeta1 = omc_Interactive_getVariableValueLst(threadData, omc_AbsynUtil_pathToStringList(threadData, omc_AbsynUtil_crefToPath(threadData, _cr)), omc_SymbolTable_getVars(threadData));
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
_exp = tmp4_1;
_env = omc_SymbolTable_buildEnv(threadData);
_cache = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _exp, 1, 1, _OMC_LIT63, _info ,&_sexp ,NULL);
tmpMeta7 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _sexp, 1, tmpMeta7, ((modelica_integer) 0) ,&_value);
tmpMeta1 = _value;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outValue = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateAlgStmtLst(threadData_t *threadData, modelica_metatype _inAbsynAlgorithmItemLst)
{
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype _algitem;
for (tmpMeta1 = _inAbsynAlgorithmItemLst; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_algitem = MMC_CAR(tmpMeta1);
omc_Interactive_evaluateAlgStmt(threadData, _algitem);
}
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateIfStatementLst(threadData_t *threadData, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inTplAbsynExpAbsynAlgorithmItemLstLst;
{
modelica_metatype _value = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _algitemlst = NULL;
modelica_metatype _algrest = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
_exp = tmpMeta7;
_algitemlst = tmpMeta8;
_algrest = tmpMeta6;
_value = omc_Interactive_evaluateExpr(threadData, _exp, _info);
omc_Interactive_evaluatePartOfIfStatement(threadData, _value, _exp, _algitemlst, _algrest, _info);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluatePartOfIfStatement(threadData_t *threadData, modelica_metatype _inValue, modelica_metatype _inExp, modelica_metatype _inAbsynAlgorithmItemLst, modelica_metatype _inTplAbsynExpAbsynAlgorithmItemLstLst, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_metatype tmp3_2;volatile modelica_metatype tmp3_3;volatile modelica_metatype tmp3_4;
tmp3_1 = _inValue;
tmp3_2 = _inExp;
tmp3_3 = _inAbsynAlgorithmItemLst;
tmp3_4 = _inTplAbsynExpAbsynAlgorithmItemLstLst;
{
modelica_metatype _algitemlst = NULL;
modelica_metatype _algrest = NULL;
modelica_string _estr = NULL;
modelica_string _tstr = NULL;
modelica_metatype _vtype = NULL;
modelica_metatype _value = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmp6 = mmc_unbox_integer(tmpMeta5);
if (1 != tmp6) goto tmp2_end;
_algitemlst = tmp3_3;
tmp3 += 1;
omc_Interactive_evaluateAlgStmtLst(threadData, _algitemlst);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_integer tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (0 != tmp8) goto tmp2_end;
_algrest = tmp3_4;
omc_Interactive_evaluateIfStatementLst(threadData, _algrest, _info);
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta9;
_value = tmp3_1;
_exp = tmp3_2;
_estr = omc_Interactive_stringRepresOfExpr(threadData, _exp);
_vtype = omc_Types_typeOfValue(threadData, _value);
_tstr = omc_Types_unparseTypeNoAttr(threadData, _vtype);
tmpMeta9 = mmc_mk_cons(_estr, mmc_mk_cons(_tstr, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT480, tmpMeta9, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateWhileStmt(threadData_t *threadData, modelica_metatype _inValue, modelica_metatype _inExp, modelica_metatype _inAbsynAlgorithmItemLst, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_metatype tmp3_2;volatile modelica_metatype tmp3_3;
tmp3_1 = _inValue;
tmp3_2 = _inExp;
tmp3_3 = _inAbsynAlgorithmItemLst;
{
modelica_metatype _value = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _algitemlst = NULL;
modelica_string _estr = NULL;
modelica_string _tstr = NULL;
modelica_metatype _vtype = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 4; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmp6 = mmc_unbox_integer(tmpMeta5);
if (0 != tmp6) goto tmp2_end;
tmp3 += 1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_integer tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (1 != tmp8) goto tmp2_end;
_exp = tmp3_2;
_algitemlst = tmp3_3;
omc_Interactive_evaluateAlgStmtLst(threadData, _algitemlst);
_value = omc_Interactive_evaluateExpr(threadData, _exp, _info);
omc_Interactive_evaluateWhileStmt(threadData, _value, _exp, _algitemlst, _info);
goto tmp2_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
goto tmp2_done;
}
case 3: {
modelica_metatype tmpMeta9;
_value = tmp3_1;
_exp = tmp3_2;
_estr = omc_Interactive_stringRepresOfExpr(threadData, _exp);
_vtype = omc_Types_typeOfValue(threadData, _value);
_tstr = omc_Types_unparseTypeNoAttr(threadData, _vtype);
tmpMeta9 = mmc_mk_cons(_estr, mmc_mk_cons(_tstr, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT483, tmpMeta9, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 4) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateForStmtRangeOpt(threadData_t *threadData, modelica_string _iter, modelica_metatype _startVal, modelica_metatype _stepVal, modelica_metatype _stopVal, modelica_metatype _algItems)
{
modelica_metatype _val = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_val = _startVal;
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
while(1)
{
if(!omc_ValuesUtil_safeLessEq(threadData, _val, _stopVal)) break;
omc_SymbolTable_appendVar(threadData, _iter, _val, omc_Types_typeOfValue(threadData, _val));
omc_Interactive_evaluateAlgStmtLst(threadData, _algItems);
omc_SymbolTable_deleteVarFirstEntry(threadData, _iter);
_val = omc_ValuesUtil_safeIntRealOp(threadData, _val, _stepVal, _OMC_LIT484);
}
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_evaluateForStmt(threadData_t *threadData, modelica_string _iter, modelica_metatype _valList, modelica_metatype _algItemList)
{
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype _val;
for (tmpMeta1 = _valList; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_val = MMC_CAR(tmpMeta1);
omc_SymbolTable_appendVar(threadData, _iter, _val, omc_Types_typeOfValue(threadData, _val));
omc_Interactive_evaluateAlgStmtLst(threadData, _algItemList);
omc_SymbolTable_deleteVarFirstEntry(threadData, _iter);
}
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_evaluateAlgStmt(threadData_t *threadData, modelica_metatype _inAlgorithmItem)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inAlgorithmItem;
{
modelica_metatype _env = NULL;
modelica_metatype _econd = NULL;
modelica_metatype _msg_1 = NULL;
modelica_metatype _sexp = NULL;
modelica_metatype _srexp = NULL;
modelica_metatype _rprop = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _msg = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _rexp = NULL;
modelica_string _str = NULL;
modelica_string _ident = NULL;
modelica_metatype _t = NULL;
modelica_metatype _value = NULL;
modelica_metatype _types = NULL;
modelica_metatype _values = NULL;
modelica_metatype _valList = NULL;
modelica_metatype _crefexps = NULL;
modelica_metatype _cond1 = NULL;
modelica_metatype _cond2 = NULL;
modelica_metatype _cond3 = NULL;
modelica_metatype _elseifexpitemlist = NULL;
modelica_metatype _algitemlist = NULL;
modelica_metatype _elseitemlist = NULL;
modelica_string _iter = NULL;
modelica_string _estr = NULL;
modelica_metatype _algItemList = NULL;
modelica_metatype _startv = NULL;
modelica_metatype _stepv = NULL;
modelica_metatype _stopv = NULL;
modelica_metatype _starte = NULL;
modelica_metatype _stepe = NULL;
modelica_metatype _stope = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _info = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _asubs = NULL;
modelica_metatype _dsubs = NULL;
modelica_metatype _crefs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 13; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_integer tmp18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (6 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT490), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (!listEmpty(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cond = tmpMeta11;
_info = tmpMeta15;
_env = omc_SymbolTable_buildEnv(threadData);
_cache = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _cond, 1, 1, _OMC_LIT63, _info ,&_econd ,NULL);
tmpMeta19 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _econd, 1, tmpMeta19, ((modelica_integer) 0), &tmpMeta16);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,3,1) == 0) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmp18 = mmc_unbox_integer(tmpMeta17);
if (1 != tmp18) goto goto_2;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,6,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,2,2) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (6 != MMC_STRLEN(tmpMeta22) || strcmp(MMC_STRINGDATA(_OMC_LIT490), MMC_STRINGDATA(tmpMeta22)) != 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,2) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
if (listEmpty(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmpMeta24);
tmpMeta26 = MMC_CDR(tmpMeta24);
if (listEmpty(tmpMeta26)) goto tmp3_end;
tmpMeta27 = MMC_CAR(tmpMeta26);
tmpMeta28 = MMC_CDR(tmpMeta26);
if (!listEmpty(tmpMeta28)) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_msg = tmpMeta27;
_info = tmpMeta29;
_env = omc_SymbolTable_buildEnv(threadData);
_cache = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _msg, 1, 1, _OMC_LIT63, _info ,&_msg_1 ,NULL);
tmpMeta32 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _msg_1, 1, tmpMeta32, ((modelica_integer) 0), &tmpMeta30);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,2,1) == 0) goto goto_2;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
_str = tmpMeta31;
tmp1 = _str;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,6,2) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 3));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cr = tmpMeta34;
_fargs = tmpMeta35;
_info = tmpMeta36;
tmp4 += 10;
_env = omc_SymbolTable_buildEnv(threadData);
tmpMeta37 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta38 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, _cr, _fargs, tmpMeta37);
_exp = tmpMeta38;
_cache = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _exp, 1, 1, _OMC_LIT63, _info ,&_sexp ,NULL);
tmpMeta39 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _sexp, 1, tmpMeta39, ((modelica_integer) 0), NULL);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,0,2) == 0) goto tmp3_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta41,2,1) == 0) goto tmp3_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta42,2,2) == 0) goto tmp3_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 2));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 3));
if (!listEmpty(tmpMeta44)) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,2,1) == 0) goto tmp3_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 2));
_ident = tmpMeta43;
_cr = tmpMeta46;
_value = omc_Interactive_getVariableValueLst(threadData, omc_AbsynUtil_pathToStringList(threadData, omc_AbsynUtil_crefToPath(threadData, _cr)), omc_SymbolTable_getVars(threadData));
_str = omc_ValuesUtil_valString(threadData, _value);
_t = omc_Types_typeOfValue(threadData, _value);
tmpMeta47 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta48 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _ident, _t, tmpMeta47);
omc_SymbolTable_addVar(threadData, tmpMeta48, _value, omc_FGraph_empty(threadData));
tmp1 = _str;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,0,2) == 0) goto tmp3_end;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta50,2,1) == 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,2,2) == 0) goto tmp3_end;
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 2));
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 3));
tmpMeta54 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 3));
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_ident = tmpMeta52;
_asubs = tmpMeta53;
_exp = tmpMeta54;
_info = tmpMeta55;
tmp4 += 8;
_env = omc_SymbolTable_buildEnv(threadData);
tmpMeta58 = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _exp, 1, 1, _OMC_LIT63, _info, &tmpMeta56, &tmpMeta57);
_cache = tmpMeta58;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,0,2) == 0) goto goto_2;
_sexp = tmpMeta56;
tmpMeta59 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _sexp, 1, tmpMeta59, ((modelica_integer) 0) ,&_value);
omc_Static_elabSubscripts(threadData, _cache, _env, _asubs, 1, _OMC_LIT63, _info ,&_dsubs ,NULL);
_t = omc_Types_typeOfValue(threadData, _value);
_str = omc_ValuesUtil_valString(threadData, _value);
tmpMeta60 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _ident, _t, _dsubs);
omc_SymbolTable_addVar(threadData, tmpMeta60, _value, _env);
tmp1 = _str;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta61,0,2) == 0) goto tmp3_end;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta62,16,1) == 0) goto tmp3_end;
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 2));
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 3));
tmpMeta65 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_crefexps = tmpMeta63;
_rexp = tmpMeta64;
_info = tmpMeta65;
tmp4 += 7;
_env = omc_SymbolTable_buildEnv(threadData);
_cache = omc_StaticScript_elabExp(threadData, omc_FCore_emptyCache(threadData), _env, _rexp, 1, 1, _OMC_LIT63, _info ,&_srexp ,&_rprop);
tmpMeta66 = omc_Types_getPropType(threadData, _rprop);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta66,14,2) == 0) goto goto_2;
tmpMeta67 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta66), 2));
_types = tmpMeta67;
_crefs = omc_Interactive_makeTupleCrefs(threadData, _crefexps, _types, _env, _cache, _info);
tmpMeta70 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
omc_CevalScript_ceval(threadData, _cache, _env, _srexp, 1, tmpMeta70, ((modelica_integer) 0), &tmpMeta68);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta68,8,1) == 0) goto goto_2;
tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta68), 2));
_values = tmpMeta69;
omc_SymbolTable_addVars(threadData, _crefs, _values, _env);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta71,1,4) == 0) goto tmp3_end;
tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 2));
tmpMeta73 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 3));
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 4));
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 5));
tmpMeta76 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta72;
_algitemlist = tmpMeta73;
_elseifexpitemlist = tmpMeta74;
_elseitemlist = tmpMeta75;
_info = tmpMeta76;
tmp4 += 6;
tmpMeta77 = mmc_mk_box2(0, _exp, _algitemlist);
_cond1 = tmpMeta77;
tmpMeta78 = mmc_mk_cons(_cond1, _elseifexpitemlist);
_cond2 = tmpMeta78;
tmpMeta80 = mmc_mk_box2(0, _OMC_LIT485, _elseitemlist);
tmpMeta79 = mmc_mk_cons(tmpMeta80, MMC_REFSTRUCTLIT(mmc_nil));
_cond3 = listAppend(_cond2, tmpMeta79);
omc_Interactive_evaluateIfStatementLst(threadData, _cond3, _info);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta81,4,2) == 0) goto tmp3_end;
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta81), 2));
tmpMeta83 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta81), 3));
tmpMeta84 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta82;
_algitemlist = tmpMeta83;
_info = tmpMeta84;
tmp4 += 5;
_value = omc_Interactive_evaluateExpr(threadData, _exp, _info);
omc_Interactive_evaluateWhileStmt(threadData, _value, _exp, _algitemlist, _info);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_metatype tmpMeta95;
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta85 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta85,2,2) == 0) goto tmp3_end;
tmpMeta86 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 2));
if (listEmpty(tmpMeta86)) goto tmp3_end;
tmpMeta87 = MMC_CAR(tmpMeta86);
tmpMeta88 = MMC_CDR(tmpMeta86);
tmpMeta89 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta87), 2));
tmpMeta90 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta87), 3));
if (!optionNone(tmpMeta90)) goto tmp3_end;
tmpMeta91 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta87), 4));
if (optionNone(tmpMeta91)) goto tmp3_end;
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta91), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta92,15,3) == 0) goto tmp3_end;
tmpMeta93 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta92), 2));
tmpMeta94 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta92), 3));
if (!optionNone(tmpMeta94)) goto tmp3_end;
tmpMeta95 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta92), 4));
if (!listEmpty(tmpMeta88)) goto tmp3_end;
tmpMeta96 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 3));
tmpMeta97 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_iter = tmpMeta89;
_starte = tmpMeta93;
_stope = tmpMeta95;
_algItemList = tmpMeta96;
_info = tmpMeta97;
tmp4 += 1;
_startv = omc_Interactive_evaluateExpr(threadData, _starte, _info);
_stopv = omc_Interactive_evaluateExpr(threadData, _stope, _info);
omc_Interactive_evaluateForStmtRangeOpt(threadData, _iter, _startv, _OMC_LIT486, _stopv, _algItemList);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta98;
modelica_metatype tmpMeta99;
modelica_metatype tmpMeta100;
modelica_metatype tmpMeta101;
modelica_metatype tmpMeta102;
modelica_metatype tmpMeta103;
modelica_metatype tmpMeta104;
modelica_metatype tmpMeta105;
modelica_metatype tmpMeta106;
modelica_metatype tmpMeta107;
modelica_metatype tmpMeta108;
modelica_metatype tmpMeta109;
modelica_metatype tmpMeta110;
modelica_metatype tmpMeta111;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta98 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta98,2,2) == 0) goto tmp3_end;
tmpMeta99 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta98), 2));
if (listEmpty(tmpMeta99)) goto tmp3_end;
tmpMeta100 = MMC_CAR(tmpMeta99);
tmpMeta101 = MMC_CDR(tmpMeta99);
tmpMeta102 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 2));
tmpMeta103 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 3));
if (!optionNone(tmpMeta103)) goto tmp3_end;
tmpMeta104 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 4));
if (optionNone(tmpMeta104)) goto tmp3_end;
tmpMeta105 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta104), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta105,15,3) == 0) goto tmp3_end;
tmpMeta106 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta105), 2));
tmpMeta107 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta105), 3));
if (optionNone(tmpMeta107)) goto tmp3_end;
tmpMeta108 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta107), 1));
tmpMeta109 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta105), 4));
if (!listEmpty(tmpMeta101)) goto tmp3_end;
tmpMeta110 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta98), 3));
tmpMeta111 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_iter = tmpMeta102;
_starte = tmpMeta106;
_stepe = tmpMeta108;
_stope = tmpMeta109;
_algItemList = tmpMeta110;
_info = tmpMeta111;
_startv = omc_Interactive_evaluateExpr(threadData, _starte, _info);
_stepv = omc_Interactive_evaluateExpr(threadData, _stepe, _info);
_stopv = omc_Interactive_evaluateExpr(threadData, _stope, _info);
omc_Interactive_evaluateForStmtRangeOpt(threadData, _iter, _startv, _stepv, _stopv, _algItemList);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta112;
modelica_metatype tmpMeta113;
modelica_metatype tmpMeta114;
modelica_metatype tmpMeta115;
modelica_metatype tmpMeta116;
modelica_metatype tmpMeta117;
modelica_metatype tmpMeta118;
modelica_metatype tmpMeta119;
modelica_metatype tmpMeta120;
modelica_metatype tmpMeta121;
modelica_metatype tmpMeta122;
modelica_metatype tmpMeta123;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta112 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta112,2,2) == 0) goto tmp3_end;
tmpMeta113 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta112), 2));
if (listEmpty(tmpMeta113)) goto tmp3_end;
tmpMeta114 = MMC_CAR(tmpMeta113);
tmpMeta115 = MMC_CDR(tmpMeta113);
tmpMeta116 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta114), 2));
tmpMeta117 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta114), 3));
if (!optionNone(tmpMeta117)) goto tmp3_end;
tmpMeta118 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta114), 4));
if (optionNone(tmpMeta118)) goto tmp3_end;
tmpMeta119 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta118), 1));
if (!listEmpty(tmpMeta115)) goto tmp3_end;
tmpMeta120 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta112), 3));
tmpMeta121 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_iter = tmpMeta116;
_exp = tmpMeta119;
_algItemList = tmpMeta120;
_info = tmpMeta121;
tmpMeta122 = omc_Interactive_evaluateExpr(threadData, _exp, _info);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta122,5,2) == 0) goto goto_2;
tmpMeta123 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta122), 2));
_valList = tmpMeta123;
omc_Interactive_evaluateForStmt(threadData, _iter, _valList, _algItemList);
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta124;
modelica_metatype tmpMeta125;
modelica_metatype tmpMeta126;
modelica_metatype tmpMeta127;
modelica_metatype tmpMeta128;
modelica_metatype tmpMeta129;
modelica_metatype tmpMeta130;
modelica_metatype tmpMeta131;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta124 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta124,2,2) == 0) goto tmp3_end;
tmpMeta125 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta124), 2));
if (listEmpty(tmpMeta125)) goto tmp3_end;
tmpMeta126 = MMC_CAR(tmpMeta125);
tmpMeta127 = MMC_CDR(tmpMeta125);
tmpMeta128 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta126), 4));
if (optionNone(tmpMeta128)) goto tmp3_end;
tmpMeta129 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta128), 1));
if (!listEmpty(tmpMeta127)) goto tmp3_end;
tmpMeta130 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta129;
_info = tmpMeta130;
tmp4 += 1;
_estr = omc_Interactive_stringRepresOfExpr(threadData, _exp);
tmpMeta131 = mmc_mk_cons(_estr, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT489, tmpMeta131, _info);
goto goto_2;
goto tmp3_done;
}
case 12: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 13) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
DLLExport
modelica_string omc_Interactive_evaluate2(threadData_t *threadData, modelica_metatype _inStatements)
{
modelica_string _outString = NULL;
modelica_metatype _stmt = NULL;
modelica_string _str = NULL;
modelica_string _str_1 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inStatements;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
if (!listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
_stmt = tmpMeta3;
{
{
modelica_string tmp8 = 0;
modelica_metatype tmpMeta20;
MMC_TRY_STACK()
{
volatile modelica_metatype tmp11_1;
tmp11_1 = _stmt;
{
modelica_metatype _algitem = NULL;
modelica_metatype _exp = NULL;
modelica_boolean _partialInst;
modelica_boolean _gen;
modelica_boolean _evalfunc;
modelica_boolean _keepArrays;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp10_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp11 < 3; tmp11++) {
switch (MMC_SWITCH_CAST(tmp11)) {
case 0: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,2) == 0) goto tmp10_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,11,3) == 0) goto tmp10_end;
tmp11 += 1;
_partialInst = omc_System_getPartialInstantiation(threadData);
omc_System_setPartialInstantiation(threadData, 1);
_gen = omc_FlagsUtil_set(threadData, _OMC_LIT463, 0);
_evalfunc = omc_FlagsUtil_set(threadData, _OMC_LIT467, 0);
_keepArrays = omc_Flags_getConfigBool(threadData, _OMC_LIT474);
omc_FlagsUtil_setConfigBool(threadData, _OMC_LIT474, 0);
omc_InstHashTable_init(threadData);
_str = omc_Interactive_evaluateGraphicalApi(threadData, _stmt, _partialInst, _gen, _evalfunc, _keepArrays);
tmpMeta14 = stringAppend(_str,_OMC_LIT72);
tmp8 = tmpMeta14;
goto tmp10_done;
}
case 1: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,0,1) == 0) goto tmp10_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,3) == 0) goto tmp10_end;
_algitem = tmpMeta15;
tmp11 += 1;
omc_InstHashTable_init(threadData);
_str = omc_Interactive_evaluateAlgStmt(threadData, _algitem);
tmpMeta16 = stringAppend(_str,_OMC_LIT72);
tmp8 = tmpMeta16;
goto tmp10_done;
}
case 2: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,2) == 0) goto tmp10_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 3));
_exp = tmpMeta17;
_info = tmpMeta18;
omc_InstHashTable_init(threadData);
_str = omc_Interactive_evaluateExprToStr(threadData, _exp, _info);
tmpMeta19 = stringAppend(_str,_OMC_LIT72);
tmp8 = tmpMeta19;
goto tmp10_done;
}
}
goto tmp10_end;
tmp10_end: ;
}
goto goto_9;
tmp10_done:
(void)tmp11;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp10_done2;
goto_9:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp11 < 3) {
goto tmp10_top;
}
MMC_THROW_INTERNAL();
tmp10_done2:;
}
}
_outString = tmp8;
MMC_ELSE_STACK()
_str = _OMC_LIT55;
_str_1 = _OMC_LIT55;
omc_GCExt_gcollect(threadData);
_str = omc_StackOverflow_getReadableMessage(threadData, _OMC_LIT72);
if(omc_Testsuite_isRunning(threadData))
{
omc_Error_clearCurrentComponent(threadData);
}
tmpMeta20 = mmc_mk_cons(omc_GlobalScriptDump_printIstmtStr(threadData, _stmt), mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addMessage(threadData, _OMC_LIT493, tmpMeta20);
omc_Error_clearCurrentComponent(threadData);
_outString = _OMC_LIT72;
MMC_CATCH_STACK()
}
}
;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Interactive_getEcho(threadData_t *threadData)
{
modelica_boolean _outBoolean;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outBoolean = (((modelica_integer) 0) != omc_Settings_getEcho(threadData));
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_getEcho(threadData_t *threadData)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_Interactive_getEcho(threadData);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Interactive_selectResultstr(threadData_t *threadData, modelica_string _inString, modelica_boolean _inSemicolon, modelica_boolean _inVerbose, modelica_boolean _inEcho)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_boolean tmp4_2;modelica_boolean tmp4_3;modelica_boolean tmp4_4;
tmp4_1 = _inString;
tmp4_2 = _inSemicolon;
tmp4_3 = _inVerbose;
tmp4_4 = _inEcho;
{
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != tmp4_4) goto tmp3_end;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 1: {
if (1 != tmp4_3) goto tmp3_end;
_str = tmp4_1;
tmp1 = _str;
goto tmp3_done;
}
case 2: {
if (1 != tmp4_2) goto tmp3_end;
tmp1 = _OMC_LIT55;
goto tmp3_done;
}
case 3: {
if (0 != tmp4_2) goto tmp3_end;
_str = tmp4_1;
tmp1 = _str;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Interactive_selectResultstr(threadData_t *threadData, modelica_metatype _inString, modelica_metatype _inSemicolon, modelica_metatype _inVerbose, modelica_metatype _inEcho)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inSemicolon);
tmp2 = mmc_unbox_integer(_inVerbose);
tmp3 = mmc_unbox_integer(_inEcho);
_outString = omc_Interactive_selectResultstr(threadData, _inString, tmp1, tmp2, tmp3);
return _outString;
}
PROTECTED_FUNCTION_STATIC void omc_Interactive_showStatement(threadData_t *threadData, modelica_metatype _s, modelica_boolean _semicolon, modelica_boolean _start)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_boolean _testsuite;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if((!omc_Flags_isSet(threadData, _OMC_LIT497)))
{
goto _return;
}
_testsuite = omc_Testsuite_isRunning(threadData);
{
volatile modelica_boolean tmp3_1;volatile modelica_boolean tmp3_2;
tmp3_1 = _start;
tmp3_2 = _testsuite;
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 5; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (1 != tmp3_1) goto tmp2_end;
if (1 != tmp3_2) goto tmp2_end;
tmp3 += 3;
tmpMeta5 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta5, mmc_mk_boolean(_semicolon));
tmpMeta7 = stringAppend(_OMC_LIT498,omc_Interactive_printIstmtStr(threadData, tmpMeta6));
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT72);
fputs(MMC_STRINGDATA(tmpMeta8),stdout);
omc_System_fflush(threadData);
goto tmp2_done;
}
case 1: {
if (0 != tmp3_1) goto tmp2_end;
if (1 != tmp3_2) goto tmp2_end;
tmp3 += 2;
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (1 != tmp3_1) goto tmp2_end;
if (0 != tmp3_2) goto tmp2_end;
tmp3 += 1;
omc_System_realtimeTick(threadData, ((modelica_integer) 25));
tmpMeta9 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta9, mmc_mk_boolean(_semicolon));
tmpMeta11 = stringAppend(_OMC_LIT499,omc_Interactive_printIstmtStr(threadData, tmpMeta10));
tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT72);
fputs(MMC_STRINGDATA(tmpMeta12),stdout);
omc_System_fflush(threadData);
goto tmp2_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (0 != tmp3_1) goto tmp2_end;
if (0 != tmp3_2) goto tmp2_end;
tmpMeta13 = stringAppend(_OMC_LIT500,realString(omc_System_realtimeTock(threadData, ((modelica_integer) 25))));
tmpMeta14 = stringAppend(tmpMeta13,_OMC_LIT501);
tmpMeta15 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta16 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta15, mmc_mk_boolean(_semicolon));
tmpMeta17 = stringAppend(tmpMeta14,omc_Interactive_printIstmtStr(threadData, tmpMeta16));
tmpMeta18 = stringAppend(tmpMeta17,_OMC_LIT72);
fputs(MMC_STRINGDATA(tmpMeta18),stdout);
omc_System_fflush(threadData);
goto tmp2_done;
}
case 4: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 5) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
threadData->mmc_jumper = old_mmc_jumper;
return;
}
PROTECTED_FUNCTION_STATIC void boxptr_Interactive_showStatement(threadData_t *threadData, modelica_metatype _s, modelica_metatype _semicolon, modelica_metatype _start)
{
modelica_integer tmp1;
modelica_integer tmp2;
tmp1 = mmc_unbox_integer(_semicolon);
tmp2 = mmc_unbox_integer(_start);
omc_Interactive_showStatement(threadData, _s, tmp1, tmp2);
return;
}
DLLExport
modelica_boolean omc_Interactive_evaluateFork(threadData_t *threadData, modelica_metatype _inTpl)
{
modelica_boolean _b;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inTpl;
{
modelica_string _mosfile = NULL;
modelica_metatype _statements = NULL;
modelica_metatype _st = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_mosfile = tmpMeta6;
_st = tmpMeta7;
omc_SymbolTable_reset(threadData);
omc_SymbolTable_setAbsyn(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_st), 2))));
omc_SymbolTable_setSCode(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_st), 3))));
setGlobalRoot(((modelica_integer) 0), mmc_mk_none());
_statements = omc_Parser_parseexp(threadData, _mosfile);
omc_Interactive_evaluateToStdOut(threadData, _statements, 1);
fputs(MMC_STRINGDATA(omc_Error_printMessagesStr(threadData, 0)),stdout);
tmp1 = 1;
goto tmp3_done;
}
case 1: {
fputs(MMC_STRINGDATA(omc_Error_printMessagesStr(threadData, 0)),stdout);
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_b = tmp1;
_return: OMC_LABEL_UNUSED
return _b;
}
modelica_metatype boxptr_Interactive_evaluateFork(threadData_t *threadData, modelica_metatype _inTpl)
{
modelica_boolean _b;
modelica_metatype out_b;
_b = omc_Interactive_evaluateFork(threadData, _inTpl);
out_b = mmc_mk_icon(_b);
return out_b;
}
DLLExport
void omc_Interactive_evaluateToStdOut(threadData_t *threadData, modelica_metatype _statements, modelica_boolean _verbose)
{
modelica_metatype _x = NULL;
modelica_metatype _xs = NULL;
modelica_boolean _semicolon;
modelica_string _res = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_xs = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_statements), 2)));
_semicolon = mmc_unbox_boolean((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_statements), 3))));
while(1)
{
if(!(!listEmpty(_xs))) break;
tmpMeta1 = _xs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_x = tmpMeta2;
_xs = tmpMeta3;
omc_Interactive_showStatement(threadData, _x, _semicolon, 1);
tmpMeta4 = mmc_mk_cons(_x, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta4, mmc_mk_boolean((listEmpty(_xs)?_verbose:_semicolon)));
_res = omc_Interactive_evaluate2(threadData, tmpMeta5);
fputs(MMC_STRINGDATA(omc_Interactive_selectResultstr(threadData, _res, _semicolon, _verbose, omc_Interactive_getEcho(threadData))),stdout);
omc_Interactive_showStatement(threadData, _x, _semicolon, 0);
}
_return: OMC_LABEL_UNUSED
return;
}
void boxptr_Interactive_evaluateToStdOut(threadData_t *threadData, modelica_metatype _statements, modelica_metatype _verbose)
{
modelica_integer tmp1;
tmp1 = mmc_unbox_integer(_verbose);
omc_Interactive_evaluateToStdOut(threadData, _statements, tmp1);
return;
}
DLLExport
modelica_string omc_Interactive_evaluate(threadData_t *threadData, modelica_metatype _inStatements, modelica_boolean _inBoolean)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_boolean tmp4_2;
tmp4_1 = _inStatements;
tmp4_2 = _inBoolean;
{
modelica_string _res = NULL;
modelica_string _res_1 = NULL;
modelica_string _res2 = NULL;
modelica_boolean _echo;
modelica_boolean _semicolon;
modelica_boolean _verbose;
modelica_metatype _x = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (!listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp10 = mmc_unbox_integer(tmpMeta9);
_x = tmpMeta7;
_semicolon = tmp10;
_verbose = tmp4_2;
omc_Interactive_showStatement(threadData, _x, _semicolon, 1);
tmpMeta11 = mmc_mk_cons(_x, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta12 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta11, mmc_mk_boolean(_verbose));
_res = omc_Interactive_evaluate2(threadData, tmpMeta12);
_echo = omc_Interactive_getEcho(threadData);
_res_1 = omc_Interactive_selectResultstr(threadData, _res, _semicolon, _verbose, _echo);
omc_Interactive_showStatement(threadData, _x, _semicolon, 0);
tmp1 = _res_1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp17 = mmc_unbox_integer(tmpMeta16);
_x = tmpMeta14;
_xs = tmpMeta15;
_semicolon = tmp17;
_verbose = tmp4_2;
omc_Interactive_showStatement(threadData, _x, _semicolon, 1);
tmpMeta18 = mmc_mk_cons(_x, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, tmpMeta18, mmc_mk_boolean(_semicolon));
_res = omc_Interactive_evaluate2(threadData, tmpMeta19);
_echo = omc_Interactive_getEcho(threadData);
_res_1 = omc_Interactive_selectResultstr(threadData, _res, _semicolon, _verbose, _echo);
omc_Interactive_showStatement(threadData, _x, _semicolon, 0);
tmpMeta20 = mmc_mk_box3(3, &GlobalScript_Statements_ISTMTS__desc, _xs, mmc_mk_boolean(_semicolon));
_res2 = omc_Interactive_evaluate(threadData, tmpMeta20, _verbose);
tmpMeta21 = stringAppend(_res_1,_res2);
tmp1 = tmpMeta21;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
modelica_metatype boxptr_Interactive_evaluate(threadData_t *threadData, modelica_metatype _inStatements, modelica_metatype _inBoolean)
{
modelica_integer tmp1;
modelica_string _outString = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outString = omc_Interactive_evaluate(threadData, _inStatements, tmp1);
return _outString;
}
