Commit 01e166d6 authored by Michele's avatar Michele
Browse files

randomtesting now check also the final sequence of inputs

parent e34b5a7e
......@@ -7,6 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- This CHANGELOG file.
- Validity of suspension automata.
- Testing algorithms
- Counterexample handling
## [v0.1.0] - 2015-09-29
### Added
......
......@@ -509,7 +509,6 @@ class LearningAlgorithm:
self.updateTable()
elif choice == 'testing':
self._logger.info("Improve preciseness method: testing")
print("Testing, round " + str(self._currentLoop))
ce, output = self.tester.findCounterexample(self._hMinus)
# Handle counterexample
if ce:
......
......@@ -163,7 +163,7 @@ class Table:
# entry
if ce in self._entries.keys():
if output not in self._entries[ce]:
self._entries[ce].add(output)
self._entries[ce][0].add(output)
return True
else:
# something went wrong, this is not a counterexample
......
......@@ -83,9 +83,15 @@ class RandomTester(AbstractTester):
# reached limit, check if some inputs needed still to be processed.
if consecutiveInputs != ():
# TODO: check if something is needed here
self._logger.error("Inputs to be processed with limit reached?")
print("Inputs to be processed with limit reached?")
output = self._processInputs(consecutiveInputs)
# anyway reset the teacher
self._teacher.reset()
if output not in model.outputs():
self._logger.info("Found a counterexample after "
+ str(i) + " input actions.")
return ce, output
return None, None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment