-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add hypothesis and dv usage qualifiers to VERIFY PROOF #92
Open
jamesjer
wants to merge
1
commit into
metamath:master
Choose a base branch
from
jamesjer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,67 @@ | |
|
||
#include "mmdata.h" | ||
|
||
char verifyProof(long statemNum); | ||
/* Flags for verifyProof */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When declaring new constants, comment their semantics at this point. All development environments I know of will automatically look up that lines and present an excerpt to the developer on request. |
||
/*! Check that non-dummy distinct variable conditions ($d) are used. */ | ||
#define UNUSED_DVS 1 | ||
/*! Check that all distinct variable conditions ($d) are used. */ | ||
#define UNUSED_DUMMY_DVS 2 | ||
/*! Check that all essential hypotheses ($e) are used. */ | ||
#define UNUSED_ESSENTIAL 4 | ||
|
||
/*! assignVar() finds an assignment to substScheme variables that match | ||
the assumptions specified in the reason string */ | ||
/*! Verify proof of one statement in a source file. | ||
* \param[in] statemNum number of the statement to verify | ||
* \param[in] unusedFlag bitwise OR of \c UNUSED_* flags. If \c unusedFlag | ||
* includes: | ||
* - \c UNUSED_DVS: check for unused \c $d conditions on nondummy variables | ||
* - \c UNUSED_DUMMY_DVS: check for all unused \c $d conditions | ||
* - \c UNUSED_ESSENTIAL: check for unused \c $e statements | ||
* \return | ||
* - 0 if proof is OK | ||
* - 1 if proof is incomplete (has '?' tokens) | ||
* - 2 if error found | ||
* - 3 if severe error found | ||
* - 4 if not a $p statement | ||
* \pre parseProof() must have already been called for the statement | ||
*/ | ||
char verifyProof(long statemNum, flag unusedFlag); | ||
|
||
/*! Find an assignment to substScheme variables that match the assumptions | ||
specified in the reason string | ||
* \param[in] bigSubstSchemAss the hypotheses the scheme | ||
* \param[in] bigSubstInstAss the instance hypotheses | ||
* \param[in] substScheme number of the statement to use for substitution | ||
* \param[in] statementNum number of the statement being verified | ||
* \param[in] step number of the proof step being verified | ||
* \param[in] unkHypFlag nonzero if there are unknown hypotheses, zero otherwise | ||
* \param[in] unusedFlag bitwise OR of \c UNUSED_* flags; e.g., | ||
* <tt>UNUSED_DVS|UNUSED_DUMMY_DVS</tt> | ||
* \param[out] djRVar array with one element per non-dummy distinct variable | ||
* condition, used to mark those that are used | ||
* \param[out] djOVar array with one element per dummy distinct variable | ||
* condition, used to mark those that are used | ||
* \pre if \c UNUSED_DVS is set in \c unusedFlag, then the length of \c djRVar | ||
* is at least as great as the length of | ||
* \c g_Statement[statemNum].reqDisjVarsA and contains all zeroes | ||
* \pre if \c UNUSED_DUMMY_DVS is set in \c unusedFlag, then the length of | ||
* \c djOVar is at least as great as the length of | ||
* \c g_Statement[statemNum].optDisjVarsA and contains all zeroes | ||
* \post if \c UNUSED_DVS is set in \c unusedFlag, then for every integer \c i | ||
* such that the variables \c g_Statement[statementNum].reqDisjVarsA[i] | ||
* and \c g_Statement[statementNum].reqDisjVarsB[i] were checked for | ||
* distinctness, \c djRVar[i] is nonzero | ||
* \post if \c UNUSED_DUMMY_DVS is set in \c unusedFlag, then for every integer | ||
* \c i such that the variables | ||
* \c g_Statement[statementNum].optDisjVarsA[i] and | ||
* \c g_Statement[statementNum].optDisjVarsB[i] were checked for | ||
* distinctness, \c djOVar[i] is nonzero | ||
*/ | ||
nmbrString *assignVar(nmbrString *bigSubstSchemeAss, | ||
nmbrString *bigSubstInstAss, long substScheme, | ||
// For error messages: | ||
long statementNum, long step, flag unkHypFlag); | ||
long statementNum, long step, flag unkHypFlag, | ||
// For checking for unused $d conditions: | ||
flag unusedFlag, nmbrString *djRVar, nmbrString *djOVar); | ||
|
||
/*! Deallocate the math symbol strings assigned in g_WrkProof structure during | ||
proof verification. This should be called after verifyProof() and after the | ||
|
Oops, something went wrong.
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.
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.
Indentation is out of order?