seqnr = 0
response = ''
data = ''
+ has_error=False
+ did_syn=False
while True:
print 'waiting for data'
done = False
print 'received: {}'.format(data)
if data == 'RES':
print 'resetting the SUT...'
- #sender.sendReset()
+ sender.sendReset()
sender = Sender(serverIP="127.0.0.1", networkInterface="lo", isLocal=True, serverPort=serverPort, waitTime=1, isVerbose=0)
data = ''
+ has_error = False
+ did_syn = False
continue
- elif data == 'SYN':
+ elif has_error:
+ response = 'ERR'
+ elif data == 'SYN' and not did_syn:
seqnr = 100
print 'S: {}'.format(seqnr)
response = sender.sendInput('S', seqnr, seqnr)
+ did_syn = True
+ elif not did_syn:
+ response = 'ERR'
+ has_error = True
+ elif data == 'SYN':
+ response = 'ERR'
+ has_error = True
elif data == 'ACK':
response = 'Timeout'
if sender.lastSeqReceived != None:
#!/bin/bash -x
#java -cp ":lib/automata-parent.jar:lib/learnlib-parent.jar" learner.Main small
-java -cp ":lib/automata-parent.jar:lib/learnlib-parent.jar" learner.Main partial LStar rand
+java -cp ":lib/automata-parent.jar:lib/learnlib-parent.jar" learner.Main partial TTT wm