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

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


      // Create predicate
      Class clazz = new PrologClassLoader().loadPredicateClass(
          "jp.ac.kobe_u.cs.prolog.compiler.pl2am", "pl2am", 1, true);
      Predicate code = (Predicate) clazz.newInstance();
      // Translate Prolog into WAM
      PrologControl p = new PrologControl();
      p.setPredicate(code, args);
      // System.out.println(code);
      return p.execute(code, args);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return false;
  }
View Full Code Here


@ThreadSafe
public class PrologCafeModelFactory implements OpponentModel.Factory {

  @Override
  public OpponentModel create(PlayerId actor) {
    PrologControl prolog = new PrologControl();
    return new PrologCafeModel(prolog);
  }
View Full Code Here

@Deprecated
public class RedundantModelFactory implements OpponentModel.Factory {

  @Override
  public OpponentModel create(PlayerId actor) {
    PrologControl prolog = new PrologControl();
    PrologCafeModel model1 = new PrologCafeModel(prolog);

    Prolog engine = new Prolog();
    try {
      Theory theory1 = new Theory(
View Full Code Here

      // "am2j", 1);
      Class clazz = new PrologClassLoader().loadPredicateClass(
          "jp.ac.kobe_u.cs.prolog.compiler.am2j", "am2j", 1, true);
      Predicate code = (Predicate) clazz.newInstance();
      // Translate WAM into Java
      PrologControl p = new PrologControl();
      p.setPredicate(code, args);
      // System.out.println(code);
      return p.execute(code, args);
    } catch (Exception e) {
      e.printStackTrace();
    }
    return false;
  }
View Full Code Here

TOP

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

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.