implicit.ly

Scala software, hot off the presses

kiama 1.2.0

The Kiama team are pleased to bring you the next release of the library.

This release includes some breaking changes that improve the reliability and safety of Kiama-based applications. All users should take careful note of these changes.

In addition, there are quite a few new features and bug fixes, most notably a new chain decorator for threading attributes through a tree, support for minimal parenthesisation in pretty printing, and callback support for rewriting. A new version of the Oberon-0 example shows how Kiama can be used in an extensible, modular way.

Breaking changes

  • General

    • Kiama's group ID is now com.googlecode.kiama instead of com.googlecode to fit with Maven Central policies. In sbt you can use it with the following dependency.

    "com.googlecode.kiama" %% "kiama" % "1.2.0"

  • Attribution

    • Basic attributes are now normal functions, not partial functions, so pattern match completion checking works on their definitions. This change may require some fixes to declared types and may reveal incompleteness that was hidden before.
    • Node properties in Attributable such as parent are not automatically set any more. If you want to use them, first call the Attribution.initTree method, passing the root of your tree. This change removes a set of bad behaviours caused by setting these properties at node construction time.
    • Attributable does not extend scala.util.parsing.input.Positional any more, since it didn't use it.
  • Rewriting

    • Remove Rewriter implicit conversions from Term and Option[Term] to Strategy because they were too dangerous. Use the new explicit operations build and option instead.
  • Output

New features

  • Attribution

  • Output

    • Add ParenPrettyPrinter trait for pretty-printing with minimal parenthesisation.
    • Updates to PrettyPrinter

      • Make conversions from String and Char to pretty-printer Doc type implicit.
      • Split list combinator into list (for lists of values) and plist (for list of pretty printables).
      • Add hsep, vsep and fillsep variants that allow a separator to be given.
      • product combinator now does something sensible for vectors, maps and tuples.
      • Add lterm combinator for lists with terminated elements.
  • Rewriting

  • Utilities

    • Add ParserUtilities trait containing helper support for using Scala combinator parsers, most notably implicit conversions so that case class constructors can take "tilde" tuples, thereby eliminating a lot of the pattern matching that you normally need to do in parser actions.
    • Add WhitespaceParser trait which allows white space to be defined using a parser instead of a regular expression when using RegexParsers and PackratParsers. This capability is useful when white space contains comments that are nestable.
    • Add Patterns module to contain useful extractors (just HasParent for Attributable now).
  • Examples

    • Add Oberon-0 example including attribution, rewriting and pretty-printing, plus assembly of processors from smaller components in a modular fashion.
    • Add small JSON example.
    • 101companies example now includes some attribution.
  • Testing

    • Add tests to improve code coverage.
    • Allow tests to capture output during command-line argument processing.
  • General

    • Move to Scala 2.9.1, ScalaTest 1.7.1, JLine 1.0 and sbt 0.11.
    • Add console import commands to build.sbt so that interactive testing is easier.

Fixes

  • Rewriting

    • Use while loops instead of for comprehensions to iterate over children in generic traversal combinators to gain significant speed-up.
    • The Product node duplication operation now caches constructors to reduce reflection overhead.
  • Utilities

    • Messaging.report now defaults its Emitter argument to standard output.
  • Examples

    • Ignore lines that only contain white space in REPLs.
  • Testing

    • Change some test names so that bits don't disappear when run by Eclipse JUnit runner.
    • Make a better split between basic code and test code so that normal compile doesn't need the test libraries.
  • General

    • Publish in Sonatype OSS repository (and hence Maven Central) instead of on www.scala-tools.org.
    • API documentation on http://kiama.googlecode.com now includes links to source.
    • Example and test API documentation is now published as well.
    • Add tree-oriented navigation links to the wiki documentation.
    • Many other small bug fixes, improvements and documentation clarifications.

Kiama is a Scala library for language processing including attribute grammars, term rewriting, abstract state machines and pretty printing.

via herald

