4.2.3
Technical rules and expert knowledge
A technical rule from Norwegian infrastructure manager Jernbaneverket [7] is used here as an example of a layout rule using geometric information. We have tested our tool with rules of different kinds, verifying topological, geometrical and interlocking properties. See [9] for details. The home signal property (Property 1 above) may be represented in the following way: isFirstFacingSwitch(b, s) ← stationBoundary(b) ∧ facingSwitch(s)∧ ¬(∃x : facingSwitch(x) ∧ between(b, x, s)), ruleViolation 1 (b, s) ← isFirstFacingSwitch(b, s)∧ (¬(∃x : signalFunction(x, home) ∧ between(b, x, s))∨ (∃x, d, l : signalFunction(x, home)∧ ∧ distance(x, s, d, l) ∧ l < 200). Checking for rule violations can be expressed as: ∃b, s : ruleViolation 1 (b, s), which in Prolog/Datalog query format becomes ruleViolation1(B,S)?.
15