Interface Address


public interface Address
A pointer to a tuple within the list of tuples. Addresses are used for jumps, especially in reaction to conditional checks (i.e., if false, jump to else block, etc.).

Addresses have the following properties:

  • A name (label).
  • An index into the tuple queue.
An address may not necessarily have an index assigned upon creation. However, upon tuple traversal, all address indexes must point to a valid tuple.

All addresses should have a meaningful label.

Author:
Danny Daglas
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assignIndex(int idx)
    Set the tuple index of this address.
    int
    index.
    The label of the address.
  • Method Details

    • label

      String label()
      The label of the address. It is particularly useful when dumping tuples to an output stream.
      Returns:
      The label of the tuple.
    • assignIndex

      void assignIndex(int idx)
      Set the tuple index of this address. This can be deferred anytime after creation of the address, but the index must be assigned prior to traversing the tuples.
      Parameters:
      idx - The tuple location within the tuple list (queue) for this address.
    • index

      int index()

      index.

      Returns:
      The index into the tuple queue/array.