FiniteSetsFiniteness of sets and maps, applied when a counterexample needs it
Sets and maps are finite, but they are encoded as arrays, which may be infinite. The difference only shows in a counterexample to a property whose cone of influence has a quantifier observing a container of an infinite element type (see LustreTypeChecker.finite_risk_types). The containers of those types are compiled with constraints that make them finite (see LustreNode.t.finite_constraints), which cost the solvers, and that a proof does not need: the encoding without them has more behaviors than the model, so what holds of the one holds of the other.
A system is therefore first built without them. A counterexample found on it, to a property whose cone of influence they would constrain, may rely on an infinite container: it is held back, and checked on the system with the constraints, sliced to the property, for one with the same inputs, which is reported instead if found in time. Otherwise the engines run again on the system built with the constraints, with what they had established carried over (see InvarManager and Kind2Flow); this is not an analysis of its own. From then on, every system built for the same top system has them.
This module keeps the top systems whose systems have the constraints, the systems that were built without some, and the request made by a counterexample in the analysis under way.
val enabled : Scope.t -> boolWhether the systems built for the top system top have the finiteness constraints of their containers
val enable : Scope.t -> unitGive the finiteness constraints of their containers to the systems built from now on for the top system top
with_enabled f is f (), where the systems built in the calling domain have the finiteness constraints whatever their top system: for the check of a counterexample found without them
Forget the request, and the time spent checking counterexamples: the engines are about to run on a system
Whether the counterexamples of the round may still be checked on the system with the finiteness constraints, rather than the engines running again on it
Count the time spent checking a counterexample on the system with the finiteness constraints
Request that the engines run again on the system built with the finiteness constraints, for the counterexample to a property that may rely on an infinite container