Skip to content

Commit

Permalink
Merge branch 'master' into kore-embed
Browse files Browse the repository at this point in the history
  • Loading branch information
rv-jenkins authored Jul 18, 2023
2 parents 9a102c2 + e3ed1bf commit 83702d5
Show file tree
Hide file tree
Showing 17 changed files with 5,902 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/runtime/collect.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ size_t get_size(uint64_t, uint16_t);
void migrate_once(block **);
void migrate_list(void *l);
void migrate_map(void *m);
void migrate_rangemap(void *m);
void migrate_set(void *s);
void migrate_collection_node(void **nodePtr);
void setKoreMemoryFunctionsForGMP(void);
Expand Down
2 changes: 1 addition & 1 deletion runtime/collect/collect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ migrate_child(void *currBlock, layoutitem *args, unsigned i, bool ptr) {
void *arg = ((char *)currBlock) + argData->offset;
switch (argData->cat) {
case MAP_LAYOUT: migrate_map(ptr ? *(map **)arg : arg); break;
case RANGEMAP_LAYOUT: abort();
case RANGEMAP_LAYOUT: migrate_rangemap(ptr ? *(rangemap **)arg : arg); break;
case LIST_LAYOUT: migrate_list(ptr ? *(list **)arg : arg); break;
case SET_LAYOUT: migrate_set(ptr ? *(set **)arg : arg); break;
case STRINGBUFFER_LAYOUT: migrate_string_buffer((stringbuffer **)arg); break;
Expand Down
17 changes: 17 additions & 0 deletions runtime/collect/migrate_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,20 @@ void migrate_map(void *m) {
migrate_collection_node((void **)&impl.root);
migrate_champ_traversal(impl.root, 0, migrate_map_leaf);
}

using treemap = rb_tree::RBTree<rng_map::Range<KElem>, KElem>;
void migrate_treemap(treemap t) {
if (t.empty()) {
return;
}
auto &data = t.root_data_mutable();
migrate_once(&data.first.start_mutable().elem);
migrate_once(&data.first.end_mutable().elem);
migrate_once(&data.second.elem);
migrate_treemap(t.left());
migrate_treemap(t.right());
}

void migrate_rangemap(void *m) {
migrate_treemap(((rangemap *)m)->treemap());
}
5,771 changes: 5,771 additions & 0 deletions test/defn/imp-with-rangemaps.kore

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions test/defn/k-files/imp-with-rangemaps.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Copyright (c) 2014-2019 K Team. All Rights Reserved.

// Modified IMP definition that adds range maps.

module IMP-WITH-RANGEMAPS-SYNTAX
imports RANGEMAP
imports BOOL-SYNTAX
imports INT-SYNTAX
imports ID

syntax AExp ::= Int | Id
| "rm_size" "(" RmExp ")" [klabel(rm_size(_)), symbol, strict]
| "lookup" "(" RmExp "," AExp ")" [klabel(lookup(_,_)), symbol, seqstrict]
| AExp "/" AExp [klabel(_/_), symbol, left, seqstrict, color(pink)]
> AExp "+" AExp [klabel(_+_), symbol, left, seqstrict, color(pink)]
| "(" AExp ")" [bracket]
syntax BExp ::= Bool
| "contains_key" "(" RmExp "," AExp ")" [klabel(contains_key(_,_)), symbol, seqstrict]
| AExp "<=" AExp [klabel(_<=_), symbol, seqstrict, latex({#1}\leq{#2}), color(pink)]
| "!" BExp [klabel(!_), symbol, strict, color(pink)]
> BExp "&&" BExp [klabel(_&&_), symbol, left, strict(1), color(pink)]
| "(" BExp ")" [bracket]
syntax RmExp ::= RangeMap | Id
| "empty" "(" ")" [klabel(empty()), symbol]
| "element" "(" AExp "," AExp "," AExp ")" [klabel(element(_,_,_)), symbol, seqstrict]
| "update" "(" RmExp "," AExp "," AExp "," AExp ")" [klabel(update(_,_,_,_)), symbol, seqstrict]
| "remove" "(" RmExp "," AExp "," AExp ")" [klabel(remove(_,_,_)), symbol, seqstrict]
| "updaterangemap" "(" RmExp "," RmExp ")" [klabel(updatermap(_,_)), symbol, seqstrict]
| "difference" "(" RmExp "," RmExp ")" [klabel(difference(_,_)), symbol, seqstrict]
syntax Block ::= "{" "}" [klabel({}), symbol]
| "{" Stmt "}" [klabel({_}), symbol, format(%1%i%n%2%d%n%3)]
syntax Stmt ::= Block
| Id "=" AExp ";" [klabel(_=a_;), symbol, strict(2), color(pink), format(%1 %2 %3%4)]
| Id "=" RmExp ";" [klabel(_=r_;), symbol, strict(2), color(pink), format(%1 %2 %3%4)]
| "if" "(" BExp ")"
Block "else" Block [klabel(if(_)_else_), symbol, strict(1), colors(yellow, white, white, yellow), format(%1 %2%3%4 %5 %6 %7)]
| "while" "(" BExp ")" Block [klabel(while(_)_), symbol, colors(yellow,white,white), format(%1 %2%3%4 %5)]
> Stmt Stmt [klabel(__), symbol, left, format(%1%n%2)]

syntax Pgm ::= "int" Ids ";" "rangemap" Ids ";" Stmt [klabel(int_;rangemap_;_), symbol, format(%1 %2%3%n%4 %5%6%n%7), colors(yellow,pink,yellow,pink)]
syntax Ids ::= List{Id,","} [klabel(_,_), symbol, format(%1%2 %3)]
endmodule

module IMP-WITH-RANGEMAPS
imports IMP-WITH-RANGEMAPS-SYNTAX
imports BOOL
imports INT
imports MAP
imports SET
imports BASIC-K

syntax KResult ::= Int | Bool | RangeMap
syntax KItem ::= Pgm

configuration <T color="yellow">
<k color="green"> $PGM:Pgm </k>
<state color="red"> .Map </state>
</T>

rule <k> X:Id => STATE[X] ... </k> <state> STATE </state> requires X in_keys(STATE)

rule <k> empty() => .RangeMap ... </k>
rule <k> element(S:Int, E:Int, V:Int) => [ S , E ) r|-> V ... </k>
rule <k> update(Rm:RangeMap, S:Int, E:Int, V:Int) => Rm [ [S, E) <- V ] ... </k>
rule <k> remove(Rm:RangeMap, S:Int, E:Int) => Rm [ [S, E) <- undef ] ... </k>
rule <k> updaterangemap(Rm1:RangeMap, Rm2:RangeMap) => updateRangeMap(Rm1, Rm2) ... </k>
rule <k> difference(Rm1:RangeMap, Rm2:RangeMap) => Rm1 -RangeMap Rm2 ... </k>
rule <k> contains_key(Rm:RangeMap, K:Int) => K in_keys ( Rm ) ... </k>
rule <k> rm_size(Rm:RangeMap) => size ( Rm ) ... </k>
rule <k> lookup(Rm:RangeMap, K:Int) => Rm [ K ] ... </k>

rule <k> I1 / I2 => I1 /Int I2 ... </k> requires I2 =/=Int 0
rule <k> I1 + I2 => I1 +Int I2 ... </k>

rule <k> I1 <= I2 => I1 <=Int I2 ... </k>
rule <k> ! T => notBool T ... </k>
rule <k> true && B => B ... </k>
rule <k> false && _ => false ... </k>

rule <k> {} => . ... </k>
rule <k> {S} => S ... </k>

rule <k> X = I:Int; => . ... </k> <state> STATE => STATE [ X <- I ] </state>
rule <k> X = Rm:RangeMap; => . ... </k> <state> STATE => STATE [ X <- Rm ] </state>

rule <k> S1:Stmt S2:Stmt => S1 ~> S2 ... </k>

rule <k> if (true) S else _ => S ... </k>
rule <k> if (false) _ else S => S ... </k>

rule [while]: <k> while (B) S => if (B) {S while (B) S} else {} ... </k>

rule <k> int (X , Xs => Xs) ; rangemap _ ; _ ... </k> <state> STATE => STATE [ X <- 0 ] </state>
requires notBool (X in keys(STATE))

rule <k> int .Ids ; rangemap (X , Xs => Xs) ; _ ... </k> <state> STATE => STATE [ X <- .RangeMap ] </state>
requires notBool (X in keys(STATE))

rule <k> int .Ids ; rangemap .Ids ; S => S ... </k>
endmodule
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-1.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("7000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))))))))
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsUnds'{}(Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("10000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("5001")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("10001"))))))))))
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-3.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("10000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("2")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("10001"))))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("15000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))))))))))))
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-4.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("10000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("5000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("2"))),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("3")))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("5")))))))))))))
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-5.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'UndsCommUnds'{}(\dv{SortId{}}("N"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}())),Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("N"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("N")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("2"))),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("3")))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("5")))))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("N"),Lbldifference'LParUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("N"))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblempty'LParRPar'{}())))))))
1 change: 1 addition & 0 deletions test/input/imp-with-rangemaps/imp-with-rangemaps-6.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LblinitGeneratedTopCell{}(Lbl'Unds'Map'Unds'{}(Lbl'Stop'Map{}(),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortKConfigVar{}, SortKItem{}}(\dv{SortKConfigVar{}}("$PGM")),inj{SortPgm{}, SortKItem{}}(Lblint'UndsSCln'rangemap'UndsSClnUnds'{}(Lbl'UndsCommUnds'{}(\dv{SortId{}}("i"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}()),Lbl'UndsCommUnds'{}(\dv{SortId{}}("M"),Lbl'UndsCommUnds'{}(\dv{SortId{}}("N"),Lbl'Stop'List'LBraQuotUndsCommUndsQuotRBraUnds'Ids{}())),Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lbl'UndsUnds'{}(Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblupdate'LParUndsCommUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1")))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("1"))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("2")))))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("N"),Lblupdatermap'LParUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("N")),inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("M"))))),Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("M"),Lblempty'LParRPar'{}())),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUnds'{}(Lbl'Unds-LT-EqlsUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("20000"))),Lbl'LBraUndsRBra'{}(Lbl'UndsUnds'{}(Lbl'UndsEqls'r'UndsSCln'{}(\dv{SortId{}}("N"),Lblremove'LParUndsCommUndsCommUndsRPar'{}(inj{SortId{}, SortRmExp{}}(\dv{SortId{}}("N")),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("3"))),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("4"))))),Lbl'UndsEqls'a'UndsSCln'{}(\dv{SortId{}}("i"),Lbl'UndsPlusUnds'{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("i")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("4")))))))))))))

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 83702d5

Please sign in to comment.