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] Infinity

On Sun, Mar 4, 2018 at 6:36 PM, C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com> wrote:

I would not like to have to write the test cases for checking that
a conforming processor either accepts a string consisting of an
infinite number of occurrences of the digit ‘0’ followed by the digit
‘5’, or else raises an out-of-resources error, and that the processor
rejects a string consisting of the letter ‘B’ preceded by an infinite
number of occurrences of the digit ‘0’.

​Actually, a state-machine based implementation can report with high confidence, and with strict bounds on memory usage, the presence, or failure to be present, of a '5' after any number of 0's. Infinity isn't a thing that exists in actual texts, so there's no need to state that any given string must be finite.  The closest you can get is say “any number of” and there you go.

BTW, this argument is not entirely theoretical.  Those who remember the Billion Laughs exploit may also remember that my first-gen "Lark" processor sailed through it, where by "sailed through" I mean "completed successfully after a few hours processing with no memory stress".   Because it had a state machine inside.  There is, practically, no limit on the length of the input such a processor can handle. So, if I claim it can manage infinite input, you can't prove me wrong. Fortunately, there's no such thing.

[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