#!hacchpsimguile -b
!#
;; "select-nested-loop-a-03.hacchpsimscm"
;; copy-modified from "select-nested-loop-a-02.hacchpsimscm"
;; vi: ft=scheme
;;	$Id: countdown-loop-a-01.hacchpsimscm,v 1.2 2007/04/20 18:27:12 fang Exp $
;; @haco@ countdown-loop-a.haco-a

; (use-modules (hackt chpsim-primitives))
(use-modules (hackt chpsim-trace))
(use-modules (hackt chpsim-primitives))
(use-modules (hackt chpsim))
; (use-modules (hackt algorithm)) ; for find-assoc-ref
(use-modules (hackt streams))
(use-modules (ice-9 streams))
; (use-modules (srfi srfi-1))	; for alist (associative lists)

(define select-events
  (chpsim-filter-static-events-select all-static-events-stream))
; "all select-events:"
; (stream-for-each-display-newline select-events)

(define branches
  (stream-filter
    (lambda (e) (hac:chpsim-event-branch? (static-event-raw-entry e)))
    all-static-events-stream)
)
"no branches:"
(stream-for-each-display-newline branches)


(define do-whiles
  (stream-filter
    (lambda (e) (hac:chpsim-event-do-while? (static-event-raw-entry e)))
    all-static-events-stream)
)
"one do-while:"
(stream-for-each-display-newline do-whiles)

(define joins
  (stream-filter
    (lambda (e) (hac:chpsim-event-join? (static-event-raw-entry e)))
    all-static-events-stream)
)
"concurrent joins (expect empty):"
(stream-for-each-display-newline joins)

