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

Introduce the Repeat Apalache operator #2927

Merged
merged 9 commits into from
Aug 14, 2024
Merged

Introduce the Repeat Apalache operator #2927

merged 9 commits into from
Aug 14, 2024

Conversation

Kukovec
Copy link
Collaborator

@Kukovec Kukovec commented Aug 8, 2024

  • Tests added for any new code
  • Ran make fmt-fix (or had formatting run automatically on all files edited)
  • Documentation added for any new functionality
  • Entries added to ./unreleased/ for any new functionality

Extends the suite of Apalache operators, by adding Repeat, a repeated iteration operator. Semantically,

Repeat(Op, N, x) = ApaFoldSeqLeft(Op, x, MkSeq(N, LAMBDA i: i))

However, in the encoding, we can avoid constructing the 1 to N sequence explicitly, for an efficiency gain.

Copy link
Collaborator

@konnov konnov left a comment

Choose a reason for hiding this comment

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

Looks good! Please add a few comments (see below). I believe that if we had a separate rewriting framework, we probably could just do that purely by rewriting.

@Kukovec Kukovec merged commit b54d097 into main Aug 14, 2024
10 checks passed
@Kukovec Kukovec deleted the jk/repeat branch August 14, 2024 10:03
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