Skip to content

Setup Annotations

HansvdLaan edited this page Apr 24, 2018 · 17 revisions

These are the annotations which can be used to set details about the learning setup, such as which methods should be called to start, initialize and shut down the SUL and which methods should be called to ensure equivalence between queries. All annotations except Start have an order value to set in which order they should be executed compared to other methods of the same type. If this value is left empty, it will be executed last. Below all annotations are showcased together with a small example. More information about their exact workings can be found in the JavaDoc.

@Start

The Start annotation is used to indicate which method should be called to start the SUL and which kind of automaton should be learned.

@Start(automaton = "MealyMachine")
@Override
public static void main(String[] args) throws Exception { 
    // code
}

@Shutdown

The Shutdown annotation is used to indicate which method should be called to shut down the SUL.

@Shutdown
public void quit() {
    System.exit(0);
}

@Initialize

The Initialize annotation is used to indicate which method should be called to initialize the SUL. This method will be called after the method annotated with Start.

@Initialize(order=1)
public void a() { 
    // code
}

@Initialize()
public void b() { 
    // code
}

@Initialize(order = 2)
public void c() { 
    // code
}

@PreQuery

@PostQuery

@PreInputInvocation

@PostInputInvocation

@PreOutputInvocation

@PostOutputInvocation

Clone this wiki locally