-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
State of the coq implementation of Michelson? #3
Comments
As you say the language has changed a bit since this work was done. I would start from the master branch of this repo and update it. For the Michelson language, look at the "gas à tous les étages" branch which makes all calls asynchronous. |
@dheeraj-chakilam I'm interested in doing the same. I'll be happy to contribute as well. |
Hi, I'm also interesting in helping with this. Where are the formal semantics for Michelson defined in the "gas à tous les étages" branch? Also, is this repository a clone for a GitLab repository or is it independent? |
The gas parameters are very rough. The best formal semantic we currently have is http://doc.tzalpha.net/whitedoc/michelson.html This repo is independent from the Gitlab repo |
The most advanced branch in terms of complete datatypes (more opcodes) and formalization, (e.g. correctness lemmas) is https://github.com/tezos/tezoscoq/tree/new_map_implementation . However as Arthur pointed out the language has changed quite a bit since then. I don't have the time to do it right this moment but if someone is interested, I could explain how the code is structured and generally help out. |
Thanks @tomsib2001 I'm curious to know the motivation for using ssreflect in the development? |
Well it's a matter of personal preferences, I suppose. My own Coq education was done in the ssreflect community and I am more productive using it. Moreover, the |
Thanks, that's what I was wondering. mathcomp is a big dependency and I'm not too familiar with ssreflect, but I just wanted to get a sense of the options. It's probably fine either way but I'll try and familiarize myself with ssreflect. |
Let me make a couple of observations: |
As I said, I'm not against it :) I'm just not educated. I didn't realize that ssreflect was in recent versions of Coq -- I was only trying to get the branch @tomsib2001 mentioned to compile and the first thing of course was to get those to work:
It probably didn't help that I switched to 8.8 already -- I was able to get everything to compile with a fresh checkout of mathcomp (it isn't in opam yet as far as I can tell). Then there are lots of other questions such as:
is |
The type |
Thanks @tomsib2001, that's helpful. In part I'm asking because I'm hoping to use tezoscoq (or a variant of it) as a target for a compiler so those questions will come up down the road (I'm using |
I meant proving properties of smart contracts which involve computations on integers; However, I'm sure there are people who think that all these things can be done just as easily and directly using vanilla Coq; this is just my biased vision. |
This is also very helpful for subset types. You don't need axioms to work with subset types if you have decidable equality. |
I can relate to that part at least: "Moreover, most lemmas are stated as equalities between booleans (rather than implications or equivalences between Prop's) which makes it easy to chain their application using rewrite. " 😀 I will try and find some time getting familiar with mathcomp... About the way the code is organized, are any of the following correct:
|
Yes, I think |
I'm not very familiar with ssreflect or mathcomp either. Is it possible to use the
However, I can install |
@manvithn I'm guessing coq-mathcomp-* is the current release? I saw opam contributions of those packages for coq 8.8 today so it's possible that it works. Otherwise, mathcomp compiled from the source for me with 8.8 as well -- albeit with tons of warnings. |
@CoinFormalizer @anton-trunov @benoitrazet while I have you, do you have any objections to releasing the code in this repo under an MIT license? If not I'll upload a license.md file |
No objection, I approve this release. |
@murbard No objections as well, feel free to release. |
@cmangin sale question |
No objection, any license will do for me. |
That's completely fine by me. |
👍 |
Hello! I'd like to prove correctness of a few simple Michelson programs in Coq. Since the language specification has changed in the last two years, (i) which branch should I be working with? (ii) what current language constructs are correctly defined in Coq as of now?
The text was updated successfully, but these errors were encountered: