Skip to content

Optimize Elaboration #736

Merged
ranjitjhala merged 10 commits into
developfrom
vrindisbacher/elab-opt
Feb 6, 2025
Merged

Optimize Elaboration #736
ranjitjhala merged 10 commits into
developfrom
vrindisbacher/elab-opt

Conversation

@vrindisbacher

@vrindisbacher vrindisbacher commented Feb 5, 2025

Copy link
Copy Markdown
Collaborator

@ranjitjhala, this one is from the liquid-fixpoint origin but has the same changes as #735

(copying over notes)

A few changes are implemented here:

  • Delaying use of applyExpr in elab until after all the elaboration has taken place.
  • Separate type Visitor and type Folder into two separate structures.
  • Additionally, ditch using the State monad for folding and replace it with the Reader monad - similar to what is implemented for CheckM
  • Ripping out a redundant unifyExpr. This seemed to be re-traversing the expression tree and creating type substitutions by unifying sorts that were already unified in elabEAppSort.

[RJ: All of these together yield massive speedups for some flux benchmarks]

@vrindisbacher vrindisbacher mentioned this pull request Feb 5, 2025
@ranjitjhala ranjitjhala merged commit 54275fd into develop Feb 6, 2025
@ranjitjhala

Copy link
Copy Markdown
Member

Thanks @vrindisbacher -- seems to give some nice improvements in the LH benchmarks too!

@vrindisbacher

Copy link
Copy Markdown
Collaborator Author

Awesome!

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.

3 participants