Package

org.bitbucket.inkytonik.kiama

rewriting

Permalink

package rewriting

Visibility
  1. Public
  2. All

Type Members

  1. trait CallbackRewriter extends Rewriter

    Permalink

    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 Rewriter class documentation for more detail on the methods defined here.

  2. trait Cloner extends AnyRef

    Permalink

    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.

  3. trait MemoRewriter extends Rewriter

    Permalink

    Strategy-based term rewriting where all strategy results are memoised by identity on the subject term.

  4. class NominalRewriter extends Rewriter

    Permalink

    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.

  5. class PlusStrategy extends Strategy

    Permalink

    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.

  6. trait PositionedRewriter extends PositionStore with CallbackRewriter

    Permalink

    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.

  7. trait Rewritable extends AnyRef

    Permalink

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

  8. trait Rewriter extends RewriterCore

    Permalink

    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.

  9. trait RewriterCore extends AnyRef

    Permalink

    Core implementation of strategy-based rewriting.

    Core implementation of strategy-based rewriting. Implement and construct basic strategies and rewrite rules, plus basic library combinators.

  10. abstract class Strategy extends (Any) ⇒ Option[Any]

    Permalink

    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.

Value Members

  1. object Cloner extends Rewriter with Cloner

    Permalink

    A cloner that uses non-memoising term rewriting.

  2. object MemoRewriter extends MemoRewriter

    Permalink

    Memoising strategy-based term rewriting for arbitrary terms.

  3. object NominalTree

    Permalink

    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.

  4. object PositionedRewriter extends PositionedRewriter

    Permalink

    Strategy-based term rewriting for Kiama Positioned terms.

  5. object Rewriter extends Rewriter

    Permalink

    Strategy-based term rewriting for arbitrary terms.

  6. object RewriterCoreMacros

    Permalink

Ungrouped