Re: A proposal for a scientific approach to this question [was Re: I'm struggling with 2219 language again]

John Day <jeanjour@comcast.net> Wed, 09 January 2013 01:29 UTC

Return-Path: <jeanjour@comcast.net>
X-Original-To: ietf@ietfa.amsl.com
Delivered-To: ietf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 36F2B21F84DD for <ietf@ietfa.amsl.com>; Tue, 8 Jan 2013 17:29:29 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -100.653
X-Spam-Level:
X-Spam-Status: No, score=-100.653 tagged_above=-999 required=5 tests=[AWL=-0.216, BAYES_00=-2.599, FH_RELAY_NODNS=1.451, HELO_MISMATCH_NET=0.611, RDNS_NONE=0.1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z8igQ-Q-nriC for <ietf@ietfa.amsl.com>; Tue, 8 Jan 2013 17:29:28 -0800 (PST)
Received: from qmta04.westchester.pa.mail.comcast.net (qmta04.westchester.pa.mail.comcast.net [IPv6:2001:558:fe14:43:76:96:62:40]) by ietfa.amsl.com (Postfix) with ESMTP id E562C21F84C9 for <ietf@ietf.org>; Tue, 8 Jan 2013 17:29:27 -0800 (PST)
Received: from omta17.westchester.pa.mail.comcast.net ([76.96.62.89]) by qmta04.westchester.pa.mail.comcast.net with comcast id lQTv1k0051vXlb854dVTsm; Wed, 09 Jan 2013 01:29:27 +0000
Received: from [10.0.1.3] ([98.229.211.49]) by omta17.westchester.pa.mail.comcast.net with comcast id ldVS1k00x14WE023ddVSAj; Wed, 09 Jan 2013 01:29:27 +0000
Mime-Version: 1.0
Message-Id: <a06240827cd126dacfce3@[10.0.1.3]>
In-Reply-To: <20130109003609.2BFF41A445@ld9781.wdf.sap.corp>
References: <20130109003609.2BFF41A445@ld9781.wdf.sap.corp>
Date: Tue, 08 Jan 2013 20:19:29 -0500
To: mrex@sap.com, Donald Eastlake <d3e3e3@gmail.com>
From: John Day <jeanjour@comcast.net>
Subject: Re: A proposal for a scientific approach to this question [was Re: I'm struggling with 2219 language again]
Content-Type: text/plain; charset="us-ascii"; format="flowed"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1357694967; bh=/d/FRIK8my0PqVa28qazUmxQwMFK1mRY3w/FSQCxwgc=; h=Received:Received:Mime-Version:Message-Id:Date:To:From:Subject: Content-Type; b=sCPPh17wG6SW+N26XyiM8814mLYRFZirH72GrHtUQPy/npTlb0hZ4a8kkDvDOxL2n NgoDtkCCNONvwRQoce01YUCRkZ532EiVtxViBA1bSo6xz/ZttXtD7hTc5X6RMeQxBr DR8hoRNM1STDFh5ZgpPDHZxkoDf0JSqJq6ajMGRHwCaqAGgM4XSeAb3pFEjQsQRlUC TCBkktlNNjWaEd0nHUWtkKDIurPRweNp9BdRRdbgoG9IuqULCrov0pjBbHJxATFyLB bLeFxIRgaxGZgtETuwLlZIWRNvfI2WwuHw3wPvxWOvDbgEEFLXbwslGU1EXfCeTjGK 0AF+R4nmdOlrQ==
Cc: IETF Discussion <ietf@ietf.org>
X-BeenThere: ietf@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: IETF-Discussion <ietf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf>, <mailto:ietf-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf>
List-Post: <mailto:ietf@ietf.org>
List-Help: <mailto:ietf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf>, <mailto:ietf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Jan 2013 01:29:29 -0000

At 1:36 AM +0100 1/9/13, Martin Rex wrote:
>
>>John Day <jeanjour@comcast.net> wrote:
>>>
>>>  The reasons have been discussed or at least alluded to previously in this
>>>  thread.  The short answer is we have been there and done that: 30 
>>>years ago.
>>>
>>>  All those tools were developed and used successfully in the 80s.
>>>  I know of cases where doing the formal specification alongside the
>>>  design phase caught lots of problems.   However, there are two
>>>  central problems:  First, in general, programmers are lazy and just
>>>  want to code. ;-)  Using a formal method is a lot more work.
>>>  Second, the complexity of the formal statements that must be written
>>>  down is greater than the code.  So there is a higher probability
>>>  of mistakes in the formal description than in the code.
>>>  Admittedly, if those statements are made, one has a far greater
>>>  understanding of what you are doing.
>
>I believe that the problem with the formal logic is that it is difficult
>to both write as well as read/understand, and to verify that the chosen
>"axioms" actually reflect (and lead to) the desired behaviour/outcome,
>the relative of scarcity of suitable tools, the complexity of the
>underlying theory and tools, and the tools' resulting lack of
>"intuitive usability".


The tools have been available for quite some time.  It is still very difficult.

>
>>>
>>>  Once you have both, there is still the problem that if a bug or ambiguity
>>>  shows up,
>
>For any formal proofing system worth its dime, this can be 100% ruled out,
>since the proofing system will emit a 100% bugfree implementation of the
>spec in the programming language of your choice as a result/byproduct of the
>formal proofing process.

C'mon. You don't really believe that do you? The statement either is 
a tautology or naive.  Ever see a compiler with bugs?  Who verified 
the verifier?  How do you know the verifier is bug free?

As I indicated before, I have been working on this problem since we 
discovered Telnet wasn't as good as we thought it was.  For data 
transfer protocols, it is relatively straightforward and can be 
considered solved for anyone who wants to bother.  The problem is 
most don't.

The real problem is the so-called application protocols where dealing 
the different semantics of objects in different systems makes the 
problem very hard and very subtle.  The representation of the 
semantics is always of what you think its seminal properties are. 
This is not always obvious.

>
>>>
>>>   neither the code nor the formal spec nor a prose spec can be taken
>>>  be the right one.  What is right is still in the heads of the authors.
>
>But maybe you're not really thinking of a defect in the implementation
>(commonly called "bug") but rather a "gap" in the specification that
>leads to unintended or undesired behaviour of a 100% bug-free
>implementation of your spec.

One person's gap is another person's bug.  What may be obvious to one 
as something that must occur may not be so to the other.  Then there 
is that fine line between what part of the specification is required 
for the specification and what part is the environment of the 
implementation.

The human mind has an amazing ability to convince us that how we see 
the world is the way others do.  Having been on the Net when there 
were 15-20 very different machine architectures, I can assure you 
that implementation strategies can differ wildly.

I had had great hopes for the Temporal ordering approaches to 
specification since they said the least about the implementation. 
(the specification is entirely in terms of ordering events) However, 
I never met anyone who could design in them.

>
>(see Section 4 of this paper for an example:
>   http://digbib.ubka.uni-karlsruhe.de/volltexte/documents/1827
>)
>
>
>Donald Eastlake wrote:
>>
>>  Another problem is maintenance. Protocols change. Having to maintain a
>  > formal specification is commonly at least an order of magnitude more
>>  effort than maintaining a prose description.
>
>Definitely.  Discussing protocols at the level of formal specification
>language would be quite challenging (typically impossible in an open
>forum, I believe it is even be difficult in a small and well-trained
>design team).

Which means there will always be a danger of "lost in translation."

>
>>
>>  And, as has been mentioned before, I'd like to emphasize that the IETF
>>  experience and principal is that, if you want interoperation,
>>  compliance testing is useless.
>
>Ouch.  I believe this message is misleading or wrong.
>
>Compliance testing is VERY important, rather than useless,
>
>Compliance testing would actually be perfectly sufficient iff the spec
>was formally proven to be free of conflicts and ambiguities among
>specified protocol elements -- plus a significant effort spent on
>ensuring there were no "gaps" in the specification.

Do you realize the cost of this amount of testing? (Not saying it 
isn't a good idea, just the probability of convincing a development 
manager to do it is pretty slim.)  ;-)

>
>As it turns out, however, a significant amount of implementations will
>be created by humans interpreting natural language specifications,
>rather than implemenations created as 100% bug-free by-products of a
>formal proof tool, and often, interop with such buggy, and often
>spec-incompliant implementations is desirable and necessary since
>they make up a significant part of the installed base.

My impression is that few implementations these days are done from 
scratch.  Available software is commandeered and adapted.  So it 
would seem getting the core aspects of the protocol well implemented 
and let laziness takes its course!  ;-)

