The Forum for Discussion about The Third Manifesto and Related Matters

You need to log in to create posts and topics.

Heading inference, not type inference

Quote from dandl on May 29, 2020, 2:30 am
Quote from AntC on May 28, 2020, 12:38 pm
Quote from Dave Voorhis on May 27, 2020, 2:57 pm


WRAP/UNWRAP and GROUP/UNGROUP are indeed beyond Appendix A, but there's nothing that precludes providing useful features and facilities beyond the scope of Appendix A. The stated goal, as I recall, was to provide a firm foundation for data, not to formally derive a high-level language from one small set of primitive operators covered in an appendix.

To try to get something useful out of this so far mostly pointless thread ... What primitives might we need for A to cater for WRAP, GROUP? My starter for ten:

Considering DTATRM p46

  • SP3 WRAP ( { P#, QTY } AS PQ ) translates to (SP3 EXTEND {PQ := TUP{P# P#, QTY QTY}}) {ALL BUT P#, QTY}

The TUP{ } constructor selector there is Tutorial D, but not a primitive in A. So we need to add it. This doesn't undermine the claim that A is relationally complete, because Codd 1972 (in defining 'relationally complete') also doesn't include any way to construct Tuple or Relation constants/literals. The EXTEND, per Appendix A, translates to a JOIN to a PLUS-alike relcon. The heading of the relcon is {P# P#, QTY QTY, PQ TUP{P# P#, QTY QTY}} -- heading obtained by mashing together SPT2, SPT3 on p46. The relcon contains every P#, QTY, PQ subject to the constraint P# == P# FROM PQ AND QTY == QTY FROM PQ.

Corrections: The words you quoted are not mine.

Correction: clearly those words are quoted from Dave. Your name does not appear in my post -- except as a palimpsest from the "mostly pointless".