-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Add ValidationLevel
tooling and apply to constant_fold_pass
#1035
Conversation
Includes #1030, let's ensure we merge that first. |
f471f91
to
a950841
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice, just a query about naming consistency
hugr/src/algorithm/verify.rs
Outdated
/// post verification. | ||
/// | ||
/// The default level is `None` because verification can be expensive. | ||
pub enum VerifyLevel { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a clear distinction between "validation" and "verification"? Should this be called "ValidateLevel" for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a clear one, but on reflection I think you verify a pass by validating a hugr. Happy to change this if you feel strongly, otherwise will sleep on it and edit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense, though I worry people would expect some kind of formal verification on passes. I think for something similar in tket1 we used the term "audit" though I don't like that much either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have renamed to "Validation", because it does literally "validate".
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1035 +/- ##
==========================================
- Coverage 87.06% 87.03% -0.04%
==========================================
Files 95 96 +1
Lines 19162 19207 +45
Branches 18353 18398 +45
==========================================
+ Hits 16684 16717 +33
- Misses 1629 1637 +8
- Partials 849 853 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This reverts commit 20b35d6.
I changed the type of the pass closure to
|
VerifyLevel
tooling and apply to constant_fold_pass
ValidationLevel
tooling and apply to constant_fold_pass
@ss2165 please have another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
## 🤖 New release * `hugr`: 0.5.0 -> 0.5.1 * `hugr-core`: 0.1.0 -> 0.2.0 * `hugr-passes`: 0.1.0 -> 0.2.0 * `hugr-cli`: 0.1.0 -> 0.1.1 <details><summary><i><b>Changelog</b></i></summary><p> ## `hugr` <blockquote> ## 0.5.1 (2024-06-07) ### Refactor - Move binary to hugr-cli ([#1134](#1134)) </blockquote> ## `hugr-core` <blockquote> ## 0.2.0 (2024-06-07) ### Bug Fixes - [**breaking**] Validate that control-flow outputs have exactly one successor ([#1144](#1144)) - Do not require matching extension_reqs when creating a replacement ([#1177](#1177)) ### Features - Add `ConstExternalSymbol` to prelude ([#1123](#1123)) - `HugrView::extract_hugr` to extract regions into owned hugrs. ([#1173](#1173)) ### Testing - Serialisation round trip testing for `OpDef` ([#999](#999)) </blockquote> ## `hugr-passes` <blockquote> ## 0.2.0 (2024-06-07) ### Features - Add `ValidationLevel` tooling and apply to `constant_fold_pass` ([#1035](#1035)) </blockquote> ## `hugr-cli` <blockquote> ## 0.1.1 (2024-06-07) ### Features - Reexport `clap::Parser` and `clap_verbosity_flag::Level` from hugr_cli ([#1146](#1146)) ### Refactor - Move binary to hugr-cli ([#1134](#1134)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/MarcoIeni/release-plz/).
No description provided.