Examples of GdlList


Examples of stanfordlogic.gdl.GdlList

    @Override
    public void agent_init(String informations)
    {
        // Informations are the game description
        GdlList content = GameManager.getParser().parse(informations);
        content = (GdlList) content.getElement(0);
       
        GdlAtom roleAtom = (GdlAtom) content.getElement(2);
        TermObject role_term = (TermObject) TermObject.buildFromGdl(roleAtom);
        my_role = role_term.toString();
       
        GdlList game_description = (GdlList) content.getElement(3);
        GameInformation gameInfo = new MetaGdl(GameManager.getParser()).examineGdl(game_description);
        all_roles = new ArrayList<String>();
        for(TermObject t : gameInfo.getRoles())
        {
            all_roles.add(t.toString());
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

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

Examples of stanfordlogic.gdl.GdlList

        assertNull(sigma);
    }

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

Examples of stanfordlogic.gdl.GdlList

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

Examples of stanfordlogic.gdl.GdlList

        assertNull(sigma);
    }
   
    public void testIdenticalFunction()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x");
        l2 = parser_.parse("foo ?x");
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

        assertNotNull(sigma);
    }
   
    public void testIdenticalVariables()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?x");
        l2 = parser_.parse("foo ?x ?x");
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

        assertEquals(1, sigma.numMappings());
    }
   
    public void testIdenticalVariableNames()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?y");
        l2 = parser_.parse("foo ?y ?y");
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

        assertEquals(2, sigma.numMappings());
    }
   
    public void testRecursiveSub()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
        l1 = parser_.parse("foo ?x ?x ?z");
        l2 = parser_.parse("foo  a ?y ?y");
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

    public GameTester( String kifFile, String role, int startClock, int playClock ) throws Exception
    {
        parser_ = GameManager.getParser();

        // Load up the kif
        GdlList gameDesc = parser_.parse( new FileInputStream( kifFile ) );
       
        // if there is no role, find the first 'role' expression and use that
        if ( role.length() == 0 )
        {
            for ( GdlExpression exp : gameDesc )
            {
                if ( exp instanceof GdlList )
                {
                    GdlList l = (GdlList) exp;
                    if ( l.getElement(0).equals( new GdlAtom(parser_.getSymbolTable(), parser_.TOK_ROLE) ) )
                    {
                        GdlAtom roleAtom = (GdlAtom) l.getElement(1);
                        role = roleAtom.toString();
                        break;
                    }
                }
            }
View Full Code Here

Examples of stanfordlogic.gdl.GdlList

    /*
     * Test method for 'camembert.prover.Unifier.mgu(Fact, Fact)'
     */
    public void testBasicMgu()
    {
        GdlList l1, l2;
        Fact f1, f2;
        Substitution sigma;
       
       
        l1 = parser_.parse("foo baz bar");
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.