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

[herd] Delay errors and warning until after filtering by model. #686

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

maranget
Copy link
Member

@maranget maranget commented Oct 2, 2023

That way errors and warning from execution candidates rejected by the model do not show up.

@maranget
Copy link
Member Author

maranget commented Oct 3, 2023

I guess this PR is an answer to PR #684 and issue #646. After digging in old code, I tend to think that errors have never been delayed that far for no specific reason.

More precisely, commit 94dd2ac introduced the (unsolved) equations, including Warn or Failed "constraints" as an argument _cs to the function model_kont in herd/top_herd.ml , but did nothing of it.

I am tempted to merge this PR.

Copy link
Member

@relokin relokin left a comment

Choose a reason for hiding this comment

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

The change makes sense to me. I have two minor comments.

@@ -2,7 +2,7 @@
(* the diy toolsuite *)
(* *)
(* Jade Alglave, University College London, UK. *)
(* Luc Maranget, INRIA Paris-Rocquencourt, France. *)
Copy link
Member

Choose a reason for hiding this comment

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

You might want to revert this before merging.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks!

@@ -1117,7 +1117,7 @@ let match_reg_events es =
PP.show_es_rfm test es rfm ;
prerr_endline "Unsolvable system"
end ;
assert (rfmap_is_cyclic es rfm);
assert (true || rfmap_is_cyclic es rfm);
Copy link
Member

Choose a reason for hiding this comment

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

should we remove this assert, or did you it intentionally?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to keep the assert as it was before, thanks for your acute eye.

@artkhyzha
Copy link
Collaborator

LGTM. Out of curiousity: what prompts the change in the unit tests? (Specifically, the need to specify the "DontCheckMixed" variant.)

@maranget
Copy link
Member Author

maranget commented Oct 4, 2023

Hi @artkhyzha. The tests contain (at least!) two fatal errors: (1) the masking attempt of a symbolic locations and (2) accesses of different sizes of the same location. Before this PR the specific error about illegal masking was raised at the end of the second solving phase and error (1) was found first. After this PR the checking of (1) has moved beyond the point where (2) is checked (point (2) is after equation solving, while (1) is after model application).

However it is possible to disable the checking of (2), with -variant DontCheckMixed, thereby restoring previous behaviour.

@artkhyzha
Copy link
Collaborator

Ah, I see, thank you for the explanation!

That way errors and warning from execution candidates
rejected by the model do not show up.

Some test error output changed  for mundane reasons,
they are updated as part of this commit.
@maranget maranget merged commit 76b5fd8 into master Oct 19, 2023
@maranget
Copy link
Member Author

Merged, thanks @relokin, @artkhyzha

@maranget maranget deleted the herd-delay-more branch October 19, 2023 15:38
maranget added a commit that referenced this pull request Oct 27, 2023
[herd] Delay errors and warning until after filtering by model.

That way errors and warning from execution candidates rejected by the model do not show up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants