XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] How to assess the correctness of a Format1 -->Format2 mapping?

On Mon, 2023-01-23 at 19:23 +0000, Roger L Costello wrote:
> 
> I want to know if my Format1 --> Format2 mapping is correct.
> 

what you propose is introducing two mappings, m1 and m2, to a format f3
(which happens to be in XML), so that you have
f1 -> (m0) -> f2
f1 -> (m1) -> f3
f2 -> (m2) -> f3

If f1 to f2 to f3 using m0 and m2 produces the same f3 as f1 to f3
using m2, you can guess that at least one of the following is true:

[A] m0, m1 and m2 are all flawed in the same way
[B] m0, m1 and m2 work plausibly for the subset of f1 in your input
[C] m1 is correct but m0 and m2 have flaws that happen to cancel out
[D] all are incorrect, your f3 does not represent f1

To gain confidence that scenario [B] is a correct description, you can
do a combination of

[a] detailed analysis of the transformation, to be confident it
    reflects your understanding

You can take this further with,
   [a.2] write a formal proof
   but this will only ever prove that your program satisfies the
   axioms you start with, which might or might not be correct

[b] try to write an exhaustive test suite (this is often too hard
    in practice)

[c] try lots of real-world test documents - one client recently
    wanted me to write some XSLT, and sent some 30 gigabytes of
    sample XML documents...


However, any sort of testing is likely to be a win over not testing.

liam

-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS