by Michał Antkiewicz, Nov 29, 2026
This release adds a Java toolchain for Clafer. clafersg, the Clafer solution generator (previously chocosolver), compiles .cfr models with its own Java frontend. It solves static models with Choco and temporal models with Alloy 6.2, in one JVM, without the Haskell compiler and without a .js file. The compiler now prints two explicit models, rich and core, and its lowerings follow Kacper Bąk's Lean formalization of the semantics. Temporal models gain the past-time operators of LTL, and an initial value can say when it is applied. Editors get a Clafer language server. Binaries for Linux x86_64 are available from the Clafer tools binary distributions page, and the packages are on Hackage: clafer, claferIG, claferwiki.
One solution generator. clafersg --file model.cfr compiles the model in Java: the parser of the full language, name and type resolution, scopes and imports, the compiler's checks, and the lowering to the core. It then solves the model with the backend that suits it, Choco for a static model and Alloy 6.2.0 for a temporal one. Both run in the same solution loop and the same interactive mode: the next instance or trace, the diff view (--diff), check of the assertions (now for static models too), scopes, and the unsat core when there is nothing more. It also has claferIG's command-line options: --useuids, --json, and --all with --savedir and --dot. On 79 temporal test models, clafersg prints the same traces as claferIG, byte for byte, in all three formats. claferIG stays, and so does the Haskell compiler, which remains the reference implementation: --haskell-frontend compiles the model with clafer instead. The old command chocosolver is no longer installed. The command claferc is the compiler's -m clafer in Java.
Rich and core explicit models. clafer -m clafer prints the rich explicit model: everything is written out, but the enumerations, the initializers, the behavioral patterns and the transitions stay as written, so the model's intent is kept. clafer -m clafer --core writes the core, model.core.cfr, in which these constructs are lowered to a fixed vocabulary. With --record-provenance, each lowered clafer and constraint carries a comment with the rich construct it comes from. Both types of models compile to themselves (compilation is idempotent). The lowering explains what a construct means, and each lowering follows the formalization: the anchors initially and finally, the modifiers initial, final, finalref and finaltarget, and the initializers. See rich and core explicit models. Kacper Bąk checked this release with his Lean instance checker and compiler.
Temporal models. The past-time operators of LTL with past are part of the language: previous a, once a, historically a, a since b and a triggered b (#127). The clock of an initial value can be written. x -> T := each e initializes each instance of x when it is born. xs -> T * := together e initializes the instances together, when their parent starts its lifetime. The meaning no longer depends on the multiplicity. The multiplicity of an abstract clafer bounds the number of all its instances, of all its subclafers together, in every backend (#129). The limits of the initializers are errors and warnings in every mode (#126), e.g., abstract Val -> integer ? := 1 needs a clock.
Editors. clafer-ls, the Clafer language server, analyzes the model and the files it imports as you type. It shows errors, the outline, go to definition, find all references, hovers, completion and rename. Clafer extension for Visual Studio Code uses it.
- clafer compiler, release pull request (0.6.0).
- two explicit models, rich (
-m clafer) and core (-m clafer --core, tomodel.core.cfr), both fixpoints, with--record-provenance(#128);-m jsonprints the rich IR and-m json --corethe core - the lowerings of the anchors
initiallyandfinally, of the modifiersinitial,final,finalrefandfinaltarget(#127), and of the initializers, as the semantics defines them - the past-time operators
previous,once,historically,sinceandtriggered(#127); the pattern lowerings are checked with nuXmv - the clock of
:=::= eachand:= together; the support limits of the initializers (#126) - the multiplicity of an abstract clafer bounds all its instances together (#129); the simple scope analysis reads it, and the constraints that count instances
- the optimizer keeps the abstract clafers that nothing needs in the IR and the explicit models; the Alloy and Choco outputs still leave them out
clafer --versionprints the build date; builds with GHC 9.12.4 (Stackage nightly-2026-11-15) and still with GHC 9.6.7
- two explicit models, rich (
- clafersg (formerly chocosolver), the Clafer solution generator, release pull request (0.6.0).
- the Java frontend:
clafersgreads.cfrfiles itself, with their imports, also from URLs - temporal models with Alloy 6.2.0 in the same JVM: one solution loop for static and temporal models, with
--diffandcheck, and with claferIG's--useuids,--json,--all,--savedirand--dot claferc, the compiler's-m claferin Java;clafer-ls, the Clafer language server- for users of the Java API: the artifacts are
org.clafer:*, andExplicitParser.parsereturns the explicit IR (the oldAstModelisorg.clafer.ast.ToAst.parse); the javadoc of all four modules is online - fixes:
transitiveClosurefollows the relation more than one step (#47)
- the Java frontend:
- claferIG Alloy-based instance generator, release pull request (0.6.0).
- uses clafer-0.6.0; unsat cores show the constraints of
initialwith their clafers claferIG --versionprints the build date
- uses clafer-0.6.0; unsat cores show the constraints of
- claferwiki, release pull request (0.6.0).
- uses clafer-0.6.0
- Clafer for Visual Studio Code, release pull request (0.6.0).
- the Clafer language server: errors as you type, in the model and the files it imports, the outline, Go to Definition, Find All References, hovers, completion and Rename Symbol; requires VS Code 1.91 or later
- highlighting and a snippet for
:= eachand:= together; the compilation also writes the rich explicit model - Clafer: Instances (Choco) runs
clafersg; Clafer: Instances (Alloy) runs claferIG with--diffand--addtypes - install the .vsix file from the GitHub release with
code --install-extension clafer-syntax-0.6.0.vsix
- Clafer Tools for Sublime Text, release pull request (0.6.0).
- the Choco-based instance generator runs
clafersg
- the Choco-based instance generator runs
- Clafer skills for Claude Code, release pull request (0.6.0).
- the clocks of the initial value,
:= eachand:= together, and the clock that a top-level abstract clafer with a multiplicity needs clafersg, which solves temporal models with Alloy, with claferIG's interactive mode andcheck
- the clocks of the initial value,
- Web tools: ClaferIDE, ClaferConfigurator, and ClaferMooVisualizer 0.6.0, with the common platform (#16).
- the tools run
clafersgon the.cfrmodel, which they no longer compile to.js - ClaferIDE:
clafersgis the default solution generator, for static and temporal models; its buttons follow the solution loop (Next, Diff, Fork, Next Config, Check, TL, Reload, Clafer Model and Quit), and those for temporal models only are disabled for a static model; claferIG stays as an alternative - ClaferIDE shows the rich and the core explicit model; the past-time operators are highlighted
- ClaferMooVisualizer caches its results by the rich explicit model, which includes the imports
- the tools run
The release has two Linux bundles, which unpack into the same folder and together are the whole toolset. The Java bundle contains clafersg, claferc and clafer-ls with their launchers and the optimized MiniSat solver; it needs Java 21 or newer, and on its own it compiles and solves static and temporal models. The Haskell bundle contains clafer, claferIG with the optimized MiniSat solver, and the Alloy jars; it runs on Linux x86_64 with glibc 2.39 or newer (Ubuntu 24.04, Debian 13, Arch Linux, Fedora), and claferIG needs Java 21 or newer. On Windows, use them through WSL.
Live demos (0.6.0): the Clafer Model Wiki, the Railway Wiki, the Traffic Lights Wiki, ClaferIDE, ClaferConfigurator, and ClaferMooVisualizer.
Note: clafersg now solves temporal models and checks assertions, but ClaferMooVisualizer and multi-objective optimization work on static models only.