Skip to main content
Generated from the rslc compiler.

E-USE

Read a used program through its outcomes. A guideline prices a submission with a rater it names in use ts = "rater.rsl". The rater’s root record becomes a type, ts.Policy, and a call reads one result: ts(self.policy).premium. The check keeps the used rater a closed box. The guideline gives it inputs and reads the values its RatingOutcomes lists. Each read is a call, so one spelling marks every place the guideline depends on the rater. The rater’s author is then free to change its internal calculations. The guideline keeps working while the outcomes stay the same. Example The referral reads the rater’s premium by path, self.policy.premium, where a call belongs.
Fix Read the outcome as a call of the used program.
Other causes Reading the used program:
  • The guideline reads a calculation that the rater’s RatingOutcomes leaves out. Add it to the rater’s RatingOutcomes, then read it as a call.
  • A call names an outcome the rater lacks, such as ts(self.policy).total. Use a name from the rater’s RatingOutcomes.
  • A call’s argument is an expression, or a record other than the rater’s root. Pass a path to the root record, such as self.policy.
  • A call stands alone, as ts(self.policy). Read one outcome of it, or match it.
  • A match on a call has arms other than Rated(r) and Declined, or its Declined arm binds a name.
  • One calculation matches the call and another reads an outcome directly. Read every outcome through match.
  • The guideline has a use and calls it nowhere. Read an outcome, or remove the use.
The use line:
  • The path names a file that is missing, a file in another folder, or the guideline itself. Keep the rater beside the guideline.
  • Two use lines share an alias. Give each its own.
  • The alias contains __, or the guideline declares a name that starts with the alias and __. Rename it.
  • The use line carries a list of outcomes in braces. Write use ts = "rater.rsl" alone.
  • The use sits in an imported file. Move it to the guideline.
The used file:
  • The used file declares Roles or Acts, or has a use of its own. A used program is a plain rater.
  • The used file lacks RatingOutcomes. Declare the values the guideline reads.
  • Both files declare Premium, or another numeric type of the language, with different precisions. Make the two declarations the same.
bad/guideline.rsl
bad/rater.rsl
good/guideline.rsl
good/rater.rsl

E-ROLE

A role is declared before it is named. A guideline says who does what on a submission. Roles lists the roles in chains that read lowest first, such as uw < manager. Acts gives quote and bind each a role. An input takes a role with by @Role.uw, and a referral goes to @Role.manager. The check asks that every @Role.name is a role the Roles section declares, and that Roles and Acts are well formed. A submission then always has someone with the authority to answer each question and sign off each referral. The check also keeps a role’s answers apart from the terms of a quote. An input marked per quote is a term: each quote of a submission may hold its own answer to it. A role’s answer is a judgment about the risk, and every quote of a submission prices one risk. So an input takes by or per quote, one of the two. Example The referral goes to @Role.supervisor, and Roles declares uw and manager.
Fix Name a declared role. To add a role, put it in a Roles chain, such as uw < manager < supervisor.
Other causes
  • The guideline names a role and has Roles nowhere. Add Roles = { … }.
  • A chain puts a role below itself, such as uw < manager < uw. Write each chain lowest first.
  • The guideline declares Roles twice, or Acts twice. Keep one of each.
  • Acts names something other than quote and bind, or gives one act two roles.
  • A role is given by path, such as policy.payrol by @Role.uw, and a step of the path misses an input. Spell each step as its record declares it.
  • Roles or Acts sits in an imported file. Move it to the guideline.
  • An input of a nested record takes by. rslc submission open reports this cause. Give the role on the root record by path, policy.payroll by @Role.uw.
  • An input takes both by and per quote, such as limit: Num by @Role.uw per quote. Keep one of the two.
  • An input marked per quote sits at or under a path that a role answers, such as policy.limit under policy by @Role.uw. rslc submission open reports this cause. Drop the mark, or drop the role.
  • A union or a list is marked per quote and holds an input that lacks the mark. rslc submission open reports this cause. Mark each input in it, or drop the mark on the union or the list.
  • Two arms of one union share a field name, and one arm alone marks it per quote. rslc submission open reports this cause. Mark the field in both arms, or remove the mark.
bad/guideline.rsl
bad/rater.rsl
good/guideline.rsl
good/rater.rsl

E-REFER

Each referral has its own name. A referral sends a submission to a role for sign-off: refer name when condition to @Role.manager because "…". While the condition holds, the submission waits for that role’s decision. The referral’s name is the question the role answers, as in answer large_account = Approved. The check asks for one referral per name. Each sign-off in the submission log then belongs to exactly one condition. Example Two referrals share the name large_account: one for the manager and one for the director.
Fix Give the second referral a name of its own.
Other causes
  • A referral sits on a nested record. rslc submission open reports this cause. Move the referral to the root record and read the nested value by path.
bad/guideline.rsl
bad/rater.rsl
good/guideline.rsl
good/rater.rsl