Sliding-window message repair in Logical English

sliding-window-repair-le.le · output · proof · check · playground


The question

A door monitor considers the last three numbered messages. Which readings enter and expire, when do they disagree, and what state can the monitor report?

What we tell eyemind

A window ending at message W contains messages W−2 through W. Compare consecutive windows to find their entering and expiring messages. Within a window, the rules first identify conflicts in the raw readings. Then they give precedence to the highest priority. Opposite readings tied at the maximum leave the verdict unresolved.

The log is represented as ordered LE facts so one run can reason over multiple windows and certify their answers.

What eyemind concludes

End message Entered Expired Raw readings Verdict
4     Conflict Unresolved
5 5 2 Conflict Closed
6 6 3 Agree Closed
struct('le:answer', 'verdicts', 'door log', 4, 'unresolved')
struct('le:answer', 'verdicts', 'door log', 5, 'closed')

What the proof establishes

The proof is checked. The verdict at 5 uses the highest priority among the readings in that window. The lower-priority open reading remains visible in the raw conflict until it expires.

Try it

node bin/eyemind.js examples/sliding-window-repair-le.le
node bin/eyemind.js --check-proof examples/proof/sliding-window-repair-le.js examples/sliding-window-repair-le.le

Lower message 5’s priority to 1. Window 5 then has an unresolved verdict.