Decomposition of Domains 1 Introduction
Total Page:16
File Type:pdf, Size:1020Kb
Decomp osition of Domains y Achim Jung Leonid Libkin Hermann Puhlmann Abstract The problem of decomp osing domains into sensible factors is addressed and solved for the case of dIdomains A decomp osition theorem is proved which allows the represention of a large sub class of dIdomains in a pro duct of at domains Direct pro duct decomp ositions of Scottdomains are studied separately Intro duction This work was initiated by Peter Bunemans interest in generalizing relational databases see He quite radically dismissed the idea that a database should b e forced into the format of an nary relation Instead he allowed it to b e an arbitrary antichain in a Scottdomain The reason for this was that advanced concepts in database theory such as null values nested relations and complex ob jects force one to augment relations and values with a notion of information order Following Bunemans general approach the question arises how to dene basic database theoretic concepts such as functional dep endency for antichains in Scottdomains For this one needs a way to sp eak ab out relational schemes which are nothing but factors of the pro duct of which the relation is a subset Buneman successfully dened a notion of scheme for Scottdomains and it is that denition which at the heart of this work We show that his generalized schemes b ehave almost like factors of a pro duct decomp osition Consequently we cho ose the word semifactor for them In the light of our results Peter Bunemans theory of generalized databases b ecomes less miraculous a large class of domains can b e understo o d as sets of tuples Bunemans denition of scheme was discussed in and an alternative denition was prop osed The idea of b oth denitions is that the elements of a domain are treated as ob jects and pro jecting an element into a scheme corresp onds to losing some information ab out this ob ject The denition of is based on the assumption that the same piece of information is lost for every ob ject For example if ob jects are records it means that we lose information ab out some attributes values The idea of is that every scheme has a sort of complement and if we pro ject one ob ject to a scheme and the other to its App eared in Proceedings of the Conference on Mathematical Foundations of Programming Semantics Springer Lecture Notes in Computer Science 598 y Addresses Achim Jung and Hermann Puhlmann Fachb ereich Mathematik Technische Ho chschule Darmstadt Schlogartenstrae D Darmstadt Germany Leonid Libkin Department of Computer and Information Sciences University of Pennsylvania Philadelphia PA USA LLibkin was supp orted in part by NSF Grants IRI and CCR and ONR Grant NOOOK complement then there exists a join of two pro jections ie every ob ject consists of two indep endent pieces of information Intuitively it means that the domain itself could b e decomp osed into two corresp onding domains The denition of is stronger than the denition of It is the rst denition that is used in our decomp osition theory while the second denition serves as a to ol to describ e direct pro duct decomp ositions of domains Combining the decomp osition theorems we will prove a formal statement that claries the informal reasonings from the previous paragraph There is also a more philosophical or p edagogical motivation for this work A feature that novices to domain theory frequently nd unsettling is the profusion of dierent def initions it oers Often these denitions are laid out at the b eginning and the relation to the semantics of programming languages is established only later In particular useful closure prop erties of the resp ective categories are derived In his Pisa Lecture Notes Gordon Plotkin chose a rather more gentle approach The domains he considers are very primitive at the b eginning just sets and step by step new constructs and prop erties are added to them a b ottom element transforms sets into at domains and thus the in formation order is intro duced next come slightly more complicated orders created by forming nite pro ducts of at domains function spaces call for the denition of dcp o and Scottcontinuous function and via bilimits and p owerdomains he nally arrives at binite domains Furthermore along the way he develops a syntax which allows to denote most of the elements of the domains making them available for computation the pro d uct app ears as a set of arrays the function space as a set of terms etc This asp ect is also describ ed elegantly and comprehensively in In this way Plotkin creates the impression that all binite domains are built up from at domains using various domain constructors This may b e reassuring for the novice but of course it is not explicitly con rmed in the text Plotkin is just very carefully expanding his denitions and motivating each new concept But we may still ask to what extent this rst impression could b e transformed into a theorem To b e more precise we may ask Is it true that every binite domain can b e derived from at domains using only lifting pro duct coalesced sum function space and convex p owerdomain as constructors A similar question was in fact asked and found dicult by Carl Gunter for the universal binite domain How would one attack such a problem We think the natural way to do it is to work backwards and to try to decompose domains into pieces that decomp ose no further If we can show that the only irreducible domains are the at domains then we are done At this p oint the informed reader may already have b ecome nervous b ecause he may know small nite counterexamples to the ab ove question But there are many variations of it which are equally interesting We can restrict or augment the numb er of allowed constructions we can change the class of domains we want to analyze we can allow more or fewer primitive ie irreducible building blo cks The choice we have made for this pap er is to consider Scott and dIdomains cf and a single alb eit rather general constructor and instead of prescribing the irreducible factors we are curious what they will turn out to b e The advantage of a decomp osition theorem of this kind is apparent instead of proving a prop erty for general domains we can prove that it holds for the irreducible factors and that it is preserved under the constructions We allow ourselves to compare this endeavor with the similar and only recently completed pro ject of decomp osing nite groups into nite simple groups although the comparison is somewhat attering we cannot exp ect to nd so much mathematically intriguing structure in domains What are the practical implications of our decomp osition theorem Well in our particular setting we derive a very concrete representation of dIdomains as a set of tuples which should simplify the implementation of dIdomains as abstract data typ es Of course there is a welldevelop ed theory of eective representations see where one enumerates the set of compact elements and represents a subset of the innite elements by recursively enumerable sets of compact approximations However this is more theoretical work and no one exp ects that we really ever use domains as data typ es represented this way Instead our representation is much more concrete To give an example consider a domain which is the pro duct of two at domains The traditional eective domain theory simply enumerates all elements and if enumerations of the elements of the two factors are already given then these are combined with the help of pairing functions We work rather in the opp osite direction For a given domain we seek to decomp ose it as far as p ossible and we will only enumerate the bases of the irreducible factors in the traditional way The representation of the original domain is then put together as a set of tuples The pap er is organized as follows In the next section we shall quickly review some basic denitions from domain theory mostly to x notation and to remind the reader of a few less common concepts In Section we intro duce semifactors and prove basic prop erties of them We apply these ideas and get a rst decomp osition theorem This representation still contains a lot of redundancy and in Section we show how to factor away this redundancy The resulting decomp osition theorem yields a representation of dIdomains which is very tight These sections rep ort work by the rst and the third author A direct pro duct decomp osition is a particular and interesting instance of our general goal and deserves more detailed study In Sections and which were written by the sec ond author this is done by establishing a relationship b etween these decomp ositions and particular instances of congruence relations and neutral ideals The idea to describ e direct pro duct decomp ositions via neutral ideals is b orrowed from lattice theory where neutral ideals describ e decomp ositions of b ounded lattices For domains we will obtain a more general kind of decomp osition including direct pro duct and coalesced sum as limit cases These decomp ositions are given by families of subsets of a domain such that every element of the domain has a unique representation as the join of suitably chosen representatives of these sets Pairs of p ermutable complemented congruences also describ e direct pro duct decomp ositions as well as they describ e decomp ositions of algebras Having proved char acterizations of decomp ositions we establish the result showing the relationship b etween the two notions of scheme Denitions We are using the standard denitions such as they can b e found in and in In particular dcpos are directedcomplete