Replace failwith with R_unknown fallback in role_of_string#109
Open
Xujiangjing wants to merge 1 commit intosneeuwballen:masterfrom
Open
Replace failwith with R_unknown fallback in role_of_string#109Xujiangjing wants to merge 1 commit intosneeuwballen:masterfrom
Xujiangjing wants to merge 1 commit intosneeuwballen:masterfrom
Conversation
- Add corollary (TPTP BNF :== lists it as axiom-like, handle as R_axiom) - Add interpretation and logic (TPTP standard roles, handle as R_plain) - Replace failwith catch-all with R_unknown + stderr warning Previously, unrecognised TPTP roles caused an uncaught Failure exception with no source location. E and Vampire both produce graceful parse errors in the same situation. This change brings Zipperposition's error handling in line with that of other ATPs.
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.
Fixes #108.
Change
Three small additions to
role_of_stringinsrc/parsers/ast_tptp.ml:corollary→R_axiom(TPTP BNF:==listscorollaryas axiom-like; handled the same way aslemma)interpretationandlogic→R_plain(TPTP-standard roles for semantic / logic specification)failwithcatch-all with a stderr warning +R_unknownfallback, so unrecognised roles no longer abort the proverBefore / after
Input:
thf(test, <ROLE>, ($true)).corollaryFailure("not a proper TPTP role: corollary")(uncaught)interpretationFailure(...)(uncaught)logicFailure(...)(uncaught)garbage(invalid)Failure(...)(uncaught)R_unknown+ stderr warningAlternative
If the maintainers prefer to keep the hard failure, I'm happy to adapt the PR accordingly.