Skip to content

Commit

Permalink
Merge pull request #1200 from AmpersandTarski/development
Browse files Browse the repository at this point in the history
Release 4.3.0
  • Loading branch information
hanjoosten authored Aug 13, 2021
2 parents 7e0b87c + bbf6aaa commit 02faaad
Show file tree
Hide file tree
Showing 212 changed files with 3,135 additions and 3,529 deletions.
2 changes: 2 additions & 0 deletions .ampersand
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AmpersandData/FormalAmpersand/AST.adl
AmpersandData/PrototypeContext/PrototypeContext.adl
23 changes: 21 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,27 @@
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"

"terminal.integrated.defaultProfile.linux":"bash",
"terminal.integrated.profiles.linux":{
"bash": {
"path": "bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "zsh",
},
"fish": {
"path": "fish"
},
"tmux": {
"path": "tmux",
"icon": "terminal-tmux"
},
"pwsh": {
"path": "pwsh",
"icon": "terminal-powershell"
}
}
},

// Use 'appPort' to create a container with published ports. If the port isn't working, be sure
Expand Down
54 changes: 6 additions & 48 deletions AmpersandData/FormalAmpersand/AST.adl
Original file line number Diff line number Diff line change
@@ -1,59 +1,17 @@
CONTEXT Ampersand IN ENGLISH
--! It is allowed to change texts and/or the order of texts IF AND ONLY IF this is also done in the corresponding Haskell files !--
INCLUDE "Concepts.adl"
--INCLUDE "AST.ifc"
--INCLUDE "MinimalAST.xlsx" -- Contains minimal population. Anything discarded from it must violate an invariant
-- INCLUDE "Conjuncts.adl"
INCLUDE "Contexts.adl"
INCLUDE "Relations.adl"
INCLUDE "Documentation.adl"
INCLUDE "Rules.adl"
INCLUDE "Expressions.adl"
INCLUDE "Views.adl"
INCLUDE "Generics.adl"
INCLUDE "Interfaces.adl"
--INCLUDE "MinimalAST.xlsx" -- Contains minimal population. Anything discarded from it must violate an invariant
INCLUDE "Relations.adl"
INCLUDE "Rules.adl"
-- INCLUDE "Tables.adl"

{- *** De volgende relaties zijn hier tijdelijk opgenomen
*** om te voorkomen dat Travis gaat piepen. Deze relaties ontbreken elders
*** in de FormalAmpersand scripts, maar worden door de
*** meatgrinder wél gevuld.
-}
RELATION interfaces[Context*Interface]
RELATION name[Role*RoleName]
REPRESENT RoleName TYPE ALPHANUMERIC
RELATION markup[Meaning*Markup][UNI,TOT]
RELATION markup[Purpose*Markup][UNI,TOT]
RELATION asMarkdown[Markup*Text][UNI,TOT]
RELATION language[Markup*Language][UNI,TOT]
REPRESENT Language TYPE ALPHANUMERIC
REPRESENT Text TYPE BIGALPHANUMERIC
RELATION urlEncodedName[Concept*EncodedName]
REPRESENT EncodedName TYPE ALPHANUMERIC
RELATION context[Relation*Context]
RELATION ttype[Concept*TType][UNI]
REPRESENT TType TYPE ALPHANUMERIC
RELATION allRoles[Context*Role]
RELATION relsDefdIn[Pattern*Relation]
RELATION maintains[Role*Rule]
RELATION context[Population*Context]
RELATION gens[Context*IsE]
RELATION urlEncodedName[Pattern*EncodedName]
RELATION interfaces[Role*Interface]
RELATION context[Population*Context]
RELATION language[Context*Language]
REPRESENT Language TYPE ALPHANUMERIC
RELATION message[Rule*Message]
RELATION origin[Rule*Origin]
REPRESENT Origin TYPE ALPHANUMERIC
RELATION versionInfo[Context*AmpersandVersion]
REPRESENT AmpersandVersion TYPE ALPHANUMERIC
RELATION urlEncodedName[Rule*EncodedName]
RELATION context[IdentityDef*Context]

{- ********************************************
*** Einde elders neer te zetten relaties ***
********************************************
-}
INCLUDE "Terms.adl"
--INCLUDE "Views.adl"


ENDCONTEXT
Expand Down
26 changes: 13 additions & 13 deletions AmpersandData/FormalAmpersand/AST.docadl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CONTEXT RAP IN ENGLISH LATEX
Each concept of the RAP metamodel has its own section, where sections are separated by comments -}
INCLUDE "AST.adl"
INCLUDE "Atoms.docadl"
--INCLUDE "Expressions.docadl"
--INCLUDE "Terms.docadl"
INCLUDE "Rules.docadl"

