summaryrefslogtreecommitdiff
path: root/d0/ecc51f0301931c74d80f67e5466593f59e4b99
blob: 7df446b7b2951a854812c7d4ee2279a0f5173237 (plain)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
Return-Path: <clarkmoody@gmail.com>
Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])
 by lists.linuxfoundation.org (Postfix) with ESMTP id 56301C0052
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Nov 2020 15:43:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by silver.osuosl.org (Postfix) with ESMTP id 220C52E16B
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Nov 2020 15:43:40 +0000 (UTC)
X-Virus-Scanned: amavisd-new at osuosl.org
Received: from silver.osuosl.org ([127.0.0.1])
 by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id O+xdFEulcX2W
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Nov 2020 15:43:37 +0000 (UTC)
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6
Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com
 [209.85.210.43])
 by silver.osuosl.org (Postfix) with ESMTPS id 3394F203E6
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Nov 2020 15:43:37 +0000 (UTC)
Received: by mail-ot1-f43.google.com with SMTP id f12so2575520oto.10
 for <bitcoin-dev@lists.linuxfoundation.org>;
 Wed, 25 Nov 2020 07:43:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=clarkmoody-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=BA4EeHRY2voIKMT1MVsEFYPNsJiDERu/TmIQM7HfvPw=;
 b=BHMsgy+sRdNxVXTUM7mq9LhuxyKBlzD6w99RTqv+3lSLEht8+fir/L2jsYbHFLP559
 qI6J3OOpNOuzdL84jcgn0DB6fw2aBcSSeRRJ8WzVPuBGNiOUShos0vq+2w1RdWl9eWzq
 20YA/hG7Ql92ruDLlAU7bjDzUPJbKRvd7f5J1mZA1VuNdy1ORq7NtrHgJi7Gx/HZ6Rz5
 nmg0+ebE4bTXAaI9SK2/cjjIxeGjvWS3TQad/vW+dNz63xpfMFFNtLFAEogF4qGv2XAw
 As4fk3JO9xvUWhYHCAkHe11XwBK90KHoxJoGtwLmjHdJC7fpahzi+jbO0EKYMjg2hVki
 qJwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=BA4EeHRY2voIKMT1MVsEFYPNsJiDERu/TmIQM7HfvPw=;
 b=PyBpyrsMddUHry8a5NbEmvkqIDeFj2Agd0DUgHabrhbAK0E6G2PAIHPEslc4JCIxMk
 87drThH8Vq/WBX3kxPOTj34YCgkQ7a9byMG6e1Zot965ejk5I1KQGvKGrXXKvRTsNeIr
 bl0IlSRgepQsIdePKjmheL+EPNr8Rskf9CHBtd4Xvi/G72+YP2NAiMSRf/GzSmW7a2iT
 9EVGqqo3ipbf1or/u7AAjIfv79LkRTX+EkMfV4cqSSfqoihTtBqznSX2BRZ3JDA49e61
 O/S8JZVcMpXg34iz2LFQgPfbIOsuw0Hw7ySxua9OrGnwhg/bOgWHp4frnrcy3bBtkhvv
 qhhw==
X-Gm-Message-State: AOAM531KqVNS5kykGkrB4AmWfH3zPQWk+g4TKQ+Uv0ZOTJuo1gO07r68
 dFiTrWTG3XSzMLAv8jcI3YfB6t7IJAtIROjrgJQ=
X-Google-Smtp-Source: ABdhPJxbFhZiWaf/niopeLmm0sRlWjDBLnfF4ah/RiX9IRwVPIa3LuauiutOYINxT+d0Gr4pJxZRGLQdj36c/KfybGk=
X-Received: by 2002:a05:6830:3109:: with SMTP id
 b9mr3292785ots.364.1606319016390; 
 Wed, 25 Nov 2020 07:43:36 -0800 (PST)
