Examples of Substitution


Examples of org.apache.tools.ant.types.Substitution

            regularExpression.setPattern(from);
            regexp = regularExpression.getRegexp(project);
            if (to == null) {
                return;
            }
            substitution = new Substitution();
            substitution.setExpression(to);
        }
View Full Code Here

Examples of org.apache.tools.ant.types.Substitution

        if (subs != null) {
            throw new BuildException("Only one substitution expression is "
                                     + "allowed");
        }

        subs = new Substitution();
        subs.setExpression(replace);
    }
View Full Code Here

Examples of org.fenixedu.academic.domain.studentCurriculum.Substitution

        if (enrolment.isOptional()) {
            final OptionalEnrolment optional = (OptionalEnrolment) enrolment;
            if (parent.hasChildDegreeModule(optional.getOptionalCurricularCourse())) {
                return;
            }
            final Substitution substitution = createSubstitution(enrolment, parent);
            createNewOptionalDismissal(substitution, parent, enrolment, optional.getOptionalCurricularCourse(),
                    optional.getEctsCredits());
        } else {
            createNewDismissal(createSubstitution(enrolment, parent), parent, enrolment);
        }
View Full Code Here

Examples of org.ggp.base.util.prover.aima.substitution.Substitution

    LinkedList<GdlLiteral> goals = new LinkedList<GdlLiteral>();
    goals.add(query);

    Set<Substitution> answers = new HashSet<Substitution>();
    Set<GdlSentence> alreadyAsking = new HashSet<GdlSentence>();
    ask(goals, new KnowledgeBase(context), new Substitution(), ProverCache.createSingleThreadedCache(),
        new VariableRenamer(), askOne, answers, alreadyAsking);

    Set<GdlSentence> results = new HashSet<GdlSentence>();
    for (Substitution theta : answers)
    {
View Full Code Here

Examples of stanfordlogic.prover.Substitution

     */
    public void testBasicMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
       
        l1 = parser_.parse("foo baz bar");
        l2 = parser_.parse("foo baz bar");
        f1 = VariableFact.fromList(l1);
        f2 = GroundFact.fromList(l2);
       
        sigma = Unifier.mgu(f1, f2);
        assertNotNull(sigma);
        assertEquals(0, sigma.numMappings());
       
       
        l1 = parser_.parse("foo ?x bar");
        l2 = parser_.parse("foo baz bar");
        f1 = VariableFact.fromList(l1);
        f2 = GroundFact.fromList(l2);
       
        sigma = Unifier.mgu( f1, f2 );
        assertNotNull(sigma);
        assertEquals( f2.getTerm( 0 ),
                sigma.getMapping( (TermVariable) f1.getTerm( 0 ) ) );
        assertEquals(1, sigma.numMappings());
       
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo baz ?y");
        f1 = VariableFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
       
        sigma = Unifier.mgu(f1,f2);
        assertNotNull(sigma);
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f1.getTerm(0)) );
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f1.getTerm(1)) );
        assertEquals( f2.getTerm(0), sigma.getMapping( (TermVariable) f2.getTerm(1)) );
        assertEquals(2, sigma.numMappings());
    }
View Full Code Here

Examples of stanfordlogic.prover.Substitution

   
    public void testFunctionMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo (f a b)");
        l2 = parser_.parse("foo ?x");
        f1 = GroundFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
       
        sigma = Unifier.mgu(f1, f2);
        assertNotNull(sigma);
        assertEquals( f1.getTerm(0), sigma.getMapping( (TermVariable) f2.getTerm(0)) );
        assertEquals(1, sigma.numMappings());
    }
View Full Code Here

Examples of stanfordlogic.prover.Substitution

   
    public void testBadMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        // Now try one that will fail
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo bar baz");
        f1 = VariableFact.fromList(l1);
View Full Code Here

Examples of stanfordlogic.prover.Substitution

    public void testDifferentFunctions()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("toto bar baz");
        f1 = VariableFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
View Full Code Here

Examples of stanfordlogic.prover.Substitution

   
    public void testDifferentArity()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?y");
        l2 = parser_.parse("foo ?x ?y bar");
        f1 = VariableFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
View Full Code Here

Examples of stanfordlogic.prover.Substitution

   
    public void testIdenticalFunction()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x");
        l2 = parser_.parse("foo ?x");
        f1 = VariableFact.fromList(l1);
        f2 = VariableFact.fromList(l2);
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.