From 3ebcf413c9d9a777e1c8ed8f46076c25904379a3 Mon Sep 17 00:00:00 2001 From: Sam Caldwell Date: Mon, 3 Jun 2019 11:39:00 -0400 Subject: [PATCH] more accurate job manager type --- racket/typed/proto.rkt | 95 ++++++++++++++++++++++++++++++------------ 1 file changed, 68 insertions(+), 27 deletions(-) diff --git a/racket/typed/proto.rkt b/racket/typed/proto.rkt index 91171b0..ed45aed 100644 --- a/racket/typed/proto.rkt +++ b/racket/typed/proto.rkt @@ -1211,37 +1211,78 @@ (define job-manager-actual '(Role - (jm89) + (jm) (Shares (JobManagerAlive)) (Reacts - (Know (Job (Bind Symbol) (Bind (List- InputTask)))) - (Role (during-inner97) - (Reacts OnDataflow - (Role (perform114) - (Reacts OnStart - (Role (this-facet123) - (Reacts OnDataflow - (Branch - (Effs (Branch (Effs - (Role (this-facet120) - (Shares (TaskAssignment ID Symbol ConcreteTask)) - (Reacts (Know (TaskState ID Symbol Int (Bind (U* (Finished TaskResult) Symbol)))) - (Branch (Effs) (Effs) - (Effs (Stop this-facet)) - ;; TODO - why is there a ρ here? - (Effs (Stop perform ρ)))) - (Reacts OnStart - (Role (take-slot121) - (Reacts (Know (TaskState ID Symbol Int Discard)) - (Stop take-slot)))) - (Reacts (¬Know (TaskManager ID Discard)) - (Stop this-facet)))) - (Effs))) - (Effs))))) + (Know + (Job + (Bind Symbol) + (Bind (List (Task Int (U (MapWork String) (ReduceWork Int Int))))))) + (Role + (during-inner) + (Reacts + OnDataflow + (Role + (perform) + (Reacts + OnStart + (Role + (this-facet) + (Reacts + OnDataflow + (Branch + (Effs + (Branch + (Effs + (Role + (this-facet) + (Shares + (TaskAssignment + Symbol + Symbol + (Task + Int + (U + (MapWork String) + (ReduceWork (Hash String Int) (Hash String Int)))))) + (Reacts + (Know + (TaskState + Symbol + Symbol + Int + (Bind (U (Finished (Hash String Int)) Symbol)))) + (Branch + (Effs) + (Effs) + (Effs (Stop this-facet)) + (Effs + (Stop + perform + (Branch + (Effs + (Role + (done) + (Shares (JobFinished Symbol (Hash String Int))))) + (Effs)))))) + (Reacts + OnStart + (Role + (take-slot) + (Reacts + (Know (TaskState Symbol Symbol Int Discard)) + (Stop take-slot)))) + (Reacts (¬Know (TaskManager Symbol Discard)) (Stop this-facet)))) + (Effs))) + (Effs))))) (Reacts OnStop) (Reacts OnStart))) - (Reacts (¬Know (Job Symbol (List- InputTask))) - (Stop during-inner)))) + (Reacts + (¬Know + (Job + Symbol + (List (Task Int (U (MapWork String) (ReduceWork Int Int)))))) + (Stop during-inner)))) (Reacts (¬Know (TaskManager (Bind Symbol) (Bind Int)))) (Reacts (Know (TaskManager (Bind Symbol) (Bind Int))))))