-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
202 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(library | ||
(name string_recorder) | ||
(libraries react_trace base)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
open! Base | ||
open Stdlib.Effect | ||
open Stdlib.Effect.Deep | ||
open React_trace | ||
open Lib_domains | ||
open Concrete_domains | ||
open Interp_effects | ||
include Recorder_intf | ||
|
||
type recording = string | ||
|
||
let emp_recording = "= Recording =\n" | ||
|
||
let event_h (type a b) (f : a -> b) (x : a) : | ||
recording:recording -> b * recording = | ||
match f x with | ||
| v -> fun ~recording -> (v, recording) | ||
| effect Update_st (path, label, (v, q)), k -> | ||
fun ~recording -> | ||
let () = perform (Update_st (path, label, (v, q))) in | ||
let recording = | ||
recording | ||
^ Printf.sprintf "[path %s] Update state %d -> %s\n" | ||
(Sexp.to_string (Path.sexp_of_t path)) | ||
label | ||
(Sexp.to_string (sexp_of_value v)) | ||
in | ||
continue k () ~recording | ||
| effect Set_dec (path, dec), k -> | ||
fun ~recording -> | ||
let () = perform (Set_dec (path, dec)) in | ||
let recording = | ||
recording | ||
^ Printf.sprintf "[path %s] Set decision %s\n" | ||
(Sexp.to_string (Path.sexp_of_t path)) | ||
(Sexp.to_string (sexp_of_decision dec)) | ||
in | ||
continue k () ~recording | ||
| effect Enq_eff (path, clos), k -> | ||
fun ~recording -> | ||
let () = perform (Enq_eff (path, clos)) in | ||
let recording = | ||
recording | ||
^ Printf.sprintf "[path %s] Enqueue effect\n" | ||
(Sexp.to_string (Path.sexp_of_t path)) | ||
in | ||
continue k () ~recording | ||
| effect Alloc_pt, k -> | ||
fun ~recording -> | ||
let path = perform Alloc_pt in | ||
let recording = | ||
recording | ||
^ Printf.sprintf "Allocate path %s\n" | ||
(Sexp.to_string (Path.sexp_of_t path)) | ||
in | ||
continue k path ~recording | ||
| effect Checkpoint _, k -> fun ~recording -> continue k () ~recording |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
(executable | ||
(public_name react_trace) | ||
(name main) | ||
(preprocess | ||
(pps ppx_jane)) | ||
(libraries | ||
react_trace | ||
report_box_recorder | ||
base | ||
logs | ||
logs.fmt | ||
fmt | ||
fmt.tty | ||
printbox | ||
printbox-text)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(library | ||
(name report_box_recorder) | ||
(libraries react_trace base printbox)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.