-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix #35: consitency spec and logs #37
Conversation
} | ||
|
||
if (output.equals(reference) && this.keys.equals(inputs.keySet())) { | ||
this.logger.warn("You may have some redundant test: same input and same outcome, only one will be used: discarded.");// case 3 |
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.
in each log line can you add the specification as well?
// we discard it | ||
this.inconsistentInputs.add(inputs); | ||
if (!this.keys.equals(inputs.keySet())) { | ||
this.logger.debug("Malformed problems: the same input value has different outcome: discarded.");// case 2 |
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.
Message should be "Ill-formed problem: not the input variables in "+inputs +" reference ("+keys+")"
this.logger.debug("Malformed problems: the same input value has different outcome: discarded.");// case 2 | ||
consistentInputs().remove(inputs); | ||
} else { | ||
this.logger.debug("Inconsistent specification: same input with same outcome, the condition can be flipped with no impact: discarded.");// case 1 |
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.
same input with different outcome, logical contradiction, discarding the second one.
@@ -67,7 +67,8 @@ private void addToSpec(Map<String, Object> inputs, T output) { | |||
} | |||
|
|||
if (output.equals(reference) && this.keys.equals(inputs.keySet())) { | |||
this.logger.warn("You may have some redundant test: same input and same outcome, only one will be used: discarded.");// case 3 |
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.
you have redundant tests: same input and same outcome, only one will be used to speed-up synthesis
the new tests are really good! |
Improvement of the consistency specifications management. We identify 3 cases:
For each case, a log has been added.
More over, with the fix of consistency, NoPol is able to find a patch for median_90a14c1a from IntroClassJava while it could not before.