;;;; cl-scopes/csys/program - common and general csys program definitions (defpackage :scopes/csys/program (:use :common-lisp) (:local-nicknames (:actor :scopes/core/actor) (:csys :scopes/csys) (:util :scopes/util)) (:export #:basic-0)) (in-package :scopes/csys/program) ;;;; basic-0: minimal recursive system (defun basic-0 () (csys:make-program (list '(:c00 :initial) (csys:std-proc :actions (actions-zero-initial)) '(:e01 :initial) (csys:eff-proc :actions (csys:basic-actions)) ':default (csys:std-proc :actions (csys:basic-actions))))) (defun actions-zero-initial () (util:plist-merge (csys:basic-actions) (list :next (next-zero-initial)))) (defun next-zero-initial () (lambda (msg scope) (let ((self actor:*self*)) (csys:send-create self :cat :e01 :connect :succ) (csys:send-create self :cat :s01 :loc "0-1" :connect :pred) (csys:send-connect self self :op (csys:multiply -1)) ;; switch :active nil)))