c4-project / c4f

The C4 Concurrent C Fuzzer
MIT License
14 stars 1 forks source link

Idea: defunctionalise availability checks #186

Open MattWindsor91 opened 4 years ago

MattWindsor91 commented 4 years ago

One of the current things I'm working on is a refactored, somewhat less overpowered version of availability checks. While doing this, I've realised that:

I'm wondering if it would be a good idea to defunctionalise availability checks, turning them into an enum of the form

type t =
| Always
| Has_threads
| Filter_constructible of Path_filter.t
(* | Custom of (Context.t -> bool Or_error.t) *)

This would then support writing a to_string method that auto-describes the availability check, which we can put into the action table listing.

This is a minor point, so would be somewhat back burner, but I'm just issuing an issue so I don't forget about it.