The examples use a small synthetic rater. Save it as
versions/rater.rsl:
Complete example: versions/rater.rsl
Complete example: 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
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.
0.7.2.
rslc docs names the language version that the release reads:
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 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:
version label stays the same.
Change the rate in a copy of the rater, and keep the label:
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.loadchecks 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.
bundle_id with the values you recorded.
Related
- Bundles and exact rating explains how a bundle is verified.
- Use the rslc commands covers
rslc check,rslc exportandrslc docs. - Install Relativities installs both packages.