Filed under  //   kiama  

kiama 1.1.0

Enhancements

  • attribution:

    • parent-child connections in Attributable now work for any GenTraversable, not just Seqs
    • parent-child connection setting is now protected rather than private so it can be customised
  • machine:

    • new reset method
  • pretty printing:

    • new pretty printing combinator library based on Swierstra and Chitil, Linear, bounded, functional pretty-printing, Journal of Functional Programming, 19 (1), 2008. See FIXME for documentation.
    • use pretty printer in many examples
  • rewriting:

    • generic traversals now work on Rewritable, Product, Traversable and Map values
    • generic traversals now return the subject term if no changes are made to its children
    • new Rewritable trait for custom rewriting of any structure
  • general:

    • move to Scala 2.9.0, ScalaTest 1.4.1, ScalaCheck 1.9 and sbt 0.7.7
    • use org.scala-lang version of JLine

Fixes

  • examples:

    • imperative: fix bug in unary minus tree construction
  • rewriting:

    • make more strategy parameters call-by-name
    • fix bugs in manybu and leaves combinators
    • remove unnecessary where strategies based on one and some
  • testing:

    • many new tests to significantly improve code coverage
    • uniplate: constrain division by zero test to avoid heap exhaustion

Kiama is a Scala library for language processing including attribute grammars, term rewriting, abstract state machines and pretty printing.

Filed under  //   Scala 2.9.0   com.googlecode   kiama  

kiama 1.0.2

Enhancements

  • rewriting:

    • new collect strategy combinator that uses 2.8 collection framework to build any Traversable
    • collectl and collects versions of collect for List and Set, respectively
    • new everything combinator to fold across a whole structure
    • everywhere combinator is alias for everywheretd (top-down version)
  • general:

    • ==> as an alias for PartialFunction is now in org.kiama package object
    • Scala 2.8.1 is default version
  • examples:

Fixes

  • command-line framework:

    • all argument files are now processed, not just one
    • no requirement for a usage message
  • test framework:

    • make filetest public again
  • general:

    • remove sbt launcher and invocation scripts from distribution
  • other minor fixes and tidying up

Kiama is a Scala library for language processing including attribute grammars, term rewriting and abstract state machines.

Filed under  //   Scala 2.8.1   com.googlecode   kiama  

kiama 1.0.1

Enhancements

  • allow abstract state machine state to be used more flexibly
  • test framework improvements:

    • command-line arguments
    • optional input files
    • default input text

Fixes

  • test framework: fix bug in tests that elicit parse errors
  • other minor fixes and tidying up

Kiama is a Scala library for language processing.

Filed under  //   Scala 2.8.0   com.googlecode   kiama  

kiama 1.0.0

Enhancements

  • depends on Scala 2.8.0
  • abstract state machine library (issue 43):

    • documentation page added to wiki
    • parameterised state
    • consistency checking for updates
  • attribute grammars:

    • attribute forwarding
    • tree splicing
    • beginning of decorators library
  • examples:

    • dataflow example now includes rewrites for simple optimisations
    • new example: Obr compiler from imperative language to SPARC
    • new example: ISWIM to SECD machine compiler
  • parsing:

    • removed, use Scala library packrat combinators
    • or try Rats!-generated parsers via our sbt-rats plugin
  • pretty-printing:

    • rudimentary support in util
  • rewriting:

    • support for congruences (issue 39)
    • failure combinator is now called fail as in Stratego
    • extended strategy library
  • sbt

    • build with sbt (currently 0.7.4)
    • "main" task for running a specific Main with arguments
  • testing:

    • use ScalaTest instead of JUnit (issue 35)
    • more powerful support for end-to-end testing (issue 46)

Fixes

  • top-level package is now org.kiama (issue 41)
  • examples now packaged with tests, not main library code (issue 44)
  • many smaller bug fixes and many new tests

Kiama is a Scala library for language processing.

Filed under  //   Scala 2.8.0   com.googlecode   kiama