List<Proposition> templatePreconds = template.getPreconds();
List<Proposition> concretePreconds = new ArrayList<Proposition>(templatePreconds.size());
//And apply the unifier to them
for (Iterator iter = templatePreconds.iterator(); iter
.hasNext();) {
PropositionImpl precond = (PropositionImpl) iter.next();
Literal literal = new LiteralImpl(precond);
literal.apply(un);
PropositionImpl concretePrecond = (PropositionImpl)propositionFactory.getProposition(literal.toString());
// XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
// if(!concretePrecond.isGround()) {
// //throw new OperatorFactoryException("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
// System.err.println("We have a non-concrete precond in operator "+signature+": "+concretePrecond);
// }
concretePreconds.add(concretePrecond);
}
List<Proposition> templateEffects = template.getEffects();
List<Proposition> concreteEffects = new ArrayList<Proposition>(templateEffects.size());
for (Iterator iter = templateEffects.iterator(); iter
.hasNext();) {
PropositionImpl effect = (PropositionImpl) iter.next();
Literal literal = new LiteralImpl(effect);
literal.apply(un);
PropositionImpl concreteEffect = (PropositionImpl)propositionFactory.getProposition(literal.toString());
// XXX Uncomment the code to debug operator instantiation, it is removed to avoid wasting time here
// if(!concreteEffect.isGround()) {
// //throw new OperatorFactoryException("We have a non-concrete effect in operator "+signature+": "+concreteEffect);
// System.err.println("We have a non-concrete effect in operator "+signature+": "+concreteEffect);
// }