CONTEXT RAP IN ENGLISH LATEX {- This file contains the documentation of RAP in LaTeX format. Each concept of the RAP metamodel has its own section, where sections are separated by comments -} -- Context CONCEPT Context "A context is a set of statements in a formal language that are true within that context." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.A_Context(ctxnm,ctxpats,ctxcs):svn1020" PURPOSE CONCEPT Context IN ENGLISH LATEX {+ Contexts exist in Ampersand for the purpose of dealing with truth. Within one context there can be no contradictions. Ampersand's way of dealing with a contradiction is either to resolve it or to separate them in different contexts. \subsubsection*{Explanation} The world is full of contradictions. Examples: \begin{itemize} \item Bob's personal income over March 2013 according to Bob's employer differs from Bob's personal income over March 2013 according to the National Tax Authority. \item The police can be convinced that Peter X commited the crime, yet his attorney is convinced he is innocent. \item One computer system can tell that the person with social security number 721-07-4426 was born on April 27th, 1943, while at the same time another computer system tells me this person was born on May 3rd, 1952. \end{itemize} \begin{itemize} In language philosopy, the idea of a context was invented to give truth a place. \item In the context of the National Tax Authority, Bob's personal income over March 2013 can be computed to precisely one amount. In the context of his employment, Bob's personal income over March 2013 can be different, because that is another context. \item The job of a court of law is to create a new truth, whose consequences (e.g. imprisonement) can be enforced by law. The court creates a new context, in which conflicts between the (different) truths of both parties are resolved by a decision of the court. \item If two computers operate in the same context, yet disagree on matters of fact, we say there is an error. It is likely that in this example someone must step in to determine which date of birth is correct (if any). The error could be detected because we know (i.e. we have a rule that says) that a person must have a unique date of birth. \end{itemize} Ampersand uses contexts to organize truth. Within one context, there is a single truth and there are no contradictions. For this reason, a context defines a language by means of concepts and relations, in which utterances can be made. We say that these utterances {\emph make sense} in that context. -} PURPOSE PATTERN Contexts IN ENGLISH LATEX {+The rules that govern contexts are brought together in one pattern, in order to formalize contexts and determine their meaning. -} -- Rule CONCEPT Rule "A rule is a statement that must be true in each context in which it is valid." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.Rule(rrnm,rrexp):svn1020" PURPOSE CONCEPT Rule IN ENGLISH LATEX {+ Rules are used as a concrete reason for people to act, feel or believe. In philosophy, this is called a 'norm'. \subsubsection*{Explanation} A rule differs from a statement in that it must always be true. Example: \begin{itemize} \item The statement "St. Paul street is a one way street." might be either true or false. We just have to check the road signs on St. Paul street to know. If, however, the city council decides that St. Paul street is a one way street, we have a rule. It is a rule because St. Paul street must be a one way street. As long as the appropriate road signs are absent, the situation on the street contradicts the decision of the city council. \end{itemize} The word 'must' implies that there is someone who says so. In this example, the city council, by the authority invested upon it by the law, says that St. Paul street must be a one way street. The people who are affected by this are called stakeholders. All contexts in which this rule is valid are called the scope of this rule. Outside its scope, a rule has no meaning. For example a rule may be valid in downtown St. Catharines, Ontario, but totally meaningless in Smalltown, NY that does not even have a St. Paul street. -} PURPOSE PATTERN Rules IN ENGLISH LATEX {+The rules that govern rules are brought together in one pattern, in order to formalize rules and determine their meaning. -} -- Pattern CONCEPT Pattern "A pattern is a set of rules that describes a theme or a general reusable solution to a commonly occurring problem." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.Pattern(ptnm,ptdcs,ptgns,ptrls):svn1020" PURPOSE CONCEPT Pattern IN ENGLISH LATEX {+ Patterns are used to isolate discussions about a specific theme to a particular group of stakeholders, who are competent to identify (define, select, invent, etc.) rules that define the theme. \subsubsection*{Explanation} A pattern formalizes the agreement among stakeholders on this particular theme. Design patterns are meant to make solutions reusable. On top of that, Ampersand advocates "one theme in one pattern". Stakeholders confine their discussion to one theme, and deliver the result in one pattern. A pattern is created when a group of stakeholders is trying to agree on a solution for a particular problem. The agreements they reach are written as rules, which are collected in a pattern. Therefore, they are independent from a particular context. \subsubsection*{Example} The problem of identifying which persons have been using an information system can be solved by making rules about log-in, users and sessions. -} PURPOSE PATTERN Patterns IN ENGLISH LATEX {+The rules that govern patterns are brought together in one pattern, in order to formalize patterns and determine their meaning. -} -- Expression CONCEPT ExpressionID "An expressionID identifies an expression with a context-dependent meaning e.g. a rule assertion, a signal relation, or a relation." CONCEPT Expression "An expression is a relation algebraic term, denoted in Ampersand syntax" -- "DatabaseDesign.Ampersand.Input.ADL1.Parser.pExpr:svn1020" PURPOSE CONCEPT Expression IN ENGLISH LATEX {+ Ampersand uses relation algebra to formalize phrases. The formalized phrases are called expressions. An Ampersand professional uses expressions to calculate with language and to specify information systems and business processes. \subsubsection*{Explanation} An expression combines relations with operators. That results in new relations, the population of which can be calculated from the constituent parts. This is similar to arithmetic, where for instance the result of expression $(3+5)\times 2$ can be calculated from the constituent numbers. In ampersand, you calculate with relations rather than numbers. \subsubsection*{Example} The problem of identifying which persons have been using an information system can be solved by making rules about log-in, users and sessions. -} PURPOSE PATTERN Expressions IN ENGLISH LATEX {+The rules that govern expressions are brought together in one pattern, in order to formalize expressions and determine their meaning. -} -- Concept CONCEPT A_Concept "A concept is a name for a category of similar objects." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.A_Concept(cptnm,cptdf,cptos):svn1020" CONCEPT ConceptOne "ConceptOne, also known as ONE, is a predefined concept that has the role of universal singleton" CONCEPT PlainConcept "A concept is a name for a category of similar objects." PURPOSE CONCEPT PlainConcept IN ENGLISH LATEX {+ In order to reason about meaning, Ampersand has borrowed the idea of a "concept" from the field of semantics (a part of the philosophy of language). \subsubsection*{Example} For example, the city of Amsterdam is an instance of the concept ``City''. \subsubsection*{Explanation} Concepts, such as City, Person, Document, Installment, and so on, allow a designer to talk about things without having them. We can discuss cities and persons that live in them without referring to the actual instances of those concepts. The distinction between an object (Amsterdam) and the corresponding concept (City) has been studied for a long time [e.g.\ Frege, 1892] and is highly relevant for Ampersand. -} PURPOSE PATTERN Concepts IN ENGLISH LATEX {+The rules that govern concepts are brought together in one pattern, in order to formalize concepts and determine their meaning. -} -- Atom CONCEPT AtomID "An atomID is the identity of an atomic term." CONCEPT Atom "An atom is an indivisible (unstructured) data element, and an instance of a specific concept." TYPE "Blob" -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pAtom:svn1020" CONCEPT AtomValue "An atom is the value of an atomic term." TYPE "Blob" -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pAtom:svn1020" PURPOSE CONCEPT Atom IN ENGLISH LATEX {+ Atoms are used to represent data. They are stored in relations that reside within a context. \subsubsection*{Example} For example, the atom ``Amsterdam'' is an instance of the concept ``City''. \subsubsection*{Explanation} Atoms populate relations. Ampersand works with binary relations, so you will find pairs of atoms in a relation. In an information system, the population of relations can change because of edit actions by users in user interfaces. This means that pairs are inserted into and deleted from relations as time goes by. -} PURPOSE PATTERN Populations IN ENGLISH LATEX {+The rules that govern atoms, pairs, and populations are brought together in one pattern, in order to formalize them and determine their meaning. -} CONCEPT Population "The contents of a Concept or Relation" PURPOSE CONCEPT Population IN ENGLISH LATEX {+ Populations are a means to specify a number of true statements that are stored in a relation. If an information system is generated, the population specified in an Ampersand script is used as the initial data stored in the database. This data can subsequently be changed by performing transactions on that database. \subsubsection*{Example} \begin{verbatim} POPULATION address[Person,Address] CONTAINS { ("Peter", "148 Browning Street") ; ("Susan", "Dorpsstraat 78") ; ("Bart", "2013 McGinnigall Drive") } \end{verbatim} \subsubsection*{Explanation} Populations provide the initial content of a database. The word {\emph population} is used sloppily for contexts as well. It refers the the total of all populations in relations and concepts inside that context. -} CONCEPT RelPopu "The content of a relation" CONCEPT CptPopu "The content of a concept" CONCEPT Pair "A pair of atomic terms as an instance of an element with a sign e.g. the population of a relation or the violations of a rule" CONCEPT Blob "A blob is a pString expected to need more than 256 characters of reserved space." TYPE "Blob" -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pString:svn1020" CONCEPT String "A string is a pString expected to be less than 256 characters." -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pString:svn1020" CONCEPT Conid "A conid is an identifier starting with an uppercase" -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pConid:svn1020" CONCEPT Varid "A varid is an identifier starting with a lowercase" -- "DatabaseDesign.Ampersand.Input.ADL1.UU_Scanner.pVarid:svn1020" CONCEPT ADLid "An ADLid is an identifier of type pVarid <|> pConid <|> pString" -- "DatabaseDesign.Ampersand.Input.ADL1.Parser.pADLid:svn1020" CONCEPT Gen "A gen, or generalization rule, is the is-a-relation between a more specific and a more generic concept." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.A_Gen(genspc,gengen):svn1020" CONCEPT Sign "A sign is a relation type signature consisting of a source concept and a target concept." -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.Sign:svn1020" CONCEPT PairID "A pairID is an identifier for a pair of atomic terms as an instance of an element with a sign e.g. the population of a relation or the violations of a rule" CONCEPT Declaration "A declaration is a declaration of a relation with a sign and properties of that relation" -- "DatabaseDesign.Ampersand.Core.AbstractSyntaxTree.Declaration(decnm,decsgn,decprps):svn1020" CONCEPT PropertyRule "A property rule is a rule, that is a property of a user-declared relation" -- "DatabaseDesign.Ampersand.ADL1.Rule.rulefromProp:svn1020" CONCEPT Property "..->.. or UNI<|>TOT<|>INJ<|>SUR<|>RFX<|>IRF<|>SYM<|>ASY<|>TRN<|>PROP" -- "DatabaseDesign.Ampersand.ADL1.Prop.Prop(..):svn1020" CONCEPT Relation "A relation is a relation term in an expression linked to a user-declared relation" ENDCONTEXT