Skip to content

Squid v0.3.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@LPTK LPTK released this 22 May 12:02
· 96 commits to master since this release

This pre-release of the Squid type-safe metaprogramming framework was focused on adding important features that were so far missing and consolidating existing ones, as well as aligning Squid's high-level interface with what was presented in our our POPL 2017 paper.

Important new features:

  • first-class variable: a more hygienic and convenient way of manipulating constructed and extracted bindings, a path-dependent-types-based alternative to the nominal system;

  • cross-stage persistence: the ability to have code fragments capture references values in the current stage, to be used during later runtime compilation;

  • better support for context-unsafe metaprogramming: i.e., better support for programming without having to deal with contexts (using OpenCode[T] only), in a way that does not compromise the soundness of the rest of the system;

  • compile-time code execution: the ability to compose and execute code at compile time, useful for communicating configurations to Squid macros in a reliable and uniform way – currently only used in StaticOptimizer, but will be used by the quasiquotes and by Squid macros in the future; for examples, see the tests;

Other main changes and improvements:

  • Scala 2.12 support

  • renaming of IR[T,C], IRType[T] and ir"..." to respectively Code[T,C], CodeType[T] and code"..." – and similarly for other types and functions; introduction of OpenCode[T] and ClosedCode[T] type synonyms;

  • type extraction improvements using ranges, which finally fixes some frustrating match failures that were due to subtyping subtleties;

  • reimplementation of the scheduling algorithm of SchedulingANF, removing the problems of the old (broken) one;

  • move to SBT 1.1;

  • addition of a LoggingOptimizer trait to facilitate dumping compile-time code optimization info;

  • renaming of squid.lib.Var to squid.lib.MutVar to avoid confusion with the new Base#Variable datatype.