Hardcaml.AssertionsAssertions within Hardcaml simulations.
There are a few steps needed to enable assertions:
1. pass trace_properties:true to Scope.create 2. enable them in the Circuit.Config (see circuit_config_with_assertions) 3. (optionally) attach assertion tracing to the simulation (see trace)
val sexp_of_t : t -> Sexplib0.Sexp.tmodule Violated_or_not : sig ... endval circuit_config_with_assertions :
?config:Circuit.Config.t ->
Scope.t ->
Circuit.Config.tReturn a circuit config with assertions enabled.
val trace :
('i, 'o) Cyclesim.t ->
Hardcaml__.Assertion_manager.t option ->
t * ('i, 'o) Cyclesim.tConnect to a simulator and record all assertions.
val results : t -> Violated_or_not.t Base.Map.M(Core.String).t optionReturn assertions fired during a simulation. Printing t as a sexp displays these results.
module Always : sig ... end