-- Context
Expand Down Expand Up @@ -88,23 +88,23 @@ The problem of identifying which persons have been using an information system c
about log-in, users and sessions.
+}

-- Expression
PATTERN Expressions
PURPOSE PATTERN Expressions
{+The rules that govern expressions are brought together in one pattern,
in order to formalize expressions and determine their meaning.
-- Term
PATTERN Terms
PURPOSE PATTERN Terms
{+The rules that govern terms are brought together in one pattern,
in order to formalize terms and determine their meaning.
+}
CONCEPT Expression "An expression is a relation algebraic term, denoted in Ampersand syntax"
REPRESENT Expression TYPE ALPHANUMERIC
PURPOSE CONCEPT Expression
CONCEPT Term "An term is a relation algebraic term, denoted in Ampersand syntax"
REPRESENT Term TYPE ALPHANUMERIC
PURPOSE CONCEPT Term
{+
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.
The formalized phrases are called terms.
An Ampersand professional uses terms to calculate with language and to specify information systems and business processes.
\subsubsection*{Explanation}
An expression combines relations with operators.
An term 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.
This is similar to arithmetic, where for instance the result of term $(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
Expand Down
Binary file removed AmpersandData/FormalAmpersand/Atoms.xlsx
Binary file not shown.
121 changes: 0 additions & 121 deletions AmpersandData/FormalAmpersand/AtomsAsShouldBe.adl

This file was deleted.

30 changes: 10 additions & 20 deletions AmpersandData/FormalAmpersand/Concepts.adl
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
CONTEXT AST IN ENGLISH

PATTERN Concepts
VIEW Concept: Concept(name)
RELATION name[Concept*ConceptName] [UNI,TOT,SUR]
ROLE ExecEngine MAINTAINS "del unused ConceptName"
RULE "del unused ConceptName" : I[ConceptName] |- name~;name
MEANING "A ConceptName without Concept will be removed."
VIOLATION ( TXT "{EX} DelAtom;ConceptName;", SRC I )
RELATION name[Concept*ConceptName] [UNI,SUR]

ROLE ExecEngine MAINTAINS "del unused ConceptName"
RULE "del unused ConceptName" : I[ConceptName] |- name~;name
MEANING "A ConceptName without Concept will be removed."
VIOLATION ( TXT "{EX} DelAtom;ConceptName;", SRC I )

IDENT Concept : Concept(name,context[Concept*Context])

RELATION name[Relation*RelationName] [UNI,TOT]
MEANING "Every relation has a name by which it can be referenced within its Context(s)."
RELATION source[Relation*Concept] [UNI,TOT]
RELATION target[Relation*Concept] [UNI,TOT]

REPRESENT ConceptName,RelationName TYPE ALPHANUMERIC
REPRESENT Identifier TYPE ALPHANUMERIC
CLASSIFY ConceptName, RelationName ISA Identifier
RELATION context[Concept*Context] [UNI] -- comes from concs, which is defined in FSpec. This contains all concepts declared inside a context but outside the patterns it contains.
ENDPATTERN

-- RULE "Identifiability of concepts": name[Concept*ConceptName];name[Concept*ConceptName]~ |- I[Concept]

PATTERN Specialization
-- VIEW Isa: Isa( TXT "CLASSIFY ", genspc;name{-[Concept*ConceptName]-} , TXT " ISA " , gengen;name{-[Concept*ConceptName]-} )
-- RULE "eq gen": gengen;gengen~ /\ genspc;genspc~ |- I
-- MEANING "Two generalization rules are identical when the specific concepts are identical and the generic concepts are identical."
-- HJO, 20160906: Disabled above rule and view, because a generalisation can currently have more than one generic concepts (CLASSIFY A IS B /\ C )
RELATION gengen[Isa*Concept] [UNI,TOT]
MEANING "A generalization rule refers to one or more generic concepts."
RELATION genspc[Isa*Concept] [UNI,TOT]
Expand All @@ -32,15 +31,6 @@ PATTERN Specialization
MEANING "A generalization rule refers to one or more generic concepts."
RELATION genspc[IsE*Concept] [UNI,TOT]
MEANING "A generalization rule refers to one or more specific concepts."

--PURPOSE RULE specialization
--{+Specialization has the consequence that an atom is not necessarily an instance of one concept only.
--If limes are citrus fruits, then every lime is not only lime but a citrus fruit as well.
--+}
--RELATION instanceOf[Atom*Concept] [TOT]
--RULE specialization : instanceOf;genspc~;gengen |- instanceOf
--MEANING "Every instance of a specialized concept is an instance of the generic concept too."

ENDPATTERN

PATTERN "Compute Closures"
Expand Down
Loading

0 comments on commit 02faaad

Please sign in to comment.