Package jason.asSyntax

Examples of jason.asSyntax.Atom


        Iterator variables = p.iterator();
       
        List<Term> terms = new ArrayList<Term>();
        while(variables.hasNext()){
          Constant var = (Constant) variables.next();
          Atom term = new Atom(var.getImage());
          terms.add(term);
         
          Set<String> setVar = this.types.get(var.getTypeSet().toString());
          setVar.add(var.getImage());
        }
View Full Code Here


        Iterator constants = p.iterator();
       
        List<Term> terms = new ArrayList<Term>();
        while(constants.hasNext()){
          Constant con = (Constant) constants.next();
          Atom term = new Atom(con.getImage());
          terms.add(term);
         
          Set<String> setCon = this.types.get(con.getTypeSet().toString());
         
          for(Constant c: this.pddlObject.getTypedDomain(con.getTypeSet())){
View Full Code Here

  public List<Term> getTerms(List<String> termsOp, List<Term> terms){
    List<Term> newTerms = new ArrayList<Term>();
    for(String s:termsOp)
      for(Term t:terms)
        if(s.split("@")[0].equals(t.toString())) {
          newTerms.add(new Atom(s.split("@")[1]));
          continue;
        }
    return newTerms;
  }
View Full Code Here

    }
   
    public Set<Term> getTerms(Set<String> termsS){
      Set<Term> terms = new HashSet<Term>();
      for(String s:termsS)
        terms.add(new Atom(s));
      return terms;
    }
View Full Code Here

  public Proposition makeGround() {
    PropositionImpl ground = (PropositionImpl) this.clone();
    for(Term term : ground.getTerms()) {
      if(term.isVar() && !term.isGround()) {
        Term t = new Atom(term.toString().toLowerCase());
        jason.asSemantics.Unifier un = new jason.asSemantics.Unifier();
        if(un.unifies(t, term)) {
          term.apply(un);
        }
      }
View Full Code Here

TOP

Related Classes of jason.asSyntax.Atom

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.