Wednesday, July 29, 2015

Clafer, ClaferIG, ClaferWiki, ClaferChocoIG 0.4.0 Released

by Michał Antkiewicz

Clafer compiler, Alloy-based instance generator, and wiki 0.4.0 are released on Hackage (clafer, claferIG, claferwiki). The release also includes the Choco3-based instance generator and optimizer, which; however, does not yet support the new features of the language.

Binary builds are available from Clafer Tools - Binary Distributions.

The Clafer 0.4.0 PowerPoint Slide Show summarizes the improvements included in this release.

Major changes include:
  • Fixed the grammar and extended the type system to properly support super types, primitive value reference types, complex reference types, primitive type reference refinements. See the test case mergeExpAndSetExp.cfr and a subset of the test case supported by Alloy mergeExpAndSetExpAlloy.cfr.
  • Added support for redefinition in Alloy-based IG. See redefinition.cfr test case.
  • Removed Alloy4.1 support. The mode -m=alloy means Alloy4.2 by default.
  • Removed XML mode (-m=xml). The JSON output (-m=json) is more comprehensive and it contains information about quality attributes and objectives.
  • Removed a redundant --noalloyruncommand option.
  • Added primitive type double and implemented primitive type coersions. See primitiveTypesAndCoersions.cfr test case.
  • Updated Clafer Tools for Sublime Text 2/3.
For detailed changes see pull requests: Clafer, ClaferIG, ClaferWiki, chocosolver, ClaferChocoIG.

Previous release Clafer, ClaferIG, ClaferWiki, ChocoSolver, and ClaferChocoIG 0.3.10 Released.

Tuesday, July 28, 2015

Accessing Clafer Models Programmatically

by Michał Antkiewicz, updated for Clafer 0.4.3

Since we ourselves translate Clafer into many output formats and use many different programming languages in the various tools (Haskell, Java, JavaScript), we developed ways of accessing the compiler's intermediate representation (IR), which represents fully-resolved information about Clafer models. This way, the compiler does all the hard work and the downstream tools can access the model conveniently.