1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-25 08:34:10 +03:00
juvix/test
Łukasz Czajka 7db74442d4
Hoisting of loop-invariant subexpressions (#3195)
* Closes #3028 
* Detects fully-applied expressions of the form
```
f a (\{ x1 .. xk := body }) a'
```
where `f` is a recursive function which does not modify its function
argument (the one for which a lambda is provided), i.e., passes it to
recursive invocations unchanged (it's the second argument in the above
example). A function `f` satisfying this requirement implements some
kind of loop with the lambda-expression usually being the loop body /
action.

Let e.g. `body = g x1 .. xk b1 b2` where `b1`, `b2` do not contain any
variables bound in the lambda (`x1`,..,`xk`). If `b1`, `b2` are
non-trivial (require computation), then these loop-invariant
subexpressions are hoisted outside of the loop, obtaining:
```
let 
  y1 := b1;
  y2 := b2;
in
f a (\{ x1 .. xk := g x1 .. xk y1 y2) a'
```
* Adds a volatility info in Core which prevents the lets created by
loop-invariant expression hoisting from being folded back.
* Removes potential duplication in the specialization optimization.
* Adds another optimization phase before lambda-lifting where hoisting
of loop-invariant subexpressions is performed. This allows to reduce the
number of iterations in the main optimization phase after
lambda-lifting.
2024-12-03 11:21:09 +01:00
..
Anoma Enable Anoma compilation resource machine builtin tests (#3208) 2024-12-02 14:09:55 +01:00
Asm Refactor pipeline functions for tests (#2864) 2024-06-28 12:15:51 +02:00
BackendMarkdown Improve performance of formatting a project (#2863) 2024-07-01 18:05:24 +02:00
Casm The assert builtin (#3014) 2024-09-12 09:29:57 +02:00
Compilation Hoisting of loop-invariant subexpressions (#3195) 2024-12-03 11:21:09 +01:00
Core Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
Examples Run test suite in parallel (#2507) 2023-11-16 16:19:52 +01:00
Formatter Improve performance of formatting a project (#2863) 2024-07-01 18:05:24 +02:00
Internal Bugfix: modules associated with inductive types should be declared after their inductive types (#2768) 2024-05-14 19:32:22 +02:00
Isabelle Isabelle/HOL translation: comments (#2974) 2024-09-02 15:56:58 +02:00
Nockma Fix nock compilation and builtin evaluation of sha256 stdilb (#3175) 2024-11-14 18:54:39 +01:00
Package Parallel pipeline (#2779) 2024-05-31 12:41:30 +01:00
Parsing Improve parsing error for missing @ in named application (#3012) 2024-09-20 18:00:38 +01:00
Reg Dead code elimination in JuvixReg (#2835) 2024-06-24 13:56:50 +02:00
Repl Fix package-base interaction (#3139) 2024-11-01 14:42:18 +00:00
Resolver Fix typos (#2573) 2024-01-08 13:27:18 +01:00
Runtime Compile-time configuration (#3102) 2024-10-16 11:47:23 +02:00
Rust Update Anoma client to testnet-v1 release (#3190) 2024-11-25 18:28:24 +01:00
Scope Fix aliases to non-recursive names (#3203) 2024-12-01 11:20:10 +01:00
Termination Detect termination for nested local definitions (#3169) 2024-11-15 12:30:18 +01:00
Tree Fix JuvixTree unification (#3087) 2024-10-09 15:33:42 +02:00
Typecheck Fix named application bug (#3075) 2024-10-03 16:26:59 +01:00
Anoma.hs Support compilation to Anoma compatible functions (#2652) 2024-02-23 12:54:22 +00:00
Asm.hs Translation from JuvixAsm to C (#1619) 2022-12-06 11:33:20 +01:00
BackendMarkdown.hs Add MarkdownInfo entry in Module Concrete Decl and proper errors (#2515) 2023-11-16 11:20:34 +01:00
Base.hs Add anoma nockma tests (#3134) 2024-11-05 13:28:28 +00:00
Casm.hs Add precondition to run tests (#2887) 2024-07-15 10:02:48 +02:00
Compilation.hs Remove old typechecker (#2545) 2023-12-01 16:50:37 +01:00
Core.hs Implement core transformation let-hoisting (#2076) 2023-05-16 13:42:44 +02:00
Examples.hs Add a test suite for milestone examples (#1920) 2023-03-24 13:16:26 +00:00
Format.hs Improve performance of formatting a project (#2863) 2024-07-01 18:05:24 +02:00
Formatter.hs Add juvix format command (#1886) 2023-03-29 15:51:04 +02:00
Internal.hs Add translation from Internal to Core (#1567) 2022-11-07 14:47:56 +01:00
Isabelle.hs Translate function bodies to Isabelle/HOL (#2868) 2024-07-19 08:40:07 +01:00
Main.hs Remove VampIR compile command and tests (#3104) 2024-10-16 15:03:14 +02:00
Nockma.hs Improve performance of anomaEncode / anomaDecode in the Core evaluator (#2975) 2024-08-30 18:20:18 +01:00
Package.hs Use JuvixError instead of Text for errors in Package file loading (#2459) 2023-10-23 19:01:36 +01:00
Parsing.hs Disallow tab characters as spaces (#1523) 2022-09-07 13:59:41 +02:00
Reg.hs JuvixReg recursors (#2641) 2024-02-19 08:58:19 +00:00
Repl.hs Update REPL artifacts with builtins from stored modules (#2639) 2024-02-26 16:19:04 +00:00
Resolver.hs Per-module compilation (#2468) 2023-12-30 20:15:35 +01:00
Runtime.hs Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00
Rust.hs Add precondition to run tests (#2887) 2024-07-15 10:02:48 +02:00
Scope.hs [ CI ] New jobs: ormolu and hlint 2022-04-05 19:57:21 +02:00
Termination.hs Add the termination checker to the pipeline (#111) 2022-05-30 13:40:52 +02:00
Tree.hs Fix JuvixTree parsing and pretty printing (#3024) 2024-09-12 14:37:51 +02:00
Typecheck.hs Remove old typechecker (#2545) 2023-12-01 16:50:37 +01:00