learner
Class AutomaticTeacher

java.lang.Object
  extended by learner.AutomaticTeacher
All Implemented Interfaces:
Teacher

public class AutomaticTeacher
extends java.lang.Object
implements Teacher

Implements the interface Teacher, and uses an fta to represent the target language.

See Also:
Teacher

Constructor Summary
AutomaticTeacher(FiniteTreeAutomata fta)
          Creates and initializes a new teacher.
 
Method Summary
 Tree equivalence(FiniteTreeAutomata fta)
          If the provided FTA does not accept exactly the target language, the a counter example is provided, otherwise the function returns null.
 boolean membership(Tree t)
          Answers wether or not the provided tree is a member of the target language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutomaticTeacher

public AutomaticTeacher(FiniteTreeAutomata fta)
Creates and initializes a new teacher.

Parameters:
fta - The target language as an fta.
Method Detail

equivalence

public Tree equivalence(FiniteTreeAutomata fta)
Description copied from interface: Teacher
If the provided FTA does not accept exactly the target language, the a counter example is provided, otherwise the function returns null.

Specified by:
equivalence in interface Teacher
Parameters:
fta - A FiniteTreeAutomata that is supposed to recognise the target language.
Returns:
A counter example, if such exists, otherwise null.

membership

public boolean membership(Tree t)
Description copied from interface: Teacher
Answers wether or not the provided tree is a member of the target language.

Specified by:
membership in interface Teacher
Parameters:
t - The labelled tree whose membership is to be determined.
Returns:
A boolean, namely true if t t is a member of the target language, and false if it is not (or, if it is null).