agg.xt_basis
Class Completion_InheritCSP
java.lang.Object
agg.xt_basis.MorphCompletionStrategy
agg.xt_basis.Completion_InheritCSP
- All Implemented Interfaces:
- StrategyProperties, CompletionPropertyBits, java.lang.Cloneable
public class Completion_InheritCSP
- extends MorphCompletionStrategy
An implementation of morphism completion as a Constraint Satisfaction Problem
(CSP).
Please note: This class is only for internal use of the
critical pair analysis for grammars with node type inheritance.
Do not use it for any kind of implementations.
Methods inherited from class agg.xt_basis.MorphCompletionStrategy |
clone, equals, forceBackState, getName, getProperties, getSize, getSupportedProperties, initialize, isInjective, next, removeFromObjectVarMap, removeFromTypeObjectsMap, removeProperty, setPartialMorphism, setProperty, showProperties |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Completion_InheritCSP
public Completion_InheritCSP()
dispose
public void dispose()
- Overrides:
dispose
in class MorphCompletionStrategy
setProperties
public void setProperties(MorphCompletionStrategy fromStrategy)
initialize
public final void initialize(OrdinaryMorphism morph)
throws BadMappingException
- Initialize the CSP by the specified morphism. The CSP variables are
created for each node and edge of the source graph of this morphism.
- Overrides:
initialize
in class MorphCompletionStrategy
- Throws:
BadMappingException
createSolutionStrategy
protected SolutionStrategy createSolutionStrategy()
- Template method to enable creation of CSPs with varying solution
strategies by subclasses.
reset
protected final void reset()
- Description copied from class:
MorphCompletionStrategy
- Reset my internal state, so that the forthcoming invocation of
next()
computes the first completion of the given
morphism.
- Overrides:
reset
in class MorphCompletionStrategy
getAttrContext
public AttrContext getAttrContext()
- Overrides:
getAttrContext
in class MorphCompletionStrategy
resetSolver
public void resetSolver(boolean doUpdateQueries)
- Overrides:
resetSolver
in class MorphCompletionStrategy
reinitializeSolver
public void reinitializeSolver(boolean doUpdateQueries)
- Overrides:
reinitializeSolver
in class MorphCompletionStrategy
resetSolverVariables
public void resetSolverVariables()
- Overrides:
resetSolverVariables
in class MorphCompletionStrategy
isDomainOfTypeEmpty
public boolean isDomainOfTypeEmpty(Type t)
- Overrides:
isDomainOfTypeEmpty
in class MorphCompletionStrategy
isDomainOfTypeEmpty
public boolean isDomainOfTypeEmpty(Type t,
Type src,
Type tar)
- Overrides:
isDomainOfTypeEmpty
in class MorphCompletionStrategy
setRelatedInstanceVarMap
public void setRelatedInstanceVarMap(java.util.Dictionary<java.lang.Object,Variable> relatedVarMap)
- Overrides:
setRelatedInstanceVarMap
in class MorphCompletionStrategy
hasRelatedInstanceVarMap
public boolean hasRelatedInstanceVarMap()
- Overrides:
hasRelatedInstanceVarMap
in class MorphCompletionStrategy
getInstanceVarMap
public java.util.Dictionary<java.lang.Object,Variable> getInstanceVarMap()
- Overrides:
getInstanceVarMap
in class MorphCompletionStrategy
resetTypeMap
protected void resetTypeMap(java.util.Hashtable<java.lang.String,java.util.Vector<GraphObject>> typeMap)
- Overrides:
resetTypeMap
in class MorphCompletionStrategy
resetTypeMap
protected void resetTypeMap(Graph g)
- Overrides:
resetTypeMap
in class MorphCompletionStrategy
resetVariableDomain
protected void resetVariableDomain(boolean initInstanceByNull)
- Overrides:
resetVariableDomain
in class MorphCompletionStrategy
resetVariableDomain
protected void resetVariableDomain(GraphObject go)
- Overrides:
resetVariableDomain
in class MorphCompletionStrategy
unsetAttrContextVariable
protected void unsetAttrContextVariable()
- Overrides:
unsetAttrContextVariable
in class MorphCompletionStrategy
next
protected final boolean next(OrdinaryMorphism morph)
- Description copied from class:
MorphCompletionStrategy
- Compute the next completion of
morph
. Invoke this method
successively with the same argument to get all completions of a morphism.
- Overrides:
next
in class MorphCompletionStrategy
- Parameters:
morph
- the morphism to totalize.
- Returns:
false
if there are no more completions.