|5{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{{{X|SAlgebraic operations. These operation do not reference their own children directly L they only contain the information that is needed to perform the operation. }~1Information on how to perform a binary operation ; The first element is the function that is to be performed 3 The second element the column name for its result 9 The third element is the left argument for the operator ; The fourth element is the right argument for the operator tInformation what column, the first element, to attach to a table and what its content would be, the second element. +Information for accessing a database table ,Information what to put in a literate table [Information on how to perform an eq-join. The first element represents the column from the ^ first table that has to be equal to the column in the second table represented by the second  element in the pair. GInformation that specifies how to select element at a certain position AInformation that specifies which column contains the conditional (Information that specifies a projection >Information that specifies how to perform the rank operation. P its first element is the column where the output of the operation is inserted Q the second element represents the sorting criteria that determine the ranking. ySchema information, represents a table structure, the first element of the tuple is the column name the second its type. A tuple is a list of values LProjection information, a list of new attribute names, and their old names. fSort information, a list (ordered in sorting priority), of pair of columns and their sort direction-- Multiple keys AKey of a database table, a key consists of multiple column names aList of table attribute information consisting of (column name, new column name, type of column) Name of a database table ZRight attribute name, used to represent the right argument when applying binary operators XLeft attribute name, used to represent the left argument when applying binary operators XSelection attribute name, used to represent the column containing the selection boolean POld attribute name, used to represent the old column name when renaming columns PNew attribute name, used to represent the new column name when renaming columns zPartition attribute name, used as a synonym where the name for the partitioning column is expected by the rownum operator OSort attribute name, used as type synonym where a column for sorting is needed xResult attribute name, used as type synonym where the name for a result column of a computation is needed Attribute name or column name Pair of a type and a value LWrapper around values that can occur in an algebraic plan Algebraic types < At this level we do not have any structural types anymore ? those are represented by columns. ASur is used for surrogate & values that occur for nested lists.  Sorting rows in a direction )One table can have multiple columns DThe column data type is used to represent the table structure while . compiling ferry core into an algebraic plan I The col column contains the column number and the type of its contents U The NCol column is used to group columns that together form an element of a record < , its string argument is used to represent the field name. 9Show the values in the way compatible with the xml plan. ;Show the algebraic types in a way that is compatible with  the xml plan. GThe show instance results in values that are accepted in the xml plan. U|}~ U|~}}~  9An algebraic plan is the result of constructing a graph. G | The pair consists of the mapping from nodes to their respective ids % | and the algres from the top node. ?Variable environemtn mapping from variables to compiled nodes. 1Graphs are constructed in a monadic environment. * | The graph constructed has to be a DAG. Y | The reader monad provides access to the variable environment Gamma and the loop table Z | The variable environment is a mapping from variable names to graphnodes that represent  | their compiled form. Y | The state monad gives access to a supply of fresh variables, and maintains a map from Z | nodes to node ids. When a node is inserted and an equal node (equal means, equal node Z | and equal child nodes) already exists in the map the node id for that already existing 2 | node is returned. This allows maximal sharing. !JEvaluate the monadic graph into an algebraic plan, given a loop relation. "Get the current loop table #1Get the current variable environment Get a fresh node id [Check if a node already exists in the graph construction environment, if so return its id. ^Insert a node into the graph construction environment, first check if the node already exists M | if so return its id, otherwise insert it and return its id. WBlindly insert a node, get a fresh id and return that $iEvaluate the graph construction computation with the current environment extended with a binding n to v. %DEvaluate the graph construction computation with a differnt gamma, X | and loop table. Return within he current computational context. &:Lookup a variable in the environment  !"#$%& !"#$%&%'Create an algebraic int value (!Create an algebraic string value )"Create an algebraic boolean value *!Create an algebraic double value "Create an algebraic decimal value +Create an algebraic nat value ,Types of algebraic values -Types of algebraic values .Types of algebraic values Types of algebraic values /Types of algebraic values 0Types of algebraic values 1Types of algebraic values 2$Construct an empty table node with 3 Construct a database table node  The first argument is the e$mph{qualified} name of the database @ table. The second describes the columns in alphabetical order. C The third argument describes the database keys (one table key can  span over multiple columns). 4!Construct a table with one value 56Attach a column  of type  with value   in all rows to table  7 Cast column  to type  and give it the name   afterwards. 8GJoin two plans where the columns n1 of table 1 and columns n2 of table  2 are equal. 9.The same as eqJoin but with multiple columns. :&Assign a number to each row in column  incrementing  sorted by . The numbering is not dense! ;*Compute the difference between two plans. <-Same as rank but provides a dense numbering. =Get'/s the nth element(s) of a (partitioned) table. >Select rows where the column  contains True. ?Remove duplicate rows @"Make cross product from two plans A=Negate the boolen value in column n and store it in column r BUnion between two plans CProject/$rename certain column out of a plan D$Apply aggregate functions to a plan E*Similar to rowrank but this will assign a e mph{unique} number to every row  (even if two rows are equal) FASame as rownum but columns can be assigned an ordering direction G$Apply an operator to the element in  and ,  store the result in  HTag a subtree with a comment I8Shorthand for the initial loop condition used by Ferry. %'()*+,-./0123456789:;<=>?@ABCDEFGHI%'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWeChilds of takes a list of xml elements, and nests them in the xml element given as a second argument XuData child of takes some data that can be printed and adds that as child to the xml element given as second argument YZ1Construct a column with name n, and new status v [.XML element representing a type \!Construct an xml tag with name n ]6Construct an algebraic node with id xId and of kind t ^Construct a content node _HConstruct an attribute for an xml node, attrname = n and its value is v `,Attach list of attributes to an xml element JKLMNOPQRSTUVWXYZ[\]^_`JKLMNOPQRSTUVWXYZ[\]^_`%abcdCreate an xml distinct node NCreate an xml rownum node *Create an xml boolean not node Create an xml select node !Create an xml table binding node %Create an xml table description node Create an xml table key node =Create an xml node containing multiple table keys efg      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxJKLMNOPQRSTUVWXYZ[\]^_`abcdefgagfbONMLKJPQRSTUVWXYZ[\]^_`cdeabcdefgyzhAttach a column  of type  with value   in all rows to table  i Cast column  to type  and give it the name   afterwards. jGJoin two plans where the columns n1 of table 1 and columns n2 of table  2 are equal. k.The same as eqJoin but with multiple columns. l&Assign a number to each row in column  incrementing  sorted by . The numbering is not dense! m*Compute the difference between two plans. n-Same as rank but provides a dense numbering. oGet'/s the nth element(s) of a (partitioned) table. pSelect rows where the column  contains True. qRemove duplicate rows r"Make cross product from two plans s=Negate the boolen value in column n and store it in column r tUnion between two plans uProject/$rename certain column out of a plan v$Apply aggregate functions to a plan w*Similar to rowrank but this will assign a e mph{unique} number to every row  (even if two rows are equal) xASame as rownum but columns can be assigned an ordering direction y$Apply an operator to the element in  and ,  store the result in  zTag a subtree with a comment hijklmnopqrstuvwxyzhijklmnopqrstuvwxyz]  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIhijklmnopqrstuvwxyz]B6C"EF8:9?<7;D>=3A@G2H45$%#&+')*(,10/.-  I!hijklmnopqrstuvwxyz{      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~        !"#$%&'('()*+,--./0./11223456789:;<<==>?@ABCDEFGHIIJJKKLMNOPPQRSTUVVWXYZ[[\\]^_``aabcdefTableAlgebra-0.7.1Database.Ferry.Algebra!Database.Ferry.Algebra.Render.XMLDatabase.Ferry.Impossible#Database.Ferry.Algebra.Data.Algebra(Database.Ferry.Algebra.Data.GraphBuilder"Database.Ferry.Algebra.Data.Create&Database.Ferry.Algebra.Render.XMLUtils%Database.Ferry.Algebra.Monadic.CreateAlgNode SchemaInfosProjInfProjPairKeyInfosAValATyASurANatADoubleADecABoolAStrAIntAggrTypeDistProdAllCountSumMinMaxAvgSortDirDescAscColumnsColumnNColColAlgPlanGamGraphMrunGraphgetLoopgetGamma withBinding withContextfromGamintstringbooldoublenatintTstringTboolTdoubleTnatTsurT emptyTabledbTablelitTable litTable'attachcasteqJoineqTJoinrank differencerowrank posSelectselectdistinctcrossnotCunionprojaggrrownumrownum'opertaginitLoopXML DictionaryXMLNode GraphNodeGraphColNamegetTags debugEnabled isDefinedfreshId addNodeTransgetNoderunXMLchildsOf dataChildOf stringChildOfcolumntypeNxmlElemnode contentNodeattrattrsOfdocumentserializeAlgebraiterColposCol mkQueryPlan mkPlanBundle mkXMLDocumentattachMcastMeqJoinMeqTJoinMrankM differenceMrowrankM posSelectMselectM distinctMcrossMnotMunionMprojMaggrMrownumMrownum'MoperMtagM impossibleAlgebraDummyAggr FunBoolNotCastFunBinOpAttachTableRef EmptyTableLitTableDistinct Difference DisjUnionEqJoinCrossPosSelSelProjRankRowRankRowNum SemInfAggrSemUnOpSemBinOp SemInfCast SemInfAttachSemInfTableRefSemInfLitTable SemInfEqJoin SemInfPosSel SemInfSel SemInfProj SemInfRank SemInfRowNumTupleSortInfKeyInfo TableAttrInf TableName RightAttrName LeftAttrName SelAttrName OldAttrName NewAttrName PartAttrName SortAttrName ResAttrNameAttrNameATyValVNatVDecVDoubleVBoolVStrVInt $fShowAVal $fShowATy $fShowSortDirTagsaddTag getFreshIdfindNode insertNode insertNode'decdecTnilNodealg2XMLmkDummy mkDifferencemkCastmkAggrsmkPosSel mkRowRank mkDistinctmkRowNum mkBoolNotmkSelectmkTable mkTableDescrmkKeymkKeysmkRank mkSortColumnmkCrossmkUnion mkEmptyTablemkColumn mkBinOpNode mkRelFnNodemkFnNode mkEqJoinNode mkProjNode mkAttachNode mkTableNodemkEdge HaXml-1.22.5Text.XML.HaXml.TypesinfolookupSTaddSTemptySTSymTabDocumentPrologXMLDeclCommentPIMiscProcessingInstructionSDDecl VersionInfoPITargetDTD DocTypeDeclElementAttListEntityNotation MarkupMisc MarkupDecl ExtSubset ExtMarkupDeclExtConditionalSect ExtSubsetDeclElemElemTag AttributeCElemCStringCRefCMiscContent ElementDeclEMPTYANYMixed ContentSpecTagNameChoiceSeqCPNoneQueryStarPlusModifierPCDATA PCDATAplus AttListDeclAttDef StringType TokenizedTypeEnumeratedTypeAttTypeIDIDREFIDREFSENTITYENTITIESNMTOKENNMTOKENS NotationType EnumerationREQUIREDIMPLIED DefaultTo DefaultDeclFIXED IncludeSect IgnoreSectConditionalSectIgnoreIgnoreSectContents RefEntityRefChar Reference EntityRefCharRef PEReference EntityGEDecl EntityPEDecl EntityDeclGEDeclPEDeclDefEntityValue DefExternalID EntityDefPEDefEntityValuePEDefExternalIDPEDefSYSTEMPUBLIC ExternalIDNDATA NDataDeclTextDecl ExtParsedEntExtPENOTATION NotationDeclPUBLICIDPublicID EncodingDeclNQNQNamensURInsPrefix NamespaceNameNamesNmTokenNmTokensAttValue EntityValueEVStringEVRefEV PubidLiteral SystemLiteralCharDataCDSectbind1bind2