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
  *
  *     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;
WAMCodeView provides a read-only view onto the code buffer of a machine.

CRC Card
Responsibilities
Allow portions of the code buffer to be examined.
Provide reverse look-ups from addresses to interned names for locations.

Author(s):
Rupert Smith
public interface WAMCodeView
{
    
Provides read access to the machines bytecode buffer.

Parameters:
start The start offset within the buffer to read.
length Then length within the buffer to read.
Returns:
The requested portion of the machines bytecode buffer.
    ByteBuffer getCodeBuffer(int startint length);

    
Attempts to find a label or functor name for a given address within the code area of the machine.

Parameters:
address The address to look up.
Returns:
The label or functor name matching the address, or null if none is set at that address.
    Integer getNameForAddress(int address);
New to GrepCode? Check out our FAQ X