learner
Class FiniteTreeAutomata

java.lang.Object
  extended by learner.FiniteTreeAutomata
Direct Known Subclasses:
CartesianFTA

public class FiniteTreeAutomata
extends java.lang.Object

The class FiniteTreeAutomata realises the abstract machine Finite Tree Automaton, an instance of which recognises a certain regular tree language. This class is heavly dependent on the class Tree and can be synthesized from an instance of the class ObservationTable.

See Also:
Tree, ObservationTable

Field Summary
 java.lang.String name
           
 
Constructor Summary
FiniteTreeAutomata()
           
FiniteTreeAutomata(TransitionTable table, java.util.LinkedHashSet<java.lang.String> accepting)
           
FiniteTreeAutomata(TransitionTable table, java.util.LinkedHashSet<java.lang.String> accepting, java.lang.String name)
           
 
Method Summary
 boolean accepts(Tree tree)
          The method accepts returns true if the argument is in the language, and otherwise false.
 java.util.LinkedHashSet<java.lang.String> getAccepting()
           
 java.util.LinkedHashSet<RankedSymbol> getSignature()
           
 java.util.LinkedHashSet<java.lang.String> getStates()
           
 TransitionTable getTable()
           
 java.lang.String run(Tree tree)
          Determines the equivalence class of the input tree.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

FiniteTreeAutomata

public FiniteTreeAutomata(TransitionTable table,
                          java.util.LinkedHashSet<java.lang.String> accepting)

FiniteTreeAutomata

public FiniteTreeAutomata(TransitionTable table,
                          java.util.LinkedHashSet<java.lang.String> accepting,
                          java.lang.String name)

FiniteTreeAutomata

public FiniteTreeAutomata()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accepts

public boolean accepts(Tree tree)
The method accepts returns true if the argument is in the language, and otherwise false. It does this by invoking the recursive method run on the argument tree.

Parameters:
tree - the labelled tree that is to be tested for membership
Returns:
true if tree is in the target language, false otherwise.

run

public java.lang.String run(Tree tree)
Determines the equivalence class of the input tree.

Parameters:
tree - the tree whose equivalence class is to be determined
Returns:
a tree represating the found equivalence class

getAccepting

public java.util.LinkedHashSet<java.lang.String> getAccepting()

getSignature

public java.util.LinkedHashSet<RankedSymbol> getSignature()

getStates

public java.util.LinkedHashSet<java.lang.String> getStates()

getTable

public TransitionTable getTable()