Package jp.ac.kobe_u.cs.prolog.lang

Examples of jp.ac.kobe_u.cs.prolog.lang.InternalException


      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    Term keys = SYM_NIL;
    for (Term term : ((HashMapOfTerm) hash).keySet()) {
      keys = new ListTerm(term, keys);
    }
View Full Code Here


      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    a3 = a3.dereference();
    ((HashMapOfTerm) hash).put(a2, a3);
    return cont;
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    if (!((HashMapOfTerm) hash).containsKey(a2)) {
      return engine.fail();
    }
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    ((HashMapOfTerm) hash).remove(a2);
    return cont;
  }
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    Term elem = ((HashMapOfTerm) hash).get(a2);
    if (elem == null) {
      elem = SYM_NIL;
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    ((HashMapOfTerm) hash).clear();
    return cont;
  }
View Full Code Here

      }
    } catch (IOException e) {
      throw new PermissionException(this, "open", "source_sink", a1, "");
    }
    if (engine.getStreamManager().containsKey(streamObject)) {
      throw new InternalException("stream object is duplicated");
    }
    // stream_options
    a4 = a4.dereference();
    Term tmp = a4;
    while (!tmp.isNil()) {
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    Term elem = ((HashMapOfTerm) hash).get(a2);
    if (elem == null) {
      elem = SYM_NIL;
    }
    a3 = a3.dereference();
    if (elem.isNil()) {
      elem = new ListTerm(a3, elem);
    } else {
      Term x = elem;
      Term y;
      while (true) {
        if (!x.isList()) {
          throw new InternalException(this + ": the valus of " + a2
              + " is not list structure");
        }
        y = ((ListTerm) x).cdr().dereference();
        if (y.isNil()) {
          ((ListTerm) x).setCdr(new ListTerm(a3, SYM_NIL));
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    Term elem = ((HashMapOfTerm) hash).get(a2);
    if (elem == null) {
      elem = SYM_NIL;
View Full Code Here

      hash = ((JavaObjectTerm) a1).object();
    } else {
      throw new IllegalDomainException(this, 1, "hash_or_alias", a1);
    }
    if (!(hash instanceof HashMapOfTerm)) {
      throw new InternalException(this + ": Hash is not HashtableOfTerm");
    }
    a2 = a2.dereference();
    if (!a2.isVariable() && !a2.isInteger()) {
      throw new IllegalTypeException(this, 1, "integer", a2);
    }
View Full Code Here

TOP

Related Classes of jp.ac.kobe_u.cs.prolog.lang.InternalException

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.