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

StratifiedRules: Integer literals #2706

Merged
merged 2 commits into from
Aug 25, 2023
Merged

StratifiedRules: Integer literals #2706

merged 2 commits into from
Aug 25, 2023

Conversation

Kukovec
Copy link
Collaborator

@Kukovec Kukovec commented Aug 23, 2023

  • 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

closes #2705

In addition, tweaks the interface of SubstStratifiedRule, to avoid implementing an unnecessary do-nothing unit method, and adds a previously missing BOOLEAN set test.

@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2023

Codecov Report

Merging #2706 (e42371c) into main (80ee397) will increase coverage by 0.01%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##             main    #2706      +/-   ##
==========================================
+ Coverage   78.48%   78.50%   +0.01%     
==========================================
  Files         460      461       +1     
  Lines       15876    15885       +9     
  Branches     2595     2562      -33     
==========================================
+ Hits        12461    12471      +10     
+ Misses       3415     3414       -1     
Files Changed Coverage Δ
.../stratifiedRules/base/IntConstStratifiedRule.scala 57.14% <57.14%> (ø)
...e/tla/bmcmt/stratifiedRules/aux/RewriterImpl.scala 88.88% <100.00%> (+4.04%) ⬆️
...cmt/stratifiedRules/base/SubstStratifiedRule.scala 44.44% <100.00%> (-5.56%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

Nice!

@@ -55,6 +58,8 @@ abstract class RewriterImpl(@unused private val ctx: SolverContext) extends Rewr
case _ => "O@"
}

val intValueCache: IntValueCache = new IntValueCache
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was a bit surprised to see this declaration between function definitions. Is not it a standard practice to put the values and attributes in from of a class definition?

Copy link
Collaborator

Choose a reason for hiding this comment

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

in the front, i assume

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.

Code LGTM

I'm concerned though that neither the linked issue nor the current PR description provide context for an uninitiated reader (e.g., a future collaborator, ourselves in 5 years from now, ...) to understand why this PR exists in the first place.
I think these should mention the larger narrative under which these changes are introduced.

@@ -55,6 +58,8 @@ abstract class RewriterImpl(@unused private val ctx: SolverContext) extends Rewr
case _ => "O@"
}

val intValueCache: IntValueCache = new IntValueCache
Copy link
Collaborator

Choose a reason for hiding this comment

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

in the front, i assume

@Kukovec
Copy link
Collaborator Author

Kukovec commented Aug 25, 2023

Code LGTM

I'm concerned though that neither the linked issue nor the current PR description provide context for an uninitiated reader (e.g., a future collaborator, ourselves in 5 years from now, ...) to understand why this PR exists in the first place. I think these should mention the larger narrative under which these changes are introduced.

The issue is part of https://github.com/informalsystems/apalache/milestone/75, and that milestone links back to the relevant ADR. If this is too obscure, I can start adding more context to individual issues, but then you'd likely have the same description literally copy-pasted for each stratified rule.

@thpani
Copy link
Collaborator

thpani commented Aug 25, 2023

The issue is part of https://github.com/informalsystems/apalache/milestone/75, and that milestone links back to the relevant ADR.

If you hadn't told me, I wouldn't have found that.
I think it's unlikely that someone in the future the would have the foresight to trace from this PR, to the issue it's addressing, to that issue's milestone, and then from the milestone description to a PR that merges the relevant ADR.

Why not provide a shortcut, for example by linking to the relevant ADR from the PR and/or issue?

I can start adding more context to individual issues, but then you'd likely have the same description literally copy-pasted for each stratified rule.

Please do.

@Kukovec Kukovec enabled auto-merge (squash) August 25, 2023 10:47
@Kukovec Kukovec merged commit 6bb36ac into main Aug 25, 2023
10 checks passed
@Kukovec Kukovec deleted the jk/2705 branch August 25, 2023 11:25
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.

Stratified rules: Integer literals
4 participants