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

feat: Extension validation can take a closure of solutions #456

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

croyzor
Copy link
Contributor

@croyzor croyzor commented Aug 24, 2023

Fixes #454.
Return from extension inference an extra solution set, which instantiates all of the inference variables to the empty set, meaning metavariables which depend on them can be solved

@croyzor croyzor requested a review from ss2165 August 24, 2023 16:23
@@ -40,18 +40,30 @@ struct ValidationContext<'a> {
impl Hugr {
/// Check the validity of the HUGR.
pub fn validate(&self) -> Result<(), ValidationError> {
let mut validator = ValidationContext::new(self);
self.validate_with_extension_closure(HashMap::new())
Copy link
Member

Choose a reason for hiding this comment

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

please add a todo for validating hugrs with input extension set variables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added issue #457 after our discussion this morning

Copy link
Member

Choose a reason for hiding this comment

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

cool, the comment here can link to that then

@croyzor croyzor requested a review from ss2165 August 25, 2023 09:48
@croyzor croyzor merged commit fe5c9ec into new/resource-inference Aug 25, 2023
@croyzor croyzor deleted the new/better-extension-validation branch August 25, 2023 09:50
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.

2 participants