Unnest array iterator calls by modifying the Lic printer.
The idea is the following: each time a nested iterator call (map<<map<<n,3>>,4>>) is encountered, we create a fresh alias name (create_alias_name) ad we add it in the node_alias_tbl. At the end of the compilation, LicDump.dump_node_alias is called, which prints the definition of those node aliases. For example, the expression "map<<map<<n,3>>,4>>" is printed like this: map<<_node_alias1, 4>> and later, the node alias is defined: node _node_alias1(x:int) returns(y:int); let y = map<<n,3>>(x); tel;
Showing
- src/getEff.ml 3 additions, 3 deletionssrc/getEff.ml
- src/lazyCompiler.ml 3 additions, 2 deletionssrc/lazyCompiler.ml
- src/licDump.ml 75 additions, 11 deletionssrc/licDump.ml
- src/licDump.mli 3 additions, 2 deletionssrc/licDump.mli
- src/main.ml 2 additions, 1 deletionsrc/main.ml
- src/predefEvalType.ml 17 additions, 12 deletionssrc/predefEvalType.ml
- src/predefEvalType.mli 3 additions, 2 deletionssrc/predefEvalType.mli
- src/split.ml 9 additions, 5 deletionssrc/split.ml
- src/split.mli 1 addition, 1 deletionsrc/split.mli
- src/test/test.res.exp 354 additions, 40 deletionssrc/test/test.res.exp
Loading
Please register or sign in to comment