Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright The Sett Ltd, 2005 to 2014.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package com.thesett.aima.logic.fol.wam.interpreter;
PrologInterpreter builds an interactive resolving interpreter using the interpreted resolution engine com.thesett.aima.logic.fol.wam.machine.WAMResolvingJavaMachine.

CRC Card
Responsibilities Collaborations
Create an interpreter for WAM. com.thesett.aima.logic.fol.isoprologparser.SentenceParser, com.thesett.aima.logic.fol.wam.compiler.InstructionCompiler, com.thesett.aima.logic.fol.wam.machine.WAMResolvingJavaMachine

Rupert Smith
public class WAMJavaInterpreter
Used for debugging purposes.
    /* private static final Logger log = Logger.getLogger(WAMJavaInterpreter.class.getName()); */

Creates the interpreter and launches its top-level run loop.

args The command line arguments.
    public static void main(String[] args)
            SymbolTableImpl<IntegerStringObjectsymbolTable = new SymbolTableImpl<IntegerStringObject>();
            final WAMResolvingMachine machine = new WAMResolvingJavaMachine(symbolTable);
            Parser<ClauseTokenparser = new InteractiveParser(machine);
            LogicCompiler<ClauseWAMCompiledPredicateWAMCompiledQuerycompiler =
                new WAMCompiler(symbolTablemachine);
            ResolutionEngine<ClauseWAMCompiledPredicateWAMCompiledQueryengine =
                new WAMEngine(parsermachinecompilermachine);
            ResolutionInterpreter<WAMCompiledPredicateWAMCompiledQueryinterpreter =
                new ResolutionInterpreter<WAMCompiledPredicateWAMCompiledQuery>(engine);
        catch (Exception e)
            /*log.log(java.util.logging.Level.SEVERE, e.getMessage(), e);*/
            e.printStackTrace(new PrintStream(.));
New to GrepCode? Check out our FAQ X