package rewriting
- Alphabetic
- Public
- All
Type Members
-
trait
CallbackRewriter
extends Rewriter
Strategy-based term rewriting with callbacks.
Strategy-based term rewriting with callbacks. Clients can register functions that are called whenever a rewrite operation has happened. See the
Rewriterclass documentation for more detail on the methods defined here. -
trait
MemoRewriter
extends Rewriter with Memoiser
Strategy-based term rewriting where all strategy results are memoised by identity on the subject term.
-
class
NominalRewriter
extends Rewriter
An extension of strategy-based term rewriting with special support for nominal rewriting along the lines of FreshML and the FreshLib library for Haskell.
An extension of strategy-based term rewriting with special support for nominal rewriting along the lines of FreshML and the FreshLib library for Haskell. See Scrap your Nameplate, James Cheney, ICFP 2005 for a description of the ideas and the FreshLib library.
-
class
PlusStrategy
extends Strategy
Helper class to contain commonality of choice in non-deterministic choice operator and then-else part of a conditional choice.
Helper class to contain commonality of choice in non-deterministic choice operator and then-else part of a conditional choice. Only returned by the non-deterministic choice operator. The first argument specifies a name for the constructed strategy.
pandqare evaluated at most once. -
trait
PositionedRewriter
extends CallbackRewriter
Strategy-based term rewriting that copies positions to rewritten terms.
Strategy-based term rewriting that copies positions to rewritten terms. The positions are stored in the Kiama
Positionsobject.Specifically, this kind of rewriter will record positions of nodes when they are (a) rewrittten as part of a generic traversal (e.g.,
all), or (b) rewritten as part of aruleor similar (e.g.,rulefs).In each case both the start and finish positions of the old node are copied across to the new node into which it is rewritten. In case (b) no attempt is made to assign positions to nodes that represent sub-terms of the term that results from a successful application of the rule. Override the
rewritingmethod to add more specific behaviour. -
trait
Rewritable
extends AnyRef
Types that implement this interface can be rewritten using the methods of Kiama's Rewriter library.
Types that implement this interface can be rewritten using the methods of Kiama's Rewriter library. Implementing this interface is not necessary if the type implements Product (which automatically includes all case class instances and case objects).
-
trait
Rewriter
extends RewriterCore
Strategy-based term rewriting in the style of Stratego (http://strategoxt.org/).
Strategy-based term rewriting in the style of Stratego (http://strategoxt.org/). The implementation here is partially based on the semantics given in "Program Transformation with Scoped Dynamic Rewrite Rules", by Bravenboer, van Dam, Olmos and Visser, Fundamenta Informaticae, 69, 2005. The library strategies are mostly based on the Stratego library, but also on combinators found in the Scrap Your Boilerplate and Uniplate libraries for Haskell.
-
trait
RewriterCore
extends AnyRef
Core implementation of strategy-based rewriting.
Core implementation of strategy-based rewriting. Implement and construct basic strategies and rewrite rules, plus basic library combinators.
-
abstract
class
Strategy
extends (Any) ⇒ Option[Any]
Any-rewriting strategies.
Any-rewriting strategies. A strategy is a function that takes a term of any type as input and either succeeds producing a new term (
Some), or fails (None).nameis used to identify this strategy in debugging output.
Value Members
-
object
MemoRewriter
extends MemoRewriter
Memoising strategy-based term rewriting for arbitrary terms.
-
object
NominalTree
Abstract syntax constructs that are common to all nominal rewriters.
Abstract syntax constructs that are common to all nominal rewriters. These definitions need to be separate from the NominalRewriter class so that the classes here don't get an outer field referring to an instance of that class.
-
object
PositionedRewriter
extends PositionedRewriter
Strategy-based term rewriting for Kiama
Positionedterms. -
object
Rewriter
extends Rewriter
Strategy-based term rewriting for arbitrary terms.
- object RewriterCoreMacros