Clafer Tools
Integration of Clafer Compiler and Instance Generators into Sublime Text 2/3
Details
Installs
- Total 252
- Win 133
- Mac 68
- Linux 51
| Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Clafer Tools
v0.5.7
Integration of the Clafer compiler and instance generators into Sublime Text 4.
Contributors
- Michał Antkiewicz, Main developer.
Features and Usage
In a Clafer model (.cfr):
- Syntax highlighting of keywords, operators, comments, strings and numbers, compiler directives
(
//# OPTIONSon the first line,//# FRAGMENT,//# GRAPH,//# STATS,//# SUMMARY), and embedded Alloy and JavaScript ([alloy| … |],[choco| … |]). - Compilation
ctrl+b(Tools > Build): the compiler's errors are shown in the model, at their position, and its output in a panel. An error in a file that the model imports (--import, Clafer 0.5.4) is shown at the start of the model, with the file and the position in it, and in that file if it is open; double-click the error's underlined position in the panel, or pressF4, to open the file at the error. The variantValidate(ctrl+shift+b) also validates the generated outputs with Alloy and chocosolver. - Instance generation in a Terminus tab:
- Alloy-based instance generator (claferIG)
ctrl+i, g, a - Choco-based instance generator (chocosolver)
ctrl+i, g, c
- Alloy-based instance generator (claferIG)
- The Command Palette has the same commands under
Clafer:.
Installation
- Install Sublime Text 4.
- In Sublime Text, install the packages
Clafer ToolsandTerminuswith Package Control:Tools > Command Palette > Package Control: Install Package. - Download a binary distribution of the Clafer tools and unpack it into a folder of your choice. The instance generators need Java 21 or later.
- Either add that folder to
PATH, or settools_pathto it inPreferences > Package Settings > Clafer Tools > Settings.
Settings
tools_path: the folder of the Clafer tools (clafer,claferIG,chocosolver.jar,alloy6.2.0.jar). Empty (the default): use the tools onPATH.clafer_args: the arguments ofclaferfor compilation; the model is added at the end. Default:["-m", "alloy", "-m", "choco", "-m", "html", "--self-contained"].
Development
syntax_test_clafer.cfr tests the syntax: open it and run Tools > Build With… > Syntax Tests.