Skip to main content
Each number answers a different question, so each one changes at its own pace. The examples use a small synthetic rater. Save it as versions/rater.rsl:
versions/rater.rsl

The language version says how to read the file

rsl names the version of RSL that the file is written in. rslc fmt keeps it as the first field of spec. This compiler reads RSL 0.4 and 0.4.1. The version has a line, 0.4, and a patch, 1. A patch only adds to its line. A rater that declares "0.4" passes the check of this compiler and rates the same premiums. A rater that uses an addition of 0.4.1 declares "0.4.1", and E-RSL-PATCH names the addition otherwise. The entry point declares the version for each file it imports. Split a rater into files describes the entry point.

One message for another version

The compiler reads the declaration before the rest of the file. A file that declares another version gets one message, and the check stops there:
later/rater.rsl
A file written for another version may use syntax that this compiler reads differently. A page of syntax messages would hide the cause, so the compiler reports the version alone. The message says what to do. For a later version, update rslc. For an earlier version, or a spec that lacks rsl, rewrite the rater in the current version. E-RSL-VERSION shows an example.

The release says which compiler you run

rslc is the compiler and the rating engine. relativities is the Python library that rates with it. Each release of relativities requires one exact release of rslc, so one install fixes both.
The command prints the release number, such as 0.7.2. rslc docs names the language version that the release reads:
Python reads the same numbers from the installed packages:
The release and the language version move separately. A release can fix a check, add a command or rate faster while the language stays 0.4.1. Each rater’s rsl declaration then stays valid, and its source stays as it is.

The rater version is a label you set

version is an optional field of spec. Give it the edition of the rating plan, in the form your team uses. The compiler keeps it with the other spec fields, and each program that loads the rater reads it there:
The label is the author’s statement. The compiler keeps it as text and leaves its meaning to you.

The bundle identity pins a result

A bundle is the rater in the form that rates: its source files, its tables and a manifest of their hashes. The bundle identity, bundle_id, is a hash over the bundle. The compiler computes it, so the same files give the same identity:
An edit to a source file or a table gives a new identity, even when the version label stays the same. Change the rate in a copy of the rater, and keep the label:
Both raters carry the label 1.2.0, and they give different premiums. The bundle identity tells them apart. A person sets a label and may forget to raise it. The identity follows the files. Record the bundle_id beside each premium you keep. It names the exact source and tables behind the premium. Bundles and exact rating shows how to load a bundle by its identity. A bundle that rslc export writes also holds its rating engine and a program layer, and its identity covers them. Compare identities between bundles made the same way.

What stays stable for a rater in use

  • With one release installed, the same source and tables give the same bundle identity and the same premiums.
  • The folder and the time of the build leave the identity as it is.
  • A saved bundle keeps its identity. Rater.load checks each file against the manifest before it rates.
  • A rater that declares "0.4" stays valid under 0.4.1, the later patch of its line.
After you install a new release, check the rater and rate your examples again. Compare the premiums and the bundle_id with the values you recorded.