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

Use Agda Haskell lib instead of MAlonzo #6562

Merged
merged 44 commits into from
Nov 5, 2024
Merged

Conversation

ana-pantilie
Copy link
Contributor

@ana-pantilie ana-pantilie commented Oct 11, 2024

Fixes #6424

To test, do cabal exec uplc -- example -s factorial | cabal exec uplc -- optimise --certify factorialCert.

Pre-submit checklist:

  • Branch
    • Tests are provided (if possible)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Changelog fragments have been written (if appropriate)
    • Relevant tickets are mentioned in commit messages
    • Formatting, PNG optimization, etc. are updated
  • PR
    • (For external contributions) Corresponding issue exists and is linked in the description
    • Targeting master unless this is a cherry-pick backport
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

@ana-pantilie ana-pantilie added the No Changelog Required Add this to skip the Changelog Check label Oct 29, 2024
@ana-pantilie ana-pantilie marked this pull request as ready for review October 29, 2024 12:46
@ana-pantilie ana-pantilie requested review from ramsay-t and a team October 29, 2024 12:47
Copy link
Member

@zliu41 zliu41 left a comment

Choose a reason for hiding this comment

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

This looks quite reasonable. The example command took ~15s on my machine - is it mostly the decision procedure?

-- ^ The trace produced by the simplification process
-> IO ()
runCertifier (Just certName) (SimplifierTrace simplTrace) = do
let processAgdaAST Simplification {beforeAST, stage, afterAST} =
Copy link
Member

Choose a reason for hiding this comment

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

nit: add type signature so it is easier to tell what it does.

instance AgdaUnparse AgdaFFI.UTerm where
agdaUnparse =
\case
AgdaFFI.UVar n -> "(UVar " ++ agdaUnparse (fromInteger n :: Natural) ++ ")"
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps future work, but you can use pretty printing operators like <+> so that you don't need to worry about space.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, with pretty-printing we could have proper indentation for example. But I agree it's not too important.

@ana-pantilie ana-pantilie merged commit 6fa1bc9 into master Nov 5, 2024
8 checks passed
@ana-pantilie ana-pantilie deleted the ana/use-agda-haskell-lib branch November 5, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Changelog Required Add this to skip the Changelog Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find a way to serialise Agda proof terms
6 participants