mirror of
https://github.com/anoma/juvix.git
synced 2024-12-24 16:12:14 +03:00
Juvix empowers developers to write code in a high-level, functional language, compile it to gas-efficient output VM instructions, and formally verify the safety of their contracts prior to deployment and execution.
7db74442d4
* 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. |
||
---|---|---|
.devcontainer | ||
.github | ||
app | ||
assets | ||
bench | ||
bench2 | ||
config | ||
examples | ||
gnuplot | ||
include | ||
juvix-stdlib@0c456725a2 | ||
licenses | ||
runtime | ||
scripts | ||
src | ||
test | ||
tests | ||
.clang-format | ||
.github_changelog_generator | ||
.gitignore | ||
.gitmodules | ||
.hlint.yaml | ||
.pre-commit-config.yaml | ||
cabal.hie.yaml | ||
cabal.project | ||
cabal.project.freeze | ||
CHANGELOG.md | ||
cntlines.sh | ||
CODING.md | ||
CONTRIBUTING.md | ||
justfile | ||
LICENSE.md | ||
Makefile | ||
package.yaml | ||
README.md | ||
stack.hie.yaml | ||
stack.yaml |
Juvix
CI Status |
---|
Codebase |
This repository is specifically dedicated to the compiler of the Juvix programming language.
For any Juvix-related inquiries, we strongly advise visiting the following resources.
Our documentation offers an in-depth understanding of the Juvix programming language. It encompasses a language reference, examples, blog posts, and numerous other resources to facilitate effective use of Juvix.