include actor start event less often when compiling internal events
This commit is contained in:
parent
7cf8f9fc0a
commit
0d11850295
|
@ -278,14 +278,16 @@
|
||||||
(set)]))
|
(set)]))
|
||||||
(define states
|
(define states
|
||||||
(for/hash ([(sn txns) (in-hash st#)]
|
(for/hash ([(sn txns) (in-hash st#)]
|
||||||
;; get rid of the empty state unless it is the start,
|
;; handle empty state below
|
||||||
;; or some other state transitions to it
|
#:unless (set-empty? sn))
|
||||||
#:unless (and (set-empty? sn)
|
|
||||||
(not (equal? sn new-st0))
|
|
||||||
(not (target-of-transition? sn st#))))
|
|
||||||
(define old-assertions (state-assertions (hash-ref orig-st#+ sn)))
|
(define old-assertions (state-assertions (hash-ref orig-st#+ sn)))
|
||||||
(define new-assertions (external-assertions old-assertions))
|
(define new-assertions (external-assertions old-assertions))
|
||||||
(values sn (state sn txns new-assertions))))
|
(values sn (state sn txns new-assertions))))
|
||||||
|
(when (set-empty? new-st0)
|
||||||
|
(error 'compile-internal-events "not able to remove initial start event"))
|
||||||
|
(when (target-of-transition? (set) st#)
|
||||||
|
;; get rid of the empty state unless some other state transitions to it
|
||||||
|
(set! states (hash-set states (set) (state (set) (hash) (set)))))
|
||||||
(role-graph new-st0 states)]
|
(role-graph new-st0 states)]
|
||||||
[(cons (work-item from path/r to by with effs) more-work)
|
[(cons (work-item from path/r to by with effs) more-work)
|
||||||
(define prev (if (empty? path/r) from (first path/r)))
|
(define prev (if (empty? path/r) from (first path/r)))
|
||||||
|
|
Loading…
Reference in New Issue