15. Reference
The whole language in one place: grammar, keywords, defaults, built-in rules and constants.
Grammar
Section titled “Grammar”program := guard+guard := "guard" NAME line*line := relation | source | mode | learn | oscillation | add | rule
relation := "relation:" CLASSsource := "source" NAME ("," NAME)* ":" ("trusted" | "untrusted")mode := "mode:" ("observe" | "enforce")learn := "learn:" ("frozen" | "max" NUMBER)oscillation := "oscillation:" ("auto" | "window" | "history")add := "add" ("attractor" | "game") NAMErule := "on" condition ":" action
condition := quantity "->" "infinity" | quantity ("<" | ">") NUMBER | ATTRACTORaction := "allow" | "modify" | "deny" | "escalate human"quantity := "w_s" | "w_o" | "w_f" | "theta" | CRITERION | quantity "/" quantity | "dwell" "(" ATTRACTOR ")"
NAME := a lowercase letter, then lowercase letters, digits, hyphensNUMBER := a decimal number, for example 0.7 or 3comment := "#" to the end of the lineThe sign + means one or more, * means zero or more, | means or.
Keywords
Section titled “Keywords”| Word | What it does | Chapter |
|---|---|---|
guard |
opens the description of one guard | 4 |
relation |
sets the relation class | 5 |
source |
declares a source trusted or untrusted | 5 |
mode |
chooses recording or blocking | 5 |
on |
starts a rule | 6 |
infinity |
the divergence condition | 7 |
dwell |
time spent in an attractor | 7 |
oscillation |
chooses the oscillation check | 8 |
learn |
limits learning | 10 |
add |
adds an attractor or a game | 10 |
Defaults
Section titled “Defaults”| Line | If not written |
|---|---|
relation |
not set; first-contact weights 0.15/0.15 |
source |
all sources untrusted |
mode |
enforce |
learn |
frozen |
oscillation |
auto |
Built-in rules
Section titled “Built-in rules”They are not written and cannot be turned off.
- Any tracked quantity that tends to infinity:
escalate human. - Oscillation verdict “unknown” and an irreversible action:
escalate human. - Text from an
untrustedsource does not move the weights.
Action precedence
Section titled “Action precedence”From the strictest: deny, escalate human, modify, allow. When no rule fires, the action is allow.
Constants
Section titled “Constants”They are the same in every installation and are not written in the file. The values are illustrative until the specification sets them.
| Constant | Meaning | In this textbook |
|---|---|---|
| L | the bound for -> infinity |
10 |
| N | the number of rising steps in a row for -> infinity |
5 |
| W | window length in steps | 10 |
| ε | the similarity bound for two situations | 0.1 |
| δ | the smallest weight difference that is a reversal | 0.1 |
Criteria
Section titled “Criteria”cardinality, third_parties, reversibility, task_ratio, pressure, continuity, delegation, authority. They are explained in chapter 3.
Next: 16. What the language does not cover Part of The PSE Language, a textbook by Andrej Ristić. Try the examples in the PSE Playground.