Initial summary of HLL ideas from uni.org

This commit is contained in:
Tony Garnock-Jones 2015-10-22 11:35:30 -04:00
parent 0c40ac37a2
commit f1bf1f5256
1 changed files with 44 additions and 0 deletions

44
doc/notes-on-hll.md Normal file
View File

@ -0,0 +1,44 @@
## Syntax
Just a sketch, at the moment. The connection between Racket `expr`s
and `I` needs to be clarified, among many other things.
Instantaneous actions, I := (actor Idef ...)
(state [O ...] [E I ...] ...)
(background I ...)
(assert! P)
(retract! P)
(send! P)
(flush!) ;; ???
(begin I ...) ;; and, generally, expr?
Actor-level defs, Idef := I
(define id expr)
(define (id id ...) expr ...)
Ongoing actions, O := (on E I ...)
(once E I ...)
(assert P)
(track [x Agg] I ...)
(begin O ...) ;; ??? expr?
Predicates, Pred := (not Pred)
(exists P Pred)
(forall P Pred)
expr
Events, E := (asserted P)
(retracted P)
(message P)
(rising-edge Pred)
(falling-edge Pred)
Aggregates, Agg := (count expr P)
(set expr P)
(hash k_expr v_expr P)
(project P)
(single-value expr P)
(single-value expr P #:default def_expr)
Pred
Patterns, P := ... ;; uses $var as binder
(define-syntax-rule (until E O ...)
(state [O ...] [E]))
(define-syntax-rule (forever O ...)
(until (rising-edge #f) O ...))