Package com.clarkparsia.pellet.rules.rete

Examples of com.clarkparsia.pellet.rules.rete.Compiler


    initialize( expressivity );

    merging = false;
    t = timers.startTimer( "rule-buildReteRules" );
    Compiler compiler = new Compiler(this);
    for (Entry<Rule, Rule> e : abox.getKB().getNormalizedRules().entrySet()) {
      Rule rule = e.getKey();
      Rule normalizedRule = e.getValue();

      if (normalizedRule == null)
        continue;

      Set<ATermAppl> explain = abox.doExplanation() ? rule.getExplanation(atermTranslator) : Collections
                      .<ATermAppl> emptySet();

      try {
              compiler.compile(normalizedRule, explain);
            }
            catch (UnsupportedOperationException uoe) {
              throw new RuntimeException("Unsupported rule " + normalizedRule, uoe);
            }
    }
    t.stop();
   
    AlphaNetwork alphaNet = compiler.getAlphaNet();
    if (abox.doExplanation()) {
      alphaNet.setDoExplanation(true);
    }
    interpreter = new Interpreter(alphaNet);
    partialBindings.clear();
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.rules.rete.Compiler

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.