Extends TemplateGenerator with functionalities for checking whether ADTs need to be unrolled.
Extends TemplateGenerator with functionalities for checking whether ADTs need to be unrolled.
Note that the actual ADT unrolling takes place in TemplateGenerator.Builder.rec.
Represents an application of a first-class function in the unfolding procedure
Abstract templates
Abstract templates
Pre-compiled sets of clauses with extra bookkeeping information that enables efficient unfolding of function calls and applications. Template is a super-type for all such clause sets that can be instantiated given a concrete argument list and a blocker in the decision-tree.
Template generator that ensures unroll call results are cached.
Template generator that ensures unroll call results are cached.
Represents a named function call in the unfolding procedure
Template used to unfold ADT closures that may contain functions.
Template used to unfold ADT closures that may contain functions.
Template instantiations
Template instantiations
Template instances, when provided with concrete arguments and a blocker, will generate three outputs used for program unfolding: - clauses: clauses that will be added to the underlying solver - call blockers: bookkeeping information necessary for named function unfolding - app blockers: bookkeeping information necessary for first-class function unfolding
This object provides helper methods to deal with the triplets generated during unfolding.
Template used to unfold free symbols in the input expression.
Template used to unfold free symbols in the input expression.
Represents an equality relation between two instances of a given type
Extends TemplateGenerator with functionalities for checking whether tuples need to be unrolled.
Extends TemplateGenerator with functionalities for checking whether tuples need to be unrolled. This trait will typically be mixed in with the ADTUnrolling trait.
Extends TemplateGenerator with functionalities to accumulate the set of functions contained within a datastructure.
Extends TemplateGenerator with functionalities to accumulate the set of functions contained within a datastructure.
Template generator that generates clauses for ADT invariant assertion.
Template generator that generates clauses for ADT invariant assertion.
Template used to unfold adts returned from functions or maps.
Template used to unfold adts returned from functions or maps.
Represents an E-matching matcher that will be used to instantiate relevant quantified propositions
Represents the polarity of the quantification within the considered formula.
Represents the polarity of the quantification within the considered formula. Positive and negative polarity enable optimizations during quantifier instantiation.
Unknown polarity is treated conservatively (subsumes both positive and negative cases).
Represents a POTENTIAL application of a first-class function in the unfolding procedure
Represents a POTENTIAL application of a first-class function in the unfolding procedure
The equals condition guards the application for equality of the concrete caller with the provided template in order to perform dynamic dispatch.
Base trait for datatype unfolding template generators.
Base trait for datatype unfolding template generators.
This trait provides a useful interface for building datatype unfolding templates. The interesting override points are:
- unroll: determines whether a given type requires unfolding.
CachedUnrolling.unroll - Builder.rec: can be overriden to provide finer controll of what clauses should be generated during template construction. The Builder class itself can't be overriden, so one must be careful to use the overriding class when construction a template! We use a Builder class here so that the Builder.rec method can refer to the current Builder state while still providing an override point.
Represents the kind of instantiator (@see TypesTemplate) a given template info is associated to.
Represents the kind of instantiator (@see TypesTemplate) a given template info is associated to.
Semi-template used for inner-template equality
Semi-template used for inner-template equality
We introduce a structure here that resembles a Template that is instantiated ONCE when the corresponding template becomes of interest.
Represents a type unfolding of a free variable (or input) in the unfolding procedure
Represents a type unfolding of a free variable (or input) in the unfolding procedure
Represents the kind of datatype a given template is associated to.
Represents the kind of datatype a given template is associated to.
Base type for datatype unfolding templates.
Base type for datatype unfolding templates.
Unknown quantification polarity.
Unknown quantification polarity.
Instantiations of unknown polarity quantification with body
p
follows the schema:
q == (q2 && inst)
inst == (guard ==> p)
It is useful to keep the two clauses separate so that satisfying assignments can be
constructed where only certain inst
variables are falsified. This is used to enable
a powerful unrolling heuristic in the presence of both quantifiers and recursive functions.
p }}}
q == (q2 && inst)
inst == (guard ==> p)
It is useful to keep the two clauses separate so that satisfying assignments can be
constructed where only certain inst
variables are falsified. This is used to enable
a powerful unrolling heuristic in the presence of both quantifiers and recursive functions.
Template generator for CaptureTemplate instances.
Template generator for CaptureTemplate instances.
Generator for DatatypeTemplate instances.
Generator for DatatypeTemplate instances.
Template generator for InvariantTemplate instances.
Template generator for InvariantTemplate instances.
Constructor object for LambdaTemplate
Constructor object for LambdaTemplate
The apply methods performs some pre-processing before creating an instance of LambdaTemplate.
Sets up the relevant unfolding procedure for closure ordering
Sets up the relevant unfolding procedure for closure ordering
Sets up the relevant unfolding procedures for symbols that are free in the input expression
Sets up the relevant unfolding procedures for symbols that are free in the input expression
Sets up the relevant unfolding procedure for datatype invariant instantiation.
Sets up the relevant unfolding procedure for datatype invariant instantiation.