ISSUE-5: n-ary datatypes - real vs XSD

I will also add another area of concern which is a mismatch between the
  real numbers and the XSD datatypes

===


In XML Schema Datatypes WD of

5th November 1999

included a real datatype:
http://www.w3.org/TR/1999/WD-xmlschema-2-19991105/#real


difficulties with this resulted in it being dropped shortly before this 
millenium, as the design stabilised.

http://www.w3.org/TR/1999/WD-xmlschema-2-19991217/

While I have not dug around in the archvies to understand what happened 
in the month between these documents, the newer version reflects the 
realities on the ground, that computer systems work with fixed width 
IEEE representations, and (to a lesser extent) unbounded length integers 
and decimals - and *none* of these is a precise representation of the 
real numbers.

Meanwhile, reasoning about numbers and declarative arithmetic (as 
opposed to procedural computation), comes up in linear programming, 
integer programming, quadratic programming, non-linear programming, the 
existentional theory of the reals etc etc.

Again these areas are typical practical, and approximation is an 
accepted part of the art; and a good understanding of how errors 
propogate, error bounds etc etc are part of the theory of these areas.

It is plausible that there is a useful merge to be made between such 
reasoning techniques and the qualitative reasoning found in a DL reasoner.

It appears that some aspects of the racer design have started along 
those lines.

It is not plausible to me that the numeric values in the abstract 
interpretations being modelled will be anything other than real numbers, 
  and issues to do with approximation being handled within the 
theoretical framework of the reasoner, rather than handled in the 
datatyping.

===

Here is a very simple example from Prolog that may be compelling:

kilometersAndMiles(K,M) :-
    nonvar(K),
    !,
    M is K / 1.6.
kilometersAndMiles(K,M) :-
    nonvar(M),
    !,
    K is M * 1.6.

Using swipl version 5.6.36, from cygwin on a 32 bit wintel machine, I 
get the following:

?- kilometersAndMiles(X,5.3002),kilometersAndMiles(X,5.3002).

X = 8.48032

Yes
?- kilometersAndMiles(X,5.3004),kilometersAndMiles(X,5.3004).

No


The prolog construct is explicitly procedural. The code tries to pretend 
that it can be made declarative, and a "surprising" result follows.
My view of the n-ary datatype design in the member submission is that it 
is of this form - surprises waiting to happen.

Received on Tuesday, 13 November 2007 16:03:39 UTC