NAME
Muldis::D::Core::Routines - Muldis D general purpose routines
VERSION
This document is Muldis::D::Core::Routines version 0.22.0.
PREFACE
This document is part of the Muldis D language specification, whose root document is Muldis::D; you should read that root document before you read this one, which provides subservient details. Moreover, you should read the Muldis::D::Core document before this current document, as that forms its own tree beneath a root document branch.
DESCRIPTION
This document contains one or more sections that were moved here from Muldis::D::Core so that that other document would not be too large.
SYSTEM-DEFINED GENERIC UNIVERSAL FUNCTIONS
These functions are applicable to values of any data type at all.
function sys.Core.Universal.is_identical result Bool params { topic(Universal), other(Universal) }-
This function results in
Bool:trueiff its 2 arguments are exactly the same value, andBool:falseotherwise. This function's arguments must be of compatible declared types; in this case, 2 declared types are compatible iff at least one of the following is true: 1. they are both subtypes of a common scalar root type; 2. they are both subtypes of a common non-incomplete tuple or relation type, that is they essentially have the same headings; 3. at least one type is a generic (eg-Universal) or incomplete (eg-Seq) type, and it is a supertype of the other. This function's 2 parameters are mutually commutative. function sys.Core.Universal.is_not_identical result Bool params { topic(Universal), other(Universal) }-
This function is exactly the same as
sys.Core.Universal.is_identicalexcept that it results in the opposite boolean value when given the same arguments. function sys.Core.Universal.is_value_of_type result Bool params { topic(Universal), type(Cat.NameChain) }-
This function results in
Bool:trueiff the value of itstopicargument is a member of the data type whose name is given in thetypeargument, andBool:falseotherwise. As trivial cases, this function always results inBool:trueif the named type isUniversal, andBool:falseif it isEmpty. This function will fail if the named type doesn't exist in the virtual machine. function sys.Core.Universal.treated result Universal params { topic(Universal), as(Cat.NameChain) }-
This function results in the value of its
topicargument, but that the declared type of the result is the not-Emptydata type whose name is given in theasargument. This function will fail if the named type doesn't exist in the virtual machine, or iftopicisn't a member of the named type. The purpose oftreatedis to permit taking values from a context having a more generic declared type, and using them in a context having a more specific declared type; such an action would otherwise be blocked at compile time due to a type-mismatch error;treatedcauses the type-mismatch validation, and possible failure, to happen at runtime instead, on the actual value rather than declared value. For example, if you are storing anIntvalue in aScalar-typed variable, usingtreatedwill cause the compiler to let you use that variable as an argument toInt.sum, which it otherwise wouldn't. function sys.Core.Universal.default result Universal params { of(Cat.NameChain) }-
This function results in the default value of the not-
Emptydata type whose name is given in theofargument, and the declared type of the result is that same type. This function will fail if the named type doesn't exist in the virtual machine, either at compile or runtime depending whether the type is in the system or user namespace. This function is conceptually implicitly used to provide default values for variables, so they always hold valid values of their declared type.
SYSTEM-DEFINED BOOLEAN-CONCERNING FUNCTIONS
These functions select values of the Bool enumeration.
function sys.Core.Bool.(false|true) result Bool params {}-
This selector function results in the
Bool:(false|true)value.
These functions implement commonly used boolean operations.
function sys.Core.Bool.not result Bool params { topic(Bool) }-
This function results in the logical not of its argument.
function sys.Core.Bool.and result Bool params { topic(SetOfBool) }-
This function is a reduction operator that recursively takes each pair of its N input element values and does a logical and (which is both commutative and associative) on them until just one is left, which is the function's result. If
topichas zero values, thenandresults inBool:true, which is the identity value for logical and. function sys.Core.Bool.or result Bool params { topic(SetOfBool) }-
This function is a reduction operator that recursively takes each pair of its N input element values and does a logical inclusive-or (which is both commutative and associative) on them until just one is left, which is the function's result. If
topichas zero values, thenorresults inBool:false, which is the identity value for logical inclusive-or. function sys.Core.Bool.xor result Bool params { topic(BagOfBool) }-
This function is a reduction operator that recursively takes each pair of its N input element values and does a logical exclusive-or (which is both commutative and associative) on them until just one is left, which is the function's result. If
topichas zero values, thenxorresults inBool:false, which is the identity value for logical exclusive-or.
SYSTEM-DEFINED GENERIC TUPLE-CONCERNING FUNCTIONS
These functions are applicable to mainly tuple types, but are generic in that they typically work with any tuple types.
function sys.Core.Tuple.attr result ScaTupRel params { topic(Tuple), name(Cat.Name) }-
This function results in the scalar or nonscalar value of the attribute of
topicwhose name is given byname. This function will fail ifnamespecifies an attribute name thattopicdoesn't have. function sys.Core.Tuple.update_attr result Tuple params { topic(Tuple), name(Cat.Name), value(ScaTupRel) }-
This function results in its
topicargument but that its attribute whose name isnamehas been updated with a new scalar or nonscalar value given byvalue. This function will fail ifnamespecifies an attribute name thattopicdoesn't have, or if the declared type ofvalueisn't a subtype of the declared type of the attribute. function sys.Core.Tuple.multi_update result Tuple params { topic(Tuple), attrs(Tuple) }-
This function is like
sys.Core.Tuple.update_attrexcept that it handles N tuple attributes at once rather than just 1. The heading of theattrsargument must be a subset of the heading of thetopicargument; this function's result istopicwith all the attribute values ofattrssubstituted into it. This function could alternately be named sys.Core.Tuple.static_substitution. function sys.Core.Tuple.rename result Tuple params { topic(Tuple), map(Cat.AttrRenameMap) }-
This function results in a
Tuplevalue that is the same as itstopicargument but that some of its attributes have different names. Each tuple of the argumentmapspecifies how to rename onetopicattribute, with thebeforeandafterattributes of amaptuple representing the old and new names of atopicattribute, respectively. As a trivial case, this function's result istopicifmaphas no tuples. This function supports renaming attributes to each others' names. This function will fail ifmapspecifies any old names thattopicdoesn't have, or any new names that are the same astopicattributes that aren't being renamed. function sys.Core.Tuple.projection result Tuple params { topic(Tuple), attrs(Cat.SetOfName) }-
This function results in the projection of its
topicargument that has just the subset of attributes oftopicwhich are named in itsattrsargument. As a trivial case, this function's result istopicifattrslists all attributes oftopic; or, it is the nullary tuple ifattrsis empty. This function will fail ifattrsspecifies any attribute names thattopicdoesn't have. function sys.Core.Tuple.cmpl_projection result Tuple params { topic(Tuple), attrs(Cat.SetOfName) }-
This function is the same as
projectionbut that it results in the complementary subset of attributes oftopicwhen given the same arguments. function sys.Core.Tuple.wrap result Tuple params { topic(Tuple), inner(Cat.SetOfName), outer(Cat.Name) }-
This function results in a
Tuplevalue that is the same as itstopicargument but that some of its attributes have been wrapped up into a newTuple-typed attribute, which exists in place of the original attributes. Theinnerargument specifies whichtopicattributes are to be removed and wrapped up, and theouterargument specifies the name of their replacement attribute. As a trivial case, ifinneris empty, then the result has all the same attributes as before plus a new tuple-typed attribute of degree zero; or, ifinnerlists all attributes oftopic, then the result has a single attribute whose value is the same astopic. This function supports the new attribute having the same name as an old one being wrapped into it. This function will fail ifinnerspecifies any attribute names thattopicdoesn't have, or ifouteris the same astopicattributes that aren't being wrapped. function sys.Core.Tuple.cmpl_wrap result Tuple params { topic(Tuple), cmpl_inner(Cat.SetOfName), outer(Cat.Name) }-
This function is the same as
wrapbut that it wraps the complementary subset of attributes oftopicto those specified bycmpl_inner. function sys.Core.Tuple.unwrap result Tuple params { topic(Tuple), outer(Cat.Name) }-
This function is the inverse of
sys.Core.Tuple.wrap, such that it will unwrap aTuple-type attribute into its member attributes. This function will fail ifouterspecifies any attribute name thattopicdoesn't have, or if an attribute oftopic{outer}is the same as anothertopicattribute. function sys.Core.Tuple.product result Tuple params { topic(QuasiSetOfTuple) }-
This function is similar to
sys.Core.Relation.productbut that it works with tuples rather than relations. This function is mainly intended for use in connecting tuples that have all disjoint headings, such as for extending one tuple with additional attributes.
SYSTEM-DEFINED GENERIC SINGLE INPUT RELATION FUNCTIONS
These functions are applicable to mainly relation types, but are generic in that they typically work with any relation types.
function sys.Core.Relation.cardinality result UInt params { topic(Relation) }-
This function results in the cardinality of its argument (that is, the count of tuples its body has).
function sys.Core.Relation.is_member result Bool params { r(Relation), t(Tuple) }-
This function results in
Bool:trueiff itstargument matches a tuple of itsrargument (that is, iff conceptuallytis a member ofr), andBool:falseotherwise. This function is likesys.Core.Relation.is_subsetexcept that the tuple being looked for doesn't have to be wrapped in a relation. This function will fail if the 2 arguments don't have the same heading. function sys.Core.Relation.is_not_member result Bool params { r(Relation), t(Tuple) }-
This function is exactly the same as
sys.Core.Relation.is_memberexcept that it results in the opposite boolean value when given the same arguments. function sys.Core.Relation.Tuple_from_Relation result Tuple params { topic(Relation) }-
This function results in the
Tuplethat is the sole member tuple of its argument. This function will fail if its argument does not have exactly one tuple. function sys.Core.Relation.Relation_from_Tuple result Relation params { topic(Tuple) }-
This function results in the
Relationvalue those body has just the oneTuplethat is its argument. function sys.Core.Relation.insertion result Relation params { r(Relation), t(Tuple) }-
This function results in a
Relationthat is the relational union ofrand a relation whose sole tuple ist; that is, conceptually the result istinserted intor. As a trivial case, iftalready exists inr, then the result is justr. function sys.Core.Relation.disjoint_insertion result Relation params { r(Relation), t(Tuple) }-
This function is exactly the same as
sys.Core.Relation.insertionexcept that it will fail iftalready exists inr. function sys.Core.Relation.deletion result Relation params { r(Relation), t(Tuple) }-
This function results in a
Relationthat is the relational difference fromrof a relation whose sole tuple ist; that is, conceptually the result istdeleted fromr. As a trivial case, iftalready doesn't exist inr, then the result is justr. function sys.Core.Relation.rename result Relation params { topic(Relation), map(Cat.AttrRenameMap) }-
This function is the same as
sys.Core.Tuple.renamebut that it operates on and results in aRelationrather than aTuple. function sys.Core.Relation.projection result Relation params { topic(Relation), attrs(Cat.SetOfName) }-
This function is the same as
sys.Core.Tuple.projectionbut that it operates on and results in aRelationrather than aTuple. But note that the result relation will have fewer tuples thantopicif anytopictuples were non-distinct for just the projected attributes. function sys.Core.Relation.cmpl_projection result Relation params { topic(Relation), attrs(Cat.SetOfName) }-
This function is the same as
sys.Core.Tuple.cmpl_projectionbut that it operates on and results in aRelationrather than aTuple. function sys.Core.Relation.wrap result Relation params { topic(Relation), inner(Cat.SetOfName), outer(Cat.Name) }-
This function is the same as
sys.Core.Tuple.wrapbut that it operates on and results in aRelationrather than aTuple, where each of its member tuples was transformed as persys.Core.Tuple.wrap. function sys.Core.Relation.cmpl_wrap result Relation params { topic(Relation), cmpl_inner(Cat.SetOfName), outer(Cat.Name) }-
This function is the same as
sys.Core.Tuple.cmpl_wrapbut that it operates on and results in aRelationrather than aTuple, where each of its member tuples was transformed as persys.Core.Tuple.cmpl_wrap. function sys.Core.Relation.unwrap result Relation params { topic(Relation), outer(Cat.Name), inner(Cat.SetOfName) }-
This function is the inverse of
sys.Core.Relation.wrapassys.Core.Tuple.unwrapis tosys.Core.Tuple.wrap. But unlike theTuplevariant ofunwrap, this current function requires the extrainnerargument to prevent ambiguity in the general case wheretopicmight have zero tuples, because in that situation the most-specific-type oftopic{outer}would beEmpty, and the names of the attributes to add totopicin place oftopic{outer}are not known. This function will fail iftopichas at least 1 tuple andinnerdoes not match the names of the attributes oftopic{outer}. function sys.Core.Relation.group result Relation params { topic(Relation), inner(Cat.SetOfName), outer(Cat.Name) }-
This function is similar to
sys.Core.Relation.wrapbut that thetopicattribute-wrapping transformations result in newRelation-typed attributes rather than newTuple-typed attributes, and moreover multipletopictuples may be combined into fewer tuples whose newRelation-typed attributes have multiple tuples. This function takes a relation of N tuples and divides the tuples into M groups where all the tuples in a group have the same values in the attributes which aren't being grouped (and distinct values in the attributes that are being grouped); it then results in a new relation of M tuples where the new relation-valued attribute of the result has the tuples of the M groups. A grouped relation contains all of the information in the original relation, but it has less redundancy due to redundant non-grouped attributes now just being represented in one tuple per the multiple tuples whose grouped attributes had them in common. A relation having relation-valued attributes like this is a common way to group so-called child tuples under their parents. As a trivial case, ifinneris empty, then the result has all the same tuples and attributes as before plus a new relation-typed attribute of degree zero whose value per tuple is of cardinality one; or, ifinnerlists all attributes oftopic, then the result has a single tuple of a single attribute whose value is the same astopic. This function supports the new attribute having the same name as an old one being grouped into it. This function will fail ifinnerspecifies any attribute names thattopicdoesn't have, or ifouteris the same astopicattributes that aren't being grouped. function sys.Core.Relation.cmpl_group result Relation params { topic(Relation), group_per(Cat.SetOfName), outer(Cat.Name) }-
This function is the same as
groupbut that it groups the complementary subset of attributes oftopicto those specified bygroup_per. function sys.Core.Relation.ungroup result Relation params { topic(Relation), outer(Cat.Name), inner(Cat.SetOfName) }-
This function is the inverse of
sys.Core.Relation.groupassys.Core.Relation.unwrapis tosys.Core.Relation.wrap; it will ungroup aRelation-type attribute into its member attributes and tuples. A relation can be first grouped and then that result ungrouped to produce the original relation, with no data loss. However, the ungroup of a relation on a relation-valued attribute will lose the information in any outer relation tuples whose inner relation value has zero tuples; a group on this result won't bring them back. This function will fail ifouterspecifies any attribute name thattopicdoesn't have, or if an attribute oftopic{outer}is the same as anothertopicattribute. function sys.Core.Relation.restriction result Relation params { topic(Relation), func(Cat.NameChain), assuming(Tuple) }-
This function results in the relational restriction of its
topicargument as determined by applying theBool-resulting function named in itsfuncargument when the latter function is curried by itsassumingargument. The result relation has the same heading astopic, and its body contains the subset oftopictuples where, for each tuple, the function named byfuncresults inBool:truewhen passed the tuple as itstopicargument andassumingas itsassumingargument. As a trivial case, iffuncis defined to unconditionally result inBool:true, then this function results simply intopic; or, for an unconditionalBool:false, this function results in the empty relation with the same heading. Note that this operation is also legitimately known as where. See also thesys.Core.Relation.semijoinfunction, which is a simpler-syntax alternative forsys.Core.Relation.restrictionin its typical usage where restrictions are composed simply of anded or ored tests for attribute value equality. function sys.Core.Relation.cmpl_restriction result Relation params { topic(Relation), func(Cat.NameChain), assuming(Tuple) }-
This function is the same as
restrictionbut that it results in the complementary subset of tuples oftopicwhen given the same arguments. See also thesys.Core.Relation.semidifferencefunction. function sys.Core.Relation.extension result Relation params { topic(Relation), func(Cat.NameChain), assuming(Tuple) }-
This function results in the relational extension of its
topicargument as determined by applying theTuple-resulting function named in itsfuncargument when the latter function is curried by itsassumingargument. The result relation has a heading that is a superset of that oftopic, and its body contains the same number of tuples, with all attribute values oftopicretained, and possibly extra present, determined as follows; for eachtopictuple, the function named byfuncresults in a second tuple when passed the first tuple as itstopicargument andassumingas itsassumingargument; the first and second tuples must have no attribute names in common, and the result tuple is derived by joining (cross-product) the tuples together. As a trivial case, iffuncis defined to unconditionally result in the degree-zero tuple, then this function results simply intopic. function sys.Core.Relation.static_extension result Relation params { topic(Relation), attrs(Tuple) }-
This function is a simpler-syntax alternative to both
sys.Core.Relation.extensionandsys.Core.Relation.productin the typical scenario of extending a relation, given in thetopicargument, such that every tuple has mutually identical values for each of the new attributes; the new attribute names and common values are given in theattrsargument. function sys.Core.Relation.summary result Relation params { topic(Relation), group_per(Cat.SetOfName), summ_func(Cat.NameChain), summ_assuming(Tuple) }-
This function provides a convenient context for using aggregate functions to derive a per-group summary relation, which is its result, from another relation, which is its
topicargument. This function first performs acmpl_groupontopicusinggroup_perto specify which attributes get grouped into a new relation-valued attribute and which don't; those that don't instead get wrapped into a tuple-valued attribute. Then, per tuple in the main relation, this function applies theTuple-resulting function named in itssumm_funcargument when the latter function is curried by itssumm_assumingargument (passed to it as justassuming); the curried function has, rather than the typical 1topicvarying parameter, 2 varying parameters namedsummarizeandper, which are valued with the relation-valued attribute and tuple-valued attribute, respectively. As per a function thatmapapplies, the function named bysumm_funceffectively takes a whole post-grouping input tuple and results in a whole tuple; the applied function would directly invoke any N-ary / aggregate operators, and extract their inputs from (or calculate)summarizeas it sees fit. Note thatsummaryis not intended to be used to summarize an entiretopicrelation at once (except by chance of it resolving to 1 group); you should instead invoke your summarize-allfuncdirectly, or inline it, rather than by way ofsummary, especially if you want a single-tuple result on an emptytopic(whichsummary) won't do.
SYSTEM-DEFINED GENERIC MULTIPLE INPUT RELATION FUNCTIONS
These functions are applicable to mainly relation types, but are generic in that they typically work with any relation types.
function sys.Core.Relation.is_subset result Bool params { look_in(Relation), look_for(Relation) }-
This function results in
Bool:trueiff the set of tuples comprisinglook_foris a subset of the set of tuples comprisinglook_in, andBool:falseotherwise. This function will fail if the 2 arguments don't have the same heading. function sys.Core.Relation.is_not_subset result Bool params { look_in(Relation), look_for(Relation) }-
This function is exactly the same as
sys.Core.Relation.is_subsetexcept that it results in the opposite boolean value when given the same arguments. function sys.Core.Relation.union result Relation params { topic(SetOfRelation) }-
This function results in the relational union/inclusive-or of the N element values of its argument; it is a reduction operator that recursively takes each pair of input values and relationally unions (which is both commutative and associative) them together until just one is left, which is the result. The result relation has the same heading as all of its inputs, and its body contains every tuple that is in any of the input relations. If
topichas zero values, thenunionresults in the empty relation with the same heading, which is the per-distinct-heading identity value for relational union. function sys.Core.Relation.disjoint_union result Relation params { topic(SetOfRelation) }-
This function is exactly the same as
sys.Core.Relation.unionexcept that it will fail if any 2 input values have a tuple in common. function sys.Core.Relation.intersection result Relation params { topic(SetOfRelation) }-
This function results in the relational intersection/and of the N element values of its argument; it is a reduction operator that recursively takes each pair of input values and relationally intersects (which is both commutative and associative) them together until just one is left, which is the result. The result relation has the same heading as all of its inputs, and its body contains only the tuples that are in every one of the input relations. If
topichas zero values, thenintersectionresults in the universal relation with the same heading (that is, the relation having all the tuples that could ever exist in a relation with that heading), which is the per-distinct-heading identity value for relational intersection. Note that this intersection operator is conceptually a special case ofjoin, applicable when the headings of the inputs are the same, and the other will produce the same result as this when given the same inputs, but with the exception that intersection has a different identity value when given zero inputs. This function will fail on atopicof zero values if the result type's universal relation is impossible or impractically large to represent, such as when any attributes are of infinite types. function sys.Core.Relation.difference result Relation params { source(Relation), filter(Relation) }-
This function results in the relational difference when its
filterargument is subtracted from itssourceargument. The result relation has the same heading as both of its arguments, and its body contains only the tuples that are insourceand are not infilter. This function will fail if its 2 arguments do not have the same heading. Note that this difference operator is conceptually a special case of semidifference, applicable when the headings of the inputs are the same. function sys.Core.Relation.semidifference result Relation params { source(Relation), filter(Relation) }-
This function is the same as
semijoinbut that it results in the complementary subset of tuples ofsourcewhen given the same arguments. Note that this operation is also legitimately known as antijoin or anti-semijoin. function sys.Core.Relation.semijoin result Relation params { source(Relation), filter(Relation) }-
This function results in the relational semijoin of its
sourceandfilterarguments. The result relation has the same heading assource, and its body contains the subset ofsourcetuples that match those offilteras perjoin. Note that relational semijoin is conceptually a short-hand for first doing an ordinary relational join between its 2 arguments, and then performing a relational projection on all of the attributes that justsourcehas. This function will fail any time thatjoinwould fail on the same 2 input relations. function sys.Core.Relation.join result Relation params { topic(QuasiSetOfRelation) }-
This function results in the relational join of the N element values of its argument; it is a reduction operator that recursively takes each pair of input values and relationally joins (which is both commutative and associative) them together until just one is left, which is the result. The result relation has a heading that is a union of all of the headings of its inputs, and its body is the result of first pairwise-matching every tuple of each input relation with every tuple of each other input relation, then where each member of a tuple pair has attribute names in common, eliminating pairs where the values of those attributes differ and unioning the remaining said tuple pairs, then eliminating any result tuples that duplicate others. If
topichas zero values, thenjoinresults in the nullary relation with one tuple, which is the identity value for relational join. As a trivial case, if any input relation has zero tuples, then the function's result will too; or, if any input is the nullary relation with one tuple, that input can be ignored (see identity value); or, if any 2 inputs have no attribute names in common, then the join of just those 2 is a cartesian product; or, if any 2 inputs have all attribute names in common, then the join of just those 2 is an intersection; or, if for 2 inputs, one's set of attribute names is a proper subset of another's, then the join of just those to is a semijoin with the former filtering the latter. This function will fail if any input relations have attributes with common names but different/incompatible declared types. Note that this operation is also legitimately known as natural inner join. function sys.Core.Relation.product result Relation params { topic(QuasiSetOfRelation) }-
This function results in the relational cartesian/cross product of the N element values of its argument; it is conceptually a special case of
joinwhere all input relations have mutually distinct attribute names; unlikejoin,productwill fail if any inputs have attribute names in common. Note that this operation is also legitimately known as cartesian/cross join. function sys.Core.Relation.quotient result Relation params { dividend(Relation), divisor(Relation) }-
This function results in the quotient when its
dividendargument is divided by itsdivisorargument using relational division. Speaking informally, say the relationsdividendanddivisorare calledAandB, and their attribute sets are respectively named{X,Y}and{Y}, then the result relation has a heading composed of attributes{X}(so the result anddivisorheadings are both complementary subsets of thedividendheading); the result has all tuples{X}such that a tuple{X,Y}appears inAfor all tuples{Y}appearing inB; that is,A / Bis shorthand forA{X} - ((A{X} join B) - A){X}.
SYSTEM-DEFINED CORE GENERIC QUASI- FUNCTIONS
This documentation is pending.
SYSTEM-DEFINED CORE CATALOG FUNCTIONS
This documentation is pending.
SYSTEM-DEFINED CORE UPDATERS
Generic Universal
These update operators are applicable to values of any data type at all.
updater sys.Core.Universal.assign update { target(Universal) } read { v(Universal) }-
This update operator will update the variable supplied as its
targetargument so that it holds the value supplied as itsvargument. This update operator's arguments must be of compatible declared types; in this case,vmust be a subtype oftarget.
SYSTEM-DEFINED CORE SYSTEM SERVICES
These system services are applicable to just one or more specific system-defined core scalar data type.
This documentation is pending.
SYSTEM-DEFINED CORE PROCEDURES
Generic Control-Flow Procedures
These procedures are applicable to use in all kinds of procedures.
procedure sys.Core.Control.fail update {} read { topic(Cat.Exception) }-
This procedure will throw the exception given as its argument; this results in the call stack unwinding, and transaction rollbacks, until it is caught.
procedure sys.Core.Control.try_catch update { try_updating(Tuple), catch_updating(Tuple) } read { try(Cat.NameChain), catch(Cat.NameChain), try_assuming(Tuple), catch_assuming(Tuple) }-
This procedure invokes the procedure named in its
tryargument, giving it the argumentstry_updatingandtry_assumingas itsupdatingandassumingarguments, respectively. If thetryprocedure throws an exception, then any state changes it made roll back (but changes made before that don't), and the call stack unwinds to thetry_catchitself; then the procedure named bycatchis invoked similarly totrywas, with corresponding arguments, but with the extra read-only argumenttopicwhose value is aCat.Exception; if thecatchprocedure also throws an exception (such as to say its not handling the thrown one), then that one is not caught and the call stack unwinding plus applicable transaction rollback carries on to the caller of thetry_catch. If thetryprocedure succeeds (doesn't throw an exception), then thecatchprocedure is not called.
SYSTEM-DEFINED CORE BOOTLOADER EXCLUSIVES
These system services may only be invoked directly by a bootloader routine.
bootloader_exclusive sys.Core.Control.start_trans read {}-
This system service starts a new child-most transaction.
bootloader_exclusive sys.Core.Control.commit_trans read {}-
This system service commits the child-most transaction; it will fail if there isn't one.
bootloader_exclusive sys.Core.Control.rollback_trans read {}-
This system service rolls back the child-most transaction; it will fail if there isn't one.
SEE ALSO
Go to Muldis::D for the majority of distribution-internal references, and Muldis::D::SeeAlso for the majority of distribution-external references.
AUTHOR
Darren Duncan (perl@DarrenDuncan.net)
LICENSE AND COPYRIGHT
This file is part of the formal specification of the Muldis D language.
Muldis D is Copyright © 2002-2008, Darren Duncan.
See the LICENSE AND COPYRIGHT of Muldis::D for details.
TRADEMARK POLICY
The TRADEMARK POLICY in Muldis::D applies to this file too.
ACKNOWLEDGEMENTS
The ACKNOWLEDGEMENTS in Muldis::D apply to this file too.