Skip to content

Commit

Permalink
Move wiki to GitHub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
inkytonik committed Sep 20, 2021
1 parent 02258b5 commit 5fd0acc
Show file tree
Hide file tree
Showing 56 changed files with 186 additions and 185 deletions.
21 changes: 11 additions & 10 deletions README.md
Expand Up @@ -8,7 +8,7 @@

Kiama is a Scala library for language processing.
In the Kiama project we are investigating embedding of language processing formalisms such as grammars, parsers, rewriters and analysers into general-purpose programming languages.
Learn about Kiama by reading our [research papers](https://github.com/inkytonik/kiama/blob/master/wiki/Research.md) starting with [Lightweight Language Processing in Kiama](https://doi.org/10.1007/978-3-642-18023-1_12).
Learn about Kiama by reading our [research papers](https://inkytonik.github.io/kiama/Research) starting with [Lightweight Language Processing in Kiama](https://doi.org/10.1007/978-3-642-18023-1_12).

IMPORTANT NOTE: Kiama is a research project, so many details will change. Consult with us before you rely on it for serious work. We make no guarantees about the features or performance of the Kiama library if you do choose to use it.

Expand All @@ -22,6 +22,7 @@ https://github.com/inkytonik

## Latest News

* Sep 20, 2021: Moved wiki to [GitHub pages](https://inkytonik/kiama.github.io)
* Jul 5, 2021: Version 2.5.0 released
* Dec 23, 2020: Version 2.4.0 released
* Dec 18, 2019: Version 2.3.0 released
Expand All @@ -38,15 +39,15 @@ https://github.com/inkytonik

## Documentation

Documentation about how to build, install and use Kiama can be found on the [Kiama wiki](https://github.com/inkytonik/kiama/blob/master/wiki/Documentation.md).
Documentation about how to build, install and use Kiama can be found on the [Kiama docs pages](https://inkytonik/kiama.github.io).

The main documentation for Kiama takes the form of wiki pages covering library features and examples. The [User Manual](https://github.com/inkytonik/kiama/blob/master/wiki/UserManual.md) is a good place to start.
The main documentation for Kiama takes the form of wiki pages covering library features and examples. The [User Manual](https://inkytonik.github.io/kiama/UserManual) is a good place to start.

See the [Research wiki page](https://github.com/inkytonik/kiama/blob/master/wiki/Research.md) for links to papers and presentations about Kiama.
See the [Research wiki page](https://inkytonik.github.io/kiama/Research) for links to papers and presentations about Kiama.

For summary information about Kiama releases, including dependencies on other software and links to API documentation, see the [Releases wiki page](https://github.com/inkytonik/kiama/blob/master/wiki/Releases.md).
For summary information about Kiama releases, including dependencies on other software and links to API documentation, see the [Releases wiki page](https://inkytonik.github.io/kiama/Releases).

See the [Installation wiki page](https://github.com/inkytonik/kiama/blob/master/wiki/Installation.md) for instructions on how to install Kiama.
See the [Installation wiki page](https://inkytonik.github.io/kiama/Installation) for instructions on how to install Kiama.

## Licensing

Expand All @@ -56,7 +57,7 @@ Kiama is distributed under the Mozilla Public License, v. 2.0. See the file LICE

A traditional approach to language processing is to represent the data to be processed as a hierarchical structure (a tree). Kiama provides different ways to operate on such trees to carry out typical language processing tasks.

* [Context-sensitive attribute equations](https://github.com/inkytonik/kiama/blob/master/wiki/Attribution.md)
* [Context-sensitive attribute equations](https://inkytonik.github.io/kiama/Attribution)

Attribute equations define properties of tree nodes in terms of constants or the properties of other nodes. In this example, the local and global minima of a binary tree (`locmin` and `globmin`) are defined using simple local equations. Accessing an attribute (property) of a node is just a function call (also accessible via the arrow notation in Kiama 1.x). The `attr` function provides caching and circularity checking to the equations.

Expand Down Expand Up @@ -88,7 +89,7 @@ Kiama version 2.x:
case t => locmin(t)
}

* [Dataflow Circular attribute equations](https://github.com/inkytonik/kiama/blob/master/wiki/Dataflow.md)
* [Dataflow Circular attribute equations](https://inkytonik.github.io/kiama/Dataflow)

Sometimes it is useful to define attributes using a mutual dependency. With `attr` this approach would lead to an error since it would not be possible to calculate the values of such attributes. The `circular` function goes further by implementing mutually dependent attributes via an iteration to a fixed point. In this example, we are calculating variable liveness information for a imperative language statements using the standard data flow equations.

Expand Down Expand Up @@ -116,7 +117,7 @@ Kiama 2.x:
s => succ(s) flatMap (in)
)

* [Rewrite rules and higher-order rewriting strategies](https://github.com/inkytonik/kiama/blob/master/wiki/Lambda2.md)
* [Rewrite rules and higher-order rewriting strategies](https://inkytonik.github.io/kiama/Lambda2)

While attributes provide a way to decorate a tree with information, rewriting is concerned with transforming trees, perhaps for translation or for optimisation. Kiama contains a strategy-based rewriting library heavily inspired by the [http://strategoxt.org/ Stratego] program transformation language. In this example, we are implementing an evaluation strategy for lambda calculus, using generic strategies such as innermost rewriting.

Expand Down Expand Up @@ -145,7 +146,7 @@ Kiama 1.x and 2.x:
val s : Strategy =
innermost(lambda)

* [Pretty-printing](https://github.com/inkytonik/kiama/blob/master/wiki/PrettyPrinting.md)
* [Pretty-printing](https://inkytonik.github.io/kiama/PrettyPrinting)

Kiama's pretty-printing library provides a flexible way to describe how you want your output to be produced within constraint of line length. For example, the following describes how to pretty-print the constructs of a simple imperative language, where `group`, `nest` and `line` cooperate to produce nicely indented code that breaks lines at sensible place when needed.

Expand Down
22 changes: 11 additions & 11 deletions wiki/Attribution.md → docs/Attribution.md
@@ -1,18 +1,18 @@
# Overview of Kiama's support for attribute grammars

Up: [User Manual](UserManual.md), Prev: [Rewriting](Rewriting.md), Next: [Relations](Relations.md)
Up: [User Manual](UserManual), Prev: [Rewriting](Rewriting), Next: [Relations](Relations)

This page provides an overview of Kiama's support for
_attribute grammars_. For the context in which this part of the library
operates, see [Context](Context.md). For a description of Kiama's support for relations, particularly in trees, and how they can be used in attribution, see [Relations](Relations.md).
operates, see [Context](Context). For a description of Kiama's support for relations, particularly in trees, and how they can be used in attribution, see [Relations](Relations).

Attribute grammars are used in the following
examples.

* [Dataflow](Dataflow.md)
* [Dataflow](Dataflow)
* ISWIM
* [Lambda2](Lambda2.md)
* [Oberon0](Oberon0.md)
* [Lambda2](Lambda2)
* [Oberon0](Oberon0)
* Obr
* OneOhOneCompanies
* PicoJava
Expand All @@ -21,7 +21,7 @@ examples.
* Transform

More information about Kiama attribute grammars can be found via the
[Research](Research.md) page.
[Research](Research) page.

## Introduction

Expand Down Expand Up @@ -57,7 +57,7 @@ Extend that class to build a module that uses attribution.

To get full support for pattern matching in
attribute definitions it is best to use data structures constructed
from instances of case classes as described in [Context](Context.md).
from instances of case classes as described in [Context](Context).

## Repmin

Expand Down Expand Up @@ -275,7 +275,7 @@ use can be used to point directly to the associated declaration node.

Reference attributes can be defined in Kiama just like other attribute
values. Nothing special needs to be done to represent the reference;
it's just a normal Scala reference. See the [Dataflow](Dataflow.md) example for
it's just a normal Scala reference. See the [Dataflow](Dataflow) example for
attributes that are defined by reference to represent the control flow
of a program.

Expand All @@ -295,7 +295,7 @@ found. We say that `lookup` is a _parameterised attribute_ since its
definition depends on the identifier that is being looked up.

Kiama provides a `paramAttr` function to assist with defining
parameterised attributes.
parameterised attributes.
For example, the `lookup` attribute in the Kiama PicoJava example
is defined as follows so that it is parameterised by a string
name.
Expand Down Expand Up @@ -352,7 +352,7 @@ In this definition `v` (of type `V`) is the initial value of the
attribute and the cases are used to define subsequent values in terms
of other, possibly circular, attributes.

See the [Dataflow](Dataflow.md) example for an illustration of the use of circular
See the [Dataflow](Dataflow) example for an illustration of the use of circular
attributes to define iterative dataflow equations to compute live
variables for an imperative programming language.

Expand Down Expand Up @@ -479,4 +479,4 @@ is also updated at blocks to define nested scopes. Finally, it is
accessed at identifier use nodes in order to check those uses against
the environment at that point.

Up: [User Manual](UserManual.md), Prev: [Rewriting](Rewriting.md), Next: [Machines](Machines.md)
Up: [User Manual](UserManual), Prev: [Rewriting](Rewriting), Next: [Machines](Machines)
16 changes: 8 additions & 8 deletions wiki/CaseClasses.md → docs/CaseClasses.md
@@ -1,6 +1,6 @@
# Overview of Kiama's support for attribute grammars

Up: [Context](Context.md), Next: [Collections](Collections.md)
Up: [Context](Context), Next: [Collections](Collections)

The easiest choice of representation for a data structure that is to
be manipulated by Kiama is one that comprises instances of Scala
Expand Down Expand Up @@ -122,12 +122,12 @@ collection nodes. Since they are implemented by case classes or objects
there is no special processing required.

Kiama also supports nodes that are collections that are not implemented
as case classes or objects. See [Collections](Collections.md) for more information.
as case classes or objects. See [Collections](Collections) for more information.

## What can you do

Structures encoded using these approaches can be [rewritten](Rewriting.md)
or can have [attribute values](Attribution.md) defined for them. Rewriting
Structures encoded using these approaches can be [rewritten](Rewriting)
or can have [attribute values](Attribution) defined for them. Rewriting
really only makes sense if the structure is a tree, whereas
attribution can also be applied to graph structures.

Expand Down Expand Up @@ -168,15 +168,15 @@ abstract class Stmt extends Product
```

You may want to obtain more generic support for your tree nodes. The
[Attributable](Attribution.md#markdown-header-attributable) class and object in Kiama's
[Attributable](Attribution#markdown-header-attributable) class and object in Kiama's
attribution module provides some useful facilities for this purpose.

## Positions

It is common to want to attach position (coordinate) information to
your structure to help with producing sensible messages. See
[the Positions section of the Parser Combinator page](ParserCombs.md#markdown-header-positions) for a discussion of how to do this when using
Scala parser combinators and [Messaging](Messaging.md) for information on how the
[the Positions section of the Parser Combinator page](ParserCombs#markdown-header-positions) for a discussion of how to do this when using
Scala parser combinators and [Messaging](Messaging) for information on how the
positions can be used.

Up: [Context](Context.md), Next: [Collections](Collections.md)
Up: [Context](Context), Next: [Collections](Collections)
12 changes: 6 additions & 6 deletions wiki/Collections.md → docs/Collections.md
@@ -1,6 +1,6 @@
# Processing collections with Kiama

Up: [Context](Context.md), Prev: [Case Classes](CaseClasses.md), Next: [Rewritable](Rewritable.md)
Up: [Context](Context), Prev: [Case Classes](CaseClasses), Next: [Rewritable](Rewritable)

IMPORTANT NOTE: This page describes Kiama 1.x. Much of it also applies
to Kiama 2.x, but not all. Please consult the 2.x release notes for the
Expand All @@ -11,15 +11,15 @@ It is often the case that data to be processed by Kiama is formed using Scala
[collection classes](http://www.scala-lang.org/docu/files/collections-api/collections.html),
such as sets, vectors and maps.

Structures encoded using collections can be [rewritten](Rewriting.md) or
can have [attribute values](Attribution.md) defined for them.
Structures encoded using collections can be [rewritten](Rewriting) or
can have [attribute values](Attribution) defined for them.

Attribution is defined as usual by attributes that are independent of
the data structure.

Rewriting of collections is currently supported for any collection
that is `GenTraversable` or is a `Map`, relying on the `foreach` method
to gain access to elements of the collection. Also, the [Rewritable](Rewritable.md)
to gain access to elements of the collection. Also, the [Rewritable](Rewritable)
class provides an interface that can be used to implement rewriting
of arbitrary structures.

Expand Down Expand Up @@ -59,7 +59,7 @@ support to parallel collections.
## Collections and `Attributable` node properties

Collections interact in a special way with the node properties provided
by the [Attributable](Attribution.md#markdown-header-attributable) class. Specifically,
by the [Attributable](Attribution#markdown-header-attributable) class. Specifically,
if a collection is present in the tree structure, it will be ignored
when it comes to determining node parents and children. The motivation
is that usually you don't want to attach attributes to the collections
Expand All @@ -72,4 +72,4 @@ the `C` nodes, even though the list is actually holding them. The `C` nodes
will have their `parent` properties set to the `P` node, not the list.
Similarly, the `P` node will have the `C` nodes in its `children` property.

Up: [Context](Context.md), Prev: [Case Classes](CaseClasses.md), Next: [Rewritable](Rewritable.md)
Up: [Context](Context), Prev: [Case Classes](CaseClasses), Next: [Rewritable](Rewritable)
12 changes: 6 additions & 6 deletions wiki/Context.md → docs/Context.md
@@ -1,6 +1,6 @@
# Description of the context in which Kiama operates

Up: [User Manual](UserManual.md), Next: [Parsing](Parsing.md)
Up: [User Manual](UserManual), Next: [Parsing](Parsing)

The Kiama library operates on structured information, often
representing text. An in-memory form of the information is the central
Expand All @@ -10,7 +10,7 @@ representation is a tree, but graphs are also possible.
Kiama makes no assumptions about the origin of the data structure that
it processes. In many projects, the data structure will be created by
a parser during analysis of a textual form. (Scala includes a
[parsing library](Parsing.md) to help with this task.) Alternatively, the
[parsing library](Parsing) to help with this task.) Alternatively, the
data can be obtained from another source such as a serialised representation
or a database, or it can be created programmatically.

Expand All @@ -19,11 +19,11 @@ a structure that is to be manipulated by Kiama. The most appropriate
choice depends on where the data comes from and how much control you
have over its type. The current options are:

* If you are creating the data structure within Scala and have no other constraints on its type, the best option is to use [case classes](http://www.scala-lang.org/node/107). All of the Kiama facilities work on case class instances without any extra definitions or code being required. [More information](CaseClasses.md).
* If you are creating the data structure within Scala and have no other constraints on its type, the best option is to use [case classes](http://www.scala-lang.org/node/107). All of the Kiama facilities work on case class instances without any extra definitions or code being required. [More information](CaseClasses).

* If your data contains instances of Scala [collection classes](http://www.scala-lang.org/docu/files/collections-api/collections.html) such as sets or maps, then you are also well-placed. Kiama supports processing of most sequential collection types. [More information](Collections.md).
* If your data contains instances of Scala [collection classes](http://www.scala-lang.org/docu/files/collections-api/collections.html) such as sets or maps, then you are also well-placed. Kiama supports processing of most sequential collection types. [More information](Collections).

* Types that are not otherwise covered, but that you can modify. [More information](Rewritable.md).
* Types that are not otherwise covered, but that you can modify. [More information](Rewritable).

Of course, these options are not mutually exclusive. A data type that
combines types from different items in the list above can be used with
Expand All @@ -39,4 +39,4 @@ As another example, if you have a collection that contains values of
some non-case class Scala type, you will need to provide special support for
the non-collection parts.

Up: [User Manual](UserManual.md), Next: [Parsing](Parsing.md)
Up: [User Manual](UserManual), Next: [Parsing](Parsing)
4 changes: 2 additions & 2 deletions wiki/Dataflow.md → docs/Dataflow.md
@@ -1,6 +1,6 @@
# Example: Dataflow calculation for live variable analysis

Up: [Examples](Examples.md), Next: [Imperative](Imperative.md)
Up: [Examples](Examples), Next: [Imperative](Imperative)

IMPORTANT NOTE: This page describes Kiama 1.x. Much of it also applies
to Kiama 2.x, but not all. Please consult the 2.x release notes for the
Expand Down Expand Up @@ -190,4 +190,4 @@ while loop.
sbt 'test-only org.bitbucket.inkytonik.kiama.example.dataflow.DataflowTests'
```

Up: [Examples](Examples.md), Next: [Imperative](Imperative.md)
Up: [Examples](Examples), Next: [Imperative](Imperative)
27 changes: 27 additions & 0 deletions docs/Documentation.md
@@ -0,0 +1,27 @@
* [User Manual](UserManual)
* [Kiama's context](Context)
* [Using case classes to define representations](CaseClasses)
* [Operating on collections](Collections)
* [Define custom rewritable representations](Rewritable)
* [Packrat parsing](Parsing)
* [The input used by parsers](ParserInput)
* [Defining parsers using combinators](ParserCombs)
* [Term rewriting](Rewriting)
* [Attribute grammars](Attribution)
* [Tree relations](Relations)
* [Abstract state machines](Machines)
* [Pretty printing](PrettyPrinting)
* [Messages](Messaging)
* [Read-eval-print loops](ReadEvalPrintLoops)
* [Profiling program execution](Profiling)
* [Examples](Examples)
* [Dataflow analysis](Dataflow)
* [Simple imperative language](Imperative)
* [Simple lambda calculus](Lambda)
* [More complex lambda calculus](Lambda2)
* [Wirth's teaching language](Oberon0)
* [Research reading](Research)
* Other
* [Installation](Installation)
* [Releases](Releases)
* [Style guide for developers](StyleGuide)

0 comments on commit 5fd0acc

Please sign in to comment.