de.ls5.jlearn.interfaces
Interface Automaton

All Superinterfaces:
Serializable
All Known Implementing Classes:
AnnotatedAutomaton, AnnotatedFSA, AutomatonImpl, FiniteStateAcceptor

public interface Automaton
extends Serializable

Basic interface for Automaton models.

Author:
merten

Method Summary
 State addNewState()
          Creates a new State and return it.
 List<State> getAllStates()
          Applies a breadth-first search algorithm to retrieve all states reachable from the starting state.
 Alphabet getAlphabet()
          Return Alphabet of this automaton
 Automaton getCopyWithRestrictedAlphabet(Alphabet alpha)
          Deprecated. 
 List<State> getIncompleteStates()
          Returns all states of the automaton which not yet have a complete set of transitions.
 State getOtherStateWithSameSignature(State s)
          Find state other than the supplied state producing the very same output for every input symbol of the alphabet.
 Alphabet getOutputAlphabet()
          Return all symbols used as output in this automaton.
 State getStart()
          Return the starting state.
 Word getTraceOutput(Word trace)
          Return a word of output symbols produced by the automaton as reaction to the supplied word of input symbols.
 State getTraceState(Word trace, int steps)
          Return reached state after consuming the specified number of symbols of the input trace.
 Word getTraceToState(State destination)
          Returns an access-sequence to the given state.
 boolean isWellDefined()
          Checks if all states of the automaton have a complete set of valid transitions, meaning that every state has a transition for every symbol of the alphabet.
 

Method Detail

getStart

State getStart()
Return the starting state. When instantiating an Automaton the starting state is automatically instantiated, too.

Returns:
starting state

getAlphabet

Alphabet getAlphabet()
Return Alphabet of this automaton

Returns:
alphabet of this automaton

getOutputAlphabet

Alphabet getOutputAlphabet()
Return all symbols used as output in this automaton.

Returns:
return output symbols

addNewState

State addNewState()
Creates a new State and return it.

Returns:
created state

isWellDefined

boolean isWellDefined()
Checks if all states of the automaton have a complete set of valid transitions, meaning that every state has a transition for every symbol of the alphabet.

Returns:
true if well-defined, false otherwise

getAllStates

List<State> getAllStates()
Applies a breadth-first search algorithm to retrieve all states reachable from the starting state.

Returns:
list of states in automaton

getIncompleteStates

List<State> getIncompleteStates()
Returns all states of the automaton which not yet have a complete set of transitions.

Returns:
list of incomplete states

getOtherStateWithSameSignature

State getOtherStateWithSameSignature(State s)
Find state other than the supplied state producing the very same output for every input symbol of the alphabet.

Parameters:
s -
Returns:
state with same signature

getTraceToState

Word getTraceToState(State destination)
Returns an access-sequence to the given state.

Parameters:
destination -
Returns:
trace to supplied state

getTraceOutput

Word getTraceOutput(Word trace)
Return a word of output symbols produced by the automaton as reaction to the supplied word of input symbols.

Parameters:
trace -
Returns:
sequence of outputs

getTraceState

State getTraceState(Word trace,
                    int steps)
Return reached state after consuming the specified number of symbols of the input trace.

Parameters:
trace -
steps -
Returns:
active state after consumption

getCopyWithRestrictedAlphabet

@Deprecated
Automaton getCopyWithRestrictedAlphabet(Alphabet alpha)
Deprecated. 

Create a copy of the automaton with only input symbols present in the supplied alphabet being present.

Parameters:
alpha - Alphabet to resrict the copy to
Returns:
stripped automaton


Copyright © 2011. All Rights Reserved.