Changeset 14150


Ignore:
Timestamp:
Nov 23, 2019 1:14:11 PM (3 weeks ago)
Author:
Jonathan Kämpe
Message:

#5883 Removing trailing non-slice subscripts in functions to be able to identify uses as non-slices in flat tree.

Location:
branches/dev-jk-2720/Compiler
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • branches/dev-jk-2720/Compiler/ModelicaFlatTree/test/modelica/EvaluationTests.mo

    r13897 r14150  
    535535    Real y = x;
    536536
    537     annotation(__JModelica(UnitTesting(tests={
    538         FlatteningTestCase(
    539             name="FunctionEval15",
    540             description="",
    541             flatModel="
     537annotation(__JModelica(UnitTesting(tests={
     538    FlatteningTestCase(
     539        name="FunctionEval15",
     540        description="",
     541        flatModel="
    542542fclass EvaluationTests.FunctionEval15
    543543 constant Real x = 50.0;
     
    573573  for i in 1:2 loop
    574574   for j in 1:2 loop
    575     x[i].a[j].b[1:3] := {1, 1, 1};
    576     x[i].b[1:3].a[j] := x[i].a[j].b[1:3];
     575    x[i].a[j].b := {1, 1, 1};
     576    x[i].b[1:3].a[j] := x[i].a[j].b;
    577577   end for;
    578578  end for;
     
    11921192    Real x2[n2] = 1:n2;
    11931193
    1194     annotation(__JModelica(UnitTesting(tests={
    1195         FlatteningTestCase(
    1196             name="FunctionEval33",
    1197             description="Evaluation of function with non-input with binding expression depending on unknown size",
    1198             flatModel="
     1194annotation(__JModelica(UnitTesting(tests={
     1195    FlatteningTestCase(
     1196        name="FunctionEval33",
     1197        description="Evaluation of function with non-input with binding expression depending on unknown size",
     1198        flatModel="
    11991199fclass EvaluationTests.FunctionEval33
    12001200 structural parameter Integer n1 = 3 /* 3 */;
     
    12081208  output Integer y;
    12091209 algorithm
    1210   y := sum(x[:]);
     1210  y := sum(x);
    12111211  return;
    12121212 end EvaluationTests.FunctionEval33.f;
     
    14471447    parameter Real b = F({2,1});
    14481448
    1449     annotation(__JModelica(UnitTesting(tests={
    1450         FlatteningTestCase(
    1451             name="FunctionEval41",
    1452             description="Evaluation of non-slice use",
    1453             flatModel="
     1449annotation(__JModelica(UnitTesting(tests={
     1450    FlatteningTestCase(
     1451        name="FunctionEval41",
     1452        description="Evaluation of non-slice use",
     1453        flatModel="
    14541454fclass EvaluationTests.FunctionEval41
    1455  parameter Real a = EvaluationTests.FunctionEval41.F({1, 2}) /* evaluation error */;
    1456  parameter Real b = EvaluationTests.FunctionEval41.F({2, 1}) /* evaluation error */;
     1455 parameter Real a = EvaluationTests.FunctionEval41.F({1, 2}) /* 2.23606797749979 */;
     1456 parameter Real b = EvaluationTests.FunctionEval41.F({2, 1}) /* 2.23606797749979 */;
    14571457
    14581458public
     
    14611461  output Real o;
    14621462 algorithm
    1463   o := sqrt(i[:] * i[:]);
     1463  o := sqrt(i * i);
    14641464  return;
    14651465 end EvaluationTests.FunctionEval41.F;
     
    15201520    parameter Real[2] a1 = F(p1) + F(p2);
    15211521
    1522     annotation(__JModelica(UnitTesting(tests={
    1523         FlatteningTestCase(
    1524             name="FunctionEval43",
    1525             description="Test array caching bug #5118",
    1526             flatModel="
     1522annotation(__JModelica(UnitTesting(tests={
     1523    FlatteningTestCase(
     1524        name="FunctionEval43",
     1525        description="Test array caching bug #5118",
     1526        flatModel="
    15271527fclass EvaluationTests.FunctionEval43
    15281528 structural parameter Integer p1[2] = {1, 1} /* { 1, 1 } */;
     
    15351535  output Real[:] y;
    15361536 algorithm
    1537   init y as Real[sum(x[:])];
    1538   for i in 1:sum(x[:]) loop
    1539    y[i] := i + sum(x[:]);
     1537  init y as Real[sum(x)];
     1538  for i in 1:sum(x) loop
     1539   y[i] := i + sum(x);
    15401540  end for;
    15411541  return;
     
    37303730    constant Real[2] y2 = f(y1);
    37313731   
    3732     annotation(__JModelica(UnitTesting(tests={
    3733         FlatteningTestCase(
    3734             name="AssigningCached2",
    3735             description="",
    3736             flatModel="
     3732annotation(__JModelica(UnitTesting(tests={
     3733    FlatteningTestCase(
     3734        name="AssigningCached2",
     3735        description="",
     3736        flatModel="
    37373737fclass EvaluationTests.AssigningCached2
    37383738 constant Real y1[2] = {1, 2};
     
    37453745 algorithm
    37463746  init y as Real[size(x, 1)];
    3747   y := x[:];
     3747  y := x;
    37483748  y[2] := 3;
    37493749  return;
     
    38133813    constant R y2 = f(y1);
    38143814   
    3815     annotation(__JModelica(UnitTesting(tests={
    3816         FlatteningTestCase(
    3817             name="AssigningCached4",
    3818             description="",
    3819             flatModel="
     3815annotation(__JModelica(UnitTesting(tests={
     3816    FlatteningTestCase(
     3817        name="AssigningCached4",
     3818        description="",
     3819        flatModel="
    38203820fclass EvaluationTests.AssigningCached4
    38213821 constant Real y1[3] = {1, 2, 3};
     
    38303830  assert(3 == size(x, 1), \"Mismatching sizes in function 'EvaluationTests.AssigningCached4.f', component 'x', dimension '1'\");
    38313831  init t as Real[3];
    3832   t[1:3] := x[1:3];
     3832  t := x;
    38333833  y1 := EvaluationTests.AssigningCached4.R(t);
    38343834  t[1] := 0;
     
    39403940    Real[integer(n)] x = 1:size(x,1);
    39413941
    3942     annotation(__JModelica(UnitTesting(tests={
    3943         FlatteningTestCase(
    3944             name="ParameterMinMax5",
    3945             description="Constricting evaluation of parameters without binding expression to min-max range",
    3946             flatModel="
     3942annotation(__JModelica(UnitTesting(tests={
     3943    FlatteningTestCase(
     3944        name="ParameterMinMax5",
     3945        description="Constricting evaluation of parameters without binding expression to min-max range",
     3946        flatModel="
    39473947fclass EvaluationTests.ParameterMinMax5
    39483948 structural parameter Real n = 1.2 /* 1.2 */;
     
    39573957    Real[integer(-n)] x = 1:size(x,1);
    39583958
    3959     annotation(__JModelica(UnitTesting(tests={
    3960         FlatteningTestCase(
    3961             name="ParameterMinMax6",
    3962             description="Constricting evaluation of parameters without binding expression to min-max range",
    3963             flatModel="
     3959annotation(__JModelica(UnitTesting(tests={
     3960    FlatteningTestCase(
     3961        name="ParameterMinMax6",
     3962        description="Constricting evaluation of parameters without binding expression to min-max range",
     3963        flatModel="
    39643964fclass EvaluationTests.ParameterMinMax6
    39653965 structural parameter Real n = -1.2 /* -1.2 */;
     
    39763976    Real[Integer(n)] x = 1:size(x,1);
    39773977
    3978     annotation(__JModelica(UnitTesting(tests={
    3979         FlatteningTestCase(
    3980             name="ParameterMinMax7",
    3981             description="Constricting evaluation of parameters without binding expression to min-max range",
    3982             flatModel="
     3978annotation(__JModelica(UnitTesting(tests={
     3979    FlatteningTestCase(
     3980        name="ParameterMinMax7",
     3981        description="Constricting evaluation of parameters without binding expression to min-max range",
     3982        flatModel="
    39833983fclass EvaluationTests.ParameterMinMax7
    39843984 structural parameter EvaluationTests.ParameterMinMax7.B n = EvaluationTests.ParameterMinMax7.A.d /* EvaluationTests.ParameterMinMax7.A.d */;
     
    40014001    Real[Integer(n)] x = 1:size(x,1);
    40024002
    4003     annotation(__JModelica(UnitTesting(tests={
    4004         FlatteningTestCase(
    4005             name="ParameterMinMax8",
    4006             description="Constricting evaluation of parameters without binding expression to min-max range",
    4007             flatModel="
     4003annotation(__JModelica(UnitTesting(tests={
     4004    FlatteningTestCase(
     4005        name="ParameterMinMax8",
     4006        description="Constricting evaluation of parameters without binding expression to min-max range",
     4007        flatModel="
    40084008fclass EvaluationTests.ParameterMinMax8
    40094009 structural parameter EvaluationTests.ParameterMinMax8.B n = EvaluationTests.ParameterMinMax8.A.b /* EvaluationTests.ParameterMinMax8.A.b */;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/src/jastadd/flattening/Flattening.jrag

    r14123 r14150  
    928928            FAssignableExp left = setLocationOf(new FAccessExp(expandedFAccessCalc()));
    929929            FStatement stmt;
    930             if (scalarizedAsFFunctionCallStmt()) {
     930            if (flattenAsFFunctionCallStmt()) {
    931931                List<FFunctionCallLeft> lefts = new List<FFunctionCallLeft>();
    932932                lefts.add(new FFunctionCallLeft(new Opt<FExp>(left)));
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/src/jastadd/flattening/FlatteningAccess.jrag

    r13103 r14150  
    159159   
    160160    inh boolean InstAccess.flattenFASContext();
    161     inh boolean FExp.flattenFASContext();
    162161    eq BaseNode.getChild().flattenFASContext()             = true;
    163162    eq FUnknownSizeExp.getFExp().flattenFASContext()       = false;
    164163    eq FExternalStmt.getChild().flattenFASContext()        = false;
    165164    eq InstDot.getInstAccess(int i).flattenFASContext()    = i != getNumInstAccess() - 1 || flattenFASContext();
    166     eq FIfExp.getChild().flattenFASContext()               = flattenFASContext();
    167     eq CommonAccessExp.getChild().flattenFASContext()            = flattenFASContext() || isSlice();
    168    
    169     eq InstFunctionArgument.getChild().flattenFASContext() = !inFunction();
    170     eq FFunctionCallLeft.getFExp().flattenFASContext()     = !inFunction();
    171     eq InstForIndex.getChild().flattenFASContext()         = !inFunction();
    172     eq FSizeExp.getFExp().flattenFASContext()              = !getFExp().isCircular() && !inFunction();
    173     eq FAssignStmt.getLeft().flattenFASContext()           = !scalarizedAsFFunctionCallStmt();
     165    eq CommonAccessExp.getChild().flattenFASContext()      = isSlice() || !inFunction();
    174166
    175167}
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/src/jastadd/flattening/FlatteningStatements.jrag

    r13456 r14150  
    6666    public boolean FAssignStmt.flatten(Flattener f, List<FStatement> sl) {
    6767        addForIndexRangeAsserts(f, sl);
    68         if (scalarizedAsFFunctionCallStmt()) {
     68        if (flattenAsFFunctionCallStmt()) {
    6969            List<FFunctionCallLeft> lefts = new List<FFunctionCallLeft>();
    7070            lefts.add(new FFunctionCallLeft(new Opt<FExp>(getLeft().flatten(f))));
     
    7676    }
    7777
    78     syn boolean FAssignStmt.scalarizedAsFFunctionCallStmt() =
     78    syn boolean FAssignStmt.flattenAsFFunctionCallStmt() =
    7979            getRight().isNonVectorizedFunctionCall() && getLeft().type().isComposite() &&
    8080            inFunction() && !getLeft().isSlice();
    81     syn boolean InstAssignable.scalarizedAsFFunctionCallStmt() =
     81    syn boolean InstAssignable.flattenAsFFunctionCallStmt() =
    8282            getBindingFExp().isNonVectorizedFunctionCall() && type().isComposite();
    8383   
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/ArrayBuiltins.mo

    r12553 r14150  
    217217    A[2] y = fill(A(1), size(y, 1));
    218218
    219     annotation(__JModelica(UnitTesting(tests={
    220         FlatteningTestCase(
    221             name="Size_SizeExp12",
    222             description="Size operator: array of records",
    223             flatModel="
     219annotation(__JModelica(UnitTesting(tests={
     220    FlatteningTestCase(
     221        name="Size_SizeExp12",
     222        description="Size operator: array of records",
     223        flatModel="
    224224fclass ArrayBuiltins.Size.SizeExp12
    225225 ArrayBuiltins.Size.SizeExp12.A y[2] = fill(ArrayBuiltins.Size.SizeExp12.A(1), size(y[1:2], 1));
     
    243243    parameter Integer p4 = 1;
    244244
    245     annotation(__JModelica(UnitTesting(tests={
    246         FlatteningTestCase(
    247             name="Size_SizeStructural1",
    248             description="Using parameter as first arg of size() expression that is used as structural parameter should not make that parameter a structural parameter",
    249             flatModel="
     245annotation(__JModelica(UnitTesting(tests={
     246    FlatteningTestCase(
     247        name="Size_SizeStructural1",
     248        description="Using parameter as first arg of size() expression that is used as structural parameter should not make that parameter a structural parameter",
     249        flatModel="
    250250fclass ArrayBuiltins.Size.SizeStructural1
    251251 Real x[1,1];
     
    22262226    A a3[5](x = 1:5) = cat(1, a1, a2);
    22272227
    2228     annotation(__JModelica(UnitTesting(tests={
    2229         FlatteningTestCase(
    2230             name="Cat_ArrayCat11",
    2231             description="",
    2232             flatModel="
     2228annotation(__JModelica(UnitTesting(tests={
     2229    FlatteningTestCase(
     2230        name="Cat_ArrayCat11",
     2231        description="",
     2232        flatModel="
    22332233fclass ArrayBuiltins.Cat.ArrayCat11
    22342234 ArrayBuiltins.Cat.ArrayCat11.A a1[2];
     
    28882888    parameter Real p3[1] = {2};
    28892889
    2890     annotation(__JModelica(UnitTesting(tests={
    2891         FlatteningTestCase(
    2892             name="NdimsStructural1",
    2893             description="Using parameter in ndims() expression that is used as structural parameter should not make that parameter a structural parameter",
    2894             flatModel="
     2890annotation(__JModelica(UnitTesting(tests={
     2891    FlatteningTestCase(
     2892        name="NdimsStructural1",
     2893        description="Using parameter in ndims() expression that is used as structural parameter should not make that parameter a structural parameter",
     2894        flatModel="
    28952895fclass ArrayBuiltins.NdimsStructural1
    28962896 Real x[1,1];
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/ArrayTests.mo

    r13103 r14150  
    72757275    x = { (i + j) * y[i, j] for j, i };
    72767276
    7277     annotation(__JModelica(UnitTesting(tests={
    7278         FlatteningTestCase(
    7279             name="For_ForNoRange10",
    7280             description="",
    7281             flatModel="
     7277annotation(__JModelica(UnitTesting(tests={
     7278    FlatteningTestCase(
     7279        name="For_ForNoRange10",
     7280        description="",
     7281        flatModel="
    72827282fclass ArrayTests.For.ForNoRange10
    72837283 structural parameter Integer m = 2 /* 2 */;
     
    74507450    x[3] = x[1] + x[2];
    74517451
    7452     annotation(__JModelica(UnitTesting(tests={
    7453         FlatteningTestCase(
    7454             name="For_ForNoRange17",
    7455             description="",
    7456             flatModel="
     7452annotation(__JModelica(UnitTesting(tests={
     7453    FlatteningTestCase(
     7454        name="For_ForNoRange17",
     7455        description="",
     7456        flatModel="
    74577457fclass ArrayTests.For.ForNoRange17
    74587458 Real x[4];
     
    75207520    Real x[2] = f((1:2) * time, (3:4) * time);
    75217521
    7522     annotation(__JModelica(UnitTesting(tests={
    7523         FlatteningTestCase(
    7524             name="For_ForNoRange19",
    7525             description="",
    7526             flatModel="
     7522annotation(__JModelica(UnitTesting(tests={
     7523    FlatteningTestCase(
     7524        name="For_ForNoRange19",
     7525        description="",
     7526        flatModel="
    75277527fclass ArrayTests.For.ForNoRange19
    75287528 Real x[2] = ArrayTests.For.ForNoRange19.f((1:2) * time, (3:4) * time);
     
    75367536  init x as Real[size(y, 1)];
    75377537  assert(size(z, 1) == size(y, 1), \"For index with implicit iteration range used for inconsistent sizes, i used for different sizes in z[i] and y[i]\");
    7538   x[:] := {y[i] + z[i] + 1 for i in 1:size(y, 1)};
     7538  x := {y[i] + z[i] + 1 for i in 1:size(y, 1)};
    75397539  return;
    75407540 end ArrayTests.For.ForNoRange19.f;
     
    76017601    Real x[2] = f(y, y, y);
    76027602
    7603     annotation(__JModelica(UnitTesting(tests={
    7604         FlatteningTestCase(
    7605             name="For_ForNoRange21",
    7606             description="",
    7607             flatModel="
     7603annotation(__JModelica(UnitTesting(tests={
     7604    FlatteningTestCase(
     7605        name="For_ForNoRange21",
     7606        description="",
     7607        flatModel="
    76087608fclass ArrayTests.For.ForNoRange21
    76097609 Real y[2] = (1:2) * time;
     
    90069006    Integer[2] x = {1,2};
    90079007    Integer y = pre(x[i]);
    9008     annotation(__JModelica(UnitTesting(tests={
    9009         FlatteningTestCase(
    9010             name="VariableIndex_Slice8",
    9011             description="Variable index in pre",
    9012             flatModel="
     9008annotation(__JModelica(UnitTesting(tests={
     9009    FlatteningTestCase(
     9010        name="VariableIndex_Slice8",
     9011        description="Variable index in pre",
     9012        flatModel="
    90139013fclass ArrayTests.VariableIndex.Slice8
    90149014 discrete Integer i = integer(time);
     
    90249024    Integer[2] x = {1,2};
    90259025    Integer y = pre(x[c[i]]);
    9026     annotation(__JModelica(UnitTesting(tests={
    9027         FlatteningTestCase(
    9028             name="VariableIndex_Slice9",
    9029             description="Variable index in pre",
    9030             flatModel="
     9026annotation(__JModelica(UnitTesting(tests={
     9027    FlatteningTestCase(
     9028        name="VariableIndex_Slice9",
     9029        description="Variable index in pre",
     9030        flatModel="
    90319031fclass ArrayTests.VariableIndex.Slice9
    90329032 constant Integer c[2] = {1, 2};
     
    90439043    Integer[2] x = {1,2};
    90449044    Integer y = pre(c[x[i]]);
    9045     annotation(__JModelica(UnitTesting(tests={
    9046         FlatteningTestCase(
    9047             name="VariableIndex_Slice10",
    9048             description="Variable index in pre",
    9049             flatModel="
     9045annotation(__JModelica(UnitTesting(tests={
     9046    FlatteningTestCase(
     9047        name="VariableIndex_Slice10",
     9048        description="Variable index in pre",
     9049        flatModel="
    90509050fclass ArrayTests.VariableIndex.Slice10
    90519051 constant Integer c[2] = {1, 2};
     
    92829282    end f;
    92839283    Real[:] y = f(2,1:3);
    9284     annotation(__JModelica(UnitTesting(tests={
    9285         FlatteningTestCase(
    9286             name="Other_ArraySize5",
    9287             description="",
    9288             flatModel="
     9284annotation(__JModelica(UnitTesting(tests={
     9285    FlatteningTestCase(
     9286        name="Other_ArraySize5",
     9287        description="",
     9288        flatModel="
    92899289fclass ArrayTests.Other.ArraySize5
    92909290 Real y[2] = ArrayTests.Other.ArraySize5.f(2, 1:3, (1:3)[1:2]);
     
    92989298 algorithm
    92999299  init z as Real[size(y, 1)];
    9300   z := y[:];
     9300  z := y;
    93019301  return;
    93029302 end ArrayTests.Other.ArraySize5.f;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/CheckTests.mo

    r13948 r14150  
    15721572        y = {time};
    15731573    end if;
    1574     annotation(__JModelica(UnitTesting(tests={
    1575         FlatteningTestCase(
    1576             name="NegativeFill2",
    1577             description="",
    1578             flatModel="
     1574annotation(__JModelica(UnitTesting(tests={
     1575    FlatteningTestCase(
     1576        name="NegativeFill2",
     1577        description="",
     1578        flatModel="
    15791579fclass CheckTests.NegativeFill2
    15801580 structural parameter Integer n = 2 /* 2 */;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/ConnectTests.mo

    r13948 r14150  
    11101110    end for;
    11111111
    1112     annotation(__JModelica(UnitTesting(tests={
    1113         FlatteningTestCase(
    1114             name="ConnectTest23",
    1115             description="Connect clauses in if with parameter test",
    1116             flatModel="
     1112annotation(__JModelica(UnitTesting(tests={
     1113    FlatteningTestCase(
     1114        name="ConnectTest23",
     1115        description="Connect clauses in if with parameter test",
     1116        flatModel="
    11171117fclass ConnectTests.ConnectTest23
    11181118 Real x[4];
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/FlatteningAccessGlobal.mo

    r12754 r14150  
    7070    Real[:] y = f();
    7171
    72     annotation(__JModelica(UnitTesting(tests={
    73         FlatteningTestCase(
    74             name="CompositeAccessArray1",
    75             description="Composite constants in functions should be flattened as global variables and uses not folded",
    76             flatModel="
     72annotation(__JModelica(UnitTesting(tests={
     73    FlatteningTestCase(
     74        name="CompositeAccessArray1",
     75        description="Composite constants in functions should be flattened as global variables and uses not folded",
     76        flatModel="
    7777fclass FlatteningAccessGlobal.CompositeAccessArray1
    7878 Real y[3] = FlatteningAccessGlobal.CompositeAccessArray1.f();
     
    8585 algorithm
    8686  init y as Real[3];
    87   y := global(FlatteningAccessGlobal.CompositeAccessArray1.P.is[1:3]);
     87  y := global(FlatteningAccessGlobal.CompositeAccessArray1.P.is);
    8888  return;
    8989 end FlatteningAccessGlobal.CompositeAccessArray1.f;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/FunctionTests.mo

    r12766 r14150  
    26912691    Real x[:] = f2(e = 2);
    26922692
    2693     annotation(__JModelica(UnitTesting(tests={
    2694         FlatteningTestCase(
    2695             name="FunctionType18",
    2696             description="",
    2697             flatModel="
     2693annotation(__JModelica(UnitTesting(tests={
     2694    FlatteningTestCase(
     2695        name="FunctionType18",
     2696        description="",
     2697        flatModel="
    26982698fclass FunctionTests.FunctionType18
    26992699 Real x[5] = FunctionTests.FunctionType18.f2(2 * 2, 2, 2 * 2 - 1);
     
    27072707 algorithm
    27082708  init g as Real[FunctionTests.FunctionType18.f1(f, e)];
    2709   g[:] := (1:size(g, 1)) .+ d;
     2709  g := (1:size(g, 1)) .+ d;
    27102710  return;
    27112711 end FunctionTests.FunctionType18.f2;
     
    54105410Real[3,3] x = f(1,3,3,{{1,2,3},{4,5,6}});
    54115411
    5412     annotation(__JModelica(UnitTesting(tests={
    5413         TransformCanonicalTestCase(
    5414             name="ArrayExpInFunc17",
    5415             description="Scalarization of functions: unknown size range exp as slice",
    5416             variability_propagation=false,
    5417             inline_functions="none",
    5418             flatModel="
     5412annotation(__JModelica(UnitTesting(tests={
     5413    TransformCanonicalTestCase(
     5414        name="ArrayExpInFunc17",
     5415        description="Scalarization of functions: unknown size range exp as slice",
     5416        variability_propagation=false,
     5417        inline_functions="none",
     5418        flatModel="
    54195419fclass FunctionTests.ArrayExpInFunc17
    54205420 Real x[1,1];
     
    54405440  init y as Real[n, size(x, 2)];
    54415441  for i1 in 1:n loop
    5442    y[i1] := x[is1 + (i1 - 1)];
     5442   for i2 in 1:size(x, 2) loop
     5443    y[i1,i2] := x[is1 + (i1 - 1)];
     5444   end for;
    54435445  end for;
    54445446  return;
     
    56135615Real[2,4] ae = f({1,2});
    56145616
    5615     annotation(__JModelica(UnitTesting(tests={
    5616         TransformCanonicalTestCase(
    5617             name="ArrayExpInFunc20",
    5618             description="Scalarization of functions: unknown size matrix expression",
    5619             variability_propagation=false,
    5620             inline_functions="none",
    5621             flatModel="
     5617annotation(__JModelica(UnitTesting(tests={
     5618    TransformCanonicalTestCase(
     5619        name="ArrayExpInFunc20",
     5620        description="Scalarization of functions: unknown size matrix expression",
     5621        variability_propagation=false,
     5622        inline_functions="none",
     5623        flatModel="
    56225624fclass FunctionTests.ArrayExpInFunc20
    56235625 Real ae[1,1];
     
    56435645 algorithm
    56445646  init o as Real[2, size(x1, 1) + 2];
    5645   assert(size(x1, 1) + 1 + 1 == 1 + size(x1, 1) + 1, \"Mismatching size in dimension 2 of expression [{x1[:]}, 1, 2; 3, {x1[:]}, 4] in function FunctionTests.ArrayExpInFunc20.f\");
     5647  assert(size(x1, 1) + 1 + 1 == 1 + size(x1, 1) + 1, \"Mismatching size in dimension 2 of expression [{x1}, 1, 2; 3, {x1}, 4] in function FunctionTests.ArrayExpInFunc20.f\");
    56465648  init temp_1 as Real[2, size(x1, 1) + 1 + 1];
    56475649  init temp_2 as Real[1, size(x1, 1) + 1 + 1];
     
    57365738Real[5,3] ae = f({1,2},{{3,4},{5,6}},{{10,11,12}});
    57375739
    5738     annotation(__JModelica(UnitTesting(tests={
    5739         TransformCanonicalTestCase(
    5740             name="ArrayExpInFunc21",
    5741             description="Scalarization of functions: unknown size matrix expression",
    5742             variability_propagation=false,
    5743             inline_functions="none",
    5744             flatModel="
     5740annotation(__JModelica(UnitTesting(tests={
     5741    TransformCanonicalTestCase(
     5742        name="ArrayExpInFunc21",
     5743        description="Scalarization of functions: unknown size matrix expression",
     5744        variability_propagation=false,
     5745        inline_functions="none",
     5746        flatModel="
    57455747fclass FunctionTests.ArrayExpInFunc21
    57465748 Real ae[1,1];
     
    57745776 algorithm
    57755777  init y as Real[size(x1, 1) * 2 + size(x3, 1), size(x2, 2) + 1];
    5776   assert(1 + size(x2, 2) == size(x2, 2) + 1, \"Mismatching size in dimension 2 of expression [x1[:], x2[:,:]; x2[:,:], x1[:]; x3[:,:]] in function FunctionTests.ArrayExpInFunc21.f\");
    5777   assert(1 + size(x2, 2) == size(x3, 2), \"Mismatching size in dimension 2 of expression [x1[:], x2[:,:]; x2[:,:], x1[:]; x3[:,:]] in function FunctionTests.ArrayExpInFunc21.f\");
    5778   assert(size(x1, 1) == size(x2, 1), \"Mismatching size in dimension 1 of expression x1[:], x2[:,:] in function FunctionTests.ArrayExpInFunc21.f\");
    5779   assert(size(x2, 1) == size(x1, 1), \"Mismatching size in dimension 1 of expression x2[:,:], x1[:] in function FunctionTests.ArrayExpInFunc21.f\");
     5778  assert(1 + size(x2, 2) == size(x2, 2) + 1, \"Mismatching size in dimension 2 of expression [x1, x2; x2, x1; x3] in function FunctionTests.ArrayExpInFunc21.f\");
     5779  assert(1 + size(x2, 2) == size(x3, 2), \"Mismatching size in dimension 2 of expression [x1, x2; x2, x1; x3] in function FunctionTests.ArrayExpInFunc21.f\");
     5780  assert(size(x1, 1) == size(x2, 1), \"Mismatching size in dimension 1 of expression x1, x2 in function FunctionTests.ArrayExpInFunc21.f\");
     5781  assert(size(x2, 1) == size(x1, 1), \"Mismatching size in dimension 1 of expression x2, x1 in function FunctionTests.ArrayExpInFunc21.f\");
    57805782  init temp_1 as Real[size(x1, 1) + size(x2, 1) + size(x3, 1), 1 + size(x2, 2)];
    57815783  init temp_2 as Real[size(x1, 1), 1 + size(x2, 2)];
     
    62706272    Real y[2,1] = f({{1}},{{1}});
    62716273
    6272     annotation(__JModelica(UnitTesting(tests={
    6273         TransformCanonicalTestCase(
    6274             name="ArrayExpInFunc29",
    6275             description="Scalarization of functions: unknown size cat expression",
    6276             variability_propagation=false,
    6277             inline_functions="none",
    6278             flatModel="
     6274annotation(__JModelica(UnitTesting(tests={
     6275    TransformCanonicalTestCase(
     6276        name="ArrayExpInFunc29",
     6277        description="Scalarization of functions: unknown size cat expression",
     6278        variability_propagation=false,
     6279        inline_functions="none",
     6280        flatModel="
    62796281fclass FunctionTests.ArrayExpInFunc29
    62806282 Real y[1,1];
     
    62916293 algorithm
    62926294  init o as Real[size(a, 1) + size(b, 1), size(b, 2)];
    6293   assert(size(a, 2) == size(b, 2), \"Mismatching size in dimension 2 of expression cat(1, a[:,:], b[:,:]) in function FunctionTests.ArrayExpInFunc29.f\");
     6295  assert(size(a, 2) == size(b, 2), \"Mismatching size in dimension 2 of expression cat(1, a, b) in function FunctionTests.ArrayExpInFunc29.f\");
    62946296  init temp_1 as Real[size(a, 1) + size(b, 1), size(a, 2)];
    62956297  for i1 in 1:size(a, 1) loop
     
    63266328    Real y[1,3,3] = f({{{0,1,2},{10,11,12}}},{{{3,4}}},{{{5}}});
    63276329
    6328     annotation(__JModelica(UnitTesting(tests={
    6329         TransformCanonicalTestCase(
    6330             name="ArrayExpInFunc30",
    6331             description="Scalarization of functions: unknown size cat expression",
    6332             variability_propagation=false,
    6333             inline_functions="none",
    6334             flatModel="
     6330annotation(__JModelica(UnitTesting(tests={
     6331    TransformCanonicalTestCase(
     6332        name="ArrayExpInFunc30",
     6333        description="Scalarization of functions: unknown size cat expression",
     6334        variability_propagation=false,
     6335        inline_functions="none",
     6336        flatModel="
    63356337fclass FunctionTests.ArrayExpInFunc30
    63366338 Real y[1,1,1];
     
    63566358 algorithm
    63576359  init o as Real[size(a, 1), size(a, 2) + size(b, 2), size(a, 3)];
    6358   assert(size(a, 1) == size(b, 1), \"Mismatching size in dimension 1 of expression cat(2, a[:,:,:], cat(3, b[:,:,:], c[:,:,:])) in function FunctionTests.ArrayExpInFunc30.f\");
    6359   assert(size(a, 3) == size(b, 3) + size(c, 3), \"Mismatching size in dimension 3 of expression cat(2, a[:,:,:], cat(3, b[:,:,:], c[:,:,:])) in function FunctionTests.ArrayExpInFunc30.f\");
    6360   assert(size(b, 1) == size(c, 1), \"Mismatching size in dimension 1 of expression cat(3, b[:,:,:], c[:,:,:]) in function FunctionTests.ArrayExpInFunc30.f\");
    6361   assert(size(b, 2) == size(c, 2), \"Mismatching size in dimension 2 of expression cat(3, b[:,:,:], c[:,:,:]) in function FunctionTests.ArrayExpInFunc30.f\");
     6360  assert(size(a, 1) == size(b, 1), \"Mismatching size in dimension 1 of expression cat(2, a, cat(3, b, c)) in function FunctionTests.ArrayExpInFunc30.f\");
     6361  assert(size(a, 3) == size(b, 3) + size(c, 3), \"Mismatching size in dimension 3 of expression cat(2, a, cat(3, b, c)) in function FunctionTests.ArrayExpInFunc30.f\");
     6362  assert(size(b, 1) == size(c, 1), \"Mismatching size in dimension 1 of expression cat(3, b, c) in function FunctionTests.ArrayExpInFunc30.f\");
     6363  assert(size(b, 2) == size(c, 2), \"Mismatching size in dimension 2 of expression cat(3, b, c) in function FunctionTests.ArrayExpInFunc30.f\");
    63626364  init temp_1 as Real[size(a, 1), size(a, 2) + size(b, 2), size(a, 3)];
    63636365  for i1 in 1:size(a, 1) loop
     
    68396841    Real[1,1] y = f({{{3}}});
    68406842
    6841     annotation(__JModelica(UnitTesting(tests={
    6842         TransformCanonicalTestCase(
    6843             name="ArrayExpInFunc40",
    6844             description="Scalarization of functions: unknown size vector operator, many dims input",
    6845             variability_propagation=false,
    6846             inline_functions="none",
    6847             flatModel="
     6843annotation(__JModelica(UnitTesting(tests={
     6844    TransformCanonicalTestCase(
     6845        name="ArrayExpInFunc40",
     6846        description="Scalarization of functions: unknown size vector operator, many dims input",
     6847        variability_propagation=false,
     6848        inline_functions="none",
     6849        flatModel="
    68486850fclass FunctionTests.ArrayExpInFunc40
    68496851 Real y[1,1];
     
    68586860 algorithm
    68596861  init b as Real[size(a, 1), size(a, 2)];
    6860   assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression matrix(a[:,:,:]) in function FunctionTests.ArrayExpInFunc40.f\");
     6862  assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression matrix(a) in function FunctionTests.ArrayExpInFunc40.f\");
    68616863  init temp_1 as Real[size(a, 1), size(a, 2)];
    68626864  for i1 in 1:size(a, 1) loop
     
    68896891    Real y = f({{{1}}});
    68906892
    6891     annotation(__JModelica(UnitTesting(tests={
    6892         TransformCanonicalTestCase(
    6893             name="ArrayExpInFunc41",
    6894             description="Scalarization of functions: unknown size in scalar operator",
    6895             variability_propagation=false,
    6896             inline_functions="none",
    6897             flatModel="
     6893annotation(__JModelica(UnitTesting(tests={
     6894    TransformCanonicalTestCase(
     6895        name="ArrayExpInFunc41",
     6896        description="Scalarization of functions: unknown size in scalar operator",
     6897        variability_propagation=false,
     6898        inline_functions="none",
     6899        flatModel="
    68986900fclass FunctionTests.ArrayExpInFunc41
    68996901 Real y;
     
    69066908  output Real b;
    69076909 algorithm
    6908   assert(size(a, 1) == 1, \"Mismatching size in dimension 1 of expression scalar(a[:,:,:] + a[:,:,:]) in function FunctionTests.ArrayExpInFunc41.f\");
    6909   assert(size(a, 2) == 1, \"Mismatching size in dimension 2 of expression scalar(a[:,:,:] + a[:,:,:]) in function FunctionTests.ArrayExpInFunc41.f\");
    6910   assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression scalar(a[:,:,:] + a[:,:,:]) in function FunctionTests.ArrayExpInFunc41.f\");
     6910  assert(size(a, 1) == 1, \"Mismatching size in dimension 1 of expression scalar(a + a) in function FunctionTests.ArrayExpInFunc41.f\");
     6911  assert(size(a, 2) == 1, \"Mismatching size in dimension 2 of expression scalar(a + a) in function FunctionTests.ArrayExpInFunc41.f\");
     6912  assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression scalar(a + a) in function FunctionTests.ArrayExpInFunc41.f\");
    69116913  b := a[1,1,1] + a[1,1,1];
    69126914  return;
     
    71567158    parameter Real[:] x2 = f({6,7,8}) annotation(Evaluate=true);
    71577159
    7158     annotation(__JModelica(UnitTesting(tests={
    7159         FlatteningTestCase(
    7160             name="ArrayExpInFunc46",
    7161             description="Check that we don't crash due to cached size for range expression in for loop in function",
    7162             flatModel="
     7160annotation(__JModelica(UnitTesting(tests={
     7161    FlatteningTestCase(
     7162        name="ArrayExpInFunc46",
     7163        description="Check that we don't crash due to cached size for range expression in for loop in function",
     7164        flatModel="
    71637165fclass FunctionTests.ArrayExpInFunc46
    71647166 eval parameter Real x1[4] = {2, 3, 4, 5} /* { 2, 3, 4, 5 } */;
     
    71727174  init y as Real[size(x, 1) - 1];
    71737175  for i in 1:2 loop
    7174    y[:] := x[2:size(x, 1)];
     7176   y := x[2:size(x, 1)];
    71757177  end for;
    71767178  return;
     
    94009402 Real y[2] = f({4,5});
    94019403
    9402     annotation(__JModelica(UnitTesting(tests={
    9403         FlatteningTestCase(
    9404             name="UnknownArray1",
    9405             description="Using functions with unknown array sizes: basic type test",
    9406             variability_propagation=false,
    9407             flatModel="
     9404annotation(__JModelica(UnitTesting(tests={
     9405    FlatteningTestCase(
     9406        name="UnknownArray1",
     9407        description="Using functions with unknown array sizes: basic type test",
     9408        variability_propagation=false,
     9409        flatModel="
    94089410fclass FunctionTests.UnknownArray1
    94099411 Real x[3] = FunctionTests.UnknownArray1.f({1, 2, 3});
     
    94169418 algorithm
    94179419  init b as Real[size(a, 1)];
    9418   b[:] := a[:];
     9420  b := a;
    94199421  return;
    94209422 end FunctionTests.UnknownArray1.f;
     
    94359437 Real y[2] = f({4,5});
    94369438
    9437     annotation(__JModelica(UnitTesting(tests={
    9438         FlatteningTestCase(
    9439             name="UnknownArray2",
    9440             description="Using functions with unknown array sizes: size from binding exp",
    9441             variability_propagation=false,
    9442             flatModel="
     9439annotation(__JModelica(UnitTesting(tests={
     9440    FlatteningTestCase(
     9441        name="UnknownArray2",
     9442        description="Using functions with unknown array sizes: size from binding exp",
     9443        variability_propagation=false,
     9444        flatModel="
    94439445fclass FunctionTests.UnknownArray2
    94449446 Real x[3] = FunctionTests.UnknownArray2.f({1, 2, 3});
     
    94519453 algorithm
    94529454  init b as Real[size(a, 1)];
    9453   b := a[:];
     9455  b := a;
    94549456  return;
    94559457 end FunctionTests.UnknownArray2.f;
     
    94729474 Real y[2] = f({4,5});
    94739475
    9474     annotation(__JModelica(UnitTesting(tests={
    9475         FlatteningTestCase(
    9476             name="UnknownArray3",
    9477             description="Using functions with unknown array sizes: indirect dependency",
    9478             variability_propagation=false,
    9479             flatModel="
     9476annotation(__JModelica(UnitTesting(tests={
     9477    FlatteningTestCase(
     9478        name="UnknownArray3",
     9479        description="Using functions with unknown array sizes: indirect dependency",
     9480        variability_propagation=false,
     9481        flatModel="
    94809482fclass FunctionTests.UnknownArray3
    94819483 Real x[3] = FunctionTests.UnknownArray3.f({1, 2, 3});
     
    94909492  init b as Real[size(c, 1)];
    94919493  init c as Real[size(a, 1)];
    9492   b[:] := a[:];
     9494  b := a;
    94939495  return;
    94949496 end FunctionTests.UnknownArray3.f;
     
    95109512 Real y[2] = f({4,5});
    95119513
    9512     annotation(__JModelica(UnitTesting(tests={
    9513         FlatteningTestCase(
    9514             name="UnknownArray4",
    9515             description="Using functions with unknown array sizes: indirect dependency from binding exp",
    9516             variability_propagation=false,
    9517             flatModel="
     9514annotation(__JModelica(UnitTesting(tests={
     9515    FlatteningTestCase(
     9516        name="UnknownArray4",
     9517        description="Using functions with unknown array sizes: indirect dependency from binding exp",
     9518        variability_propagation=false,
     9519        flatModel="
    95189520fclass FunctionTests.UnknownArray4
    95199521 Real x[3] = FunctionTests.UnknownArray4.f({1, 2, 3});
     
    95279529 algorithm
    95289530  init b as Real[size(a, 1)];
    9529   b := c[:];
     9531  b := c;
    95309532  init c as Real[size(a, 1)];
    9531   c := a[:];
     9533  c := a;
    95329534  return;
    95339535 end FunctionTests.UnknownArray4.f;
     
    95519553 (x, y) = f({1,2,3});
    95529554
    9553     annotation(__JModelica(UnitTesting(tests={
    9554         FlatteningTestCase(
    9555             name="UnknownArray5",
    9556             description="Using functions with unknown array sizes: multiple outputs",
    9557             variability_propagation=false,
    9558             flatModel="
     9555annotation(__JModelica(UnitTesting(tests={
     9556    FlatteningTestCase(
     9557        name="UnknownArray5",
     9558        description="Using functions with unknown array sizes: multiple outputs",
     9559        variability_propagation=false,
     9560        flatModel="
    95599561fclass FunctionTests.UnknownArray5
    95609562 Real x[3];
     
    95709572 algorithm
    95719573  init b as Real[size(a, 1)];
    9572   b := c[:];
     9574  b := c;
    95739575  init c as Real[size(a, 1)];
    9574   c := a[:];
     9576  c := a;
    95759577  return;
    95769578 end FunctionTests.UnknownArray5.f;
     
    96729674 Real x[5,2] = f({{1,2},{3,4}}, {{5,6},{7,8},{9,0}});
    96739675
    9674     annotation(__JModelica(UnitTesting(tests={
    9675         FlatteningTestCase(
    9676             name="UnknownArray9",
    9677             description="Unknown size calculated by adding sizes",
    9678             variability_propagation=false,
    9679             flatModel="
     9676annotation(__JModelica(UnitTesting(tests={
     9677    FlatteningTestCase(
     9678        name="UnknownArray9",
     9679        description="Unknown size calculated by adding sizes",
     9680        variability_propagation=false,
     9681        flatModel="
    96809682fclass FunctionTests.UnknownArray9
    96819683 Real x[5,2] = FunctionTests.UnknownArray9.f({{1, 2}, {3, 4}}, {{5, 6}, {7, 8}, {9, 0}});
     
    96929694  init c as Real[size(d, 1), size(d, 2)];
    96939695  init d as Real[size(a, 1) + size(b, 1), size(a, 2)];
    9694   d := cat(1, a[:,:], b[:,:]);
     9696  d := cat(1, a, b);
    96959697  init e as Real[size(a, 1) + size(b, 1), size(a, 2)];
    9696   e := [a[:,:]; b[:,:]];
    9697   c[:,:] := d[:,:];
     9698  e := [a; b];
     9699  c := d;
    96989700  return;
    96999701 end FunctionTests.UnknownArray9.f;
     
    1325813260    Real x = sum(f(p));
    1325913261
    13260     annotation(__JModelica(UnitTesting(tests={
    13261         FlatteningTestCase(
    13262             name="InputAsArraySize13",
    13263             description="Parameters that decide size of array expression should be structural",
    13264             flatModel="
     13262annotation(__JModelica(UnitTesting(tests={
     13263    FlatteningTestCase(
     13264        name="InputAsArraySize13",
     13265        description="Parameters that decide size of array expression should be structural",
     13266        flatModel="
    1326513267fclass FunctionTests.InputAsArraySize13
    1326613268 structural parameter Integer p = 3 /* 3 */;
     
    1327313275 algorithm
    1327413276  init y as Real[n];
    13275   y[:] := 1:n;
     13277  y := 1:n;
    1327613278  return;
    1327713279 end FunctionTests.InputAsArraySize13.f;
     
    1330013302    (x, y) = f(p1, p2);
    1330113303
    13302     annotation(__JModelica(UnitTesting(tests={
    13303         FlatteningTestCase(
    13304             name="InputAsArraySize14",
    13305             description="Parameters that decide size of array expression should be structural",
    13306             flatModel="
     13304annotation(__JModelica(UnitTesting(tests={
     13305    FlatteningTestCase(
     13306        name="InputAsArraySize14",
     13307        description="Parameters that decide size of array expression should be structural",
     13308        flatModel="
    1330713309fclass FunctionTests.InputAsArraySize14
    1330813310 structural parameter Integer p1 = 2 /* 2 */;
     
    1332213324  init y as Real[n];
    1332313325  init z as Real[m];
    13324   y[:] := 1:n;
    13325   y[:] := 1:m;
     13326  y := 1:n;
     13327  y := 1:m;
    1332613328  return;
    1332713329 end FunctionTests.InputAsArraySize14.f;
     
    1334713349    Real x = sum(f(p1, p2));
    1334813350
    13349     annotation(__JModelica(UnitTesting(tests={
    13350         FlatteningTestCase(
    13351             name="InputAsArraySize15",
    13352             description="Parameters that decide size of array expression should be structural",
    13353             flatModel="
     13351annotation(__JModelica(UnitTesting(tests={
     13352    FlatteningTestCase(
     13353        name="InputAsArraySize15",
     13354        description="Parameters that decide size of array expression should be structural",
     13355        flatModel="
    1335413356fclass FunctionTests.InputAsArraySize15
    1335513357 structural parameter Integer p1 = 2 /* 2 */;
     
    1336613368  init y as Real[n];
    1336713369  init z as Real[m];
    13368   y[:] := 1:n;
    13369   y[:] := 1:m;
     13370  y := 1:n;
     13371  y := 1:m;
    1337013372  return;
    1337113373 end FunctionTests.InputAsArraySize15.f;
     
    1457914581  output Real c;
    1458014582 algorithm
    14581   assert(size(a, 1) == 1, \"Mismatching size in dimension 1 of expression scalar(a[:,:]) in function FunctionTests.UnknownSize.Hidden.Scalar1.f\");
    14582   assert(size(a, 2) == 1, \"Mismatching size in dimension 2 of expression scalar(a[:,:]) in function FunctionTests.UnknownSize.Hidden.Scalar1.f\");
     14583  assert(size(a, 1) == 1, \"Mismatching size in dimension 1 of expression scalar(a) in function FunctionTests.UnknownSize.Hidden.Scalar1.f\");
     14584  assert(size(a, 2) == 1, \"Mismatching size in dimension 2 of expression scalar(a) in function FunctionTests.UnknownSize.Hidden.Scalar1.f\");
    1458314585  c := 2 * a[1,1];
    1458414586  return;
     
    1461914621  init c as Real[2];
    1462014622  assert(2 * size(a, 2) == 2, \"Mismatching sizes in FunctionTests.UnknownSize.Hidden.Vector1.f\");
    14621   assert(2 * size(a, 2) <= 2 + size(a, 2) - 2 + 1, \"Mismatching size in expression vector(a[1:2,:]) in function FunctionTests.UnknownSize.Hidden.Vector1.f\");
     14623  assert(2 * size(a, 2) <= 2 + size(a, 2) - 2 + 1, \"Mismatching size in expression vector(a) in function FunctionTests.UnknownSize.Hidden.Vector1.f\");
    1462214624  init temp_1 as Real[2 * size(a, 2)];
    1462314625  for i1 in 1:2 loop
     
    1466414666 algorithm
    1466514667  init c as Real[1, 1];
    14666   assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression matrix(a[1:1,1:1,:]) in function FunctionTests.UnknownSize.Hidden.Matrix1.f\");
     14668  assert(size(a, 3) == 1, \"Mismatching size in dimension 3 of expression matrix(a) in function FunctionTests.UnknownSize.Hidden.Matrix1.f\");
    1466714669  init temp_1 as Real[1, 1];
    1466814670  for i1 in 1:1 loop
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/InnerOuterTests.mo

    r10783 r14150  
    403403    B b;
    404404
    405     annotation(__JModelica(UnitTesting(tests={
    406         FlatteningTestCase(
    407             name="InnerOuterTest15",
    408             description="",
    409             flatModel="
     405annotation(__JModelica(UnitTesting(tests={
     406    FlatteningTestCase(
     407        name="InnerOuterTest15",
     408        description="",
     409        flatModel="
    410410fclass InnerOuterTests.InnerOuterTest15
    411411 Real a.x[2];
     
    429429    A a;
    430430
    431     annotation(__JModelica(UnitTesting(tests={
    432         FlatteningTestCase(
    433             name="InnerOuterTest16",
    434             description="Flattening of accesses to outer array with array subscripts",
    435             flatModel="
     431annotation(__JModelica(UnitTesting(tests={
     432    FlatteningTestCase(
     433        name="InnerOuterTest16",
     434        description="Flattening of accesses to outer array with array subscripts",
     435        flatModel="
    436436fclass InnerOuterTests.InnerOuterTest16
    437437 Real x[3] = {1, 2, 3} * time;
     
    607607    B b;
    608608
    609     annotation(__JModelica(UnitTesting(tests={
    610         FlatteningTestCase(
    611             name="InnerOuterTest21",
    612             description="Flattening array access in function in inner",
    613             flatModel="
     609annotation(__JModelica(UnitTesting(tests={
     610    FlatteningTestCase(
     611        name="InnerOuterTest21",
     612        description="Flattening array access in function in inner",
     613        flatModel="
    614614fclass InnerOuterTests.InnerOuterTest21
    615615 Real b.a.y[2] = InnerOuterTests.InnerOuterTest21.b.m.f({time, time});
     
    622622  assert(2 == size(x, 1), \"Mismatching sizes in function 'InnerOuterTests.InnerOuterTest21.b.m.f', component 'x', dimension '1'\");
    623623  init y as Real[2];
    624   y[1:2] := x[1:2];
     624  y := x;
    625625  return;
    626626 end InnerOuterTests.InnerOuterTest21.b.m.f;
     
    654654    inner M m;
    655655
    656     annotation(__JModelica(UnitTesting(tests={
    657         FlatteningTestCase(
    658             name="InnerOuterTest22",
    659             description="Flattening array access in short class decl in inner",
    660             flatModel="
     656annotation(__JModelica(UnitTesting(tests={
     657    FlatteningTestCase(
     658        name="InnerOuterTest22",
     659        description="Flattening array access in short class decl in inner",
     660        flatModel="
    661661fclass InnerOuterTests.InnerOuterTest22
    662662 Real m.y[2] = InnerOuterTests.InnerOuterTest22.m.f2(m.X[1:2]);
     
    669669 algorithm
    670670  init y as Real[size(x, 1)];
    671   y := x[:];
     671  y := x;
    672672  return;
    673673 end InnerOuterTests.InnerOuterTest22.m.f2;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/ModificationTests.mo

    r12245 r14150  
    24752475    record B = A;
    24762476
    2477     annotation(__JModelica(UnitTesting(tests={
    2478         FlatteningTestCase(
    2479             name="ArrayModifications71",
    2480             description="Test type checking of modifiers on records with short class declarations",
    2481             flatModel="
     2477annotation(__JModelica(UnitTesting(tests={
     2478    FlatteningTestCase(
     2479        name="ArrayModifications71",
     2480        description="Test type checking of modifiers on records with short class declarations",
     2481        flatModel="
    24822482fclass ModificationTests.ArrayModifications71
    24832483 ModificationTests.ArrayModifications71.B b1[1] = b2[1:1];
     
    25062506    end B;
    25072507
    2508     annotation(__JModelica(UnitTesting(tests={
    2509         FlatteningTestCase(
    2510             name="ArrayModifications72",
    2511             description="Test type checking of modifiers on records with inheritance",
    2512             flatModel="
     2508annotation(__JModelica(UnitTesting(tests={
     2509    FlatteningTestCase(
     2510        name="ArrayModifications72",
     2511        description="Test type checking of modifiers on records with inheritance",
     2512        flatModel="
    25132513fclass ModificationTests.ArrayModifications72
    25142514 ModificationTests.ArrayModifications72.B b1[1] = b2[1:1];
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/NameTests.mo

    r13948 r14150  
    13871387    L f;
    13881388
    1389     annotation(__JModelica(UnitTesting(tests={
    1390         FlatteningTestCase(
    1391             name="ConstantLookup22",
    1392             description="Class lookup through redeclares with constrainedby, complex example",
    1393             flatModel="
     1389annotation(__JModelica(UnitTesting(tests={
     1390    FlatteningTestCase(
     1391        name="ConstantLookup22",
     1392        description="Class lookup through redeclares with constrainedby, complex example",
     1393        flatModel="
    13941394fclass NameTests.ConstantLookup22
    13951395 Real f.d.a[2] = f.e[1:2];
    13961396 Real f.e[2] = ones(2);
    1397 
    13981397end NameTests.ConstantLookup22;
    13991398")})));
     
    29732972  Real x = y.z[i];
    29742973
    2975     annotation(__JModelica(UnitTesting(tests={
    2976         FlatteningTestCase(
    2977             name="IndexLookup1",
    2978             description="Name lookup from within array subscript",
    2979             flatModel="
     2974annotation(__JModelica(UnitTesting(tests={
     2975    FlatteningTestCase(
     2976        name="IndexLookup1",
     2977        description="Name lookup from within array subscript",
     2978        flatModel="
    29802979fclass NameTests.IndexLookup1
    29812980 parameter Integer i = 2 /* 2 */;
    29822981 Real y.z[2] = {1, 2};
    29832982 Real x = (y.z[1:2])[i];
    2984 
    29852983end NameTests.IndexLookup1;
    29862984")})));
     
    29982996  Real x = y.z[i];
    29992997
    3000     annotation(__JModelica(UnitTesting(tests={
    3001         FlatteningTestCase(
    3002             name="IndexLookup2",
    3003             description="Name lookup from within array subscript",
    3004             flatModel="
     2998annotation(__JModelica(UnitTesting(tests={
     2999    FlatteningTestCase(
     3000        name="IndexLookup2",
     3001        description="Name lookup from within array subscript",
     3002        flatModel="
    30053003fclass NameTests.IndexLookup2
    30063004 parameter Integer i = 2 /* 2 */;
     
    30083006 Real y.z[2] = {1, 2};
    30093007 Real x = (y.z[1:2])[i];
    3010 
    30113008end NameTests.IndexLookup2;
    30123009")})));
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/OperatorRecordTests.mo

    r13456 r14150  
    32243224 algorithm
    32253225  init y as OperatorRecordTests.Cplx[n];
    3226   y[:] := {OperatorRecordTests.Cplx.'constructor'(i, 0) for i in 1:n};
     3226  y := {OperatorRecordTests.Cplx.'constructor'(i, 0) for i in 1:n};
    32273227  return;
    32283228 end OperatorRecordTests.BuildArrayInInst1.f;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/OverconstrainedConnection.mo

    r13456 r14150  
    7676  assert(2 == size(i2, 1), \"Mismatching sizes in function 'OverconstrainedConnection.OverconstrainedCorrect1.T1.equalityConstraint', component 'i2', dimension '1'\");
    7777  init o as Real[1];
    78   o[1:1] := sum(i1[1:2] .+ i2[1:2]);
     78  o := sum(i1 .+ i2);
    7979  return;
    8080 end OverconstrainedConnection.OverconstrainedCorrect1.T1.equalityConstraint;
     
    146146  assert(2 == size(i2, 1), \"Mismatching sizes in function 'OverconstrainedConnection.OverconstrainedCorrect2.T1.equalityConstraint', component 'i2', dimension '1'\");
    147147  init o as Real[1];
    148   o[1:1] := sum(i1[1:2] .+ i2[1:2]);
     148  o := sum(i1 .+ i2);
    149149  return;
    150150 end OverconstrainedConnection.OverconstrainedCorrect2.T1.equalityConstraint;
     
    10211021  assert(2 == size(i2, 1), \"Mismatching sizes in function 'OverconstrainedConnection.PureConnectLoop3.T1.equalityConstraint', component 'i2', dimension '1'\");
    10221022  init o as Real[1];
    1023   o[1:1] := sum(i1[1:2] .+ i2[1:2]);
     1023  o := sum(i1 .+ i2);
    10241024  return;
    10251025 end OverconstrainedConnection.PureConnectLoop3.T1.equalityConstraint;
     
    10951095  assert(2 == size(i2, 1), \"Mismatching sizes in function 'OverconstrainedConnection.PureConnectLoop4.T1.equalityConstraint', component 'i2', dimension '1'\");
    10961096  init o as Real[1];
    1097   o[1:1] := sum(i1[1:2] .+ i2[1:2]);
     1097  o := sum(i1 .+ i2);
    10981098  return;
    10991099 end OverconstrainedConnection.PureConnectLoop4.T1.equalityConstraint;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/RecordTests.mo

    r12916 r14150  
    23712371    Real y[m] = a.x;
    23722372
    2373     annotation(__JModelica(UnitTesting(tests={
    2374         FlatteningTestCase(
    2375             name="RecordArray8",
    2376             description="Flattening of model with record that gets array size of member from function call that returns entire record",
    2377             flatModel="
     2373annotation(__JModelica(UnitTesting(tests={
     2374    FlatteningTestCase(
     2375        name="RecordArray8",
     2376        description="Flattening of model with record that gets array size of member from function call that returns entire record",
     2377        flatModel="
    23782378fclass RecordTests.RecordArray8
    23792379 structural parameter Integer m = 2 /* 2 */;
     
    23872387 algorithm
    23882388  a.n := n2;
    2389   a.x[:] := 1:n2;
     2389  a.x := 1:n2;
    23902390  return;
    23912391 end RecordTests.RecordArray8.f;
     
    30463046    R r5;
    30473047
    3048     annotation(__JModelica(UnitTesting(tests={
    3049         FlatteningTestCase(
    3050             name="RecordConstructor14",
    3051             description="Parameter in record depending on size of input to constructor",
    3052             flatModel="
     3048annotation(__JModelica(UnitTesting(tests={
     3049    FlatteningTestCase(
     3050        name="RecordConstructor14",
     3051        description="Parameter in record depending on size of input to constructor",
     3052        flatModel="
    30533053fclass RecordTests.RecordConstructor14
    30543054 parameter RecordTests.RecordConstructor14.R r1(x(size() = {1})) = RecordTests.RecordConstructor14.R({1}, size({1}, 1)) /* RecordTests.RecordConstructor14.R({ 1 }, 1) */;
     
    34853485    D d(redeclare B b, a2 = {A(2), A(3)});
    34863486
    3487     annotation(__JModelica(UnitTesting(tests={
    3488         FlatteningTestCase(
    3489             name="RecordConstructor25",
    3490             description="Array of records with constructors used in modification on redeclare",
    3491             flatModel="
     3487annotation(__JModelica(UnitTesting(tests={
     3488    FlatteningTestCase(
     3489        name="RecordConstructor25",
     3490        description="Array of records with constructors used in modification on redeclare",
     3491        flatModel="
    34923492fclass RecordTests.RecordConstructor25
    34933493 structural parameter Integer d.b.n = 2 /* 2 */;
     
    35833583    parameter R r = R(a={p});
    35843584
    3585     annotation(__JModelica(UnitTesting(tests={
    3586         FlatteningTestCase(
    3587             name="RecordConstructor28",
    3588             description="",
    3589             flatModel="
     3585annotation(__JModelica(UnitTesting(tests={
     3586    FlatteningTestCase(
     3587        name="RecordConstructor28",
     3588        description="",
     3589        flatModel="
    35903590fclass RecordTests.RecordConstructor28
    35913591 parameter Real p;
     
    36203620    C c;
    36213621
    3622     annotation(__JModelica(UnitTesting(tests={
    3623         FlatteningTestCase(
    3624             name="RecordConstructor29",
    3625             description="",
    3626             flatModel="
     3622annotation(__JModelica(UnitTesting(tests={
     3623    FlatteningTestCase(
     3624        name="RecordConstructor29",
     3625        description="",
     3626        flatModel="
    36273627fclass RecordTests.RecordConstructor29
    36283628 parameter Real c.p = -20 /* -20 */;
     
    59015901    R y = x[integer(time)];
    59025902
    5903     annotation(__JModelica(UnitTesting(tests={
    5904         TransformCanonicalTestCase(
    5905             name="RecordScalarize53",
    5906             description="",
    5907             flatModel="
     5903annotation(__JModelica(UnitTesting(tests={
     5904    TransformCanonicalTestCase(
     5905        name="RecordScalarize53",
     5906        description="",
     5907        flatModel="
    59085908fclass RecordTests.RecordScalarize53
    59095909 constant Real x[1].x = 1;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/RedeclareTests.mo

    r13948 r14150  
    59865986    Real x[2] = C.B({1, 2});
    59875987
    5988     annotation(__JModelica(UnitTesting(tests={
    5989         FlatteningTestCase(
    5990             name="RedeclareFunction1",
    5991             description="Lookup with modifications in extending function",
    5992             flatModel="
     5988annotation(__JModelica(UnitTesting(tests={
     5989    FlatteningTestCase(
     5990        name="Function_RedeclareFunction1",
     5991        description="Lookup with modifications in extending function",
     5992        flatModel="
    59935993fclass RedeclareTests.Function.RedeclareFunction1
    5994  Real x[2] = RedeclareTests.Function.RedeclareFunction1.C.B({1,2});
     5994 Real x[2] = RedeclareTests.Function.RedeclareFunction1.C.B({1, 2});
    59955995
    59965996public
     
    60016001  assert(2 == size(i, 1), \"Mismatching sizes in function 'RedeclareTests.Function.RedeclareFunction1.C.B', component 'i', dimension '1'\");
    60026002  init o as Real[2];
    6003   o[1:2] := i[1:2];
     6003  o := i;
    60046004  return;
    60056005 end RedeclareTests.Function.RedeclareFunction1.C.B;
     
    60386038    C.D x = C.B({1, 2});
    60396039
    6040     annotation(__JModelica(UnitTesting(tests={
    6041         FlatteningTestCase(
    6042             name="RedeclareFunction2",
    6043             description="Lookup in extending function with redeclared record",
    6044             flatModel="
     6040annotation(__JModelica(UnitTesting(tests={
     6041    FlatteningTestCase(
     6042        name="Function_RedeclareFunction2",
     6043        description="Lookup in extending function with redeclared record",
     6044        flatModel="
    60456045fclass RedeclareTests.Function.RedeclareFunction2
    60466046 RedeclareTests.Function.RedeclareFunction2.C.D x(a(size() = {2})) = RedeclareTests.Function.RedeclareFunction2.C.B({1, 2});
     
    60526052 algorithm
    60536053  assert(2 == size(i, 1), \"Mismatching sizes in function 'RedeclareTests.Function.RedeclareFunction2.C.B', component 'i', dimension '1'\");
    6054   o.a[1:2] := i[1:2];
     6054  o.a := i;
    60556055  return;
    60566056 end RedeclareTests.Function.RedeclareFunction2.C.B;
  • branches/dev-jk-2720/Compiler/ModelicaFrontEnd/test/modelica/TypeTests.mo

    r12553 r14150  
    18011801    z = x;
    18021802
    1803     annotation(__JModelica(UnitTesting(tests={
    1804         FlatteningTestCase(
    1805             name="Primitive1",
    1806             description="Short class decl of type that is array of Real",
    1807             flatModel="
     1803annotation(__JModelica(UnitTesting(tests={
     1804    FlatteningTestCase(
     1805        name="Primitive1",
     1806        description="Short class decl of type that is array of Real",
     1807        flatModel="
    18081808fclass TypeTests.Primitive1
    18091809 Real x[3] = {1, 2, 3};
     
    18341834    z = x;
    18351835
    1836     annotation(__JModelica(UnitTesting(tests={
    1837         FlatteningTestCase(
    1838             name="Primitive2",
    1839             description="Class decl extending type that is array of Real",
    1840             flatModel="
     1836annotation(__JModelica(UnitTesting(tests={
     1837    FlatteningTestCase(
     1838        name="Primitive2",
     1839        description="Class decl extending type that is array of Real",
     1840        flatModel="
    18411841fclass TypeTests.Primitive2
    18421842 Real x[3] = {1, 2, 3};
     
    18721872    z4 = y;
    18731873
    1874     annotation(__JModelica(UnitTesting(tests={
    1875         FlatteningTestCase(
    1876             name="Primitive3",
    1877             description="Short class decl of type that is array of Real, adding dimensions in several levels",
    1878             flatModel="
     1874annotation(__JModelica(UnitTesting(tests={
     1875    FlatteningTestCase(
     1876        name="Primitive3",
     1877        description="Short class decl of type that is array of Real, adding dimensions in several levels",
     1878        flatModel="
    18791879fclass TypeTests.Primitive3
    18801880 Real x[3,2] = {{1, 2}, {3, 4}, {5, 6}};
     
    19151915    z2 = transpose(z1);
    19161916
    1917     annotation(__JModelica(UnitTesting(tests={
    1918         FlatteningTestCase(
    1919             name="Primitive4",
    1920             description="",
    1921             flatModel="
     1917annotation(__JModelica(UnitTesting(tests={
     1918    FlatteningTestCase(
     1919        name="Primitive4",
     1920        description="",
     1921        flatModel="
    19221922fclass TypeTests.Primitive4
    19231923 Real x[3] = {1, 2, 3};
     
    19371937  assert(3 == size(y, 1), \"Mismatching sizes in function 'TypeTests.Primitive4.f', component 'y', dimension '1'\");
    19381938  init z as Real[3, 3];
    1939   z[1:3,1:3] := {x[1:3], cross(x[1:3], y[1:3]), y[1:3]};
     1939  z := {x, cross(x, y), y};
    19401940  return;
    19411941 end TypeTests.Primitive4.f;
     
    25532553        rec2 := if size(arr2, 1) == 1 then R(r = arr2) else R(r = arr1);
    25542554
    2555     annotation(__JModelica(UnitTesting(tests={
    2556         FlatteningTestCase(
    2557             name="FunctionArgument1",
    2558             description="Verifies that for functional arguments within if-statements
    2559                     only the used branch is type-checked.",
    2560             flatModel="
     2555annotation(__JModelica(UnitTesting(tests={
     2556    FlatteningTestCase(
     2557        name="FunctionArgument1",
     2558        description="
     2559Verifies that for functional arguments within if-statements
     2560                    only the used branch is type-checked.
     2561",
     2562        flatModel="
    25612563fclass TypeTests.FunctionArgument1
    25622564 Real arr1[1] = {0};
     
    29592961    Real y[:] = Subtask.decouple(x);
    29602962
    2961     annotation(__JModelica(UnitTesting(tests={
    2962         FlatteningTestCase(
    2963             name="DecoupleTest1",
    2964             description="Test flattening of Subtask.decouple() operator",
    2965             flatModel="
     2963annotation(__JModelica(UnitTesting(tests={
     2964    FlatteningTestCase(
     2965        name="DecoupleTest1",
     2966        description="Test flattening of Subtask.decouple() operator",
     2967        flatModel="
    29662968fclass TypeTests.DecoupleTest1
    29672969 Real x[2] = time * (1:2);
  • branches/dev-jk-2720/Compiler/ModelicaMiddleEnd/test/modelica/Differentiation.mo

    r12754 r14150  
    957957            Real y[3,2] = der(transpose(x));
    958958
    959     annotation(__JModelica(UnitTesting(tests={
    960         FlatteningTestCase(
    961             name="Expressions_Transpose",
    962             description="Derivative of transpose()",
    963             flatModel="
     959        annotation(__JModelica(UnitTesting(tests={
     960            FlatteningTestCase(
     961                name="Expressions_Transpose",
     962                description="Derivative of transpose()",
     963                flatModel="
    964964fclass Differentiation.Expressions.Transpose
    965965 Real x[2,3] = {{1, 2, 3}, {4, 5, 6}} * time;
     
    974974            Real z[2,2] = der(outerProduct(x, y));
    975975
    976     annotation(__JModelica(UnitTesting(tests={
    977         FlatteningTestCase(
    978             name="Expressions_OuterProduct",
    979             description="Derivative of outerProduct()",
    980             flatModel="
     976        annotation(__JModelica(UnitTesting(tests={
     977            FlatteningTestCase(
     978                name="Expressions_OuterProduct",
     979                description="Derivative of outerProduct()",
     980                flatModel="
    981981fclass Differentiation.Expressions.OuterProduct
    982982 Real x[2] = {1, 2} * time;
     
    10081008            Real z[3] = der(cross(x, y));
    10091009
    1010     annotation(__JModelica(UnitTesting(tests={
    1011         FlatteningTestCase(
    1012             name="Expressions_Cross",
    1013             description="Derivative of cross()",
    1014             flatModel="
     1010        annotation(__JModelica(UnitTesting(tests={
     1011            FlatteningTestCase(
     1012                name="Expressions_Cross",
     1013                description="Derivative of cross()",
     1014                flatModel="
    10151015fclass Differentiation.Expressions.Cross
    10161016 Real x[3] = {1, 2, 3} * time;
     
    10251025            Real y[3,3] = der(skew(x));
    10261026
    1027     annotation(__JModelica(UnitTesting(tests={
    1028         FlatteningTestCase(
    1029             name="Expressions_Skew",
    1030             description="Derivative of skew()",
    1031             flatModel="
     1027        annotation(__JModelica(UnitTesting(tests={
     1028            FlatteningTestCase(
     1029                name="Expressions_Skew",
     1030                description="Derivative of skew()",
     1031                flatModel="
    10321032fclass Differentiation.Expressions.Skew
    10331033 Real x[3] = {1, 2, 3} * time;
     
    11541154            Real z[4] = der(cat(1, x, y));
    11551155
    1156     annotation(__JModelica(UnitTesting(tests={
    1157         FlatteningTestCase(
    1158             name="Expressions_Cat",
    1159             description="Derivative of cat()",
    1160             flatModel="
     1156        annotation(__JModelica(UnitTesting(tests={
     1157            FlatteningTestCase(
     1158                name="Expressions_Cat",
     1159                description="Derivative of cat()",
     1160                flatModel="
    11611161fclass Differentiation.Expressions.Cat
    11621162 Real x[2] = {1, 2} * time;
     
    12431243            Real y[2,2] = der(diagonal(x));
    12441244
    1245     annotation(__JModelica(UnitTesting(tests={
    1246         FlatteningTestCase(
    1247             name="Expressions_Diagonal",
    1248             description="Derivative of diagonal()",
    1249             flatModel="
     1245        annotation(__JModelica(UnitTesting(tests={
     1246            FlatteningTestCase(
     1247                name="Expressions_Diagonal",
     1248                description="Derivative of diagonal()",
     1249                flatModel="
    12501250fclass Differentiation.Expressions.Diagonal
    12511251 Real x[2] = {1, 2} * time;
     
    12591259            Real y = der(scalar(x));
    12601260
    1261     annotation(__JModelica(UnitTesting(tests={
    1262         FlatteningTestCase(
    1263             name="Expressions_Scalar",
    1264             description="Derivative of scalar()",
    1265             flatModel="
     1261        annotation(__JModelica(UnitTesting(tests={
     1262            FlatteningTestCase(
     1263                name="Expressions_Scalar",
     1264                description="Derivative of scalar()",
     1265                flatModel="
    12661266fclass Differentiation.Expressions.Scalar
    12671267 Real x[1,1,1] = {{{time}}};
     
    12751275            Real y[1] = der(vector(x));
    12761276
    1277     annotation(__JModelica(UnitTesting(tests={
    1278         FlatteningTestCase(
    1279             name="Expressions_Vector",
    1280             description="Derivative of vector()",
    1281             flatModel="
     1277        annotation(__JModelica(UnitTesting(tests={
     1278            FlatteningTestCase(
     1279                name="Expressions_Vector",
     1280                description="Derivative of vector()",
     1281                flatModel="
    12821282fclass Differentiation.Expressions.Vector
    12831283 Real x[1,1,1] = {{{time}}};
     
    12911291            Real y[1,1] = der(matrix(x));
    12921292
    1293     annotation(__JModelica(UnitTesting(tests={
    1294         FlatteningTestCase(
    1295             name="Expressions_Matrix",
    1296             description="Derivative of matrix()",
    1297             flatModel="
     1293        annotation(__JModelica(UnitTesting(tests={
     1294            FlatteningTestCase(
     1295                name="Expressions_Matrix",
     1296                description="Derivative of matrix()",
     1297                flatModel="
    12981298fclass Differentiation.Expressions.Matrix
    12991299 Real x[1,1,1] = {{{time}}};
  • branches/dev-jk-2720/Compiler/ModelicaMiddleEnd/test/modelica/ScalarizeFunctionTemporaries.mo

    r12716 r14150  
    8989end RangeInSumInSum;
    9090
    91 end ScalarizeFunctionUnrolledTests;
     91end ScalarizeFunctionTemporaries;
  • branches/dev-jk-2720/Compiler/ModelicaMiddleEnd/test/modelica/ScalarizeFunctionVectorTests.mo

    r12493 r14150  
    6868    Real[1] y = f({{{1}}});
    6969
    70     annotation(__JModelica(UnitTesting(tests={
    71         TransformCanonicalTestCase(
    72             name="Vector2",
    73             description="Scalarization of functions: unknown size vector operator",
    74             variability_propagation=false,
    75             inline_functions="none",
    76             flatModel="
     70annotation(__JModelica(UnitTesting(tests={
     71    TransformCanonicalTestCase(
     72        name="Vector2",
     73        description="Scalarization of functions: unknown size vector operator",
     74        variability_propagation=false,
     75        inline_functions="none",
     76        flatModel="
    7777fclass ScalarizeFunctionVectorTests.Vector2
    7878 Real y[1];
     
    8787 algorithm
    8888  init b as Real[size(a, 1) * size(a, 2) * size(a, 3)];
    89   assert(size(a, 1) * size(a, 2) * size(a, 3) <= size(a, 1) + size(a, 2) + size(a, 3) - 3 + 1, \"Mismatching size in expression vector(a[:,:,:]) in function ScalarizeFunctionVectorTests.Vector2.f\");
     89  assert(size(a, 1) * size(a, 2) * size(a, 3) <= size(a, 1) + size(a, 2) + size(a, 3) - 3 + 1, \"Mismatching size in expression vector(a) in function ScalarizeFunctionVectorTests.Vector2.f\");
    9090  init temp_1 as Real[size(a, 1) * size(a, 2) * size(a, 3)];
    9191  for i1 in 1:size(a, 1) loop
  • branches/dev-jk-2720/Compiler/ModelicaMiddleEnd/test/modelica/TransformCanonicalTests.mo

    r12716 r14150  
    29812981    end when;
    29822982
    2983     annotation(__JModelica(UnitTesting(tests={
    2984         FlatteningTestCase(
    2985             name="WhenEqu15",
    2986             description="Basic test of when equations",
    2987             equation_sorting=true,
    2988             flatModel="
     2983annotation(__JModelica(UnitTesting(tests={
     2984    FlatteningTestCase(
     2985        name="WhenEqu15",
     2986        description="Basic test of when equations",
     2987        equation_sorting=true,
     2988        flatModel="
    29892989fclass TransformCanonicalTests.WhenEqu15
    29902990 discrete Real x[3];
     
    39653965    end if;
    39663966
    3967     annotation(__JModelica(UnitTesting(tests={
    3968         FlatteningTestCase(
    3969             name="IfEqu1",
    3970             description="If equations: flattening",
    3971             flatModel="
     3967annotation(__JModelica(UnitTesting(tests={
     3968    FlatteningTestCase(
     3969        name="IfEqu1",
     3970        description="If equations: flattening",
     3971        flatModel="
    39723972fclass TransformCanonicalTests.IfEqu1
    39733973 Real x[3];
Note: See TracChangeset for help on using the changeset viewer.