summaryrefslogtreecommitdiff
path: root/BFF.agda
AgeCommit message (Collapse)Author
2019-09-29port to agda/2.6.0.1 and agda-stdlib/1.1Helmut Grohne
* Data.Vec.lookup changed parameter order. * A number of symbols were moved from Data.Maybe to submodules. * In a number of occasions, agda no longer figures implicit arguments and they had to be made explicit. * We can no longer use heterogeneous proofs inside equational reasoning for propositional equality. Use heterogeneous equational reasoning. * Stop importing proof-irrelevance as that would require K.
2018-11-25port to agda/2.5.4.1 and agda-stdlib/0.17Helmut Grohne
2015-06-09drop barred members from GetTypesHelmut Grohne
These became duplicates of their non-barred counterparts.
2014-04-03drop PartialShapeVecHelmut Grohne
One can use PartialShapeShape instead, so there is limited utility for this type. It is not used directly and there also is no PartialVecShape.
2014-03-10also allow Shaped types for the viewHelmut Grohne
Albeit long, this commit is relatively boring.
2014-03-10implement a bff on a shaped source typeHelmut Grohne
Add IsShaped and Shaped records describing shapely types as in Jay95. Implement bff on Shaped and rewrite PartialVecVec to use the vector shape retaining all proofs on the vector implementation.
2014-03-07use allFin rather than tabulate idHelmut Grohne
2014-02-26remove the sequenceV call from bffHelmut Grohne
This allows bff to be more precise with regard to its failure modes, even though we are not yet making use of that projected precision. It allows inserting a default value for entries that could not be recovered in a shape changing update as described in VoigtlaenderHMW13.
2014-02-17Merge branch feature-partial-getlen into masterHelmut Grohne
It allows defining get functions that are only defined for some vector lengths. It retains backwards compatibility with the previous state via a VecVec compatibility module. The biggest benefit is that now standard library functions such as tail, take and drop can be passed to bff. Conflicts: heavy BFF.agda (imports, bff type clash) Bidir.agda (imports, heavy bff type clash in theorem-{1,2} and lemma-get-mapMV) Generic.agda (imports) Precond.agda (imports, bff type clash in assoc-enough)
2014-02-07allow shape shape updates in bffHelmut Grohne
Unlike the original version in VoigtlaenderHMW13, we do not request an sput : ℕ → ℕ → Maybe ℕ function for determining the updated source shape from the original source and updated view shape. Instead we ask the caller directly to provide the result of sput together with a proof that its getlen matches with the provided, updated view. The precondition assoc-enough is not enriched in this way and still requires a non-changing shape. I.e. it says what it said before.
2014-02-05be more precise about which lookups we useHelmut Grohne
2014-02-04remove unused importsHelmut Grohne
Most of the became unused by using the convenience functions introduced in the parent commit.
2014-02-04add convenience members to PartialVecVec.GetHelmut Grohne
2014-02-04Merge branch feature-get-record into feature-partial-getlenHelmut Grohne
These two features heavily interconnect. As such it makes sense to integrate them properly. This non-trivial merge does that work. Compared to feature-partial-getlen a few definitions moved from FreeTheorems.agda to GetTypes.agda. Many types changed compared to both branches. Conflicts: BFF.agda Bidir.agda FreeTheorems.agda Precond.agda conflict in GetTypes.agda not detected by merge
2014-01-30make the getlen functions explicit in PartialVecBFFHelmut Grohne
There is no way for Agda to infer these functions or even the intended index Setoid, so making these explicit is rather required.
2014-01-30express VecBFF via PartialVecBFFHelmut Grohne
2014-01-30allow importing of Bidir without any postulatesHelmut Grohne
2014-01-30pass get functions as recordsHelmut Grohne
This allows passing both getlen and get as a single parameter. It also allows to make the free theorem a prerequisite instead of a postulate.
2014-01-28define bff on a partial getlenHelmut Grohne
The representation chosen is to give both an injection gl₁ and a function gl₂ (formerly getlen), such that by choosing a non-identity for gl₁ partiality of getlen can be expressed. An alternative would have been to allow getlen to return a Maybe ℕ and have get return maybe (Vec A) ⊤ (getlen n) thus sending all inputs for which getlen yields nothing to tt. It seems that while there is no way to obtain a such a getlen predicate from an arbitrary index Setoid I, it should be possible to manufacture a Setoid from a predicate. Thanks to Stefan Mehner for the insightful discussion.
2014-01-27Merge branch feature-deleteHelmut Grohne
Most conflicts stem from varying imports or added functions and a take-both approach merges them. A notable exception is theorem-2, where a new result sequence-cong was required. Apart from that, theorem-2 could be taken almost verbatim from feature-delete albeit its type coming from feature-decsetoid. Conflicts: Bidir.agda FinMap.agda Generic.agda Precond.agda
2014-01-23generalize BFF and theorem-2 to arbitrary SetoidsHelmut Grohne
Since the generalization of lemma-checkInsert-restrict there is nothing to show for theorem-1. So everything works with Setoids now yielding the same results as the paper proofs.
2014-01-17generalize checkInsert to arbitrary SetoidsHelmut Grohne
This is another step towards permitting arbitrary Setoids in bff.
2013-12-17refactor to get rid of FinMap without Maybe entirelyHelmut Grohne
The union was the only user of this type and now it uses only partial mappings. So drop remaining uses of FinMap and make everything work with FinMapMaybe instead.
2013-12-17update bff implementation to use deleteHelmut Grohne
In the presence of shape-changing updates, bff needs to shrink one of the mappings before unifying them. As long the shape does not change, the union becomes a disjoint union. With this insight we can adapt the proof of theorem-1 using the adapted lemma-disjoint-union. Unfortunately theorem-2 requires more work and assoc-enough becomes non-trivial due to the introduction of mapMV.
2013-12-16get rid of the ListBFF implementationHelmut Grohne
It is unused, has no proofs and starts to get into the way of refactoring the union function type.
2013-07-21import _>>=_ and fmap from Data.MaybeHelmut Grohne
Also rename fmap to _<$>_ to match Agda naming conventions. The imported _>>=_ appears to have different binding, so some braces were necessary.
2012-10-22finally parameterize CheckInsertHelmut Grohne
Also adapt depending modules. Long lines generally become shorter. The misleading name "EqInst" (hiding the decidability) got discarded.
2012-10-22now parameterize BFFHelmut Grohne
And update Bidir and Precond, cause they import BFF.
2012-10-05move all postulates to one moduleHelmut Grohne
This should make it easier to see what is assumed.
2012-10-05remove VecRevBFFHelmut Grohne
The case is not interesting, because it is too restricted. The defined get-type requires a bijection between input length and output length. Since it requires polymorphism we get a reverse get-len via free theorems and both compositions are required to be identities. Thus the case is restricted without providing new insights.
2012-09-27move definition of get-type to BFF and use it everywhereHelmut Grohne
2012-06-19third definition of bffHelmut Grohne
It is a definition based on Vec but with less assumptions. The VecBFF has therefore been renamed to VecRevBFF. VecBFF uses get : \forall n \exists m -> Vec A n -> Vec a m VecRevBFF uses get : \forall m \exists n -> Vec A n -> Vec a m
2012-06-05make the Vec bff more similar to the List versionHelmut Grohne
2012-06-05define a bff over VecHelmut Grohne
2012-06-05move bff and friends to submodule ListBFFHelmut Grohne