Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lltz_codegen): change of version + type and other fixes for smartpy compatibility #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alanmarkoTrilitech
Copy link
Contributor

@alanmarkoTrilitech alanmarkoTrilitech commented Oct 4, 2024

Context

https://app.asana.com/0/1207308081067689/1207308081144596

Description

This PR changes the OCaml version, adds support for annotations, fixes some type issues, adds optimisation for removing tuple variable via a single drop and also make multiple smaller adjustments/ bug fixes to make LLTZ compatible with Michel->LLTZ compilation.

Manual testing

./build test-scenario-mockup-lltz -j8 > temp.out from smartpy

@alanmarkoTrilitech alanmarkoTrilitech requested review from rinderknecht and removed request for rinderknecht October 4, 2024 13:48
@alanmarkoTrilitech alanmarkoTrilitech force-pushed the alan@lltz_codegen/smartpy_compatible branch from 1e14806 to 43ef79c Compare October 7, 2024 14:25
(* Computes a map from free variables to their types in the given expression *)
let free_vars_with_types (expr : LLTZ.E.t) : LLTZ.T.t String.Map.t =
let empty = String.Map.empty in

let () = Printexc.record_backtrace true in
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debug

)
with
| e ->
let backtrace = Printexc.get_backtrace () in
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backtrace


(* prim m n instr stack: m elements are consumed from the stack, n elements are produced *)
let prim m n instr stack =
M.pp Format.err_formatter instr;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove pp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants