Strategy-based term rewriting with callbacks.
Implementation of cloning operations.
Implementation of cloning operations. These operations must be mixed in to an instance of the rewriting library which will then be used as the underlying rewriting behaviour.
Strategy-based term rewriting where all strategy results are memoised by identity on the subject term.
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.
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. p
and q
are
evaluated at most once.
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 a Kiama Positions
object.
Specifically, this kind of rewriter will record positions of nodes
when they are (a) rewritten as part of a generic traversal (e.g.,
all
), or (b) rewritten as part of a rule
or 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 rewriting
method to add more specific behaviour.
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).
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.
Core implementation of strategy-based rewriting.
Core implementation of strategy-based rewriting. Implement and construct basic strategies and rewrite rules, plus basic library combinators.
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
). name
is used to identify this strategy in debugging
output.
A cloner that uses non-memoising term rewriting.
Memoising strategy-based term rewriting for arbitrary terms.
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.
Strategy-based term rewriting for Kiama Positioned
terms.
Strategy-based term rewriting for arbitrary terms.
Strategy-based term rewriting with callbacks. Clients can register functions that are called whenever a rewrite operation has happened. See the
Rewriter
class documentation for more detail on the methods defined here.