New state resulting from an event.
(event-next event systate) → new-systate
Based on the event, we use the appropriate function.
Function:
(defun event-next (event systate) (declare (xargs :guard (and (eventp event) (system-statep systate)))) (declare (xargs :guard (event-possiblep event systate))) (let ((__function__ 'event-next)) (declare (ignorable __function__)) (event-case event :create-certificate (create-certificate-next event.certificate systate) :receive-certificate (receive-certificate-next event.message systate) :store-certificate (store-certificate-next event.certificate event.validator systate) :advance-round (advance-round-next event.validator systate) :commit-anchors (commit-anchors-next event.validator systate) :timer-expires (timer-expires-next event.validator systate))))
Theorem:
(defthm system-statep-of-event-next (b* ((new-systate (event-next event systate))) (system-statep new-systate)) :rule-classes :rewrite)