Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michele Volpato
Alnos
Commits
01e166d6
Commit
01e166d6
authored
Oct 08, 2015
by
Michele
Browse files
randomtesting now check also the final sequence of inputs
parent
e34b5a7e
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
01e166d6
...
...
@@ -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
...
...
learning/learning.py
View file @
01e166d6
...
...
@@ -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
:
...
...
learning/observationtable.py
View file @
01e166d6
...
...
@@ -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
...
...
testing/randomtesting.py
View file @
01e166d6
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment