inpro.incremental.processor
Interface RMRSComposer.Resolver

All Superinterfaces:
edu.cmu.sphinx.util.props.Configurable
Enclosing class:
RMRSComposer

public static interface RMRSComposer.Resolver
extends edu.cmu.sphinx.util.props.Configurable

Interface to call whenever a Formula needs to check if its relations resolve with something in the world.

Author:
okko

Method Summary
 int resolves(Formula f)
          A resolve method called whenever a new FormulaIU is created to determine if its relations resolve something in the world.
 int resolvesObject(Formula f, java.lang.String id)
          A resolve method called to determine if a particular object, identified by a string argument, was among the domain objects that resolved (or indeed the only one that did)
Implementers need to make sure that comparison of the string representation and domain objects takes place.
 java.util.Map<java.lang.Integer,java.util.List<? extends java.lang.Object>> resolvesObjects(Formula f)
          A resolve method called whenever a new Formula is created to determine what domain concepts it resolves in the world.
 void setPerformDomainAction(boolean action)
          A setter called to turn off/on domain actions.
 
Methods inherited from interface edu.cmu.sphinx.util.props.Configurable
newProperties
 

Method Detail

resolves

int resolves(Formula f)
A resolve method called whenever a new FormulaIU is created to determine if its relations resolve something in the world.

Parameters:
f - the formula
Returns:
-1 if nothing resolved for any predicate argument, 0 if many world objects resolve for all args, 1 for at least one arg only one world object resolves.

resolvesObjects

java.util.Map<java.lang.Integer,java.util.List<? extends java.lang.Object>> resolvesObjects(Formula f)
A resolve method called whenever a new Formula is created to determine what domain concepts it resolves in the world.
The map returns maps (Integer) predicate arguments to possible world objects.
This can be used to further validate the Formula.

Parameters:
f - the formula
Returns:
a map of Formula predicate arguments to lists of objects that the argument can stand for

resolvesObject

int resolvesObject(Formula f,
                   java.lang.String id)
A resolve method called to determine if a particular object, identified by a string argument, was among the domain objects that resolved (or indeed the only one that did)
Implementers need to make sure that comparison of the string representation and domain objects takes place.

Parameters:
f - the formula
id - a string representation of the object
Returns:
-1 if nothing resolved, 0 if id was among the resolved objects, 1 if only id was among the resolved objects

setPerformDomainAction

void setPerformDomainAction(boolean action)
A setter called to turn off/on domain actions.

Parameters:
action - on or off