public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Dmitry Petukhov <dp@simplexum.com>
To: Clark Moody <clark@clarkmoody.com>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Formal specification of Miniscript in Alloy
Date: Wed, 25 Nov 2020 17:09:46 +0100	[thread overview]
Message-ID: <20201125170946.7893f87a@simplexum.com> (raw)
In-Reply-To: <CAHGSxGvqAwWQS+R5x9zMYR0VjL598g2vL+erxFeoaseJvfpBfg@mail.gmail.com>

В Wed, 25 Nov 2020 09:43:10 -0600
Clark Moody <clark@clarkmoody.com> wrote:

> Thanks for this! I can't comment on the correctness of your
> implementation, but I really appreciate the idea and effort.
> 
> By chance, did you come across any other spec definitions in alternate
> formal grammars?

As far as I know, this is the first formal spec for Miniscript.

I also considered using the K framework [1] for the task (it would
also give the parser out of the box), but at the time it did not have
the reference documentation, only tutorials on their site. It seems that
they have published the new site, with more documentation.

I am satisfied with how Alloy spec turned out, though - in my opinion,
the node definitions in the spec are very readable.

[1] https://kframework.org/


> On Wed, Nov 25, 2020 at 5:35 AM Dmitry Petukhov via bitcoin-dev <
> bitcoin-dev@lists.linuxfoundation.org> wrote:
> 
> > I have created a formal specification of Miniscript [1] using
> > the specification language of Alloy analyzer [2]
> >
> > Link: https://github.com/dgpv/miniscript-alloy-spec
> >
> > Possible uses for the spec:
> >
> > - Implementing Miniscript libraries, as additional reference that
> > might be easier to navigate than prose spec
> >
> > - Generating test cases for implementations, although currently this
> >   will be a manual process due to the tools limitation (can be
> > overcome with GUI automation)
> >
> > - Checking the implementation against the spec, by writing a program
> >   that would generate Alloy .als files from the data structures of
> > the implementation, and then checking these files in Alloy
> >
> > - Extending or amending Miniscript, if the need arise. Having
> >   extenstions and changes checked (with bounds) against a spec
> > should help catch inconsistencies
> >
> > - Exploring the properties of Miniscript
> >
> > If you have an interest in Miniscript, please consider looking at
> > the spec and share your ideas.
> >
> > The spec may contain mistakes, as it was not yet checked against any
> > implementation, it was only checked for consistency using its own
> > predicates, with the scope of up to 8 nodes.
> >
> > If you notice a mistake or inconsistency, please submit an issue on
> > github (or communicate this in other ways)
> >
> > [1] http://bitcoin.sipa.be/miniscript/
> > [2] https://alloytools.org/
> > _______________________________________________
> > bitcoin-dev mailing list
> > bitcoin-dev@lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> >  



      reply	other threads:[~2020-11-25 16:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25 11:15 [bitcoin-dev] Formal specification of Miniscript in Alloy Dmitry Petukhov
2020-11-25 15:43 ` Clark Moody
2020-11-25 16:09   ` Dmitry Petukhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201125170946.7893f87a@simplexum.com \
    --to=dp@simplexum.com \
    --cc=bitcoin-dev@lists.linuxfoundation.org \
    --cc=clark@clarkmoody.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox