Examples of InstantiationContext


Examples of synalp.commons.unification.InstantiationContext

   * @param sem2
   * @return a set of alternative instantiation contexts
   */
  public static Set<InstantiationContext> subsumes(Semantics sem1, Semantics sem2)
  {
    return subsumes(sem1, sem2, new InstantiationContext(), true);
  }
View Full Code Here

Examples of synalp.commons.unification.InstantiationContext

   *            subsumption
   * @return a set of alternative instantiation contexts
   */
  public static Set<InstantiationContext> subsumes(Semantics sem1, Semantics sem2, boolean ignoreSelectionalLiterals)
  {
    return subsumes(sem1, sem2, new InstantiationContext(), ignoreSelectionalLiterals);
  }
View Full Code Here

Examples of synalp.commons.unification.InstantiationContext

      {
        logIgnoreLiteral(otherLiteral);
        continue;
      }

      InstantiationContext newContext = new InstantiationContext(context);
      if (otherLiteral.unifies(literal, newContext))
        ret.add(newContext);
    }
    return ret;
  }
View Full Code Here

Examples of synalp.commons.unification.InstantiationContext

      {
        logIgnoreLiteral(otherLiteral);
        continue;
      }

      InstantiationContext newContext = new InstantiationContext(context);
      if (otherLiteral.unifies(literal, newContext))
      {
        if (!literal.isSelectional())
          ret.addLiteral(newContext, otherLiteral);
        else ret.addContext(newContext);
View Full Code Here

Examples of synalp.commons.unification.InstantiationContext

  @SuppressWarnings("javadoc")
  public void testFlatten()
  {
    Semantics sem1 = Semantics.readSemantics("foo(a|b c|d)");
    Semantics sem2 = Semantics.readSemantics("foo(a c) foo(b c) foo(a d) foo(b d)");
    assertTrue(new Semantics().join(sem1.flattenDisjunctions()).equals(sem2, new InstantiationContext()));
   
    sem1 = Semantics.readSemantics("foo(a|b c|d) bar(e f|g)");
    assertTrue(sem1.flattenDisjunctions().size() == 8);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.