Web-Based Development Environment for Clafer
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Server
.gitignore
.gitmodules
LICENSE
README.md

README.md

ClaferIDE

v0.4.4

A web-based IDE for Clafer.

ClaferIDE is part of Clafer Tools. Read more in the paper Clafer Tools for Product Line Engineering.

Live demo

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

Background

See clafer.org.

Functions

  • Provides a web-based IDE for modeling in Clafer.
  • Provides an source code editor (ACE).
  • Compiles the model to HTML for syntax highlighting and navigation via hyperlinks or error highlighting.
  • Instantiates the model using ClaferIG and allows for global scope setting and requesting a next instance.
  • Provides a set of predefined examples that can be compiled and instantiated.

Nature

ClaferIDE is a web-based application. Its server side (implemented with Node.js) processes requests, runs the chosen back-end and passes back its output. The client-side is implemented using JavaScript/HTML and handles all the IDE functionality.

Contributors

Installation and running

Dependencies for running

  • Java Platform (JDK) v8+
  • Clafer v0.4.4
    • can be from the binary distribution
  • Node.js Framework, v4.2.3 LTS
  • Redis Server, v2:2.*
    • On Ubuntu, execute sudo add-apt-repository ppa:chris-lea/redis-server && apt-get install redis-server
  • Backends' dependencies must be satisfied. See the backend installation steps below.

Installation

Core

  1. Download (git clone) ClaferIDE to some directory <target directory>
  2. Go to <target directory>/ClaferIDE and execute
git submodule init
git submodule update

This will install the platform.

When working with a branch other then master, you need to additionally checkout that branch (e.g., develop):

git submodule foreach git checkout develop
  1. Go to <target directory>/ClaferIDE/Server and execute

npm install

This will download all the required Node.js modules.

  1. Install the necessary backends into some location <bin> found on PATH. The default configuration in <target directory>/ClaferIDE/Server/Backends/backends.json assumes /home/clafertools040/bin.

The fastest way is to unzip a binary distribution into the folder <bin>.

See Installing Backends for detailed steps.

Settings

  1. Make sure the port 8094 is free, or change the value of the key port in Server/config.json: "port" = "8094" to any free one.

  2. Make sure clafer, node, and java are in PATH environment variables, so they can be executed without any path prefixes.

  3. Running the following commands should produce the following results or later version:

clafer --version

Clafer v0.4.4

claferIG --version

Clafer v0.4.4

java -version

java version 1.8.0_102

node -v

v4.2.3 LTS

  1. Make sure uploads folder is accessible for writing, since temporary files will be stored there.

  2. If you use Shell scipts (.sh) for running, make sure the scripts have Execute permissions.

Running

  • To run the server in a standard mode, execute
cd <target directory>/ClaferIDE/Server/
node ClaferIDE.js
  • If you use Node Supervisor under Linux, you can execute
cd <target directory>/ClaferIDE/Server/commons
chmod +x start.sh
./start.sh

Then you can go to any browser and type http://localhost:[port]/ and open any Clafer file with objectives in it.

Trying an Example

  • Choose Simple model of a Person example in the dropdown box in the upper-left corner of the tool window.
  • Press Compile button right in the front of the drop down list.
  • Once you see the compilation is complete, go to Instance Generator view and press Run there (the default backend is Alloy-based IG (IG only)).
  • The Output view should print the first generated instance.

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 master are guaranteed to work well together. Development versions from branches develop should work well together but this might not always be the case.

Need help?