1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
Return-Path: <dp@simplexum.com>
Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])
by lists.linuxfoundation.org (Postfix) with ESMTP id 4C21BC0052
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 25 Nov 2020 16:05:03 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
by fraxinus.osuosl.org (Postfix) with ESMTP id 3B99586E89
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 25 Nov 2020 16:05:03 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from fraxinus.osuosl.org ([127.0.0.1])
by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id azk-BakPk4jI
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 25 Nov 2020 16:05:02 +0000 (UTC)
X-Greylist: from auto-whitelisted by SQLgrey-1.7.6
Received: from mail.ruggedbytes.com (mail.ruggedbytes.com [88.99.30.248])
by fraxinus.osuosl.org (Postfix) with ESMTPS id 5D3BD86E36
for <bitcoin-dev@lists.linuxfoundation.org>;
Wed, 25 Nov 2020 16:05:02 +0000 (UTC)
Received: from mail.ruggedbytes.com (localhost [127.0.0.1])
by mail.ruggedbytes.com (Postfix) with ESMTPS id 75EFE260023D;
Wed, 25 Nov 2020 16:04:59 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simplexum.com;
s=mail; t=1606320299;
bh=WWvk416jL8ORb1H1RYoie+23VYhfT67mCmK/8LmwvrE=;
h=Date:From:To:Cc:Subject:In-Reply-To:References;
b=YlxnjY05mk7vJ03EEG3s0UiZ7ct+hBhGoAT2/c8fD4tgWaqAjEEtYkH5HTfZyi7jj
jhOy2sn6y+v44AiAlHI72oP/UUZSZdYeQ2WGWpOLhXL2oRPvO9WCO40oLVj6B8FkEc
eGy8j6fy1JCSAhYO+GrbNyhUthn1EpkQqtQBOc2Y=
Date: Wed, 25 Nov 2020 17:09:46 +0100
From: Dmitry Petukhov <dp@simplexum.com>
To: Clark Moody <clark@clarkmoody.com>
Message-ID: <20201125170946.7893f87a@simplexum.com>
In-Reply-To: <CAHGSxGvqAwWQS+R5x9zMYR0VjL598g2vL+erxFeoaseJvfpBfg@mail.gmail.com>
References: <20201125121555.49565b3c@simplexum.com>
<CAHGSxGvqAwWQS+R5x9zMYR0VjL598g2vL+erxFeoaseJvfpBfg@mail.gmail.com>
Organization: simplexum.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Mailman-Approved-At: Wed, 25 Nov 2020 16:08:35 +0000
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] Formal specification of Miniscript in Alloy
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Nov 2020 16:05:03 -0000
=D0=92 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.
>=20
> 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:
>=20
> > 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
> > =20
|