Structures For Tracking a Computation's Oracle Queries #
This file defines types like QueryLog and QueryCache for use with
simulation oracles and implementation transformers defined in the same directory.
Type to represent a cache of queries to oracles in spec.
Defined to be a function from (indexed) inputs to an optional output.
Equations
Instances For
Equations
Add a index + input pair to the cache by updating the function (wrapper around Function.update)
Equations
Instances For
Simple wrapper in order to introduce the Monoid structure for countingOracle.
Marked as reducible and can generally be treated as just a function.
idx gives the "index" for a given input
Equations
Instances For
Equations
Instances For
Log of queries represented by a list of dependent product's tagging the oracle's index.
(t : spec.Domain) × (spec.Range t) is slightly more restricted as it doesn't
keep track of query ordering between different oracles.
Equations
Instances For
Query log with a single entry.
Equations
Instances For
Update a query log by adding a new element to the appropriate list. Note that this requires decidable equality on the indexing set.
Equations
Instances For
Equations
Get all the queries with inputs satisfying p
Equations
Instances For
Count the number of queries with inputs satisfying p.
Equations
Instances For
Check if an element was ever queried in a log of queries. Relies on decidable equality of the domain types of oracles.
Equations
Instances For
Get only the portion of the log for queries in spec₁.
Equations
Instances For
Get only the portion of the log for queries in spec₂.
Equations
Instances For
View a log for spec₁ as one for spec₁ ++ₒ spec₂ by inclusion.
Equations
Instances For
View a log for spec₂ as one for spec₁ ++ₒ spec₂ by inclusion.