Lists Home |
Date Index |
> > > At the beginning of this thread Dare asserted that a weakness of
> > > XML-Query is that it's semantics is too weak to allow
> > static analysis
> > > of the correctness of updates.
> > >
> > > What's interesting is that this assertion is in fact untrue, but
> > > people seem to be accepting it and instead arguing
> whether that's a
> > > fatal flaw or not (and what the relevant definition of "type" is).
> Please prove this assertion untrue. XML type systems (especially with
> W3C XML Schema) are based on constraints. Constraints are runtime
There's a misunderstanding here. No static analysis of any program can
classify programs unambiguously as correct or incorrect; if that were the
case it would never be necessary to execute a program. The purpose of static
checking is to reject as many incorrect programs as possible before
executing them. An interesting design choice is the extent to which we
reject the programs that might or might not be correct, depending on the
input data. Typically we solve this by distinguishing structural
constraints, which can be checked statically, from value-based constraints,
which can't: but it's a fuzzy boundary.
Static analysis potentially allows one to catch mistakes like the following
and this is surely a Good Thing.