syndicate-2017/racket/doc/forward-chaining-hll4.rkt.txt

13 lines
516 B
Plaintext
Raw Normal View History

2016-04-01 23:53:46 +00:00
#lang syndicate/hll ;; -*- racket -*-
2015-11-10 00:07:29 +00:00
(actor (forever (assert `(parent john douglas))))
(actor (forever (assert `(parent bob john))))
(actor (forever (assert `(parent ebbon bob))))
(actor (forever (on (asserted `(parent ,$A ,$C))
(until (retracted `(parent ,A ,C))
(assert `(ancestor ,A ,C))
(on (asserted `(ancestor ,C ,$B))
(until (retracted `(ancestor ,C ,B))
(assert `(ancestor ,A ,B))))))))