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

[WIP] Memoization tables #1246

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

[WIP] Memoization tables #1246

wants to merge 7 commits into from

Conversation

imalsogreg
Copy link
Contributor

Add memotables to the pact state. We will temporarily ignore exactly what this will eventually be used for.

For now, we only want a memo table to exist in the pact state, and we provide a repl-only function to add entries to the memo table. This command should put (shift 10 1) => 20 into the memo table:

pact> (env-memoize shift 10 1)
"Ok"

In subsequent evaluations that include (shift 10 1) as a subterm, 20 should be substituted immediately instead of recomputing (shift 10 1).

The PR does not work right now:

pact> (env-memoize shift 10 1)
...
<interactive>:1:0:Error: Expected def: native `shift`  ...

I'm still trying to fix this.

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • Documentation has been updated if new natives or FV properties have been added. To generate new documentation, issue cabal run tests. If they pass locally, docs are generated.
  • Any changes that could be relevant to users have been recorded in the changelog
  • In case of changes to the Pact trace output (pact -t), make sure pact-lsp is in sync.

Additionally, please justify why you should or should not do the following:

  • Confirm replay/back compat
  • Benchmark regressions
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact

@imalsogreg
Copy link
Contributor Author

@jmcardon Think I should close this PR? Did we decide that all L2-related work will be against pact-core?

1 similar comment
@imalsogreg
Copy link
Contributor Author

@jmcardon Think I should close this PR? Did we decide that all L2-related work will be against pact-core?

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.

1 participant