- From: Karl Dubost <karl@w3.org>
- Date: Thu, 10 Mar 2005 23:46:06 -0500
- To: 'www-qa-wg@w3.org' <www-qa-wg@w3.org>
- Message-Id: <c9f114821bcdf690acc7907afa5defa7@w3.org>
Issue:1049 - Formal vs prose language normativity
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1049
There's a dependency with the issue 1144
http://www.w3.org/Bugs/Public/show_bug.cgi?id=1144
5 GP E is moved to section 3.
http://www.w3.org/QA/Group/2005/02/qaframe-spec/#specify-conformance-
need
3. Defining and using terminology
3.1 Define terms
3.2 What is mandatory?
--> We should put it here?
New Text:
5 Good Practice E: Use formal languages when possible.
What does it mean? If an existing formal language (e.g. DTD, Schemas,
...) is expressive enough to describe the technical requirements of the
specification, try to use it.
and make it clear when the English prose and the formal language
overlaps which one should be held for true in case of discrepancy.
Why care? There's an immediate benefit of using a formal language to
describe conformance requirements when it's possible. It can allow to
avoid some ambiguities introduced by the interpretation of the prose.
It gives also the possibility of using existing tools for the given
language to facilitate testing and validation.
But prose remains necessary to allow implementers to understand the
specification, as well as to express additional requirements the formal
language cannot express; this means that there are possible overlaps
between the prose and the formal language, in which case, it is
important to define which one is the main point of reference in case of
disjunction.
Related
• Wiki: Formal Language vs. Prose? [WIKI-FORMAL-LANGUAGE]
Techniques
• There are plenty of formal languages used across W3C
specifications: DTD, XML Schema, Relax NG, EBNF, Z Notation, ....
Picking the right one depends on the kind of specifications developed
(language, XML or not, protocol) and the use needed from the formal
language.
• To avoid discrepancies between the English prose and the formal
language, set up a process so that a given section is bound to a given
part of the formal language, and one can't modified without the other.
• Use the formal language tools to validate the examples given in the
specification, so as to ensure they match.
• When using several formal languages in combination, generate random
content according to the rules defined in one of them and try to
validate it with the others, to find discrepancies.
Examples
XQuery Formal Semantics Notice section 1.1 defines where the document
is normative over the grammar specs (separate for XPath and XQuery) and
where the grammar specs are normative.
--
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager
*** Be Strict To Be Cool ***
Received on Friday, 11 March 2005 04:46:08 UTC