WIP: More flexible rule creation with more error checking (discuss me 2nd) - #157
Draft
davidweichiang wants to merge 8 commits into
Draft
davidweichiang wants to merge 8 commits into
davidweichiang wants to merge 8 commits into
Conversation
davidweichiang
marked this pull request as draft
August 15, 2022 20:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves checking the constraint that an HRGRule's lhs and rhs types have to match (closes #79).
It also adds more flexibility in creating an HRGRule. This partially helps with #140.
The alternative to the last point would be if we moved ext from Graph to HRGRule. In other words, Graph would be just a hypergraph (not a "hypergraph fragment") and an HRGRule would have an lhs, a rhs, and external nodes. Then HRGRule would be able to check the consistency of lhs and ext perfectly. However, there would be no way to stop someone from deleting an external node. I prefer this alternative (since I envision node deletion being much less common then setting the external nodes).
(This PR is part of a larger plan to fix #140 and generally try to simplify things.)