Skip to content

Commit

Permalink
🚧 Add a skeleton for Recorder
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeta611 committed Nov 26, 2024
1 parent 6ce30b4 commit 813d881
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/recorder.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
open! Core
open Syntax
open Concrete_domains
(* open Interp_effects *)

type event =
| Evt_update_st of (Path.t * Label.t * (value * Job_q.t))
| Evt_set_dec of (Path.t * decision)
| Evt_enq_eff of (Path.t * clos)
| Evt_alloc_pt of Path.t

(** TODO: *)
let record = function
| Evt_update_st (path, label, (v, q)) -> ignore (path, label, v, q)
| Evt_set_dec (path, dec) -> ignore (path, dec)
| Evt_enq_eff (path, clos) -> ignore (path, clos)
| Evt_alloc_pt path -> ignore path

type diagnostics
(** TODO *)

let diagnostics = ref (failwith "not implemented")
15 changes: 15 additions & 0 deletions lib/recorder.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
open! Core
open Syntax
open Concrete_domains

type event =
| Evt_update_st of (Path.t * Label.t * (value * Job_q.t))
| Evt_set_dec of (Path.t * decision)
| Evt_enq_eff of (Path.t * clos)
| Evt_alloc_pt of Path.t

val record : event -> unit

type diagnostics

val diagnostics : diagnostics ref

0 comments on commit 813d881

Please sign in to comment.