fact: Definition VarDHandler' (inp : input) : GenHandler1 data output := match inp with | Get k => v <- getk k ;; resp k v v | Put k v => old <- getk k ;; setk k v ;; resp k (Some v) old | Del k => old <- getk k ;; delk k ;; resp k None old | CAS k v v' => old <- getk k ;; if (val_eq_dec old v) then (setk k v' ;; resp k (Some v') old) else resp k old old | CAD k v => old <- getk k ;; if (val_eq_dec old (Some v)) then (delk k ;; resp k None old) else resp k old old end.
imports: Verdi(Verdi) Coq(FMapList String) Verdi(FMapVeryWeak StateMachineHandlerMonad)