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

Translate Quint generate #2916

Merged
merged 7 commits into from
Aug 14, 2024
Merged

Conversation

konnov
Copy link
Collaborator

@konnov konnov commented Jun 27, 2024

This PR adds translation of Quint generate introduced in informalsystems/quint#1455 into Apalache!Gen.

@konnov
Copy link
Collaborator Author

konnov commented Jul 17, 2024

Hey @bugarela, is there any chance I would be able to get a review? It would be great if I could call Apalache from quint without relying on a fork

@bugarela
Copy link
Collaborator

@konnov Ah, sorry, I missed this one. So is this why the PR on the Quint side has a failing test?

I saw that PR and thought it was still WIP due to the failing test. I'll take a look at both of them still this week!

@konnov
Copy link
Collaborator Author

konnov commented Jul 17, 2024

@konnov Ah, sorry, I missed this one. So is this why the PR on the Quint side has a failing test?

I saw that PR and thought it was still WIP due to the failing test. I'll take a look at both of them still this week!

I guess, Quint is failing as it is picking up the older version of Apalache.

@konnov konnov requested review from thpani and bugarela August 13, 2024 19:01
@konnov konnov requested a review from Kukovec as a code owner August 13, 2024 19:01
Copy link
Collaborator

@thpani thpani left a comment

Choose a reason for hiding this comment

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

lgtm

val elemType = typeConv.convert(types(id).typ)
val boundIntConst = intFromExpr(bound)
if (boundIntConst.isEmpty) {
throw new QuintIRParseError(s"nondet $name = generate($bound) ... expects an integer constant")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the ...?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a nested expression under nondet

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, but it's not relevant for the error here, so at best it will confuse.

Also, afaiu there's a second parameter to generate()? So ellipses inside the parentheses make more sense to me.

@konnov konnov enabled auto-merge August 14, 2024 06:57
@konnov konnov merged commit 9e6071b into apalache-mc:main Aug 14, 2024
10 checks passed
@konnov konnov deleted the igor/quint-generate branch August 14, 2024 07:14
This was referenced Aug 14, 2024
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