Package stanfordlogic.prover

Examples of stanfordlogic.prover.Substitution.addMapping()


       
        TermVariable v1 = TermVariable.makeTermVariable();
        TermVariable v2 = TermVariable.makeTermVariable();
        TermObject t = TermObject.makeTermObject(256);
       
        s.addMapping( v1, v2 );
        s.addMapping( v2, t );
       
        assertEquals(2, s.numMappings() );
        assertEquals(t, s.getMapping(v1) );
        assertEquals(t, s.getMapping(v2) );
View Full Code Here


        TermVariable v1 = TermVariable.makeTermVariable();
        TermVariable v2 = TermVariable.makeTermVariable();
        TermObject t = TermObject.makeTermObject(256);
       
        s.addMapping( v1, v2 );
        s.addMapping( v2, t );
       
        assertEquals(2, s.numMappings() );
        assertEquals(t, s.getMapping(v1) );
        assertEquals(t, s.getMapping(v2) );
    }
View Full Code Here

        TermVariable varX = getVariable("?x");
        TermVariable varY = getVariable("?y");
        TermVariable varZ = getVariable("?z");
       
        Substitution s = new Substitution();
        s.addMapping(varX, tf);
        s.addMapping(varY, getTermObject("1"));
        s.addMapping(varZ, getTermObject("2"));
       
       
        Fact result = (Fact) f1.applySubstitution(s);
View Full Code Here

        TermVariable varY = getVariable("?y");
        TermVariable varZ = getVariable("?z");
       
        Substitution s = new Substitution();
        s.addMapping(varX, tf);
        s.addMapping(varY, getTermObject("1"));
        s.addMapping(varZ, getTermObject("2"));
       
       
        Fact result = (Fact) f1.applySubstitution(s);
       
View Full Code Here

        TermVariable varZ = getVariable("?z");
       
        Substitution s = new Substitution();
        s.addMapping(varX, tf);
        s.addMapping(varY, getTermObject("1"));
        s.addMapping(varZ, getTermObject("2"));
       
       
        Fact result = (Fact) f1.applySubstitution(s);
       
        assertEquals( makeFact("legal (mark 1 2)"), result );
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.