org.kiama.example.obr

RISCTree

object RISCTree extends AnyRef

Module containing structures for representing RISC machine programs. In essence this is a register-less assembly code, in which the flow of data between constructs is represented in the parent-child relationships of a tree structure.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RISCTree
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. case class AddW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Add two word values and return the sum l + r.

  2. class Address extends RISCNode

    Memory addresses that can be stored to or loaded from.

  3. case class Beq (cond: Datum, dest: Label) extends Item with Product with Serializable

    Branch to the given label if the value of the given datum is equal to zero.

  4. case class Bne (cond: Datum, dest: Label) extends Item with Product with Serializable

    Branch to the given label if the value of the given datum is not equal to zero.

  5. case class CmpeqW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Compare two word values for equality and return 1 if they are equal and 0 if they are not.

  6. case class CmpgtW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Compare two word values and return 1 if the left operand is greater then the right operands, otherwise return 0.

  7. case class CmpltW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Compare two word values and return 1 if the left operand is less then the right operands, otherwise return 0.

  8. case class CmpneW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Compare two word values for inequality and return 1 if they are equal and 0 if they are not.

  9. case class Cond (cond: Datum, t: Datum, f: Datum) extends Datum with Product with Serializable

    Evaluate cond and if the value is true (non-zero) return the value of t, else return the value of f.

  10. class Datum extends RISCNode with NeedsRegister

    Superclass of all datum constructs, ie target constructs that return a value to their enclosing construct.

  11. case class DivW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Divide two word values and return the dividend from l / r.

  12. case class Indexed (base: Local, offset: Datum) extends Address with NeedsRegister with Product with Serializable

    An address that is calculated by a indexing from the local address addr.

  13. case class IntDatum (num: Int) extends Datum with Product with Serializable

    Return the given integer value.

  14. class Item extends RISCNode

    Superclass of all item constructs, ie.

  15. case class Jmp (dest: Label) extends Item with Product with Serializable

    Jump unconditionally to the given label.

  16. case class Label (num: Int) extends Product with Serializable

    Labels represent a code position.

  17. case class LabelDef (lab: Label) extends Item with Product with Serializable

    Define the given at this point in the item sequence.

  18. case class LdW (mem: Address) extends Datum with Product with Serializable

    Load a value from memory address given by mem.

  19. case class Local (offset: Int) extends Address with Product with Serializable

    An address that is calculated by an known integer offset from the start of the local memory block.

  20. case class MulW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Multiple two word values and return l * r.

  21. trait NeedsRegister extends RISCNode

    Trait to mark those nodes which need to have a return value allocated to a register.

  22. case class NegW (d: Datum) extends Datum with Product with Serializable

    Negate a word value and return the negation of e.

  23. case class Not (d: Datum) extends Datum with Product with Serializable

    Complement a Boolean value.

  24. class RISCNode extends Attributable

    Superclass of all RISC tree nodes.

  25. case class RISCProg (insns: List[Item]) extends RISCNode with Product with Serializable

    A stack program consisting of the given statements.

  26. case class Read () extends Datum with Product with Serializable

    Read an integer value from standard input.

  27. case class RemW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Divide two word values and return the remainder from l / r.

  28. case class Ret () extends Item with Product with Serializable

    Cause the program to terminate.

  29. case class SequenceDatum (insns: List[Item], d: Datum) extends Datum with Product with Serializable

    A compound datum, consisting of a sequence of items to execute followed by a datum whose value is evaluated and returned.

  30. case class StW (mem: Address, d: Datum) extends Item with Product with Serializable

    Evaluate d and store its value in the memory location given by mem.

  31. case class SubW (l: Datum, r: Datum) extends Datum with Product with Serializable

    Subtract two word values and return the difference l - r.

  32. case class Write (d: Datum) extends Item with Product with Serializable

    Calculate and write out the value of the given datum to standard output.

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def genlabel (): Label

    Generate a unique label.

  12. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  13. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  14. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  15. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def reset (): Unit

    Reset the module.

  19. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  20. def toString (): String

    Definition Classes
    AnyRef → Any
  21. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any