MIME-Version: 1.0
References: <20201125121555.49565b3c@simplexum.com>
In-Reply-To: <20201125121555.49565b3c@simplexum.com>
From: Clark Moody <clark@clarkmoody.com>
Date: Wed, 25 Nov 2020 09:43:10 -0600
Message-ID: <CAHGSxGvqAwWQS+R5x9zMYR0VjL598g2vL+erxFeoaseJvfpBfg@mail.gmail.com>
To: Dmitry Petukhov <dp@simplexum.com>, 
 Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: multipart/alternative; boundary="0000000000005e337e05b4f04a56"
X-Mailman-Approved-At: Wed, 25 Nov 2020 15:44:50 +0000
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 15:43:40 -0000

--0000000000005e337e05b4f04a56
Content-Type: text/plain; charset="UTF-8"

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?


-Clark


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
>

--0000000000005e337e05b4f04a56
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:tahoma,s=
ans-serif;font-size:small;color:#000000">Thanks for this! I can&#39;t comme=
nt on the correctness of your implementation, but I really appreciate the i=
dea and effort.<br></div><div class=3D"gmail_default" style=3D"font-family:=
tahoma,sans-serif;font-size:small;color:#000000"><br></div><div class=3D"gm=
ail_default" style=3D"font-family:tahoma,sans-serif;font-size:small;color:#=
000000">By chance, did you come across any other spec definitions in altern=
ate formal grammars?<br clear=3D"all"></div><div><div dir=3D"ltr" class=3D"=
gmail_signature" data-smartmail=3D"gmail_signature"><div><br></div><div><br=
></div><div>-Clark</div><div></div></div></div><br></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 25, 2020 at =
5:35 AM Dmitry Petukhov via bitcoin-dev &lt;<a href=3D"mailto:bitcoin-dev@l=
ists.linuxfoundation.org">bitcoin-dev@lists.linuxfoundation.org</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have creat=
ed a formal specification of Miniscript [1] using<br>
the specification language of Alloy analyzer [2]<br>
<br>
Link: <a href=3D"https://github.com/dgpv/miniscript-alloy-spec" rel=3D"nore=
ferrer" target=3D"_blank">https://github.com/dgpv/miniscript-alloy-spec</a>=
<br>
<br>
Possible uses for the spec:<br>
<br>
- Implementing Miniscript libraries, as additional reference that might<br>
=C2=A0 be easier to navigate than prose spec<br>
<br>
- Generating test cases for implementations, although currently this<br>
=C2=A0 will be a manual process due to the tools limitation (can be overcom=
e<br>
=C2=A0 with GUI automation)<br>
<br>
- Checking the implementation against the spec, by writing a program<br>
=C2=A0 that would generate Alloy .als files from the data structures of the=
<br>
=C2=A0 implementation, and then checking these files in Alloy<br>
<br>
- Extending or amending Miniscript, if the need arise. Having<br>
=C2=A0 extenstions and changes checked (with bounds) against a spec should<=
br>
=C2=A0 help catch inconsistencies<br>
<br>
- Exploring the properties of Miniscript<br>
<br>
If you have an interest in Miniscript, please consider looking at the<br>
spec and share your ideas.<br>
<br>
The spec may contain mistakes, as it was not yet checked against any<br>
implementation, it was only checked for consistency using its own<br>
predicates, with the scope of up to 8 nodes.<br>
<br>
If you notice a mistake or inconsistency, please submit an issue on<br>
github (or communicate this in other ways)<br>
<br>
[1] <a href=3D"http://bitcoin.sipa.be/miniscript/" rel=3D"noreferrer" targe=
t=3D"_blank">http://bitcoin.sipa.be/miniscript/</a><br>
[2] <a href=3D"https://alloytools.org/" rel=3D"noreferrer" target=3D"_blank=
">https://alloytools.org/</a><br>
_______________________________________________<br>
bitcoin-dev mailing list<br>
<a href=3D"mailto:bitcoin-dev@lists.linuxfoundation.org" target=3D"_blank">=
bitcoin-dev@lists.linuxfoundation.org</a><br>
<a href=3D"https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev" =
rel=3D"noreferrer" target=3D"_blank">https://lists.linuxfoundation.org/mail=
man/listinfo/bitcoin-dev</a><br>
</blockquote></div>

--0000000000005e337e05b4f04a56--