Bug Summary

File:OMCompiler/Compiler/boot/build/Causalize.c
Warning:line 495, column 3
Value stored to '_syst' is never read

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1#ifdef OMC_BASE_FILE
2 #define OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c" OMC_BASE_FILE
3#else
4 #define OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c" "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
5#endif
6#include "omc_simulation_settings.h"
7#include "Causalize.h"
8static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT0,1,6)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT0
= { (((1) << 10) + (((6) & 255) << 2)),
{&ErrorTypes_MessageType_SYMBOLIC__desc,}};
9#define _OMC_LIT0((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT0)((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3))
10static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT1,1,4)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT1
= { (((1) << 10) + (((4) & 255) << 2)),
{&ErrorTypes_Severity_ERROR__desc,}};
11#define _OMC_LIT1((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT1)((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3))
12#define _OMC_LIT2_data"Initialization problem is structurally singular, error found sorting equations \n %s for variables \n %s" "Initialization problem is structurally singular, error found sorting equations \n %s for variables \n %s"
13static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,102,_OMC_LIT2_data)struct { mmc_uint_t header; const char data[(102)+1]; } _OMC_LIT_STRUCT2
= { ((((mmc_uint_t)102)<<(3))+((1<<(3+3))+5)), "Initialization problem is structurally singular, error found sorting equations \n %s for variables \n %s"
}
;
14#define _OMC_LIT2((void*)((char*)(&(_OMC_LIT_STRUCT2).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)((void*)((char*)(&(_OMC_LIT_STRUCT2).header) + 3))
15static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,2,3)struct { mmc_uint_t header; const void *data[2]; } _OMC_LIT_STRUCT3
= { (((2) << 10) + (((3) & 255) << 2)),
{&Gettext_TranslatableContent_gettext__desc,_OMC_LIT2((void*)((char*)(&(_OMC_LIT_STRUCT2).header) + 3))}};
16#define _OMC_LIT3((void*)((char*)(&(_OMC_LIT_STRUCT3).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)((void*)((char*)(&(_OMC_LIT_STRUCT3).header) + 3))
17static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,5,3)struct { mmc_uint_t header; const void *data[5]; } _OMC_LIT_STRUCT4
= { (((5) << 10) + (((3) & 255) << 2)),
{&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(254))((void*)(((((mmc_uint_t) (254)) << 1)+0))),_OMC_LIT0((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3)),_OMC_LIT1((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3)),_OMC_LIT3((void*)((char*)(&(_OMC_LIT_STRUCT3).header) + 3))}};
18#define _OMC_LIT4((void*)((char*)(&(_OMC_LIT_STRUCT4).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)((void*)((char*)(&(_OMC_LIT_STRUCT4).header) + 3))
19#define _OMC_LIT5_data"Model is structurally singular, error found sorting equations\n%s\nfor variables\n%s" "Model is structurally singular, error found sorting equations\n%s\nfor variables\n%s"
20static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,81,_OMC_LIT5_data)struct { mmc_uint_t header; const char data[(81)+1]; } _OMC_LIT_STRUCT5
= { ((((mmc_uint_t)81)<<(3))+((1<<(3+3))+5)), "Model is structurally singular, error found sorting equations\n%s\nfor variables\n%s"
}
;
21#define _OMC_LIT5((void*)((char*)(&(_OMC_LIT_STRUCT5).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)((void*)((char*)(&(_OMC_LIT_STRUCT5).header) + 3))
22static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,2,3)struct { mmc_uint_t header; const void *data[2]; } _OMC_LIT_STRUCT6
= { (((2) << 10) + (((3) & 255) << 2)),
{&Gettext_TranslatableContent_gettext__desc,_OMC_LIT5((void*)((char*)(&(_OMC_LIT_STRUCT5).header) + 3))}};
23#define _OMC_LIT6((void*)((char*)(&(_OMC_LIT_STRUCT6).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)((void*)((char*)(&(_OMC_LIT_STRUCT6).header) + 3))
24static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT7,5,3)struct { mmc_uint_t header; const void *data[5]; } _OMC_LIT_STRUCT7
= { (((5) << 10) + (((3) & 255) << 2)),
{&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(34))((void*)(((((mmc_uint_t) (34)) << 1)+0))),_OMC_LIT0((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3)),_OMC_LIT1((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3)),_OMC_LIT6((void*)((char*)(&(_OMC_LIT_STRUCT6).header) + 3))}};
25#define _OMC_LIT7((void*)((char*)(&(_OMC_LIT_STRUCT7).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT7)((void*)((char*)(&(_OMC_LIT_STRUCT7).header) + 3))
26static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT8,1,3)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT8
= { (((1) << 10) + (((3) & 255) << 2)),
{&BackendDAE_IndexType_ABSOLUTE__desc,}};
27#define _OMC_LIT8((void*)((char*)(&(_OMC_LIT_STRUCT8).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT8)((void*)((char*)(&(_OMC_LIT_STRUCT8).header) + 3))
28static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,1,3)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT9
= { (((1) << 10) + (((3) & 255) << 2)),
{&BackendDAE_Matching_NO__MATCHING__desc,}};
29#define _OMC_LIT9((void*)((char*)(&(_OMC_LIT_STRUCT9).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)((void*)((char*)(&(_OMC_LIT_STRUCT9).header) + 3))
30static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT10,1,3)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT10
= { (((1) << 10) + (((3) & 255) << 2)),
{&BackendDAE_IndexReduction_INDEX__REDUCTION__desc,}};
31#define _OMC_LIT10((void*)((char*)(&(_OMC_LIT_STRUCT10).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT10)((void*)((char*)(&(_OMC_LIT_STRUCT10).header) + 3))
32static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,1,3)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT11
= { (((1) << 10) + (((3) & 255) << 2)),
{&BackendDAE_EquationConstraints_ALLOW__UNDERCONSTRAINED__desc,}};
33#define _OMC_LIT11((void*)((char*)(&(_OMC_LIT_STRUCT11).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)((void*)((char*)(&(_OMC_LIT_STRUCT11).header) + 3))
34static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,1,4)struct { mmc_uint_t header; const void *data[1]; } _OMC_LIT_STRUCT12
= { (((1) << 10) + (((4) & 255) << 2)),
{&BackendDAE_EquationConstraints_EXACT__desc,}};
35#define _OMC_LIT12((void*)((char*)(&(_OMC_LIT_STRUCT12).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT12)((void*)((char*)(&(_OMC_LIT_STRUCT12).header) + 3))
36#define _OMC_LIT13_data"Too few equations, under-determined system. The model has %s equation(s) and %s variable(s)." "Too few equations, under-determined system. The model has %s equation(s) and %s variable(s)."
37static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT13,92,_OMC_LIT13_data)struct { mmc_uint_t header; const char data[(92)+1]; } _OMC_LIT_STRUCT13
= { ((((mmc_uint_t)92)<<(3))+((1<<(3+3))+5)), "Too few equations, under-determined system. The model has %s equation(s) and %s variable(s)."
}
;
38#define _OMC_LIT13((void*)((char*)(&(_OMC_LIT_STRUCT13).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT13)((void*)((char*)(&(_OMC_LIT_STRUCT13).header) + 3))
39static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT14,2,3)struct { mmc_uint_t header; const void *data[2]; } _OMC_LIT_STRUCT14
= { (((2) << 10) + (((3) & 255) << 2)),
{&Gettext_TranslatableContent_gettext__desc,_OMC_LIT13((void*)((char*)(&(_OMC_LIT_STRUCT13).header) + 3))}};
40#define _OMC_LIT14((void*)((char*)(&(_OMC_LIT_STRUCT14).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT14)((void*)((char*)(&(_OMC_LIT_STRUCT14).header) + 3))
41static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT15,5,3)struct { mmc_uint_t header; const void *data[5]; } _OMC_LIT_STRUCT15
= { (((5) << 10) + (((3) & 255) << 2)),
{&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(32))((void*)(((((mmc_uint_t) (32)) << 1)+0))),_OMC_LIT0((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3)),_OMC_LIT1((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3)),_OMC_LIT14((void*)((char*)(&(_OMC_LIT_STRUCT14).header) + 3))}};
42#define _OMC_LIT15((void*)((char*)(&(_OMC_LIT_STRUCT15).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT15)((void*)((char*)(&(_OMC_LIT_STRUCT15).header) + 3))
43#define _OMC_LIT16_data"Too many equations, over-determined system. The model has %s equation(s) and %s variable(s)." "Too many equations, over-determined system. The model has %s equation(s) and %s variable(s)."
44static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT16,92,_OMC_LIT16_data)struct { mmc_uint_t header; const char data[(92)+1]; } _OMC_LIT_STRUCT16
= { ((((mmc_uint_t)92)<<(3))+((1<<(3+3))+5)), "Too many equations, over-determined system. The model has %s equation(s) and %s variable(s)."
}
;
45#define _OMC_LIT16((void*)((char*)(&(_OMC_LIT_STRUCT16).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT16)((void*)((char*)(&(_OMC_LIT_STRUCT16).header) + 3))
46static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT17,2,3)struct { mmc_uint_t header; const void *data[2]; } _OMC_LIT_STRUCT17
= { (((2) << 10) + (((3) & 255) << 2)),
{&Gettext_TranslatableContent_gettext__desc,_OMC_LIT16((void*)((char*)(&(_OMC_LIT_STRUCT16).header) + 3))}};
47#define _OMC_LIT17((void*)((char*)(&(_OMC_LIT_STRUCT17).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT17)((void*)((char*)(&(_OMC_LIT_STRUCT17).header) + 3))
48static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT18,5,3)struct { mmc_uint_t header; const void *data[5]; } _OMC_LIT_STRUCT18
= { (((5) << 10) + (((3) & 255) << 2)),
{&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(33))((void*)(((((mmc_uint_t) (33)) << 1)+0))),_OMC_LIT0((void*)((char*)(&(_OMC_LIT_STRUCT0).header) + 3)),_OMC_LIT1((void*)((char*)(&(_OMC_LIT_STRUCT1).header) + 3)),_OMC_LIT17((void*)((char*)(&(_OMC_LIT_STRUCT17).header) + 3))}};
49#define _OMC_LIT18((void*)((char*)(&(_OMC_LIT_STRUCT18).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT18)((void*)((char*)(&(_OMC_LIT_STRUCT18).header) + 3))
50#define _OMC_LIT19_data"failtrace" "failtrace"
51static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT19,9,_OMC_LIT19_data)struct { mmc_uint_t header; const char data[(9)+1]; } _OMC_LIT_STRUCT19
= { ((((mmc_uint_t)9)<<(3))+((1<<(3+3))+5)), "failtrace"
}
;
52#define _OMC_LIT19((void*)((char*)(&(_OMC_LIT_STRUCT19).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT19)((void*)((char*)(&(_OMC_LIT_STRUCT19).header) + 3))
53#define _OMC_LIT20_data"Sets whether to print a failtrace or not." "Sets whether to print a failtrace or not."
54static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT20,41,_OMC_LIT20_data)struct { mmc_uint_t header; const char data[(41)+1]; } _OMC_LIT_STRUCT20
= { ((((mmc_uint_t)41)<<(3))+((1<<(3+3))+5)), "Sets whether to print a failtrace or not."
}
;
55#define _OMC_LIT20((void*)((char*)(&(_OMC_LIT_STRUCT20).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT20)((void*)((char*)(&(_OMC_LIT_STRUCT20).header) + 3))
56static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,2,3)struct { mmc_uint_t header; const void *data[2]; } _OMC_LIT_STRUCT21
= { (((2) << 10) + (((3) & 255) << 2)),
{&Gettext_TranslatableContent_gettext__desc,_OMC_LIT20((void*)((char*)(&(_OMC_LIT_STRUCT20).header) + 3))}};
57#define _OMC_LIT21((void*)((char*)(&(_OMC_LIT_STRUCT21).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)((void*)((char*)(&(_OMC_LIT_STRUCT21).header) + 3))
58static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,5,3)struct { mmc_uint_t header; const void *data[5]; } _OMC_LIT_STRUCT22
= { (((5) << 10) + (((3) & 255) << 2)),
{&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))((void*)(((((mmc_uint_t) (1)) << 1)+0))),_OMC_LIT19((void*)((char*)(&(_OMC_LIT_STRUCT19).header) + 3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))((void*)(((((mmc_uint_t) (0)) << 1)+0))),_OMC_LIT21((void*)((char*)(&(_OMC_LIT_STRUCT21).header) + 3))}};
59#define _OMC_LIT22((void*)((char*)(&(_OMC_LIT_STRUCT22).header) + 3)) MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)((void*)((char*)(&(_OMC_LIT_STRUCT22).header) + 3))
60#define _OMC_LIT23_data"- Causalize.singularSystemCheck failed\n" "- Causalize.singularSystemCheck failed\n"
61static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,39,_OMC_LIT23_data)struct { mmc_uint_t header; const char data[(39)+1]; } _OMC_LIT_STRUCT23
= { ((((mmc_uint_t)39)<<(3))+((1<<(3+3))+5)), "- Causalize.singularSystemCheck failed\n"
}
;
62#define _OMC_LIT23((void*)((char*)(&(_OMC_LIT_STRUCT23).header) + 3)) MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)((void*)((char*)(&(_OMC_LIT_STRUCT23).header) + 3))
63#include "util/modelica.h"
64
65#include "Causalize_includes.h"
66
67
68/* default, do not make protected functions static */
69#if !defined(PROTECTED_FUNCTION_STATIC)
70#define PROTECTED_FUNCTION_STATIC
71#endif
72PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_getAssignedVars(threadData_t *threadData, modelica_integer _e, modelica_metatype _ass, modelica_metatype _iAcc);
73PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_getAssignedVars(threadData_t *threadData, modelica_metatype _e, modelica_metatype _ass, modelica_metatype _iAcc);
74static const MMC_DEFSTRUCTLIT(boxvar_lit_Causalize_getAssignedVars,2,0)struct { mmc_uint_t header; const void *data[2]; } boxvar_lit_Causalize_getAssignedVars
= { (((2) << 10) + (((0) & 255) << 2)),
{(void*) boxptr_Causalize_getAssignedVars,0}};
75#define boxvar_Causalize_getAssignedVars((void*)((char*)(&(boxvar_lit_Causalize_getAssignedVars).
header) + 3))
MMC_REFSTRUCTLIT(boxvar_lit_Causalize_getAssignedVars)((void*)((char*)(&(boxvar_lit_Causalize_getAssignedVars).
header) + 3))
76PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_foundSingularSystem(threadData_t *threadData, modelica_metatype _eqns, modelica_integer _D_24in_actualEqn, modelica_metatype _D_24in_isyst, modelica_metatype _D_24in_ishared, modelica_metatype _D_24in_inAssignments1, modelica_metatype _D_24in_inAssignments2, modelica_metatype _D_24in_inArg, modelica_integer *out_actualEqn, modelica_metatype *out_isyst, modelica_metatype *out_ishared, modelica_metatype *out_inAssignments1, modelica_metatype *out_inAssignments2, modelica_metatype *out_inArg);
77PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_foundSingularSystem(threadData_t *threadData, modelica_metatype _eqns, modelica_metatype _D_24in_actualEqn, modelica_metatype _D_24in_isyst, modelica_metatype _D_24in_ishared, modelica_metatype _D_24in_inAssignments1, modelica_metatype _D_24in_inAssignments2, modelica_metatype _D_24in_inArg, modelica_metatype *out_actualEqn, modelica_metatype *out_isyst, modelica_metatype *out_ishared, modelica_metatype *out_inAssignments1, modelica_metatype *out_inAssignments2, modelica_metatype *out_inArg);
78static const MMC_DEFSTRUCTLIT(boxvar_lit_Causalize_foundSingularSystem,2,0)struct { mmc_uint_t header; const void *data[2]; } boxvar_lit_Causalize_foundSingularSystem
= { (((2) << 10) + (((0) & 255) << 2)),
{(void*) boxptr_Causalize_foundSingularSystem,0}};
79#define boxvar_Causalize_foundSingularSystem((void*)((char*)(&(boxvar_lit_Causalize_foundSingularSystem
).header) + 3))
MMC_REFSTRUCTLIT(boxvar_lit_Causalize_foundSingularSystem)((void*)((char*)(&(boxvar_lit_Causalize_foundSingularSystem
).header) + 3))
80PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_freeStateAssignments(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inTpl, modelica_metatype *out_outTpl);
81static const MMC_DEFSTRUCTLIT(boxvar_lit_Causalize_freeStateAssignments,2,0)struct { mmc_uint_t header; const void *data[2]; } boxvar_lit_Causalize_freeStateAssignments
= { (((2) << 10) + (((0) & 255) << 2)),
{(void*) boxptr_Causalize_freeStateAssignmentsomc_Causalize_freeStateAssignments,0}};
82#define boxvar_Causalize_freeStateAssignments((void*)((char*)(&(boxvar_lit_Causalize_freeStateAssignments
).header) + 3))
MMC_REFSTRUCTLIT(boxvar_lit_Causalize_freeStateAssignments)((void*)((char*)(&(boxvar_lit_Causalize_freeStateAssignments
).header) + 3))
83PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_singularSystemCheck1(threadData_t *threadData, modelica_integer _nVars, modelica_integer _nEqns, modelica_metatype _iSyst, modelica_metatype _eqnConstr, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _iShared);
84PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_singularSystemCheck1(threadData_t *threadData, modelica_metatype _nVars, modelica_metatype _nEqns, modelica_metatype _iSyst, modelica_metatype _eqnConstr, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _iShared);
85static const MMC_DEFSTRUCTLIT(boxvar_lit_Causalize_singularSystemCheck1,2,0)struct { mmc_uint_t header; const void *data[2]; } boxvar_lit_Causalize_singularSystemCheck1
= { (((2) << 10) + (((0) & 255) << 2)),
{(void*) boxptr_Causalize_singularSystemCheck1,0}};
86#define boxvar_Causalize_singularSystemCheck1((void*)((char*)(&(boxvar_lit_Causalize_singularSystemCheck1
).header) + 3))
MMC_REFSTRUCTLIT(boxvar_lit_Causalize_singularSystemCheck1)((void*)((char*)(&(boxvar_lit_Causalize_singularSystemCheck1
).header) + 3))
87
88PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_getAssignedVars(threadData_t *threadData, modelica_integer _e, modelica_metatype _ass, modelica_metatype _iAcc)
89{
90 modelica_metatype _oAcc = NULL((void*)0);
91 modelica_integer _i;
92 modelica_boolean _b;
93 MMC_SO()mmc_check_stackoverflow(threadData);
94 _tailrecursive: OMC_LABEL_UNUSED__attribute__((unused))
95 // _oAcc has no default value.
96 // _i has no default value.
97 // _b has no default value.
98#line 252 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
99 _i = mmc_unbox_integer(arrayGet(_ass,_e) /* DAE.ASUB */)(((mmc_sint_t) (nobox_arrayGet(threadData,_ass,_e))) >>
1)
;
100#line 100 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
101
102#line 253 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
103 _b = (_i > ((modelica_integer) 0));
104#line 104 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
105
106#line 254 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
107 _oAcc = omc_List_consOnTrue(threadData, _b, mmc_mk_integermmc_mk_icon(_i), _iAcc);
108#line 108 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
109 _return: OMC_LABEL_UNUSED__attribute__((unused))
110 return _oAcc;
111}
112PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_getAssignedVars(threadData_t *threadData, modelica_metatype _e, modelica_metatype _ass, modelica_metatype _iAcc)
113{
114 modelica_integer tmp1;
115 modelica_metatype _oAcc = NULL((void*)0);
116 tmp1 = mmc_unbox_integer(_e)(((mmc_sint_t) (_e)) >> 1);
117 _oAcc = omc_Causalize_getAssignedVars(threadData, tmp1, _ass, _iAcc);
118 /* skip box _oAcc; list<#Integer> */
119 return _oAcc;
120}
121
122PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_foundSingularSystem(threadData_t *threadData, modelica_metatype _eqns, modelica_integer _D_24in_actualEqn, modelica_metatype _D_24in_isyst, modelica_metatype _D_24in_ishared, modelica_metatype _D_24in_inAssignments1, modelica_metatype _D_24in_inAssignments2, modelica_metatype _D_24in_inArg, modelica_integer *out_actualEqn, modelica_metatype *out_isyst, modelica_metatype *out_ishared, modelica_metatype *out_inAssignments1, modelica_metatype *out_inAssignments2, modelica_metatype *out_inArg)
123{
124 modelica_metatype _changedEqns = NULL((void*)0);
125 modelica_integer _actualEqn;
126 modelica_metatype _isyst = NULL((void*)0);
127 modelica_metatype _ishared = NULL((void*)0);
128 modelica_metatype _inAssignments1 = NULL((void*)0);
129 modelica_metatype _inAssignments2 = NULL((void*)0);
130 modelica_metatype _inArg = NULL((void*)0);
131 modelica_metatype _mapIncRowEqn = NULL((void*)0);
132 modelica_metatype _syst = NULL((void*)0);
133 modelica_metatype _source = NULL((void*)0);
134 modelica_integer _n;
135 modelica_metatype _unmatched = NULL((void*)0);
136 modelica_metatype _unmatched1 = NULL((void*)0);
137 modelica_metatype _vars = NULL((void*)0);
138 modelica_metatype _info = NULL((void*)0);
139 modelica_string _eqn_str = NULL((void*)0);
140 modelica_string _var_str = NULL((void*)0);
141 modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
142 MMC_SO()mmc_check_stackoverflow(threadData);
143 _tailrecursive: OMC_LABEL_UNUSED__attribute__((unused))
144 tmpMeta[0] = MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3));
145 _changedEqns = tmpMeta[0];
146 _actualEqn = _D_24in_actualEqn;
147 _isyst = _D_24in_isyst;
148 _ishared = _D_24in_ishared;
149 _inAssignments1 = _D_24in_inAssignments1;
150 _inAssignments2 = _D_24in_inAssignments2;
151 _inArg = _D_24in_inArg;
152 // _mapIncRowEqn has no default value.
153 // _syst has no default value.
154 // _source has no default value.
155 // _n has no default value.
156 // _unmatched has no default value.
157 // _unmatched1 has no default value.
158 // _vars has no default value.
159 // _info has no default value.
160 // _eqn_str has no default value.
161 // _var_str has no default value.
162#line 216 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
163 if((!listEmpty(_eqns)((*(mmc_uint_t*)((void*)((char*)(_eqns) - 3))) == (((0) <<
10) + (((0) & 255) << 2)))
))
164#line 216 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
165 {
166#line 217 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
167 /* Pattern-matching assignment */
168#line 217 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
169 tmpMeta[1] = _inArg;
170#line 217 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
171 tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 4))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[1]) - 3
))) + (4)))))
;
172#line 217 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
173 _mapIncRowEqn = tmpMeta[2];
174#line 174 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
175
176#line 218 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
177 _n = omc_BackendDAEUtil_systemSize(threadData, _isyst);
178#line 178 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
179
180#line 228 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
181 _unmatched = omc_List_flatten(threadData, _eqns);
182#line 182 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
183
184#line 229 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
185 _unmatched1 = omc_List_map1r(threadData, _unmatched, boxvar_arrayGet((void*)((char*)(&(boxvar_lit_arrayGet).header) + 3)), _mapIncRowEqn);
186#line 186 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
187
188#line 230 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
189 _unmatched1 = omc_List_uniqueIntN(threadData, _unmatched1, arrayLength(_mapIncRowEqn));
190#line 190 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
191
192#line 231 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
193 _eqn_str = omc_BackendDump_dumpMarkedEqns(threadData, _isyst, omc_List_sort(threadData, _unmatched1, boxvar_intGt((void*)((char*)(&(boxvar_lit_intGt).header) + 3))));
194#line 194 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
195
196#line 232 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
197 tmpMeta[1] = MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3));
198#line 232 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
199 _vars = omc_Matching_getUnassigned(threadData, _n, _inAssignments2, tmpMeta[1]);
200#line 200 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
201
202#line 233 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
203 _vars = omc_List_fold1(threadData, _unmatched, boxvar_Causalize_getAssignedVars((void*)((char*)(&(boxvar_lit_Causalize_getAssignedVars).
header) + 3))
, _inAssignments1, _vars);
204#line 204 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
205
206#line 234 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
207 _var_str = omc_BackendDump_dumpMarkedVars(threadData, _isyst, omc_List_sort(threadData, _vars, boxvar_intGt((void*)((char*)(&(boxvar_lit_intGt).header) + 3))));
208#line 208 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
209
210#line 235 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
211 _source = omc_BackendEquation_markedEquationSource(threadData, _isyst, mmc_unbox_integer(listHead(_unmatched1))(((mmc_sint_t) (boxptr_listHead(threadData,_unmatched1))) >>
1)
);
212#line 212 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
213
214#line 236 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
215 _info = omc_ElementSource_getElementSourceFileInfo(threadData, _source);
216#line 216 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
217
218#line 238 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
219 tmpMeta[1] = mmc_mk_cons(_eqn_str, mmc_mk_cons(_var_str, MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3))));
220#line 238 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
221 omc_Error_addSourceMessage(threadData, (omc_BackendDAEUtil_isInitializationDAE(threadData, _ishared)?_OMC_LIT4((void*)((char*)(&(_OMC_LIT_STRUCT4).header) + 3)):_OMC_LIT7((void*)((char*)(&(_OMC_LIT_STRUCT7).header) + 3))), tmpMeta[1], _info);
222#line 222 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
223
224#line 239 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
225 MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
226#line 226 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
227 }
228 _return: OMC_LABEL_UNUSED__attribute__((unused))
229 if (out_actualEqn) { *out_actualEqn = _actualEqn; }
230 if (out_isyst) { *out_isyst = _isyst; }
231 if (out_ishared) { *out_ishared = _ishared; }
232 if (out_inAssignments1) { *out_inAssignments1 = _inAssignments1; }
233 if (out_inAssignments2) { *out_inAssignments2 = _inAssignments2; }
234 if (out_inArg) { *out_inArg = _inArg; }
235 return _changedEqns;
236}
237PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_foundSingularSystem(threadData_t *threadData, modelica_metatype _eqns, modelica_metatype _D_24in_actualEqn, modelica_metatype _D_24in_isyst, modelica_metatype _D_24in_ishared, modelica_metatype _D_24in_inAssignments1, modelica_metatype _D_24in_inAssignments2, modelica_metatype _D_24in_inArg, modelica_metatype *out_actualEqn, modelica_metatype *out_isyst, modelica_metatype *out_ishared, modelica_metatype *out_inAssignments1, modelica_metatype *out_inAssignments2, modelica_metatype *out_inArg)
238{
239 modelica_integer tmp1;
240 modelica_integer _actualEqn;
241 modelica_metatype _changedEqns = NULL((void*)0);
242 modelica_metatype tmpMeta[1] __attribute__((unused)) = {0};
243 tmp1 = mmc_unbox_integer(_D_24in_actualEqn)(((mmc_sint_t) (_D_24in_actualEqn)) >> 1);
244 _changedEqns = omc_Causalize_foundSingularSystem(threadData, _eqns, tmp1, _D_24in_isyst, _D_24in_ishared, _D_24in_inAssignments1, _D_24in_inAssignments2, _D_24in_inArg, &_actualEqn, out_isyst, out_ishared, out_inAssignments1, out_inAssignments2, out_inArg);
245 /* skip box _changedEqns; list<#Integer> */
246 if (out_actualEqn) { *out_actualEqn = mmc_mk_icon(_actualEqn); }
247 /* skip box _isyst; BackendDAE.EqSystem */
248 /* skip box _ishared; BackendDAE.Shared */
249 /* skip box _inAssignments1; array<#Integer> */
250 /* skip box _inAssignments2; array<#Integer> */
251 /* skip box _inArg; tuple<BackendDAE.StateOrder, array<list<BackendDAE.Equation>>, array<list<#Integer>>, array<#Integer>, #Integer> */
252 return _changedEqns;
253}
254
255PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_freeStateAssignments(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inTpl, modelica_metatype *out_outTpl)
256{
257 modelica_metatype _outVar = NULL((void*)0);
258 modelica_metatype _outTpl = NULL((void*)0);
259 modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
260 MMC_SO()mmc_check_stackoverflow(threadData);
261 _tailrecursive: OMC_LABEL_UNUSED__attribute__((unused))
262 // _outVar has no default value.
263 // _outTpl has no default value.
264#line 183 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
265
266#line 183 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
267
268#line 268 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
269 { /* match expression */
270 modelica_metatype tmp4_1;modelica_metatype tmp4_2;
271 tmp4_1 = _inVar;
272 tmp4_2 = _inTpl;
273 {
274 modelica_integer _e;
275 modelica_integer _index;
276 modelica_metatype _ass1 = NULL((void*)0);
277 modelica_metatype _ass2 = NULL((void*)0);
278 modelica_metatype _var = NULL((void*)0);
279 volatile mmc_switch_type tmp4;
280 int tmp5;
281 // _e has no default value.
282 // _index has no default value.
283 // _ass1 has no default value.
284 // _ass2 has no default value.
285 // _var has no default value.
286 tmp4 = 0;
287 for (; tmp4 < 2; tmp4++) {
288 switch (MMC_SWITCH_CAST(tmp4)(tmp4)) {
289 case 0: {
290 modelica_integer tmp6;
291 tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_1) - 3))) +
(3)))))
;
292 if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],1,3)((*(mmc_uint_t*)((void*)((char*)(tmpMeta[2]) - 3)))==(((3 +1)
<< 10) + (((1 +3) & 255) << 2)))
== 0) goto tmp3_end;
293 tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(1)))))
;
294 tmp6 = mmc_unbox_integer(tmpMeta[3])(((mmc_sint_t) (tmpMeta[3])) >> 1);
295 tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(2)))))
;
296 tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(3)))))
;
297 _var = tmp4_1;
298 _index = tmp6 /* pattern as ty=Integer */;
299 _ass1 = tmpMeta[4];
300 _ass2 = tmpMeta[5];
301 /* Pattern matching succeeded */
302#line 190 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
303 _e = mmc_unbox_integer(arrayGet(_ass1,_index) /* DAE.ASUB */)(((mmc_sint_t) (nobox_arrayGet(threadData,_ass1,_index))) >>
1)
;
304#line 304 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
305
306#line 191 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
307 _ass1 = arrayUpdate(_ass1, _index, mmc_mk_integer(((modelica_integer) -1)))boxptr_arrayUpdate(threadData,_ass1,mmc_mk_icon(_index),mmc_mk_icon
(((modelica_integer) -1)))
;
308#line 308 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
309
310#line 192 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
311 _ass2 = arrayUpdate(_ass2, _e, mmc_mk_integer(((modelica_integer) -1)))boxptr_arrayUpdate(threadData,_ass2,mmc_mk_icon(_e),mmc_mk_icon
(((modelica_integer) -1)))
;
312#line 312 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
313#line 193 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
314 tmpMeta[2] = mmc_mk_box3(0, mmc_mk_integermmc_mk_icon(((modelica_integer) 1) + _index), _ass1, _ass2);
315#line 193 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
316 tmpMeta[0+0] = _var;
317#line 193 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
318 tmpMeta[0+1] = tmpMeta[2];
319#line 319 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
320 goto tmp3_done;
321 }
322 case 1: {
323 modelica_integer tmp7;
324 tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(1)))))
;
325 tmp7 = mmc_unbox_integer(tmpMeta[2])(((mmc_sint_t) (tmpMeta[2])) >> 1);
326 tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(2)))))
;
327 tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmp4_2) - 3))) +
(3)))))
;
328 _var = tmp4_1;
329 _index = tmp7 /* pattern as ty=Integer */;
330 _ass1 = tmpMeta[3];
331 _ass2 = tmpMeta[4];
332 /* Pattern matching succeeded */
333#line 194 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
334 tmpMeta[2] = mmc_mk_box3(0, mmc_mk_integermmc_mk_icon(((modelica_integer) 1) + _index), _ass1, _ass2);
335#line 194 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
336 tmpMeta[0+0] = _var;
337#line 194 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
338 tmpMeta[0+1] = tmpMeta[2];
339#line 339 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
340 goto tmp3_done;
341 }
342 }
343 goto tmp3_end;
344 tmp3_end: ;
345 }
346 goto goto_2;
347 goto_2:;
348 MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
349 goto tmp3_done;
350 tmp3_done:;
351 }
352 }
353 _outVar = tmpMeta[0+0];
354 _outTpl = tmpMeta[0+1];
355 _return: OMC_LABEL_UNUSED__attribute__((unused))
356 if (out_outTpl) { *out_outTpl = _outTpl; }
357 return _outVar;
358}
359
360PROTECTED_FUNCTION_STATIC modelica_metatype omc_Causalize_singularSystemCheck1(threadData_t *threadData, modelica_integer _nVars, modelica_integer _nEqns, modelica_metatype _iSyst, modelica_metatype _eqnConstr, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _iShared)
361{
362 modelica_metatype _outSyst = NULL((void*)0);
363 modelica_metatype _m = NULL((void*)0);
364 modelica_metatype _mT = NULL((void*)0);
365 modelica_metatype _comps = NULL((void*)0);
366 modelica_metatype _ass1 = NULL((void*)0);
367 modelica_metatype _ass2 = NULL((void*)0);
368 modelica_fnptr _matchingFunc;
369 modelica_metatype _syst = NULL((void*)0);
370 modelica_metatype _mapEqnIncRow = NULL((void*)0);
371 modelica_metatype _mapIncRowEqn = NULL((void*)0);
372 modelica_metatype _indexType = NULL((void*)0);
373 modelica_boolean _scalar;
374 modelica_boolean _processed;
375 modelica_integer tmp1;
376 modelica_integer tmp2;
377 modelica_metatype tmpMeta[12] __attribute__((unused)) = {0};
378 MMC_SO()mmc_check_stackoverflow(threadData);
379 _tailrecursive: OMC_LABEL_UNUSED__attribute__((unused))
380 _outSyst = _iSyst;
381 // _m has no default value.
382 // _mT has no default value.
383 // _comps has no default value.
384 // _ass1 has no default value.
385 // _ass2 has no default value.
386 // _syst has no default value.
387 // _mapEqnIncRow has no default value.
388 // _mapIncRowEqn has no default value.
389 // _indexType has no default value.
390 // _scalar has no default value.
391 // _processed has no default value.
392#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
393 /* Pattern-matching assignment */
394#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
395 tmpMeta[0] = _iSyst;
396#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
397 tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 4))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[0]) - 3
))) + (4)))))
;
398#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
399 if (optionNone(tmpMeta[1])(0==((((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[1]) - 3)))) &
(7)) == 5)) ? ((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[1])
- 3)))) >> (3+3))) : (((*(mmc_uint_t*)((void*)((char*)
(tmpMeta[1]) - 3)))) >> 10)) ? 1 : 0)
) MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
400#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
401 tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[1]) - 3
))) + (1)))))
;
402#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
403 tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 5))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[0]) - 3
))) + (5)))))
;
404#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
405 if (optionNone(tmpMeta[3])(0==((((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[3]) - 3)))) &
(7)) == 5)) ? ((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[3])
- 3)))) >> (3+3))) : (((*(mmc_uint_t*)((void*)((char*)
(tmpMeta[3]) - 3)))) >> 10)) ? 1 : 0)
) MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
406#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
407 tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[3]) - 3
))) + (1)))))
;
408#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
409 tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 6))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[0]) - 3
))) + (6)))))
;
410#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
411 if (optionNone(tmpMeta[5])(0==((((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[5]) - 3)))) &
(7)) == 5)) ? ((((*(mmc_uint_t*)((void*)((char*)(tmpMeta[5])
- 3)))) >> (3+3))) : (((*(mmc_uint_t*)((void*)((char*)
(tmpMeta[5]) - 3)))) >> 10)) ? 1 : 0)
) MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
412#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
413 tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[5]), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[5]) - 3
))) + (1)))))
;
414#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
415 tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[6]) - 3
))) + (1)))))
;
416#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
417 tmpMeta[8] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[6]) - 3
))) + (2)))))
;
418#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
419 tmpMeta[9] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[6]) - 3
))) + (3)))))
;
420#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
421 tmpMeta[10] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 4))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[6]) - 3
))) + (4)))))
;
422#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
423 tmp1 = mmc_unbox_integer(tmpMeta[10])(((mmc_sint_t) (tmpMeta[10])) >> 1);
424#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
425 tmpMeta[11] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 5))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[6]) - 3
))) + (5)))))
;
426#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
427 tmp2 = mmc_unbox_integer(tmpMeta[11])(((mmc_sint_t) (tmpMeta[11])) >> 1);
428#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
429 _m = tmpMeta[2];
430#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
431 _mT = tmpMeta[4];
432#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
433 _mapEqnIncRow = tmpMeta[7];
434#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
435 _mapIncRowEqn = tmpMeta[8];
436#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
437 _indexType = tmpMeta[9];
438#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
439 _scalar = tmp1 /* pattern as ty=Boolean */;
440#line 154 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
441 _processed = tmp2 /* pattern as ty=Boolean */;
442#line 442 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
443
444#line 155 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
445 /* Pattern-matching assignment */
446#line 155 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
447 tmpMeta[0] = _matchingAlgorithm;
448#line 155 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
449 tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 1))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[0]) - 3
))) + (1)))))
;
450#line 155 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
451 _matchingFunc = tmpMeta[1];
452#line 452 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
453
454#line 157 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
455 _m = omc_AdjacencyMatrix_absAdjacencyMatrix(threadData, _m);
456#line 456 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
457
458#line 158 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
459 _mT = omc_AdjacencyMatrix_absAdjacencyMatrix(threadData, _mT);
460#line 460 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
461
462#line 160 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
463 tmpMeta[0] = mmc_mk_box5(0, _mapEqnIncRow, _mapIncRowEqn, _OMC_LIT8((void*)((char*)(&(_OMC_LIT_STRUCT8).header) + 3)), mmc_mk_boolean(_scalar)((_scalar) != 0 ? (mmc_mk_icon(1)) : (mmc_mk_icon(0))), mmc_mk_boolean(_processed)((_processed) != 0 ? (mmc_mk_icon(1)) : (mmc_mk_icon(0))));
464#line 160 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
465 _syst = omc_BackendDAEUtil_setEqSystMatrices(threadData, _iSyst, mmc_mk_some(_m), mmc_mk_some(_mT), mmc_mk_some(tmpMeta[0]));
466#line 466 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
467
468#line 161 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
469 tmpMeta[0] = MMC_TAGPTR(mmc_alloc_words(11))((void*)((char*)(mmc_alloc_words(11)) + 3));
470#line 161 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
471 memcpy(MMC_UNTAGPTR(tmpMeta[0])((void*)((char*)(tmpMeta[0]) - 3)), MMC_UNTAGPTR(_syst)((void*)((char*)(_syst) - 3)), 11*sizeof(modelica_metatype));
472#line 161 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
473 ((modelica_metatype*)MMC_UNTAGPTR(tmpMeta[0])((void*)((char*)(tmpMeta[0]) - 3)))[7] = _OMC_LIT9((void*)((char*)(&(_OMC_LIT_STRUCT9).header) + 3));
474#line 161 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
475 _syst = tmpMeta[0];
476#line 476 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
477
478#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
479 /* Pattern-matching tuple assignment */
480#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
481 tmpMeta[0] = mmc_mk_box2(0, _OMC_LIT10((void*)((char*)(&(_OMC_LIT_STRUCT10).header) + 3)), _eqnConstr);
482#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
483 tmpMeta[1] = mmc_mk_box2(0, _OMC_LIT10((void*)((char*)(&(_OMC_LIT_STRUCT10).header) + 3)), _eqnConstr);
484#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
485 tmpMeta[2] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_matchingFunc), 2))(*(void**)(((void*)((void**)(((void*)((char*)(_matchingFunc) -
3))) + (2)))))
) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_fnptr, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_matchingFunc), 1))(*(void**)(((void*)((void**)(((void*)((char*)(_matchingFunc) -
3))) + (1)))))
)) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_matchingFunc), 2))(*(void**)(((void*)((void**)(((void*)((char*)(_matchingFunc) -
3))) + (2)))))
), _syst, _iShared, mmc_mk_boolean(1)((1) != 0 ? (mmc_mk_icon(1)) : (mmc_mk_icon(0))), tmpMeta[1], boxvar_Causalize_foundSingularSystem((void*)((char*)(&(boxvar_lit_Causalize_foundSingularSystem
).header) + 3))
, _arg, NULL((void*)0), NULL((void*)0)) : ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_fnptr, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_matchingFunc), 1))(*(void**)(((void*)((void**)(((void*)((char*)(_matchingFunc) -
3))) + (1)))))
)) (threadData, _syst, _iShared, mmc_mk_boolean(1)((1) != 0 ? (mmc_mk_icon(1)) : (mmc_mk_icon(0))), tmpMeta[0], boxvar_Causalize_foundSingularSystem((void*)((char*)(&(boxvar_lit_Causalize_foundSingularSystem
).header) + 3))
, _arg, NULL((void*)0), NULL((void*)0));
486#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
487 tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 7))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[2]) - 3
))) + (7)))))
;
488#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
489 if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],1,3)((*(mmc_uint_t*)((void*)((char*)(tmpMeta[3]) - 3)))==(((3 +1)
<< 10) + (((1 +3) & 255) << 2)))
== 0) MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
490#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
491 tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[3]) - 3
))) + (2)))))
;
492#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
493 tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[3]) - 3
))) + (3)))))
;
494#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
495 _syst = tmpMeta[2];
Value stored to '_syst' is never read
496#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
497 _ass1 = tmpMeta[4];
498#line 163 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
499 _ass2 = tmpMeta[5];
500#line 500 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
501
502#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
503 tmpMeta[1] = MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3));
504#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
505 tmpMeta[2] = mmc_mk_box4(4, &BackendDAE_Matching_MATCHING__desc, _ass1, _ass2, tmpMeta[1]);
506#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
507 tmpMeta[0] = MMC_TAGPTR(mmc_alloc_words(11))((void*)((char*)(mmc_alloc_words(11)) + 3));
508#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
509 memcpy(MMC_UNTAGPTR(tmpMeta[0])((void*)((char*)(tmpMeta[0]) - 3)), MMC_UNTAGPTR(_outSyst)((void*)((char*)(_outSyst) - 3)), 11*sizeof(modelica_metatype));
510#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
511 ((modelica_metatype*)MMC_UNTAGPTR(tmpMeta[0])((void*)((char*)(tmpMeta[0]) - 3)))[7] = tmpMeta[2];
512#line 165 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
513 _outSyst = tmpMeta[0];
514#line 514 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
515
516#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
517 /* Pattern-matching assignment */
518#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
519 tmpMeta[0] = mmc_mk_box3(0, mmc_mk_integermmc_mk_icon(((modelica_integer) 1)), _ass1, _ass2);
520#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
521 tmpMeta[1] = omc_BackendVariable_traverseBackendDAEVars(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_outSyst), 2))(*(void**)(((void*)((void**)(((void*)((char*)(_outSyst) - 3))
) + (2)))))
), boxvar_Causalize_freeStateAssignments((void*)((char*)(&(boxvar_lit_Causalize_freeStateAssignments
).header) + 3))
, tmpMeta[0]);
522#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
523 tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[1]) - 3
))) + (2)))))
;
524#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
525 tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 3))(*(void**)(((void*)((void**)(((void*)((char*)(tmpMeta[1]) - 3
))) + (3)))))
;
526#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
527 _ass1 = tmpMeta[2];
528#line 174 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
529 _ass2 = tmpMeta[3];
530#line 530 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
531 _return: OMC_LABEL_UNUSED__attribute__((unused))
532 return _outSyst;
533}
534PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Causalize_singularSystemCheck1(threadData_t *threadData, modelica_metatype _nVars, modelica_metatype _nEqns, modelica_metatype _iSyst, modelica_metatype _eqnConstr, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _iShared)
535{
536 modelica_integer tmp1;
537 modelica_integer tmp2;
538 modelica_metatype _outSyst = NULL((void*)0);
539 tmp1 = mmc_unbox_integer(_nVars)(((mmc_sint_t) (_nVars)) >> 1);
540 tmp2 = mmc_unbox_integer(_nEqns)(((mmc_sint_t) (_nEqns)) >> 1);
541 _outSyst = omc_Causalize_singularSystemCheck1(threadData, tmp1, tmp2, _iSyst, _eqnConstr, _matchingAlgorithm, _arg, _iShared);
542 /* skip box _outSyst; BackendDAE.EqSystem */
543 return _outSyst;
544}
545
546DLLExport
547modelica_metatype omc_Causalize_singularSystemCheck(threadData_t *threadData, modelica_integer _nvars, modelica_integer _neqns, modelica_metatype _isyst, modelica_metatype _inMatchingOptions, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _ishared)
548{
549 modelica_metatype _outSyst = NULL((void*)0);
550 modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
551 MMC_SO()mmc_check_stackoverflow(threadData);
552 _tailrecursive: OMC_LABEL_UNUSED__attribute__((unused))
553 // _outSyst has no default value.
554#line 554 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
555 { /* matchcontinue expression */
556 volatile modelica_metatype tmp3_1;
557 tmp3_1 = _inMatchingOptions;
558 {
559 modelica_string _esize_str = NULL((void*)0);
560 modelica_string _vsize_str = NULL((void*)0);
561 volatile mmc_switch_type tmp3;
562 int tmp4;
563 // _esize_str has no default value.
564 // _vsize_str has no default value.
565 tmp3 = 0;
566 MMC_TRY_INTERNAL(mmc_jumper){ jmp_buf new_mmc_jumper, *old_jumper __attribute__((unused))
= threadData->mmc_jumper; threadData->mmc_jumper = &
new_mmc_jumper; if (_setjmp (new_mmc_jumper) == 0) {
567 tmp2_top:
568 threadData->mmc_jumper = &new_mmc_jumper;
569 for (; tmp3 < 5; tmp3++) {
570 switch (MMC_SWITCH_CAST(tmp3)(tmp3)) {
571 case 0: {
572 tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmp3_1) - 3))) +
(2)))))
;
573 if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,0)((*(mmc_uint_t*)((void*)((char*)(tmpMeta[1]) - 3)))==(((0 +1)
<< 10) + (((0 +3) & 255) << 2)))
== 0) goto tmp2_end;
574 tmp3 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
575#line 90 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
576 tmpMeta[0] = omc_Causalize_singularSystemCheck1(threadData, _nvars, _neqns, _isyst, _OMC_LIT11((void*)((char*)(&(_OMC_LIT_STRUCT11).header) + 3)), _matchingAlgorithm, _arg, _ishared);
577#line 577 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
578 goto tmp2_done;
579 }
580 case 1: {
581 modelica_boolean tmp5;
582 tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmp3_1) - 3))) +
(2)))))
;
583 if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],1,0)((*(mmc_uint_t*)((void*)((char*)(tmpMeta[1]) - 3)))==(((0 +1)
<< 10) + (((1 +3) & 255) << 2)))
== 0) goto tmp2_end;
584 /* Pattern matching succeeded */
585#line 95 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
586 /* Pattern-matching assignment */
587#line 95 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
588 tmp5 = (_nvars == _neqns);
589#line 95 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
590 if (1 != tmp5) goto goto_1;
591#line 591 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
592#line 96 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
593 tmpMeta[0] = omc_Causalize_singularSystemCheck1(threadData, _nvars, _neqns, _isyst, _OMC_LIT12((void*)((char*)(&(_OMC_LIT_STRUCT12).header) + 3)), _matchingAlgorithm, _arg, _ishared);
594#line 594 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
595 goto tmp2_done;
596 }
597 case 2: {
598 modelica_boolean tmp6;
599 tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2))(*(void**)(((void*)((void**)(((void*)((char*)(tmp3_1) - 3))) +
(2)))))
;
600 if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],1,0)((*(mmc_uint_t*)((void*)((char*)(tmpMeta[1]) - 3)))==(((0 +1)
<< 10) + (((1 +3) & 255) << 2)))
== 0) goto tmp2_end;
601 /* Pattern matching succeeded */
602#line 101 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
603 /* Pattern-matching assignment */
604#line 101 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
605 tmp6 = (_nvars > _neqns);
606#line 101 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
607 if (1 != tmp6) goto goto_1;
608#line 608 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
609
610#line 102 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
611 _esize_str = intString(_neqns);
612#line 612 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
613
614#line 103 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
615 _vsize_str = intString(_nvars);
616#line 616 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
617
618#line 104 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
619 tmpMeta[1] = mmc_mk_cons(_esize_str, mmc_mk_cons(_vsize_str, MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3))));
620#line 104 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
621 omc_Error_addMessage(threadData, _OMC_LIT15((void*)((char*)(&(_OMC_LIT_STRUCT15).header) + 3)), tmpMeta[1]);
622#line 622 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
623
624#line 105 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
625 omc_BackendDAEUtil_checkAdjacencyMatrixSolvability(threadData, _isyst, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ishared), 12))(*(void**)(((void*)((void**)(((void*)((char*)(_ishared) - 3))
) + (12)))))
), omc_BackendDAEUtil_isInitializationDAE(threadData, _ishared));
626#line 626 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
627#line 106 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
628 goto goto_1;
629#line 629 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
630 goto tmp2_done;
631 }
632 case 3: {
633 modelica_boolean tmp7;
634
635 /* Pattern matching succeeded */
636#line 111 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
637 /* Pattern-matching assignment */
638#line 111 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
639 tmp7 = (_nvars < _neqns);
640#line 111 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
641 if (1 != tmp7) goto goto_1;
642#line 642 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
643
644#line 112 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
645 _esize_str = intString(_neqns);
646#line 646 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
647
648#line 113 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
649 _vsize_str = intString(_nvars);
650#line 650 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
651
652#line 114 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
653 tmpMeta[1] = mmc_mk_cons(_esize_str, mmc_mk_cons(_vsize_str, MMC_REFSTRUCTLIT(mmc_nil)((void*)((char*)(&(mmc_nil).header) + 3))));
654#line 114 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
655 omc_Error_addMessage(threadData, _OMC_LIT18((void*)((char*)(&(_OMC_LIT_STRUCT18).header) + 3)), tmpMeta[1]);
656#line 656 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
657
658#line 115 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
659 omc_BackendDAEUtil_checkAdjacencyMatrixSolvability(threadData, _isyst, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ishared), 12))(*(void**)(((void*)((void**)(((void*)((char*)(_ishared) - 3))
) + (12)))))
), omc_BackendDAEUtil_isInitializationDAE(threadData, _ishared));
660#line 660 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
661#line 116 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
662 goto goto_1;
663#line 663 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
664 goto tmp2_done;
665 }
666 case 4: {
667 modelica_boolean tmp8;
668
669 /* Pattern matching succeeded */
670#line 121 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
671 /* Pattern-matching assignment */
672#line 121 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
673 tmp8 = omc_Flags_isSet(threadData, _OMC_LIT22((void*)((char*)(&(_OMC_LIT_STRUCT22).header) + 3)));
674#line 121 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
675 if (1 != tmp8) goto goto_1;
676#line 676 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
677
678#line 122 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
679 omc_Debug_trace(threadData, _OMC_LIT23((void*)((char*)(&(_OMC_LIT_STRUCT23).header) + 3)));
680#line 680 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
681#line 123 "/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/BackEnd/Causalize.mo"
682 goto goto_1;
683#line 683 OMC_FILE"/var/lib/jenkins1/ws/ins.slow_JKRT-OMSens-minor-fixes/OMCompiler/Compiler/boot/build/tmp/Causalize.c"
684 goto tmp2_done;
685 }
686 }
687 goto tmp2_end;
688 tmp2_end: ;
689 }
690 goto goto_1;
691 tmp2_done:
692 (void)tmp3;
693 MMC_RESTORE_INTERNAL(mmc_jumper)threadData->mmc_jumper = old_jumper;;
694 goto tmp2_done2;
695 goto_1:;
696 MMC_CATCH_INTERNAL(mmc_jumper)} threadData->mmc_jumper = old_jumper;mmc_catch_dummy_fn()
;}
;
697 if (++tmp3 < 5) {
698 goto tmp2_top;
699 }
700 MMC_THROW_INTERNAL(){longjmp(*threadData->mmc_jumper,1);};
701 tmp2_done2:;
702 }
703 }
704 _outSyst = tmpMeta[0];
705 _return: OMC_LABEL_UNUSED__attribute__((unused))
706 return _outSyst;
707}
708modelica_metatype boxptr_Causalize_singularSystemCheck(threadData_t *threadData, modelica_metatype _nvars, modelica_metatype _neqns, modelica_metatype _isyst, modelica_metatype _inMatchingOptions, modelica_metatype _matchingAlgorithm, modelica_metatype _arg, modelica_metatype _ishared)
709{
710 modelica_integer tmp1;
711 modelica_integer tmp2;
712 modelica_metatype _outSyst = NULL((void*)0);
713 tmp1 = mmc_unbox_integer(_nvars)(((mmc_sint_t) (_nvars)) >> 1);
714 tmp2 = mmc_unbox_integer(_neqns)(((mmc_sint_t) (_neqns)) >> 1);
715 _outSyst = omc_Causalize_singularSystemCheck(threadData, tmp1, tmp2, _isyst, _inMatchingOptions, _matchingAlgorithm, _arg, _ishared);
716 /* skip box _outSyst; BackendDAE.EqSystem */
717 return _outSyst;
718}
719