Release per January 31, 2020: v0.2.0

Version v0.2.0 concurs with the third milestone in the project as supported by NLnet.

Major changes

This release sees a number of important new mechanisms. The goal we've set for this release includes a first version of a general user interface. This requires most of the basic mechanisms to be available (and caused a number of aspects to be included in this release that were not foreseen).

  1. Rule triggering mechanism. Not planned, but nevertheless realised is a (new) mechanism for triggering rules. It depends on inverting queries. A query is the mechanism by which a Perspectives modeller can 'reach outside' a context. It introduces dependencies amongst contexts that are not part of the static structure. This causes a change in one context to be relevant to the condition in other contexts. By inverting queries, we ensure that a change evaluates the relevant rules in affected contexts. See the texts Perspectives across context boundaries and Query Inversion.
  2. External function interface. Not planned either. The Perspectives Language has a number of built-in functions to create queries from, such as context and binding. As the language is further developed, many other functions will turn out to be useful. Often, they will be useful only in particular cases. Rather than extending the language with a new keyword for each such function, we introduce a mechanism for external functions. Such functions come in two flavors: core external functions and foreign external functions. The former are compiled with the core of the program (the Perspectives Distributed Runtime). A mechanism for them, together with a number of functions oriented to Couchdb, is released now. The mechanism for foreign functions is not yet ready. It will enable the programmer to add a Javascript module to his model and make use of functions defined therein. Obviously, this introduces a safety risk. See the text External Function Interface
  3. Compiler. In the previous version we released the parser for PL. In this version, the compiler that transforms valid parsed models to executable purescript programs, is included. Though not complete, it supports many of the main facilities of the language.
  4. Model management. For the modelling user, functionality is included to load a model file, have it compiled to a so-called DomainFile, and have that stored in Couchdb. Furthermore there are functions to upload such compiled files to a repository and to download them from a repository into one's local set of Perspectives models.
  5. Update functions. A complete set of update functions is now implemented. These functions not only change the state of the computation, but also contribute 'Deltas' to a Transaction. Transactions are the base for synchronisation.
  6. Preparation for synchronisation. Many facets of the work for this release are of great importance for the synchronisation mechanism that ensures that a PDR installation stays up to date as other users change data. This holds in particular for the query inversion mechanism and the Transactions.
  7. object variable in rules. A rule on a computed perspective may change the state that the computation rests on. Consequently, after changing that state the original object set may no longer be computed. There are plausible use cases where this would be a problem. By introducing a variable object that is automatically bound to the original object set in the right hand side of rules, we solve this problem. See The case for an object variable in rules
  8. Abstract Data Type. Because we can bind multiple roles, either as alternatives or (in the near future) as components, we have the need to describe the type of such bindings. This we do with Abstract Data Types. The understanding of these ADTs has been improved, they have been documented (Abstract Data Type) and a new implementation is incorporated.

New projects

With this release, we publish an end user program with a user interface - in its very first version. This program is based on Electron and is maintained in a seperate repository. Furthermore, it depends on several other projects, one of them newly released now. These are the newly published repositories:

Documentation

The reference page has been actualised in several places, e.g. regarding to the new object variable and the externel interface. Furthermore we've published a number of new language design documents:

  1. Perspectives across context boundaries
  2. Query Inversion
  3. The case for an object variable in rules
  4. External Function Interface
  5. Abstract Data Type

Models/Apps

Apart from the main screen of the InPlace end user program, we've created two models whose current versions are published with this release, for test usage:

The plan for this release included a chat-app skeleton. However, we found it doesn't add anything to the other two models in terms of either real functionality or feature demonstration, so we've postponed it to a later release when we have synchronisation between PDR installations. Chatting will demonstrate that synchronisation.

Usage

To test drive the alpha version of the InPlace end user program, you will have to install the full development environment and build all projects. We refer you to the readme document of perspectives-react-integrated-client for instructions how to start the client.

Also, you'll have to install Couchdb. Perspectives development depends on version V2.1.1; however, we have good reason to believe the latest Couchdb version will work for you, too.

Notice that you need to have at least model:System in Couchdb in order to be able to start InPlace. Run

pulp test

to achieve this. We will soon release a version with more convenient ways of test driving InPlace!