Package jason.asSyntax

Examples of jason.asSyntax.LiteralImpl


                propositionImpls.addAll(getPropositionFromDomainExp(and, false));
              }
              break;
          case ATOMIC_FORMULA:
              AtomicFormula p = (AtomicFormula) exp;
        PropositionImpl proposition = new PropositionImpl(new LiteralImpl(!negated, p.getPredicate()));
       
        Iterator pddlTerms = p.iterator();
       
        List<Term> terms = new ArrayList<Term>();
        while(pddlTerms.hasNext()){
View Full Code Here


                propositionImpls.addAll(getPropositionFromProblemExp(and, false));
              }
              break;
          case ATOMIC_FORMULA:
              AtomicFormula p = (AtomicFormula) exp;
        PropositionImpl proposition = new PropositionImpl(new LiteralImpl(!negated, p.getPredicate()));
       
        Iterator constants = p.iterator();
       
        List<Term> terms = new ArrayList<Term>();
        while(constants.hasNext()){
View Full Code Here

        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);
//          }
View Full Code Here

TOP

Related Classes of jason.asSyntax.LiteralImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.