>
>>
>>  The way to interoperation is interoperation testing between
>>  implementations and, to a first approximation, the more and the
>>  earlier you do interoperation testing, the better.
>
>
>The #1 reason for interop problems and road-block to evolution of
>protocols is the wide-spread lack of compliance testing (on the flawed
>assumption that it is useless) and focus on black-box interop testing
>of the intersection of two subsets of protocol features.
>
>The problem with interop testing is that it really doesn't provide
>much of a clue, and the results can _not_ be extrapolated to features
>and areas that were not interop tested (typically the other 90% of the
>specification, many optional features and most of the extensibility).
>
>
>The near complete breakage of TLS protocol version negotiation is a
>result of the narrow-minded interop testing in companion with a complete
>lack of compliance testing.
>
>
>If done right, pure compliance testing can go a long way to providing
>interop.  The only area where real interop testing is necessary is
>those protocol areas where the spec contains conflicts/inconsistencies
>that implementors didn't notice or ignored, or where there is a
>widespread inconsistencies of implementations with the specification,
>of created by careless premature shipping of a defective implementation
>and factual creation of an installed base that is too large to ignore.

That last sentence is a doozy.  You are saying that interop testing 
will be required with bad implementations with sufficiently large 
installed base that you have to live with it?

John

>
>-Martin