Skip to content
jyp0802 edited this page Jun 12, 2018 · 2 revisions

AsyncLearnlib

Install

  • git clone https://github.com/jyp0802/AsyncLearnlib.git
  • Make a new IntelliJ Project with the file code/TCP_learner.java
  • Add the learnlib project
  • Follow steps in here to add the automatalib module to the project

Run

TCP server

  • python tcp_server Run the TCP server either locally or on an external device

Learnlib client

(Inside TCP_learner.java)

  • Set the String HOST to either localhost (for local TCP server) or the.i.p.address of the TCP server
  • Run the TCP_learner class

Components

Mapper

File location: TCP_learner.TCP_mapper

  • Methods called from queries in Learnlib are in this class.
  • Acts as the communication middleware between the TCP server and the Learnlib client.

Membership queries

File location: de.learnlib.oracle.membership.SULOracle

  1. How it works:
  • E.g. if query = sequence of symbls “A-B-C-D”,
  • Send “A”, “B”, “C” by pipelining them, i.e. do not wait for replies.
  • Send “D” as usual, i.e. wait for the reply.
  1. Mainly Modified functions:
  • de.learnlib.filter.cache.sul.SULCache.SULCacheIm]pl#step
  • de.learnlib.filter.cache.sul.SULCache.SULCa]cheImpl#pre

Equivalence queries

File location: de.learnlib.oracle.equivalence.mealy.RandomWalkEQOracle

  1. How it works:
  • Equivalence query = sequence of random symbols "X1-X2-X3-X4-X5...." until counterexample is observed.
  • Keep sending “X1”, “X2” … without receiving replies until:
    • restart < restartProbability or sent symbols > maxPipe.
  • Then receive replies for all of the sent ones at once.
  • Iterate through the replies and check for any differences.
  1. Mainly Modified functions:
  • de.learnlib.oracle.equivalence.mealy.RandomWalkEQOracle#doFindCounterExample
  • de.learnlib.mapper.MappedSUL#stepMultiple

TCP server

  • tcp_module: module that maintains the TCP 3-way handshake behaviour
  • tcp_server: server implementation of the tcp_module
  • multi_tcp_server: server implementation of the tcp_module, allowing multiple connections in parallel

Clone this wiki locally