/* Copyright 2008, 2009, 2010 by the Oxford University Computing Laboratory
This file is part of HermiT.
HermiT is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
HermiT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with HermiT. If not, see <http://www.gnu.org/licenses/>.
*/
package org.semanticweb.HermiT.existentials;
import java.io.Serializable;
import org.semanticweb.HermiT.blocking.BlockingStrategy;
import org.semanticweb.HermiT.model.AtLeast;
import org.semanticweb.HermiT.tableau.Node;
/**
* Strategy for expanding all existentials on the oldest node in the tableau with unexpanded existentials.
* This usually closely approximates a breadth-first expansion. (Existentials introduced onto parent nodes
* as a result of constraints on their children can produce newer nodes of lower depth than older nodes,
* which could result in slight non-breadth-first behavior.)
*/
public class CreationOrderStrategy extends AbstractExpansionStrategy implements Serializable {
private static final long serialVersionUID=-64673639237063636L;
public CreationOrderStrategy(BlockingStrategy strategy) {
super(strategy,true);
}
public boolean isDeterministic() {
return true;
}
protected void expandExistential(AtLeast atLeast,Node forNode) {
m_existentialExpansionManager.expand(atLeast,forNode);
m_existentialExpansionManager.markExistentialProcessed(atLeast,forNode);
}
}