claferwiki: A wiki-based IDE for literate modeling with Clafer

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

A wiki-based IDE for literate modeling with Clafer. A Plugin for the Gitit wiki which collects code blocks written in Clafer (.clafer), compiles them, renders into HTML and Dot, and replaces the code blocks with the results.


[Skip to Readme]

Properties

Versions 0.3.5, 0.3.5.1, 0.3.6, 0.3.6.1, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.4.0, 0.4.1, 0.4.2, 0.4.2.1, 0.4.3, 0.4.4, 0.4.5, 0.5.8
Change log CHANGES.md
Dependencies base (>=4.18.3.0 && <5), clafer (==0.5.8), containers (>=0.5.7.1), directory (>=1.2.1.0), gitit (>=0.15.1.1), happstack-server (>=7.0), process (>=1.2.0.0), split (>=0.2.3.2), text (>=2.0), transformers (>=0.6), utf8-string (>=0.3.8) [details]
License MIT
Copyright Michal Antkiewicz, Chris Walker, Luke Michael Brown
Author Michał Antkiewicz, Chris Walker, Luke Michael Brown
Maintainer Michał Antkiewicz <michal.antkiewicz@uwaterloo.ca>
Category Wiki
Home page http://github.com/gsdlab/claferwiki
Source repo head: git clone https://github.com/gsdlab/claferwiki.git
Uploaded by mantkiew at 2026-11-11T21:17:43Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for claferwiki-0.5.8

[back to package description]

Claferwiki

v0.5.8

Claferwiki is a wiki system integrated with Clafer compiler. Clafer is a lightweight yet powerful structural modeling language. Claferwiki allows for embedding Clafer model fragments in wiki pages and provides model authoring support including code highlighting, parse and semantic error reporting, hyperlinking from identifier use to its definition, and graphical view rendering.

Claferwiki supports informal-to-formal modeling, that is, gradually refining parts of specification in natural language into a Clafer model fragments. Claferwiki supports literate modeling - both the rich text and the model fragments can be freely mixed. Informal-to-formal modeling is important during domain modeling.

Also, Claferwiki acts as a collaborative, lightweight, web-based model publishing environment for Clafer. In addition to code highlighting, error reporting, hyperlinking, and graphical view rendering, it also provides model versioning and distributed online/offline editing capabilities as it is based on the Git distributed version control system and the Gitit wiki.

Claferwiki is also integrated with other Clafer Web Tools, allowing to open the current page in:

Live demo

Try me! Also the Railway Wiki and the Traffic Lights Wiki.

If the demo is down or you encounter a bug, please email Michal Antkiewicz.

Contributors

Getting the Clafer Wiki

ClaferWiki is a gitit plugin: gitit loads it when it starts, compiling it with GHC, so GHC and the claferwiki package must be available where gitit runs.

Dependencies

Important: branches must correspond

All related projects are following the simultaneous release model. The branch master contains releases, whereas the branch develop contains code under development. When building the tools, the branches should match. Releases from branches 'masterare guaranteed to work well together. Development versions from branchesdevelop` should work well together but this might not always be the case.

Installation

The plugin library is available on Hackage and can be built with either stack or cabal-install:

The wiki needs gitit.cnf, static/ and templates/ from this repository in the directory where gitit runs.

Usage

Wiki can be configured by editing the gitit.cnf file. See Configuring and customizing gitit. The wiki data is a git repository; see the repository-path: option in gitit.cnf.

Features

Telematics Example, Module Overview Telematics Example, Module Details

Using Clafer Wiki

For general usage information for the GitIt wiki see the README.

You can insert code blocks with clafer code anywhere in the page as follows:

```clafer

<here goes your model fragment>

```

The model overview, including the graph, stats, and download links, can be added as follows:

``` {.clafer .summary}

<the contents in this block are ignored>

```

To have the code blocks correctly processed, make sure to add an empty line before and after the code block, even if the code block is the last element on the page.

The blocks {.clafer .ide}, {.clafer .config}, and {.clafer .mooviz} become buttons that open the page's model in ClaferIDE, ClaferConfigurator, and ClaferMooVisualizer. By default, the buttons link to the tools' ports 8094, 8093, and 8092 on the host that the browser used to reach the wiki. The environment variables CLAFERIDE_URL, CLAFERCONFIGURATOR_URL, and CLAFERMOOVISUALIZER_URL give the tools' URLs instead, either full URLs or paths on the wiki's host, e.g., CLAFERIDE_URL=/claferide/.

Behind a reverse proxy, the wiki takes its own URL, which the tools load the model from, from the headers X-Forwarded-Host, X-Forwarded-Proto, and X-Forwarded-Prefix, e.g., with Apache:

ProxyPass /modelwiki/ http://127.0.0.1:8091/
<Location /modelwiki/>
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Prefix "/modelwiki"
</Location>

How it works

Need help?