Skip to main content
Install Relativities before running the synthetic examples. As a rater grows, its types and tables crowd its calculations. Move them into a second file, and name that file in the rater:
The example splits a personal auto rater from the synthetic carrier Example Mutual. It also imports a set of marital status values from the standard library.

Move declarations into a second file

Save the rater as personal-auto/rater.rsl. This file is the entry point: the file you check, export and build.
personal-auto/rater.rsl
Save the territory type and its table as personal-auto/territory.rsl:
personal-auto/territory.rsl
Save the table’s rows as personal-auto/tables/TerritoryFactor.csv:
personal-auto/tables/TerritoryFactor.csv
Check the entry point:
The check reads rater.rsl, each file it imports and each table, and checks them as one rater. Build and rate it the same way as a rater in one file:
The annual premium is 600 × 1.25 × 0.92 = 690.

Follow the import rules

  • Write each import on its own line, outside the sections. The example writes its imports after spec.
  • A path is relative to the file that writes the import. A path that starts with std/ names the standard library.
  • An imported file holds sections such as Types, Constants and Tables. The rater reads them as its own.
  • Each name has one declaration across the files.
  • The spec block of the entry point applies to every file.
  • An imported file may import other files. Two files that import each other fail the check.
  • Keep each imported file inside the folder of the entry point. A bundle holds that one folder.
A missing file, a repeated name or a circular import gets E-UNRESOLVED, with the file and the line.

Keep the CSV files beside the entry point

  • The rater reads each table from tables/ beside the entry point, whichever file declares the table.
  • An enumeration declared as Name = Enum reads its members from enums/Name.csv beside the entry point.

Check, format and export the rater

An imported file checked alone lacks the other files. territory.rsl cites the source manual, which rater.rsl declares:
Format each file with its own command:
Export the entry point:
The bundle holds the entry point, each imported file at its path, and each table:
The standard library ships with the compiler, so std/ppa.rsl stays out of the bundle. Package a rater describes the other files.

Import from the standard library

The standard library holds value sets that many raters share. Import a file by its std/ path:
The rater then uses a type from that file by name:
inputs lists the values each type accepts:
Each of these files declares enumerations for one line of business:
  • The files install with the compiler, in the std folder of the rslc package. Read a file there for its full list.
  • Import one of these files in a rater. Several of them declare the same name, such as MaritalStatus.
  • A name from an imported file is taken: choose a different name for your own type.