Commit ddc734e4 authored by Paul Fiterau Brostean's avatar Paul Fiterau Brostean
Browse files

Ready

parent d5bd3d39
1 a b
1 a b a b
0 a
0 b
0 a b a
0 a a
0 a b b
0 a b a a
\ No newline at end of file
......@@ -9,7 +9,7 @@ setup(
author='Rick Smetsers, Paul Fiterau',
author_email='ricksmet@gmail.com',
licence='MIT',
packages=find_packages(exclude=['tests*', 'docs*']),
packages=find_packages(exclude=['tests*']),
install_requires=['z3-solver'],
classifiers=[
'Development Status :: 3 - Alpha',
......
......@@ -85,7 +85,6 @@ if __name__ == '__main__':
parser.add_argument('-y', '--yannakakis', action='store_true', help='use yannakakis instead of rwalkfromstate '
'(only supports Mealy Machines)')
args = parser.parse_args()
formalism = args.aut
formalisms = model.defined_formalisms()
......@@ -96,6 +95,7 @@ if __name__ == '__main__':
if args.mode == 'traces':
trace_file = args.file
traces = parse.extract_traces_from_file(args.file, formalism)
print(traces)
(automaton, statistics) = alg.learn(learner, aut2testcls[aut_type], traces)
else:
if args.mode == 'dotnorst':
......@@ -131,4 +131,4 @@ if __name__ == '__main__':
test_generator = aut2rwalkcls[aut_type](sut_to_learn, rand_test_length, reset_prob)
(automaton, statistics) = alg.learn_mbt(sut_to_learn, learner, test_generator, num_tests)
print("Learned\n", automaton, "\nWith stats\n", statistics)
\ No newline at end of file
print("Learned model\n", automaton, "\nWith stats\n", statistics)
\ No newline at end of file
......@@ -118,7 +118,6 @@ def learn_no_reset(sut:NoRstSUT, learner:Learner, max_inputs:int, rand_seq=3) ->
if len(next_inputs) == 0:
next_inputs = _next_seq_rwalkfromstate(hyp, inputs, rand_seq=rand_seq)
rand_inp = next_inputs.pop(0)
#rand_inp = utils.rand_sel(alpha)
out_sut = sut.step(rand_inp)
trace.append((rand_inp, out_sut))
inputs.append(rand_inp)
......@@ -132,7 +131,6 @@ def learn_no_reset(sut:NoRstSUT, learner:Learner, max_inputs:int, rand_seq=3) ->
hyp,definition = ret
end_time = int(time.time() * 1000)
statistics.add_learning_time(end_time - start_time)
print("new hyp")
done = False
break
statistics.inputs = len(trace) - max_inputs
......
Markdown is supported
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