
com.thesett.aima.logic.fol.wam.machine.WAMBaseMachine Maven / Gradle / Ivy
/*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.thesett.aima.logic.fol.wam.machine;
import java.util.HashMap;
import java.util.Map;
import com.thesett.aima.logic.fol.LinkageException;
import com.thesett.aima.logic.fol.VariableAndFunctorInternerImpl;
import com.thesett.aima.logic.fol.wam.compiler.WAMCallPoint;
import com.thesett.aima.logic.fol.wam.compiler.WAMCompiledPredicate;
import com.thesett.aima.logic.fol.wam.compiler.WAMCompiledQuery;
import com.thesett.aima.logic.fol.wam.compiler.WAMReservedLabel;
import com.thesett.common.util.doublemaps.SymbolTable;
/**
* WAMBaseMachine provides the basic services common to all WAM machines. This consists of managing the interning name
* tables for functors and variables, and managing the call table for the entry addresses of procedures.
*
*
CRC Card
* Responsibilities Collaborations
* Provide symbol table for functors names.
* Provide symbol table for variable names.
* Store and retrieve the entry points to byte code procedures.
*
*
* @author Rupert Smith
*/
public abstract class WAMBaseMachine extends VariableAndFunctorInternerImpl implements WAMMachine, WAMCodeView
{
/** Used for debugging. */
/* private static final Logger log = Logger.getLogger(WAMBaseMachine.class.getName()); */
/** The symbol table key for call points. */
protected static final String SYMKEY_CALLPOINTS = "call_points";
/** Holds the symbol table. */
protected SymbolTable© 2015 - 2025 Weber Informatics LLC | Privacy Policy