Skip to content

15. Reference

The whole language in one place: grammar, keywords, defaults, built-in rules and constants.

program := guard+
guard := "guard" NAME line*
line := relation | source | mode | learn
| oscillation | add | rule
relation := "relation:" CLASS
source := "source" NAME ("," NAME)* ":"
("trusted" | "untrusted")
mode := "mode:" ("observe" | "enforce")
learn := "learn:" ("frozen" | "max" NUMBER)
oscillation := "oscillation:"
("auto" | "window" | "history")
add := "add" ("attractor" | "game") NAME
rule := "on" condition ":" action
condition := quantity "->" "infinity"
| quantity ("<" | ">") NUMBER
| ATTRACTOR
action := "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, hyphens
NUMBER := a decimal number, for example 0.7 or 3
comment := "#" to the end of the line

The sign + means one or more, * means zero or more, | means or.

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
Line If not written
relation not set; first-contact weights 0.15/0.15
source all sources untrusted
mode enforce
learn frozen
oscillation auto

They are not written and cannot be turned off.

  1. Any tracked quantity that tends to infinity: escalate human.
  2. Oscillation verdict “unknown” and an irreversible action: escalate human.
  3. Text from an untrusted source does not move the weights.

From the strictest: deny, escalate human, modify, allow. When no rule fires, the action is allow.

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

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.