Re: [hackathon] Formal Languages at the Hackathon

Antoni Przygienda <prz@juniper.net> Wed, 06 November 2019 16:52 UTC

Return-Path: <prz@juniper.net>
X-Original-To: hackathon@ietfa.amsl.com
Delivered-To: hackathon@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 01C871208E6 for <hackathon@ietfa.amsl.com>; Wed, 6 Nov 2019 08:52:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dNZpO-ZiHwud for <hackathon@ietfa.amsl.com>; Wed, 6 Nov 2019 08:52:49 -0800 (PST)
Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 91CFC1208DC for <hackathon@ietf.org>; Wed, 6 Nov 2019 08:52:49 -0800 (PST)
Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xA6Gl3Kd022770; Wed, 6 Nov 2019 08:52:44 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=b/WQwvlFf6h9ipjWYLdJztY60cZSKLh344dHJqZjaM4=; b=fu0oSIaBcRPcKekt0PBEZqQkt8iC5s9N6KgBtOxJe4yZhBUBWbK5ZKHAOUbJlLdWAqC7 ZYAb05uhMosjDYSp6xFKo43sEk++vCnStQsBNm371gVm3mA00/zqIStaLWvG5F3lieGP oRNWix+b06oq3JnC0yGQa3VqQfqzPKoBLjlhkShJzjb1yMz/RaehONVnWVoJDOMlmuob Ps1NZysEhcDNoDzw0bmzvTqGF8cRXR6lKIRRL+nc36KhMT/58FL0QW3mwLKStDhTqMFJ li036LvD1B/QD6j2JX8yNUHP+GOxWm47nlq1ZjwByVtNaaYCypDusdpprh/4qCbHr6fv bw==
Received: from nam05-dm3-obe.outbound.protection.outlook.com (mail-dm3nam05lp2050.outbound.protection.outlook.com [104.47.49.50]) by mx0a-00273201.pphosted.com with ESMTP id 2w41vb80u4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Nov 2019 08:52:43 -0800
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T+vXY7wH+OrqJWpJrkaXQJO9G7MAxQs/PLmJcUrtgknqjTcl24sNFjslDqC2tiXcmdcKVu9TcHzeGtYptb+47EjYH9hBM5vm0Z5NVVhFuf2QQywi4GFNRd3WJdq7PUiCDk5nifLkNIN2srq13wUXEES399pm/napryZpZUY7Qem/TRTlCf2eewDs2p6hzzyRYl2JqXQ46efM46lxg5nZsOHebzTPyACfovVZx1znjFXoC8uR+SZ7vfPLR38TzfnbF6Kex6iKVqmdUq1fsRZBc8vN02u+L6/1+UgFQ0tLqsSq263QQNUAzOQuFvZSX1U5AwjBk90JYtrTES85DqTmQw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b/WQwvlFf6h9ipjWYLdJztY60cZSKLh344dHJqZjaM4=; b=JxUpRq4qKgbBj+n4nzkNFnZUvBUq8bx2hnAaVlSBemeeD9iHXdYGJA64LYo9nVLH/8BRx3OYjS1KRFsf101Cd87G0ZNaOsQViLM9h2QZt7TIUt8aRWBIKI35FsBxkKyPmAl5omHQ3Up0luBeuM/uYixSIZ1U62EEXKGyTfNeO4uOoTcAe4LmRMA8npSMMGytyYxFgL26ClK02+32ziuqkeho9EnYAUh0qyiUq3np48rvqj5o/Y714lGf7wh7tpQtCFIwtCIIlpJkhWcZS04WZT0lTJW/GyhPSyGdPDAHgf/0xJdi8GSEvRlaUKiPUqvMMFLx2twYsVtCWfSZYYAWKA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=juniper.net; dmarc=pass action=none header.from=juniper.net; dkim=pass header.d=juniper.net; arc=none
Received: from SN6PR05MB5613.namprd05.prod.outlook.com (52.135.109.221) by SN6PR05MB4893.namprd05.prod.outlook.com (52.135.117.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.16; Wed, 6 Nov 2019 16:52:41 +0000
Received: from SN6PR05MB5613.namprd05.prod.outlook.com ([fe80::1cff:aada:b864:8c83]) by SN6PR05MB5613.namprd05.prod.outlook.com ([fe80::1cff:aada:b864:8c83%7]) with mapi id 15.20.2430.020; Wed, 6 Nov 2019 16:52:41 +0000
From: Antoni Przygienda <prz@juniper.net>
To: Carsten Bormann <cabo@tzi.org>, "hackathon@ietf.org" <hackathon@ietf.org>
CC: Alvaro Retana <aretana.ietf@gmail.com>, Deborah Brungard <db3546@att.com>
Thread-Topic: [hackathon] Formal Languages at the Hackathon
Thread-Index: AQHVlIpUHHz09UBtGESbEgrp8q5at6d+R96A//+ODYA=
Date: Wed, 6 Nov 2019 16:52:41 +0000
Message-ID: <FF14A414-758A-462A-ADF4-3B6EF051FE32@juniper.net>
References: <4BD0608C-A277-4130-B85C-D7A75FAEFD8F@smcquistin.uk> <C464EE6D-3DF8-4101-AA26-BD38A61F8E7B@tzi.org>
In-Reply-To: <C464EE6D-3DF8-4101-AA26-BD38A61F8E7B@tzi.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels: MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_Enabled=true; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_Name=Juniper Business Use Only; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_Enabled=true; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_SiteId=bea78b3c-4cdb-4130-854a-1d193232e5f4; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_ContentBits=0; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_Method=Standard; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_ActionId=53cad70c-4a8c-4a2b-b5f9-0000a325acc5; MSIP_Label_9784d817-3396-4a4f-b60c-3ef6b345fe55_SetDate=2019-11-06T16:37:16Z;
user-agent: Microsoft-MacOutlook/10.1f.0.191103
x-originating-ip: [66.129.239.12]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 2a80cf52-7daa-476a-bb9c-08d762d9bd3d
x-ms-traffictypediagnostic: SN6PR05MB4893:
x-ms-exchange-purlcount: 10
x-microsoft-antispam-prvs: <SN6PR05MB48934E0001E10B629FA1C7EAAC790@SN6PR05MB4893.namprd05.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 02135EB356
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(396003)(136003)(376002)(346002)(199004)(189003)(51444003)(53754006)(66946007)(2616005)(478600001)(66446008)(6506007)(486006)(102836004)(6512007)(6306002)(5660300002)(81166006)(81156014)(316002)(8936002)(6246003)(86362001)(7736002)(305945005)(25786009)(3846002)(6116002)(6436002)(256004)(54906003)(14444005)(26005)(6486002)(229853002)(53546011)(14454004)(446003)(966005)(58126008)(8676002)(110136005)(66556008)(33656002)(71200400001)(99286004)(66066001)(71190400001)(91956017)(476003)(11346002)(2501003)(76176011)(76116006)(36756003)(64756008)(66476007)(2906002)(186003)(4326008); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR05MB4893; H:SN6PR05MB5613.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: uA7/sfgBTxS2bXJJgS7Uf1og5t7jg0sgUO0A9XxcKrux4a110xfyjlaPFtSLGL3QTKHx5yLexFQhibbG/tAanm5WBO/pRmi/dFqXr9xY1lGoiZzyzObJn6FyuHAo6zSQKuFuSTESU8Mdoc5B6AGRU9BCpiX4nA8TMEGXdVYoRoaoq1xHpumPOeI5pzjg2BTJLBZX13/Te+KkAzEO5mhVHRiXGL4R5J3vo4v/KyKeASk1Rf7OYuH2uW+r+BnkSnUpXcJsnsA/jh+z4nT3EvEYi3BDSibegEXBa5spGgdih0PS34+Y9NiC4S3qSODXhxV1hWusjU5px8l6v+PStkByDJFyUc0s8Tp0xV69nic/zg7tolrBsFIcMaLn9xqmYsbtnSGa++0HmWpdHURbtHB2D6334dO+bybZQPByimgYYw8Co1AKrDi10Y/TwVKATTVzmD+kvay5zkc69+3HP940rKYOHOt+/hE51g+TL3FLjMM=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-ID: <ADD912530A3AFE44A34BE552EDFF4813@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 2a80cf52-7daa-476a-bb9c-08d762d9bd3d
X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2019 16:52:41.7460 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 7BftlFqmJ0EFGjDQqY4Dum9b4tRit2o0m7WisRcZD9J2KKTKkOP3jAVtQLQlE80q
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR05MB4893
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-06_05:2019-11-06,2019-11-06 signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 bulkscore=0 mlxscore=0 adultscore=0 malwarescore=0 spamscore=0 priorityscore=1501 suspectscore=0 clxscore=1011 mlxlogscore=999 phishscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911060162
Archived-At: <https://mailarchive.ietf.org/arch/msg/hackathon/m4dIVQKXqVRIWSHBQwjTgK9m6bA>
Subject: Re: [hackathon] Formal Languages at the Hackathon
X-BeenThere: hackathon@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussion regarding past, present, and future IETF hackathons." <hackathon.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hackathon>, <mailto:hackathon-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hackathon/>
List-Post: <mailto:hackathon@ietf.org>
List-Help: <mailto:hackathon-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hackathon>, <mailto:hackathon-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Nov 2019 16:52:53 -0000

From practical experience (as in, implementing and interoping stuff through schema defined packet formats in a performance critical protocol) I think that it is most practical and  long-term productive to concentrate on a format IDL like yang-data or enhance GRPC or thrift with offset/size provisions to model such data. Trying to kow-tow to "human readers" sprinkling stuff full of natural language in ASCII pictures all over the document was a feasible technique when better tools did not exist and complexity was low and people were "reading the wire". Formalizing it further does IMO a long term disservice to IETF @ this point in time for several reasons. 

Having said that, I made exceedingly good experience working on implementation/interop of a whole protocol in Thrift which we chose for its extremely portable open source compiler, maturity, extensive language backend support and rich set of constructs available (maps of even structures to structures, differentiation between a set and a vector and so on). In fact, my view is that you want to train people to NOT look @ packet bits and count offsets to understand what's going on but serialized data is a "blob" on the wire that can be only read after an IDL is applied to decode it. 

As to "reserved", future extensibility and so on we thought through the issues and with versioning of schemas and couple rules this is entirely feasible. At least Thrift parser does reliably differentiate from IDL between optional, optional with default and mandatory fields which is all that is really needed as we verified. 

Schema in protocol spec appendix on https://datatracker.ietf.org/doc/draft-ietf-rift-rift/?include_text=1

BTW, an interesting problem is how we match a packet IDL onto registries. The IANA section you find in RIFT is entirely generated from the schema and IMO that's a viable approach (interesting topic is versioning of schema and how THAT interacts with registries ultimately). Ultimately I believe the IDL should be the source of truth and the registries should just point to schema elements and enforce registry allocation policies, ensure collision-free extension of schema and validate its versioning but not hold codepoints. 

Glad to talk more about it but I'm coming in Sat nite only ... 

--- tony 

On 11/6/19, 7:40 AM, "hackathon on behalf of Carsten Bormann" <hackathon-bounces@ietf.org on behalf of cabo@tzi.org> wrote:

    I’m sharing the below with t2trg as it appears to be highly related to some of our current work.
    
    I’d also like to point out that formal description techniques (FDT) have been used a lot at the IETF and the IRTF:
    
    * we know very well how to use ABNF (RFC 5234) for our text-based protocols.  We don’t really have a good way to work with multiple layers of ABNF, though; see the difference between RFC 5988 and RFC 8288 for some recent improvements (but the link between the layers is not formal).  ABNF tools exist for both checking ABNF specs and for automatically generating instances (examples).
    
    * specific areas have had their FDTs, e.g. RFC 4997 for ROHC, YANG for management, etc.  Specifically YANG is increasingly used not only for its original purpose, describing management information bases, but also for data on the wire (yang-data).  YOUPI [1] is an interesting YANG extension for describing arbitrary binary data.
    
    [1]: https://urldefense.com/v3/__https://tools.ietf.org/html/draft-petrov-t2trg-youpi__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNKybg7Y9A$ 
    
    * some RFCs were to a large extent machine-generated text (e.g., RFC 7400) or machine-verified (e.g., RFC 8428), based on models in various FDTs.  Some of these are very domain-specific, but we could still be better on sharing tools (and long-term preserving the sources that generated those RFCs).
    
    * there is a lively discussion about adding (structural) data modeling (a.k.a. “schemas”) to JSON over at the mailing list of the closed JSON WG (e.g., [2]).  While that discussion is ongoing, we already have CDDL (RFC 8610) for structurally modeling CBOR and JSON data.  Maybe one size does not fit all here.  Similar to ABNF, CDDL tools can check specs, verify instances against a spec, extract/generate code snippets from specs, and generate instances/examples from specs.  One next step here is adding links to application semantics.
    
    [2]: https://urldefense.com/v3/__https://tools.ietf.org/html/draft-ucarion-jddf__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNLGSHOyBg$ 
    
    * the WISHI activity in T2TRG looks at modeling data shapes, interaction modeling, and potentially adding protocol bindings towards the wire and application semantics towards the application.  Several SDOs are providing interesting study subjects, e.g., W3C WoT with their Thing Description (TD) [3] and the still somewhat stealthy OneDM group with the Simple Definition Format (SDF) [4].  We’ll discuss this on the Friday before the IETF [5] and work on tools for it at the Hackathon (look for “WISHI”).
    
    [3]: https://urldefense.com/v3/__https://www.w3.org/TR/wot-thing-description/__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNLJDdphMw$ 
    [4]: https://github.com/one-data-model/language/blob/master/sdf.md
    [5]: https://github.com/t2trg/2019-11-singapore
    (Yes, you can still register.)
    
    I understand that the “Formal Languages” activity mostly addresses their use in IETF specifications, and I like that angle — there are other uses of formal description techniques that possible have a different set of requirements, which sometimes cause the requirements of spec writers to be forgotten [6].
    
    [6]: https://urldefense.com/v3/__https://www.iab.org/wp-content/IAB-uploads/2016/03/Noise-in-specifications-hurts.pdf__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNIWiw1ecg$ 
    
    So I’m really looking forward to the discussions on Friday, November 15th [5] and at the Hackathon.  Getting something going on cross-pollinating and coordinating the various FDT activities at IETF and IRTF might be a good medium term goal.
    
    Grüße, Carsten
    
    
    
    > On Nov 6, 2019, at 11:09, Stephen McQuistin <sm@smcquistin.uk> wrote:
    > 
    > Hi all,
    > 
    > Marc Petit-Huguenin and I are championing formal languages projects at the hackathon in Singapore. Broadly, these
    > projects seek to improve the quality of standards by using formal and structured languages in specification documents.
    > These documents can then be parsed by tooling that can, for example, generate parser code or verify properties for the
    > protocol being specified.
    > 
    > There will be two formal languages projects being worked on: Augmented Packet Header Diagrams and Computerate
    > Specifying. Details for both projects are available on the Wiki at https://urldefense.com/v3/__https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon/formal-languages__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNL8MUCYaQ$ ,
    > but I'll give a brief outline of the Augmented Packet Header Diagrams project here. I'll let Marc describe his
    > Computerate Specifying project separately.
    > 
    > The Augmented Packet Header Diagram format (draft-mcquistin-augmented-ascii-diagrams) is a consistent packet header
    > diagram format and accompanying structured text constructs that allow for the parsing process of protocol headers to be
    > fully specified. This provides support for the automatic generation of parser code, and for other benefits that follow
    > from being able to use tooling to process packet header diagrams.
    > 
    > Our goal at the hackathon is to improve both the Augmented Packet Header Diagram format itself, by attempting to rewrite
    > existing I-Ds and RFCs using its syntax, and to improve the tooling, and in particular, its Rust parser generator.
    > 
    > Please join us: we are particularly interested in examples of packet header diagrams that might be challenging to write
    > in the format our draft describes, and in how our tooling might fit into existing workflows.
    > 
    > I-D: https://urldefense.com/v3/__https://datatracker.ietf.org/doc/draft-mcquistin-augmented-ascii-diagrams__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNLmRvlHqA$ 
    > Getting started information: https://urldefense.com/v3/__https://trac.ietf.org/trac/ietf/meeting/wiki/106hackathon/formal-languages__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNL8MUCYaQ$ 
    > 
    > Thanks,
    > 
    > Stephen
    > 
    > 
    > 
    > _______________________________________________
    > hackathon mailing list
    > hackathon@ietf.org
    > https://urldefense.com/v3/__https://www.ietf.org/mailman/listinfo/hackathon__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNI0zxfnZQ$ 
    
    _______________________________________________
    hackathon mailing list
    hackathon@ietf.org
    https://urldefense.com/v3/__https://www.ietf.org/mailman/listinfo/hackathon__;!8WoA6RjC81c!SS9exXxoGkZM7iVEI5DC4DeL4o9i0EFxrnC0_t-gygfI7XbeEs4uMNI0zxfnZQ$