Instance log_base_params : BaseParams := @log_base_params orig_base_params.Instance log_multi_params : DiskOpMultiParams log_base_params := log_multi_params snapshot_interval.Instance log_failure_params : DiskOpFailureParams log_multi_params := log_failure_params snapshot_interval.Definition disk_correct dsk h st  :=
    exists s (entries : list entry) (snap : data),
      dsk Count = Some (serialize (length entries)) /\
      dsk Log = Some s /\
      IOStreamWriter.unwrap s = IOStreamWriter.unwrap (list_serialize_rec entry _ entries) /\
      dsk Snapshot = Some (serialize snap) /\
      log_num_entries st = length entries /\
      (apply_log h snap entries = log_data st).

(* Specifications: *)
Lemma log_net_handlers_spec : forall dst src m st ops out st' l dsk dsk', disk_correct dsk dst st -> log_net_handlers snapshot_interval dst src m st = (ops, out, st', l) -> apply_ops dsk ops = dsk' -> disk_correct dsk' dst st'.
Lemma log_input_handlers_spec : forall h m st ops out st' l dsk dsk', disk_correct dsk h st -> log_input_handlers snapshot_interval h m st = (ops, out, st', l) -> apply_ops dsk ops = dsk' -> disk_correct dsk' h st'.
Lemma disk_correct_reboot : forall net h d ops, disk_correct (nwdoDisk net h) h (nwdoState net h) -> do_log_reboot snapshot_interval h (disk_to_channel (nwdoDisk net h)) = (d, ops) -> disk_correct (apply_ops (nwdoDisk net h) ops) h d.
Lemma disk_correct_invariant : forall net failed tr, @step_failure_disk_ops_star _ _ log_failure_params step_failure_disk_ops_init (failed, net) tr -> forall h, disk_correct (nwdoDisk net h) h (nwdoState net h).
Lemma reboot_invariant : forall net failed tr, @step_failure_disk_ops_star _ _ log_failure_params step_failure_disk_ops_init (failed, net) tr -> forall h d dsk, do_reboot h (disk_to_channel (nwdoDisk net h)) = (d, dsk) -> log_data d = reboot (log_data (nwdoState net h)).