Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy tc #633

Draft
wants to merge 90 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a8975fc
TC: examples for subtypes
strub Jul 6, 2021
18abf81
Merge branch '1.0' into deploy-tc
strub Sep 7, 2021
37892ab
parsing entry for tc parameters
strub Sep 7, 2021
37ed00f
It compiles
AntoineSere Sep 13, 2021
51e9f8d
Parser error
AntoineSere Sep 16, 2021
ad321e5
It compiles, need to modify parser
AntoineSere Sep 16, 2021
d5beecf
Pierre-Yves fixed parser and other stuff
AntoineSere Sep 16, 2021
64d401f
Added error message when different number of type arguments in typeclass
AntoineSere Sep 20, 2021
d229960
Pre checkout
AntoineSere Oct 5, 2021
6b79bbb
Added everything
AntoineSere Nov 5, 2021
0bae431
strub Oct 11, 2021
6432c4c
strub Oct 18, 2021
c2ed9ae
ask for tc axioms realization when declaring an instance
strub Nov 5, 2021
a420ad5
check parent constraint when adding a new tc instance
strub Nov 5, 2021
1fab9ba
Added everything again
AntoineSere Nov 8, 2021
89fea98
api for tc resolution + inclusion in EcUnify
strub Nov 8, 2021
9303f9a
generalize unification API for external constraints
strub Nov 15, 2021
cc70db8
type class inference
strub Nov 15, 2021
d075d95
Merge branch '1.0' into deploy-tc
strub Nov 16, 2021
6a7f430
added inherited instances
AntoineSere Nov 16, 2021
0a1eead
Merge branch 'deploy-tc' of github:EasyCrypt/easycrypt into deploy-tc
AntoineSere Nov 16, 2021
d68d4cc
fix merge (section / typeclass)
strub Nov 16, 2021
c13bc35
fix type classes resolution for type variables
strub Nov 16, 2021
9c8e467
fix instanciation op/axioms in tc instances
strub Nov 16, 2021
b4f19d5
better error messages for TC
strub Nov 16, 2021
674e283
TC: fix parsing
strub Nov 16, 2021
2ce431b
better formatting of error msgs
strub Nov 16, 2021
8fd25e4
strub Nov 16, 2021
619941e
Merge branch '1.0' into deploy-tc
strub Nov 17, 2021
dd3f68e
Cleaned up examples/typeclass.ec
AntoineSere Nov 17, 2021
1d6dc3d
Bugs found
AntoineSere Nov 19, 2021
54bb1fc
WIP
strub Nov 19, 2021
1b3a699
Merge branch '1.0' into deploy-tc
strub Nov 19, 2021
6b929c7
fix op types in typeclasses instances
strub Nov 19, 2021
6561b69
prune virtual tc
strub Nov 19, 2021
a1342af
typeclass.ec comments
AntoineSere Nov 21, 2021
f36be52
Merge branch 'deploy-tc' of github:EasyCrypt/easycrypt into deploy-tc
AntoineSere Nov 21, 2021
7e9fa8b
add tc witnesses info in operators
strub Nov 21, 2021
07dc332
Added normalize to typeclass
AntoineSere Nov 24, 2021
64a620f
Added typeclass examples modifications
AntoineSere Nov 30, 2021
bb7e662
Fails gracefully when applying a tactic on a completed proof.
Feb 16, 2022
2aab4c9
Unfold non-transparent operators in `case` & `elim`.
Feb 16, 2022
741c078
Merge branch '1.0' into deploy-tc
strub Mar 1, 2022
89a0c20
Working on typeclass examples
AntoineSere Apr 8, 2022
47fdc0a
Merge branch 'deploy-tc' of github:EasyCrypt/easycrypt into deploy-tc
AntoineSere Apr 8, 2022
4570b19
Merge branch '1.0' into deploy-tc
AntoineSere Apr 8, 2022
a98707d
Merge remote-tracking branch 'origin/main' into deploy-tc
AntoineSere Apr 8, 2022
9c584d7
Printing typeclasses partly done
AntoineSere Apr 20, 2022
d61cdfc
Added ppx deriving
AntoineSere Apr 20, 2022
9f4d3bc
Printing typeclass issue
AntoineSere Apr 28, 2022
1e29119
fix printing of type-classes names
strub Apr 28, 2022
f01c06d
record typeclass instances operators
strub Apr 28, 2022
f58252d
EcUnify.hastc returns the instance operators
strub Apr 28, 2022
9af95ee
Added modification to susbt
AntoineSere May 9, 2022
c5682fe
Bump Why3 version from 1.4.x to 1.5.0
strub May 5, 2022
37dbab8
WIP
strub May 9, 2022
8da9dfc
added operators in tcsyms
AntoineSere May 10, 2022
8033da4
Revert "added operators in tcsyms"
strub May 11, 2022
b1e4ba7
Revert "WIP"
strub May 11, 2022
02f8378
Revert "Added modification to susbt"
strub May 11, 2022
2505d15
TC: reduction/cnv + various bug fixes
strub May 12, 2022
bc83128
nits
strub May 12, 2022
2aa276b
Pre merge
AntoineSere Oct 4, 2022
1437df9
Merged
AntoineSere Oct 4, 2022
ab2599f
Issue after merge in compilation, ppx_deriving added to nix
AntoineSere Oct 4, 2022
c06774c
Merge branch 'main' into deploy-tc
strub Aug 31, 2023
e00cd3d
Merge branch 'deploy-tc' of github.com:EasyCrypt/easycrypt into deplo…
strub Aug 31, 2023
2078454
leftovers
strub Aug 31, 2023
33e61af
[WIP] typeclasses, finding issues
fdupress Jan 12, 2024
bede2b2
Merge branch 'main' into deploy-tc
strub Jan 16, 2024
03f5769
Merge remote-tracking branch 'origin/main' into deploy-tc
strub Apr 5, 2024
5f6d579
[subst]: fix name capture
strub May 3, 2024
6355223
Merge branch 'main' into deploy-tc
strub May 13, 2024
89aaa44
TC Refactoring.
strub May 17, 2024
7eec7c0
Merge remote-tracking branch 'origin/main' into deploy-tc
strub May 18, 2024
9f80bc0
ml-kem: jobs=1
strub May 18, 2024
dbf6a70
Merge branch 'main' into deploy-tc
strub Sep 26, 2024
43b97c2
Merge remote-tracking branch 'origin/main' into deploy-tc
strub Dec 3, 2024
8bf7a6c
nits
strub Dec 3, 2024
45e0850
Merge remote-tracking branch 'origin/main' into deploy-tc
strub Jan 6, 2025
6eddaa5
create TC univar
strub Jan 7, 2025
8204148
uni -> tyuni/tcuni
strub Jan 7, 2025
67271de
more work on tc unification variables
strub Jan 7, 2025
c77f666
WIP on TC resolution
strub Jan 7, 2025
ac20674
WIP: section & tc instance
strub Jan 8, 2025
ef0105a
named TC instances
strub Jan 8, 2025
703e44e
reduce TCI by default
strub Jan 8, 2025
6342276
WIP: reduction+matching
strub Jan 8, 2025
ae7a987
TCI resolution for type variables
strub Jan 8, 2025
60a5603
progressing on dependent type-classes + general instance inference
strub Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
(why3 (and (>= 1.7.0) (< 1.8)))
yojson
(zarith (>= 1.10))
))
)
)
35 changes: 35 additions & 0 deletions examples/tcstdlib/TcMonoid.ec
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require import Int.

(* -------------------------------------------------------------------- *)
type class monoid = {
op idm : monoid
op (+) : monoid -> monoid -> monoid

axiom addmA: associative (+)
axiom addmC: commutative (+)
axiom add0m: left_id idm (+)
}.

(* -------------------------------------------------------------------- *)
section.
declare type m <: monoid.

lemma addm0: right_id idm (+)<:m>.
proof. by move=> x; rewrite addmC add0m. qed.

lemma addmCA: left_commutative (+)<:m>.
proof. by move=> x y z; rewrite !addmA (addmC x). qed.

lemma addmAC: right_commutative (+)<:m>.
proof. by move=> x y z; rewrite -!addmA (addmC y). qed.

lemma addmACA: interchange (+)<:m> (+).
proof. by move=> x y z t; rewrite -!addmA (addmCA y). qed.

lemma iteropE n (x : m): iterop n (+) x idm = iter n ((+) x) idm.
proof.
elim/natcase n => [n le0_n|n ge0_n].
+ by rewrite ?(iter0, iterop0).
+ by rewrite iterSr // addm0 iteropS.
qed.
end section.
Loading