[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: defining correctness for an XML transformation - how?
From Wikipedia: "In theoretical computer science, an algorithm is correct with respect to a specification if it behaves as specified. Best explored is functional correctness, which refers to the input-output behavior of the algorithm: for each input it produces an output satisfying the specification.[1] Within the latter notion, partial correctness, requiring that if an answer is returned it will be correct, is distinguished from total correctness, which additionally requires that an answer is eventually returned, i.e. the algorithm terminates. Correspondingly, to prove a program's total correctness, it is sufficient to prove its partial correctness, and its termination.[2] The latter kind of proof (termination proof) can never be fully automated, since the halting problem is undecidable." Were correctness proof possible in general, it would already have been applied significantly in practice (and there would be no bugs 😀 ). But what we have in reality is the art of software testing, with
correctness testing
being just one of
its
parts. When practicing TDD (Test Driven Development) correctness is defined by the available set of tests, and must be defined/constructed before any implementation is attempted. Then any implementation that passes all tests is considered "correct". Of course, the set of tests is constantly modified and generally extended over time and so the "proof of correctness" (running the set of tests) must be run successfully over and over again. And if the set of tests is constantly being modified, this means that there was no complete definition of the correctness at any time. It seems that this is the current state of the art (would love to be proven wrong!), and up to my knowledge there isn't a general way of proving that the initial or any current set of tests is solvable, due to, for example, such known factors as the halting problem. There might be a subset (or subsets) of the set of all problems, for which proof of correctness is possible, but I am not aware of such subsets having been defined, or, if defined, how useful is their scope. Anyway, there is no restriction on the sets of problems that one could attempt to solve with XSLT. And even if we could define "correctness", this would not be too useful if in general this "correctness" would not be possible to prove. Thanks, Dimitre On Wed, Jul 3, 2024 at 6:48 AM C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> wrote: Roger Costello's recent question about how to show the correctness of a -- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- To achieve the impossible dream, try going to sleep. ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- Typing monkeys will write all Shakespeare's works in 200yrs.Will they write all patents, too? :) ------------------------------------- Sanity is madness put to good use. ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|