org.kiama.rewriting

MemoRewriter

trait MemoRewriter extends Rewriter with Memoiser

Strategy-based term rewriting where all strategy results are memoised.

Source
MemoRewriter.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MemoRewriter
  2. Memoiser
  3. Rewriter
  4. RewriterCore
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait IdMemoised[T, U] extends MemoisedBase[T, U]

    A memoised entity that uses identity to compare argument values.

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

  3. trait Memoised[T, U] extends MemoisedBase[T, U]

    A memoised entity that uses equality to compare argument values.

  4. trait MemoisedBase[T, U] extends AnyRef

    Common interface for encapsulation of memoisation for a single memoised entity.

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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. object Term

    Generic term deconstruction.

  7. def all(name: String, s: ⇒ Strategy): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  8. def all(s: Strategy): Strategy

    Traversal to all children.

    Traversal to all children. Construct a strategy that applies s to all term children of the subject term. If s succeeds on all of the children, then succeed, forming a new term from the constructor of the original term and the result of s for each child. If s fails on any child, fail. If there are no children, succeed. If s succeeds on all children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method. s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  9. def allMap[CC[V, W] <: Map[V, W]](s: Strategy, t: CC[Any, Any])(implicit cbf: CanBuildFrom[CC[Any, Any], (Any, Any), CC[Any, Any]]): Option[CC[Any, Any]]

    Implementation of all for Map values.

    Implementation of all for Map values.

    Definition Classes
    RewriterCore
  10. def allProduct(s: Strategy, p: Product): Option[Any]

    Implementation of all for Product values.

    Implementation of all for Product values.

    Definition Classes
    RewriterCore
  11. def allRewritable(s: Strategy, r: Rewritable): Option[Any]

    Implementation of all for Rewritable values.

    Implementation of all for Rewritable values.

    Definition Classes
    RewriterCore
  12. def allTraversable[CC[_] <: Traversable[Any]](s: Strategy, t: CC[Any])(implicit cbf: CanBuildFrom[CC[Any], Any, CC[Any]]): Option[CC[Any]]

    Implementation of all for Traversable values.

    Implementation of all for Traversable values.

    Definition Classes
    RewriterCore
  13. def allbu(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.allbu

  14. def allbu(s: Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to all subterms at each level, stopping at a frontier where s succeeds.

    Construct a strategy that applies s in a bottom-up fashion to all subterms at each level, stopping at a frontier where s succeeds.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  15. def alldownup2(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.alldownup2

  16. def alldownup2(s1: Strategy, s2: Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds. s2 is applied in a bottom-up, postfix fashion to the result.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  17. def alltd(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.alltd

  18. def alltd(s: Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion, stopping at a frontier where s succeeds.

    Construct a strategy that applies s in a top-down fashion, stopping at a frontier where s succeeds.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  19. def alltdfold(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.alltdfold

  20. def alltdfold(s1: Strategy, s2: Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion stopping at a frontier where s1 succeeds. s2 is applied in a bottom-up, postfix fashion to the results of the recursive calls.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  21. def and(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.and

  22. def and(s1: Strategy, s2: Strategy): Strategy

    and(s1, s2) applies s1 and s2 to the current term and succeeds if both succeed.

    and(s1, s2) applies s1 and s2 to the current term and succeeds if both succeed. s2 will always be applied, i.e., and is not a short-circuit operator

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  23. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  24. def attempt(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.attempt

  25. def attempt(s: Strategy): Strategy

    Construct a strategy that applies s, yielding the result of s if it succeeds, otherwise leave the original subject term unchanged.

    Construct a strategy that applies s, yielding the result of s if it succeeds, otherwise leave the original subject term unchanged. In Stratego library this strategy is called try.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  26. def bottomup(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.bottomup

  27. def bottomup(s: Strategy): Strategy

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term.

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  28. def bottomupS(name: String, s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.bottomupS

  29. def bottomupS(s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  30. def breadthfirst(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.breadthfirst

  31. def breadthfirst(s: Strategy): Strategy

    Construct a strategy that applies s in breadth first order.

    Construct a strategy that applies s in breadth first order. This strategy does not apply s to the root of the subject term.

    It is called breadthfirst to follow Stratego's library, but is not really conducting a breadth-first traversal since all of the descendants of the first child of a term are visited before any of the descendants of the second child of a term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  32. def build(name: String, t: ⇒ Any): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  33. def build(t: Any): Strategy

    Construct a strategy that always succeeds, changing the subject term to the given term t.

    Construct a strategy that always succeeds, changing the subject term to the given term t. The term t is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  34. def child(name: String, i: Int, s: ⇒ Strategy): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  35. def child(i: Int, s: Strategy): Strategy

    Traversal to a single child.

    Traversal to a single child. Construct a strategy that applies s to the ith child of the subject term (counting from one). If s succeeds on the ith child producing t, then succeed, forming a new term that is the same as the original term except that the ith child is now t. If s fails on the ith child or the subject term does not have an ith child, then fail. child(i, s) is equivalent to Stratego's i(s) operator. If s succeeds on the ith child producing the same term (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works for instances of Product or finite Seq values. s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  36. def childProduct(s: Strategy, i: Int, p: Product): Option[Any]

    Implementation of child for Product values.

    Implementation of child for Product values.

    Definition Classes
    RewriterCore
  37. def childSeq[CC[U] <: Seq[U]](s: Strategy, i: Int, t: CC[Any])(implicit cbf: CanBuildFrom[CC[Any], Any, CC[Any]]): Option[CC[Any]]

    Implementation of child for Seq values.

    Implementation of child for Seq values.

    Definition Classes
    RewriterCore
  38. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. def collect[CC[U] <: Traversable[U], T](f: ==>[Any, T])(implicit cbf: CanBuildFrom[CC[T], T, CC[T]]): (Any) ⇒ CC[T]

    Collect query results in a traversable collection.

    Collect query results in a traversable collection. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in the collection and return the final value of the list.

    Definition Classes
    Rewriter
  40. def collectl[T](f: ==>[Any, T]): (Any) ⇒ List[T]

    Collect query results in a list.

    Collect query results in a list. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in a list and return the final value of the list.

    Definition Classes
    Rewriter
  41. def collects[T](f: ==>[Any, T]): (Any) ⇒ Set[T]

    Collect query results in a set.

    Collect query results in a set. Run the function f as a top-down left-to-right query on the subject term. Accumulate the values produced by the function in a set and return the final value of the set.

    Definition Classes
    Rewriter
  42. def congruence(name: String, ss: Strategy*): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  43. def congruence(ss: Strategy*): Strategy

    Make a strategy that applies the elements of ss pairwise to the children of the subject term, returning a new term if all of the strategies succeed, otherwise failing.

    Make a strategy that applies the elements of ss pairwise to the children of the subject term, returning a new term if all of the strategies succeed, otherwise failing. The constructor of the new term is the same as that of the original term and the children are the results of the strategies. If the length of ss is not the same as the number of children, then congruence(ss) fails. If the argument strategies succeed on children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of Product values.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  44. def congruenceProduct(p: Product, ss: Strategy*): Option[Any]

    Implementation of congruence for Product values.

    Implementation of congruence for Product values.

    Definition Classes
    RewriterCore
  45. val constrcache: WeakHashMap[Class[_], Constructor[_]]

    Cache of constructors for product duplication.

    Cache of constructors for product duplication.

    Attributes
    protected
    Definition Classes
    RewriterCore
  46. def count(f: ==>[Any, Int]): (Any) ⇒ Int

    Count function results.

    Count function results. Run the function f as a top-down query on the subject term. Sum the integer values returned by f from all applications.

    Definition Classes
    Rewriter
  47. def debug(name: String, msg: String, emitter: Emitter): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  48. def debug(msg: String, emitter: Emitter = new Emitter): Strategy

    A strategy that always succeeds with the subject term unchanged (i.

    A strategy that always succeeds with the subject term unchanged (i.e., this is the identity strategy) with the side-effect that the subject term is printed to the given emitter, prefixed by the string s. The emitter defaults to one that writes to standard output.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  49. def doloop(name: String, s: Strategy, r: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.doloop

  50. def doloop(s: Strategy, r: Strategy): Strategy

    Construct a strategy that applies s at least once and then repeats s while r succeeds.

    Construct a strategy that applies s at least once and then repeats s while r succeeds. This operator is called do-while in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  51. def dontstop(s: ⇒ Strategy): Strategy

    A unit for topdownS, bottomupS and downupS.

    A unit for topdownS, bottomupS and downupS. For example, topdown(s) is equivalent to topdownS(s, dontstop).

    Definition Classes
    Rewriter
  52. def downup(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.downup

  53. def downup(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.downup

  54. def downup(s1: Strategy, s2: Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term.

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  55. def downup(s: Strategy): Strategy

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.e., both prefix and postfix) to the subject term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  56. def downupS(name: String, s1: Strategy, s2: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.downupS

  57. def downupS(name: String, s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.downupS

  58. def downupS(s1: Strategy, s2: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s1 in a top-down, prefix fashion and s2 in a bottom-up, postfix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  59. def downupS(s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.

    Construct a strategy that applies s in a combined top-down and bottom-up fashion (i.e., both prefix and postfix) to the subject but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  60. def dup[T <: Product](t: T, children: Array[AnyRef]): T

    General product duplication function.

    General product duplication function. Returns a product that applies the same constructor as the product t, but with the given children instead of t's children. Fails if a constructor cannot be found, there are the wrong number of new children, or if one of the new children is not of the appropriate type.

    Attributes
    protected
    Definition Classes
    RewriterCore
  61. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  62. val eq: Strategy

    A strategy that tests whether the two sub-terms of a pair of terms are equal.

    A strategy that tests whether the two sub-terms of a pair of terms are equal.

    Definition Classes
    Rewriter
  63. val equal: Strategy

    Construct a strategy that tests whether the two sub-terms of a pair of terms are equal.

    Construct a strategy that tests whether the two sub-terms of a pair of terms are equal. Synonym for eq.

    Definition Classes
    Rewriter
  64. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  65. def everything[T](v: T)(f: (T, T) ⇒ T)(g: ==>[Any, T])(t: Any): T

    Apply the function at every term in t in a top-down, left-to-right order.

    Apply the function at every term in t in a top-down, left-to-right order. Collect the resulting T values by accumulating them using f with initial left value v. Return the final value of the accumulation.

    Definition Classes
    Rewriter
  66. def everywhere(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.everywhere

  67. def everywhere(s: Strategy): Strategy

    Same as everywheretd.

    Same as everywheretd.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  68. def everywherebu(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.everywherebu

  69. def everywherebu(s: Strategy): Strategy

    Construct a strategy that applies s at all terms in a bottom-up fashion regardless of failure.

    Construct a strategy that applies s at all terms in a bottom-up fashion regardless of failure. Terms for which the strategy fails are left unchanged.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  70. def everywheretd(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.everywheretd

  71. def everywheretd(s: Strategy): Strategy

    Construct a strategy that applies s at all terms in a top-down fashion regardless of failure.

    Construct a strategy that applies s at all terms in a top-down fashion regardless of failure. Terms for which the strategy fails are left unchanged.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  72. val fail: Strategy

    A strategy that always fails.

    A strategy that always fails.

    Definition Classes
    RewriterCore
  73. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  76. val id: Strategy

    A strategy that always succeeds.

    A strategy that always succeeds.

    Definition Classes
    RewriterCore
  77. def innermost(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.innermost

  78. def innermost(s: Strategy): Strategy

    Construct a strategy that applies s repeatedly to the innermost (i.

    Construct a strategy that applies s repeatedly to the innermost (i.e., lowest and left-most) (sub-)term to which it applies. Stop with the current term if s doesn't apply anywhere.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  79. def innermost2(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.innermost2

  80. def innermost2(s: Strategy): Strategy

    An alternative version of innermost.

    An alternative version of innermost.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  81. def ior(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.ior

  82. def ior(s1: Strategy, s2: Strategy): Strategy

    ior(s1, s2) implements inclusive OR, that is, the inclusive choice of s1 and s2.

    ior(s1, s2) implements inclusive OR, that is, the inclusive choice of s1 and s2. It first tries s1. If that fails it applies s2 (just like s1 <+ s2). However, when s1 succeeds it also tries to apply s2.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  83. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  84. val isinnernode: Strategy

    Construct a strategy that succeeds if the current term has at least one direct subterm.

    Construct a strategy that succeeds if the current term has at least one direct subterm.

    Definition Classes
    Rewriter
  85. val isleaf: Strategy

    Construct a strategy that succeeds if the current term has no direct subterms.

    Construct a strategy that succeeds if the current term has no direct subterms.

    Definition Classes
    Rewriter
  86. val ispropersubterm: Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y but is not equal to y.

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y but is not equal to y.

    Definition Classes
    Rewriter
  87. val ispropersuperterm: Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a super-term of y but is not equal to y.

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a super-term of y but is not equal to y.

    Definition Classes
    Rewriter
  88. val issubterm: Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y.

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a sub-term of y.

    Definition Classes
    Rewriter
  89. val issuperterm: Strategy

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a superterm of y.

    Construct a strategy that succeeds when applied to a pair (x,y) if x is a superterm of y.

    Definition Classes
    Rewriter
  90. def lastly(name: String, s: Strategy, f: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.lastly

  91. def lastly(s: Strategy, f: Strategy): Strategy

    Applies s followed by f whether s failed or not.

    Applies s followed by f whether s failed or not. This operator is called finally in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  92. def leaves(name: String, s: Strategy, isleaf: Strategy, skip: (Strategy) ⇒ Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.leaves

  93. def leaves(name: String, s: Strategy, isleaf: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.leaves

  94. def leaves(s: Strategy, isleaf: Strategy, skip: (Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate, skipping subterms for which skip when applied to the result succeeds.

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate, skipping subterms for which skip when applied to the result succeeds.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  95. def leaves(s: Strategy, isleaf: Strategy): Strategy

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate.

    Construct a strategy that applies to all of the leaves of the current term, using isleaf as the leaf predicate.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  96. def log(name: String, s: ⇒ Strategy, msg: String, emitter: Emitter): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  97. def log(s: Strategy, msg: String, emitter: Emitter = new Emitter): Strategy

    Create a logging strategy based on a strategy s.

    Create a logging strategy based on a strategy s. The returned strategy succeeds or fails exactly as s does, but also prints the provided message, the subject term, the success or failure status, and on success, the result term, to the provided emitter (default: standard output). s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  98. def logfail[T](name: String, s: ⇒ Strategy, msg: String, emitter: Emitter): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  99. def logfail[T](s: Strategy, msg: String, emitter: Emitter = new Emitter): Strategy

    Create a logging strategy based on a strategy s.

    Create a logging strategy based on a strategy s. The returned strategy succeeds or fails exactly as s does, but if s fails, also prints the provided message and the subject term to the provided emitter (default: standard output). s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  100. def loop(name: String, c: Strategy, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.loop

  101. def loop(r: Strategy, s: Strategy): Strategy

    Construct a strategy that while r succeeds applies s.

    Construct a strategy that while r succeeds applies s. This operator is called while in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  102. def loopiter(name: String, s: (Int) ⇒ Strategy, low: Int, high: Int): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.loopiter

  103. def loopiter(name: String, i: Strategy, r: Strategy, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.loopiter

  104. def loopiter(s: (Int) ⇒ Strategy, low: Int, high: Int): Strategy

    Construct a strategy that applies s(i) for each integer i from low to high (inclusive).

    Construct a strategy that applies s(i) for each integer i from low to high (inclusive). This operator is called for in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  105. def loopiter(i: Strategy, r: Strategy, s: Strategy): Strategy

    Construct a strategy that repeats application of s while r fails, after initialization with i.

    Construct a strategy that repeats application of s while r fails, after initialization with i. This operator is called for in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  106. def loopnot(name: String, r: Strategy, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.loopnot

  107. def loopnot(r: Strategy, s: Strategy): Strategy

    Construct a strategy that while r does not succeed applies s.

    Construct a strategy that while r does not succeed applies s. This operator is called while-not in the Stratego library.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  108. def makechild(c: Any): AnyRef

    Make an arbitrary value c into a term child, checking that it worked properly.

    Make an arbitrary value c into a term child, checking that it worked properly. Object references will be returned unchanged; other values will be boxed.

    Attributes
    protected
    Definition Classes
    RewriterCore
  109. def manybu(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.manybu

  110. def manybu(s: Strategy): Strategy

    Construct a strategy that applies s as many times as possible, but at least once, in bottom up order.

    Construct a strategy that applies s as many times as possible, but at least once, in bottom up order.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  111. def manytd(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.manytd

  112. def manytd(s: Strategy): Strategy

    Construct a strategy that applies s as many times as possible, but at least once, in top down order.

    Construct a strategy that applies s as many times as possible, but at least once, in top down order.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  113. def map(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.map

  114. def map(s: Strategy): Strategy

    Construct a strategy that applies s to each element of a list, returning a new list of the results if all of the applications succeed, otherwise fail.

    Construct a strategy that applies s to each element of a list, returning a new list of the results if all of the applications succeed, otherwise fail. If all of the applications succeed without change, return the input list.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  115. def memo(name: String, s: ⇒ Strategy): Strategy

    Build a memoising strategy.

    Build a memoising strategy. Since all strategies here are memoised, this method is the identity.

    Definition Classes
    MemoRewriterRewriterCore
  116. def memo(s: Strategy): Strategy

    Return a strategy that behaves as s does, but memoises its arguments and results.

    Return a strategy that behaves as s does, but memoises its arguments and results. In other words, if memo(s) is called on a term t twice, the second time will return the same result as the first, without having to invoke s. For best results, it is important that s should have no side effects. s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  117. def mkStrategy(name: String, f: (Any) ⇒ Option[Any]): Strategy

    Make a memoising strategy with the given name and body f.

    Make a memoising strategy with the given name and body f.

    Definition Classes
    MemoRewriterRewriterCore
  118. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  119. def not(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.not

  120. def not(s: Strategy): Strategy

    Construct a strategy that applies s, then fails if s succeeded or, if s failed, succeeds with the subject term unchanged, I.

    Construct a strategy that applies s, then fails if s succeeded or, if s failed, succeeds with the subject term unchanged, I.e., it tests if s applies, but has no effect on the subject term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  121. final def notify(): Unit

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

    Definition Classes
    AnyRef
  123. def oncebu(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.oncebu

  124. def oncebu(s: Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

    Construct a strategy that applies s in a bottom-up fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  125. def oncetd(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.oncetd

  126. def oncetd(s: Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

    Construct a strategy that applies s in a top-down fashion to one subterm at each level, stopping as soon as it succeeds once (at any level).

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  127. def one(name: String, s: ⇒ Strategy): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  128. def one(s: Strategy): Strategy

    Traversal to one child.

    Traversal to one child. Construct a strategy that applies s to the term children of the subject term. Assume that c is the first child on which s succeeds. Then stop applying s to the children and succeed, forming a new term from the constructor of the original term and the original children, except that c is replaced by the result of applying s to c. In the event that the strategy fails on all children, then fail. If there are no children, fail. If s succeeds on the one child producing the same term (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method. s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  129. def oneMap[CC[V, W] <: Map[V, W]](s: Strategy, t: CC[Any, Any])(implicit cbf: CanBuildFrom[CC[Any, Any], (Any, Any), CC[Any, Any]]): Option[CC[Any, Any]]

    Implementation of one for Map values.

    Implementation of one for Map values.

    Definition Classes
    RewriterCore
  130. def oneProduct(s: Strategy, p: Product): Option[Any]

    Implementation of one for Product values.

    Implementation of one for Product values.

    Definition Classes
    RewriterCore
  131. def oneRewritable(s: Strategy, r: Rewritable): Option[Any]

    Implementation of one for Rewritable values.

    Implementation of one for Rewritable values.

    Definition Classes
    RewriterCore
  132. def oneTraversable[CC[U] <: Traversable[U]](s: Strategy, t: CC[Any])(implicit cbf: CanBuildFrom[CC[Any], Any, CC[Any]]): Option[CC[Any]]

    Implementation of one for Traversable values.

    Implementation of one for Traversable values.

    Definition Classes
    RewriterCore
  133. def option(name: String, o: ⇒ Option[Any]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  134. def option(o: Option[Any]): Strategy

    Construct a strategy from an option value o.

    Construct a strategy from an option value o. The strategy succeeds or fails depending on whether o is a Some or None, respectively. If o is a Some, then the subject term is changed to the term that is wrapped by the Some. o is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  135. def or(name: String, s1: Strategy, s2: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.or

  136. def or(s1: Strategy, s2: Strategy): Strategy

    or(s1, s2) is similar to ior(s1, s2), but the application of the strategies is only tested.

    or(s1, s2) is similar to ior(s1, s2), but the application of the strategies is only tested.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  137. def outermost(name: String, s: Strategy): Strategy

    Definition Classes
    Rewriter
  138. def outermost(s: Strategy): Strategy

    Construct a strategy that applies s repeatedly in a top-down fashion stopping each time as soon as it succeeds once (at any level).

    Construct a strategy that applies s repeatedly in a top-down fashion stopping each time as soon as it succeeds once (at any level). The outermost fails when s fails to apply to any (sub-)term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  139. def para[T](f: (Any, Seq[T]) ⇒ T): (Any) ⇒ T

    Perform a paramorphism over a value.

    Perform a paramorphism over a value. This is a fold in which the recursive step may refer to the recursive component of the value and the results of folding over the children. When the function f is called, the first parameter is the value and the second is a sequence of the values that f has returned for the children. his will work on any value, but will only decompose values that are supported by the Term generic term deconstruction. This operation is similar to that used in the Uniplate library.

    Definition Classes
    RewriterCore
  140. def query[T](name: String, f: ==>[Any, T]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  141. def query[T](f: ==>[Any, T]): Strategy

    Define a term query by a partial function f.

    Define a term query by a partial function f. The query always succeeds with no effect on the subject term but applies the given partial function f to the subject term. In other words, the strategy runs f for its side-effects.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  142. def queryf[T](name: String, f: (Any) ⇒ T): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  143. def queryf[T](f: (Any) ⇒ T): Strategy

    Define a term query by a function f.

    Define a term query by a function f. The query always succeeds with no effect on the subject term but applies the given (possibly partial) function f to the subject term. In other words, the strategy runs f for its side-effects.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  144. def reduce(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.reduce

  145. def reduce(s: Strategy): Strategy

    Construct a strategy that applies s repeatedly to subterms until it fails on all of them.

    Construct a strategy that applies s repeatedly to subterms until it fails on all of them.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  146. def repeat(name: String, s: Strategy, n: Int): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeat

  147. def repeat(name: String, s: Strategy, r: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeat

  148. def repeat(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeat

  149. def repeat(s: Strategy, n: Int): Strategy

    Construct a strategy that applies s repeatedly exactly n times.

    Construct a strategy that applies s repeatedly exactly n times. If s fails at some point during the n applications, the entire strategy fails. The result of the strategy is that of the nth application of s.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  150. def repeat(s: Strategy, r: Strategy): Strategy

    Construct a strategy that repeatedly applies s until it fails and then terminates with application of r.

    Construct a strategy that repeatedly applies s until it fails and then terminates with application of r.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  151. def repeat(s: Strategy): Strategy

    Construct a strategy that applies s repeatedly until it fails.

    Construct a strategy that applies s repeatedly until it fails.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  152. def repeat1(name: String, s: Strategy, r: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeat1

  153. def repeat1(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeat1

  154. def repeat1(s: Strategy, r: Strategy): Strategy

    Construct a strategy that repeatedly applies s (at least once) and terminates with application of c.

    Construct a strategy that repeatedly applies s (at least once) and terminates with application of c.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  155. def repeat1(s: Strategy): Strategy

    Construct a strategy that repeatedly applies s (at least once).

    Construct a strategy that repeatedly applies s (at least once).

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  156. def repeatuntil(name: String, s: Strategy, r: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.repeatuntil

  157. def repeatuntil(s: Strategy, r: Strategy): Strategy

    Construct a strategy that repeatedly applies s until c succeeds.

    Construct a strategy that repeatedly applies s until c succeeds.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  158. def resetMemo(): Unit

    Lazily reset all memoisation tables.

    Lazily reset all memoisation tables. The actual resets will only happen the next time the value of each attribute is accessed.

    Definition Classes
    Memoiser
  159. def restore(name: String, s: Strategy, rest: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.restore

  160. def restore(s: Strategy, rest: Strategy): Strategy

    Construct a strategy that applies s, then applies the restoring action rest if s fails (and then fail).

    Construct a strategy that applies s, then applies the restoring action rest if s fails (and then fail). Otherwise, let the result of s stand. Typically useful if s performs side effects that should be restored or undone when s fails.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  161. def restorealways(name: String, s: Strategy, rest: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.restorealways

  162. def restorealways(s: Strategy, rest: Strategy): Strategy

    Construct a strategy that applies s, then applies the restoring action rest regardless of the success or failure of s.

    Construct a strategy that applies s, then applies the restoring action rest regardless of the success or failure of s. The whole strategy preserves the success or failure of s. Typically useful if s performs side effects that should be restored always, e.g., when maintaining scope information.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  163. def rewrite[T](s: Strategy)(t: T): T

    Rewrite a term.

    Rewrite a term. Apply the strategy s to a term returning the result term if s succeeds, otherwise return the original term.

    Definition Classes
    Rewriter
  164. def rule(name: String, f: ==>[Any, Any]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  165. def rule(f: ==>[Any, Any]): Strategy

    Define a rewrite rule using a partial function f.

    Define a rewrite rule using a partial function f. If the function is defined at the current term, then the strategy succeeds with the return value of the function applied to the current term. Otherwise the strategy fails.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  166. def rulef(name: String, f: (Any) ⇒ Any): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  167. def rulef(f: (Any) ⇒ Any): Strategy

    Define a rewrite rule using a function f that returns a term.

    Define a rewrite rule using a function f that returns a term. The rule always succeeds with the return value of the function.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  168. def rulefs(name: String, f: ==>[Any, Strategy]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  169. def rulefs(f: ==>[Any, Strategy]): Strategy

    Define a rewrite rule using a function f that returns a strategy.

    Define a rewrite rule using a function f that returns a strategy. The rule applies the function to the subject term to get a strategy which is then applied again to the subject term. In other words, the function is only used for effects such as pattern matching. The whole thing also fails if f is not defined at the term in the first place.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  170. def same(v1: Any, v2: Any): Boolean

    Compare two arbitrary values.

    Compare two arbitrary values. If they are both references, use reference equality, otherwise throw an error since we should be able to cast anything to reference.

    Attributes
    protected
    Definition Classes
    RewriterCore
  171. def some(name: String, s: ⇒ Strategy): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  172. def some(s: Strategy): Strategy

    Traversal to as many children as possible, but at least one.

    Traversal to as many children as possible, but at least one. Construct a strategy that applies s to the term children of the subject term. If s succeeds on any of the children, then succeed, forming a new term from the constructor of the original term and the result of s for each succeeding child, with other children unchanged. In the event that the strategy fails on all children, then fail. If there are no children, fail. If s succeeds on children producing the same terms (by eq for references and by == for other values), then the overall strategy returns the subject term. This operation works on instances of finite Rewritable, Product, Map and Traversable values, checked for in that order. Children of a Rewritable (resp. Product, collection) value are processed in the order returned by the value's deconstruct (resp. productElement, foreach) method. s is evaluated at most once.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  173. def someMap[CC[V, W] <: Map[V, W]](s: Strategy, t: CC[Any, Any])(implicit cbf: CanBuildFrom[CC[Any, Any], (Any, Any), CC[Any, Any]]): Option[CC[Any, Any]]

    Implementation of some for Map values.

    Implementation of some for Map values.

    Definition Classes
    RewriterCore
  174. def someProduct(s: Strategy, p: Product): Option[Any]

    Implementation of some for Product values.

    Implementation of some for Product values.

    Definition Classes
    RewriterCore
  175. def someRewritable(s: Strategy, r: Rewritable): Option[Any]

    Implementation of some for Rewritable values.

    Implementation of some for Rewritable values.

    Definition Classes
    RewriterCore
  176. def someTraversable[CC[U] <: Traversable[U]](s: Strategy, t: CC[Any])(implicit cbf: CanBuildFrom[CC[Any], Any, CC[Any]]): Option[CC[Any]]

    Implementation of some for Traversable values.

    Implementation of some for Traversable values.

    Definition Classes
    RewriterCore
  177. def somebu(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.somebu

  178. def somebu(s: Strategy): Strategy

    Construct a strategy that applies s in a bottom-up fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

    Construct a strategy that applies s in a bottom-up fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  179. def somedownup(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.somedownup

  180. def somedownup(s: Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion stopping at a frontier where s succeeds on some children.

    Construct a strategy that applies s in a top-down, prefix fashion stopping at a frontier where s succeeds on some children. s is then applied in a bottom-up, postfix fashion to the result.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  181. def sometd(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.sometd

  182. def sometd(s: Strategy): Strategy

    Construct a strategy that applies s in a top-down fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

    Construct a strategy that applies s in a top-down fashion to some subterms at each level, stopping as soon as it succeeds once (at any level).

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  183. def strategy(name: String, f: ==>[Any, Option[Any]]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  184. def strategy(f: ==>[Any, Option[Any]]): Strategy

    Make a strategy from a partial function f.

    Make a strategy from a partial function f. If the function is defined at the current term, then the function return value when applied to the current term determines whether the strategy succeeds or fails. If the function is not defined at the current term, the strategy fails.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  185. def strategyf(name: String, f: (Any) ⇒ Option[Any]): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  186. def strategyf(f: (Any) ⇒ Option[Any]): Strategy

    Make a strategy from a function f.

    Make a strategy from a function f. The function return value determines whether the strategy succeeds or fails.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  187. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  188. def term(name: String, t: Any): Strategy

    As for the version without the name argument but specifies the name for the constructed strategy.

    As for the version without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    RewriterCore
  189. def term(t: Any): Strategy

    Construct a strategy that succeeds only if the subject term matches the given term t.

    Construct a strategy that succeeds only if the subject term matches the given term t.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  190. def test(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.test

  191. def test(s: Strategy): Strategy

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success.

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success. A synonym for where.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  192. def toString(): String

    Definition Classes
    AnyRef → Any
  193. def topdown(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.topdown

  194. def topdown(s: Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term.

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  195. def topdownS(name: String, s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.topdownS

  196. def topdownS(s: Strategy, stop: (⇒ Strategy) ⇒ Strategy): Strategy

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term but stops when the strategy produced by stop succeeds.

    Construct a strategy that applies s in a top-down, prefix fashion to the subject term but stops when the strategy produced by stop succeeds. stop is given the whole strategy itself as its argument.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()
  197. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  200. def where(name: String, s: Strategy): Strategy

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    As for the version in RewriterCore without the name argument but specifies the name for the constructed strategy.

    Definition Classes
    Rewriter
    See also

    RewriterCore.where

  201. def where(s: Strategy): Strategy

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success.

    Construct a strategy that tests whether strategy s succeeds, restoring the original term on success. This is similar to Stratego's where, except that in this version any effects on bindings are not visible outside s.

    Definition Classes
    RewriterCore
    Annotations
    @macroImpl()

Inherited from Memoiser

Inherited from Rewriter

Inherited from RewriterCore

Inherited from AnyRef

Inherited from Any

Ungrouped