org.kiama.rewriting.Rewriter

Strategy

abstract class Strategy extends (Term) ⇒ Option[Term]

Term-rewriting strategies. A strategy is a function that takes a term as input and either succeeds producing a new term (Some), or fails (None).

Self Type
Strategy
Source
Rewriter.scala
Linear Supertypes
(Term) ⇒ Option[Term], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Strategy
  2. Function1
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Strategy()

Abstract Value Members

  1. abstract def apply(r: Term): Option[Term]

    Apply this strategy to a term, producing either a transformed term wrapped in Some, or None, representing a rewriting failure.

    Apply this strategy to a term, producing either a transformed term wrapped in Some, or None, representing a rewriting failure.

    Definition Classes
    Strategy → Function1

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  10. def andThen[A](g: (Option[Term]) ⇒ A): (Term) ⇒ A

    Definition Classes
    Function1
  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def clone(): AnyRef

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

    Definition Classes
    Function1
  14. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

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

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

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

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

    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from (Term) ⇒ Option[Term]

Inherited from AnyRef

Inherited from Any