Package wyautl_old.lang.DefaultInterpretation

Examples of wyautl_old.lang.DefaultInterpretation.Term


    ArrayList<Term> model = new ArrayList<Term>();
    try {
      int count = 0;
      while (true) {
        Automaton automaton = reader.read();
        Term value = DefaultInterpretation.construct(automaton);
        model.add(value);
        if(verbose) {
          System.err.print("\rRead " + count + " values.");
        }
        count++;
View Full Code Here


  }

  public static BitSet accepts(Interpretation interpretation, Automaton automaton, ArrayList<Term> model) {
    BitSet accepted = new BitSet(model.size());
    for(int i=0;i!=model.size();++i) {
      Term value = model.get(i);
      if(interpretation.accepts(automaton,value)) {
        accepted.set(i);
      }
    }
    return accepted;
View Full Code Here

          return false;
        }
        int child = automaton.states[index].children[0];
        Term[] values = value.children;
        for(int i=0;i!=values.length;++i) {
          Term vchild = values[i];
          if(!accepts(child,automaton,vchild)) {
            return false;
          }
        }
        return true;
      }
      case Type.K_FUNCTION:
      case Type.K_METHOD: {
        int[] schildren = state.children;
        Term[] vchildren = value.children;
        if(schildren.length != vchildren.length) {
          return false;
        }
        int length = schildren.length;
        // First, do parameters (which are contravariant).
        for(int i=2;i<length;++i) {
          int schild = schildren[i];
          Term vchild = vchildren[i];
          if(accepts(schild,automaton,vchild)) {
            return false;
          }
        }
        // Second, do return values (which are covariant)
View Full Code Here

TOP

Related Classes of wyautl_old.lang.DefaultInterpretation.Term

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.