org.kiama.rewriting.MemoRewriter

MemoStrategy

abstract class MemoStrategy extends Strategy with IdMemoised[Any, Option[Any]]

Source
MemoRewriter.scala
Linear Supertypes
MemoRewriter.IdMemoised[Any, Option[Any]], MemoRewriter.MemoisedBase[Any, Option[Any]], Strategy, (Any) ⇒ Option[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MemoStrategy
  2. IdMemoised
  3. MemoisedBase
  4. Strategy
  5. Function1
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MemoStrategy(name: String)

Abstract Value Members

  1. abstract val body: (Any) ⇒ Option[Any]

    Implementation of this strategy.

    Implementation of this strategy. When applied to a term produce either a transformed term wrapped in Some, or None, representing a rewriting failure.

    Definition Classes
    Strategy

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(name: String, q: ⇒ Strategy): PlusStrategy

    As for the other + with the first argument specifying a name for the constructed strategy.

    As for the other + with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  4. macro def +(q: Strategy): PlusStrategy

    Non-deterministic choice.

    Non-deterministic choice. Normally, construct a strategy that first applies either this strategy or the given strategy. If it succeeds, succeed with the resulting term. Otherwise, apply q. Currently implemented as deterministic choice, but this behaviour should not be relied upon. When used as the argument to the < conditional choice combinator, + just serves to hold the two strategies that are chosen between by the conditional choice. q is evaluated at most once.

    Definition Classes
    Strategy
  5. def <(name: String, lr: ⇒ PlusStrategy): Strategy

    As for the other < with the first argument specifying a name for the constructed strategy.

    As for the other < with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  6. macro def <(lr: PlusStrategy): Strategy

    Conditional choice: c < l + r.

    Conditional choice: c < l + r. Construct a strategy that first applies this strategy (c). If c succeeds, the strategy applies l to the resulting term, otherwise it applies r to the original subject term. lr is evaluated at most once.

    Definition Classes
    Strategy
  7. def <*(name: String, q: ⇒ Strategy): Strategy

    As for the other <* with the first argument specifying a name for the constructed strategy.

    As for the other <* with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  8. macro def <*(q: Strategy): Strategy

    Sequential composition.

    Sequential composition. Construct a strategy that first applies this strategy. If it succeeds, then apply q to the new subject term. Otherwise fail. q is evaluated at most once.

    Definition Classes
    Strategy
  9. def <+(name: String, q: ⇒ Strategy): Strategy

    As for the other <+ with the first argument specifying a name for the constructed strategy.

    As for the other <+ with the first argument specifying a name for the constructed strategy.

    Definition Classes
    Strategy
  10. macro def <+(q: Strategy): Strategy

    Deterministic choice.

    Deterministic choice. Construct a strategy that first applies this strategy. If it succeeds, succeed with the resulting term. Otherwise, apply q to the original subject term. q is evaluated at most once.

    Definition Classes
    Strategy
  11. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def andThen[A](g: (Option[Any]) ⇒ A): (Any) ⇒ A

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  13. def apply(r: Any): Option[Any]

    Return the value of this attribute for node t, raising an error if it depends on itself.

    Return the value of this attribute for node t, raising an error if it depends on itself.

    Definition Classes
    MemoStrategyStrategy → Function1
  14. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def compose[A](g: (A) ⇒ Any): (A) ⇒ Option[Any]

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  17. def dup(t1: Any, t2: Any, u: Option[Any]): Unit

    Duplicate an entry if possible.

    Duplicate an entry if possible. If t1 has a memoised value associated with it, set the value associated with t2 to the same value. If there is no value associated with t1, set the value associated with t2 to u.

    Definition Classes
    MemoisedBase
  18. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. def get(t: Any): Option[Option[Any]]

    Return the value stored at key t as an option.

    Return the value stored at key t as an option.

    Definition Classes
    MemoisedBase
  22. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  23. def getWithDefault(t: Any, u: Option[Any]): Option[Any]

    Return the value stored at key t if there is one, otherwise return u.

    Return the value stored at key t if there is one, otherwise return u.

    Definition Classes
    MemoisedBase
  24. def hasBeenComputedAt(t: Any): Boolean

    Has the value of this attribute at t already been computed or not? By default, does the memo table contain a value for t?

    Has the value of this attribute at t already been computed or not? By default, does the memo table contain a value for t?

    Definition Classes
    MemoisedBase
  25. def hashCode(): Int

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

    Definition Classes
    Any
  27. val memo: Cache[AnyRef, AnyRef]

    The memo table.

    The memo table.

    Definition Classes
    IdMemoisedMemoisedBase
  28. def mkStrategy(name: String, f: (Any) ⇒ Option[Any]): Strategy

    Make one of these strategies with the given name and body f.

    Make one of these strategies with the given name and body f.

    Definition Classes
    MemoStrategyStrategy
  29. val name: String

    Definition Classes
    Strategy
  30. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  31. final def notify(): Unit

    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  33. def put(t: Any, u: Option[Any]): Unit

    Store the value u under the key t.

    Store the value u under the key t.

    Definition Classes
    MemoisedBase
  34. def putIfNotPresent(t: Any, u: Option[Any]): Unit

    Store the value u under the key t if t does not already have an associated value.

    Store the value u under the key t if t does not already have an associated value.

    Definition Classes
    MemoisedBase
  35. def reset(): Unit

    Immediately reset the memo table.

    Immediately reset the memo table.

    Definition Classes
    MemoisedBase
  36. def resetAt(t: Any): Unit

    Immediately reset the memo table at t.

    Immediately reset the memo table at t.

    Definition Classes
    MemoisedBase
  37. def resetIfRequested(): Unit

    Check to see if a reset has been requested via the common memo version, and if so, do it.

    Check to see if a reset has been requested via the common memo version, and if so, do it.

    Definition Classes
    MemoisedBase
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Identify this strategy by its name.

    Identify this strategy by its name.

    Definition Classes
    Strategy → Function1 → AnyRef → Any
  40. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from MemoRewriter.IdMemoised[Any, Option[Any]]

Inherited from MemoRewriter.MemoisedBase[Any, Option[Any]]

Inherited from Strategy

Inherited from (Any) ⇒ Option[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped