Skip to content

Commit

Permalink
Merge pull request #690 from AmpersandTarski/development
Browse files Browse the repository at this point in the history
Release 3.8.7
  • Loading branch information
hanjoosten authored Aug 4, 2017
2 parents 49946cb + d610dbc commit 0d679b3
Show file tree
Hide file tree
Showing 78 changed files with 921 additions and 1,129 deletions.
45 changes: 19 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@
#
dist: trusty
sudo: required
#addons:
# mariadb: '10.0'
# apt:
# packages:
# - mysql-server-5.6
# - mysql-client-core-5.6
# - mysql-client-5.6

language: generic

cache:
directories:
Expand All @@ -30,46 +23,47 @@ cache:
# matrix, you can use a line such as:
# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
matrix:
fast_finish: true
include:
# The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
# variable, such as using --stack-yaml to point to a different file.
- env: BUILD=stack ARGS=""
compiler: ": #stack 8.0.1"
addons: {apt: {packages: [ ghc-8.0.1
- env: BUILD=stack GHCVER=8.0.2 STACK_YAML=stack.yaml
compiler: ": #stack 8.0.2"
addons: {apt: {packages: [ cabal-install-1.24
, ghc-8.0.2
, mysql-server-5.6
, mysql-client-core-5.6
, mysql-client-5.6
]
,sources: [hvr-ghc]}}
- env: BUILD=stack ARGS="" osx
compiler: ": #stack 8.0.1"
- env: BUILD=stack GHCVER=8.0.2 STACK_YAML=stack.yaml osx
compiler: ": #stack 8.0.2"
os: osx


# We grab the appropriate GHC and cabal-install versions from hvr's PPA. See:
# https://github.com/hvr/multi-ghc-travis
- env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24
compiler: ": #GHC 8.0.1"
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [ cabal-install-1.24
, ghc-8.0.1
, ghc-8.0.2
, mysql-server-5.6
, mysql-client-core-5.6
, mysql-client-5.6
]
,sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 osx
compiler: ": #GHC 8.0.1"
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 osx
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [ cabal-install-1.24
, ghc-8.0.1
, ghc-8.0.2
, mysql-server-5.6
, mysql-client-core-5.6
, mysql-client-5.6
]
,sources: [hvr-ghc]}}
os: osx

# Build with the newest GHC and cabal-install. This is an accepted failure,
# see below.
# Build with the newest GHC and cabal-install.
- env: BUILD=cabal GHCVER=head CABALVER=head
compiler: ": #GHC HEAD"
addons: {apt: {packages: [ cabal-install-head
Expand All @@ -79,23 +73,22 @@ matrix:
, mysql-client-5.6
]
,sources: [hvr-ghc]}}
# Nightly builds are allowed to fail
- env: BUILD=stack ARGS="--resolver nightly"
compiler: ": #stack nightly"
addons: {apt: {packages: [libgmp-dev]}}


allow_failures:
- env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24
# Nightly builds are allowed to fail
- env: BUILD=stack ARGS="--resolver nightly"
- env: BUILD=cabal GHCVER=head CABALVER=head

# OSX builds currently (sept 2016) do not work, because PHP isn't available
- env: BUILD=stack ARGS="" osx
- env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 osx
- env: BUILD=stack GHCVER=8.0.2 STACK_YAML=stack.yaml osx
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 osx


fast_finish: true




Expand Down
2 changes: 1 addition & 1 deletion AmpersandData/FormalAmpersand/ADLTool.adl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONTEXT RAP IN ENGLISH
CONTEXT RAP3 IN ENGLISH

INCLUDE "FormalAmpersand.adl"

Expand Down
44 changes: 33 additions & 11 deletions AmpersandData/FormalAmpersand/AST.adl
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,43 @@ INCLUDE "Documentation.adl"
INCLUDE "Rules.adl"
INCLUDE "Expressions.adl"
INCLUDE "Views.adl"
-- INCLUDE "Generics.adl"
INCLUDE "Generics.adl"
INCLUDE "Interfaces.adl"
-- INCLUDE "Tables.adl"

{-RJ/20150207: Opmerkingen n.a.v. een vluchtige code-inspectie van dit bestand
1) Het is nu nog wel, maar binnen RAP niet meer, mogelijk om een Pattern, Context en/of Concept dezelfde naam te geven (vanwege de INJectiviteit van relaties als name, ptnm). Deze nieuwe beperking lijkt me onwenselijk.
Reactie HJO/20150207: Die snap ik niet. Twee Concepten met dezelfde naam zijn hetzelfde Concept. Een Pattern mag dezelfde naam hebben als een Concept. Daarmee zijn de uiteraard niet identiek. Een Pattern is nou een maal geen Concept. Dit is nu zo geregeld in RAP. Als je punt is, dat twee verschillende Concepten best dezelfde naam zouden mogen hebben, dan hebben we een issue. Maar ik denk niet dat je dit bedoelt.
2) VIEWs (zoals 'VIEW Isa') horen m.i. niet in dit bestand thuis, maar daar waar de UI wordt gespecificeerd. IDENTs horen wel in dit bestand thuis.
Reactie HJO/20150207: Helemaal mee eens. Gaan we doen.
3) Van "RELATION propertyRule[Relation*PropertyRule]" zou ik denken dat hij niet alleen INJ, maar ook SUR moet zijn.
Reactie HJO/20150207: Dat denk ik ook. Leuk is, dat dit geen invloed heeft op de meatgrinder. Immers, die zorgt alleen maar voor de juiste populatie van Relations. Als blijkt dat we dan overtredingen krijgen, dan gaan we dat meemaken...
{- *** De volgende relaties zijn hier tijdelijk opgenomen
*** om 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]
RELATION markupText[Purpose*MarkupText]
RELATION urlEncodedName[Concept*EncodedName]
RELATION context[Relation*Context]
RELATION ttype[Concept*TType]
RELATION allRoles[Context*Role]
RELATION sign[Expression*Signature]
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]
RELATION message[Rule*Message]
RELATION origin[Rule*Origin]
RELATION versionInfo[Context*AmpersandVersion]
RELATION urlEncodedName[Rule*EncodedName]
RELATION context[IdentityDef*Context]
RELATION ifcname[Interface*String]
{- ********************************************
*** Einde elders neer te zetten relaties ***
********************************************
-}


--PATTERN ToDo -- This pattern contains stuff still to be done.
--RELATION rrviols[Rule*Violation]
--ENDPATTERN
ENDCONTEXT


2 changes: 1 addition & 1 deletion AmpersandData/FormalAmpersand/AST.ifc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ BOX [ up : first~ \/ second~ \/ arg~ cRud LINKTO INTERFACE Expression
, second : second[BinaryTerm*Expression] cRud LINKTO INTERFACE Expression
, arg : arg[UnaryTerm*Expression] cRud LINKTO INTERFACE Expression
, unaryOperator : operator[UnaryTerm*Operator] cRud
, "formalExpression~" : formalExpression[Rule*Expression]~ cRud
, "defines rule" : formalExpression[Rule*Expression]~ cRud
, bind : bind[BindedRelation*Relation] cRud LINKTO INTERFACE Relation
, singleton : singleton[Singleton*AtomValue] cRud
-- , "user defined src" : userSrc["V"*Concept]cRud
Expand Down
2 changes: 0 additions & 2 deletions AmpersandData/FormalAmpersand/Atoms.adl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ PATTERN Atoms
RELATION rAtom[Pair*Atom] [UNI,TOT,SUR] -- SUR is maintained by the exec-engine
ENDPATTERN

VIEW Pair : Pair(TXT "(",l,TXT ",",r,TXT ")")

PROCESS "Compute populations"
RELATION pop[Atom*Concept]
MEANING "If a pop c, we say that atom a is in the population of concept c."
Expand Down
6 changes: 4 additions & 2 deletions AmpersandData/FormalAmpersand/Atoms.ifc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONTEXT AST IN ENGLISH
INCLUDE "Concepts.adl"
INCLUDE "Atoms.xlsx"
INCLUDE "Atoms.adl"
--INCLUDE "Atoms.xlsx"

REPRESENT Atom TYPE ALPHANUMERIC

Expand Down Expand Up @@ -35,7 +36,6 @@ TABS[ relations : V[SESSION*Relation]
]

VIEW Concept : Concept(name)
VIEW Pair : Pair(TXT "(",lAtom,TXT ",",rAtom,TXT ")")
VIEW Relation : Relation(name,TXT "[",source;name,TXT "*",target;name,TXT "]")

INTERFACE Concept(name[Concept*Identifier],isa) : I[Concept]
Expand All @@ -44,6 +44,8 @@ ROWS [ name : name
, specializations : isa~
]

VIEW Pair : Pair(TXT "(",lAtom,TXT ",",rAtom,TXT ")")

INTERFACE Pair(lAtom,rAtom,in[Pair*Relation]) : I[Pair]
ROWS [ "relation(s)" : in
, lAtom : lAtom
Expand Down
1 change: 0 additions & 1 deletion AmpersandData/FormalAmpersand/Concepts.adl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ PATTERN Concepts

REPRESENT ConceptName,RelationName TYPE ALPHANUMERIC
ENDPATTERN
VIEW Concept: Concept(name[Concept*ConceptName])

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

Expand Down
2 changes: 1 addition & 1 deletion AmpersandData/FormalAmpersand/Conjuncts.adl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RELATION allShifts[DnfClause*DnfClause]
RELATION term[Rule*Expression][UNI,TOT] --is defined somewhere else too.
RELATION conjNF[Expression*Expression] [UNI,TOT]
RELATION exprIsc2list[Expression*Expression] [TOT]
RELATION name[Rule*RuleID] [UNI,TOT]
RELATION name[Rule*RuleName] [UNI,TOT]

RULE Conjuncts1 : qConjuncts;rc_conjunct |- qRule;conjuncts
MEANING "All conjuncts in a quad are derived by means of the relation ``conjuncts''."
Expand Down
4 changes: 1 addition & 3 deletions AmpersandData/FormalAmpersand/Contexts.adl
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
CONTEXT RAP IN ENGLISH
INCLUDE "Rules.adl"
INCLUDE "Relations.adl"
--! 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 !--

RELATION name[Concept*ConceptName] [UNI,TOT,SUR]

VIEW Signature: Signature( TXT "[" , src;name[Concept*ConceptName] , TXT "*" , tgt;name[Concept*ConceptName] , TXT "]" )

Expand All @@ -28,7 +26,7 @@ PATTERN Context
CONCEPT Context "A context is the root of the abstract syntax tree of a valid Ampersand rule specification."
VIEW Context: Context(name[Context*ContextName])
REPRESENT ContextName TYPE ALPHANUMERIC
RELATION name[Context*ContextName] [UNI,TOT,SUR]
RELATION name[Context*ContextName] [UNI] --Removed TOT, for it gives a nasty violation
MEANING "The name of a context."
ROLE ExecEngine MAINTAINS "del unused ContextName"
RULE "del unused ContextName" : I[ContextName] |- name~;name
Expand Down
22 changes: 10 additions & 12 deletions AmpersandData/FormalAmpersand/Expressions.adl
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
CONTEXT AST IN ENGLISH LATEX
-- The comments for this script can be found in Atoms.doc
INCLUDE "Concepts.adl"
INCLUDE "Relations.adl"


PROCESS "Expression definitions"
PATTERN "Expression definitions"
RELATION usedIn[Relation*Expression]
MEANING "The rule expressed in relation algebra."
RELATION src[Expression*Concept]
RELATION tgt[Expression*Concept]
RELATION bind[BindedRelation*Relation][UNI,TOT]
RELATION formalExpression[Rule*Expression]
-- TODO make transitive closure of usedIn
ROLE ExecEngine MAINTAINS bindUsedIn
RULE bindUsedIn : bind |- usedIn~
VIOLATION (TXT "{EX} InsPair;usedIn;Relation;", TGT I, TXT ";Expression;", SRC I[Expression])

RELATION sign[Expression*Signature]
RELATION in[Pair*Expression]
VIEW BindedRelation : BindedRelation (bind)


VIEW Equivalence : Equivalence(TXT "RULE ", first[BinaryTerm*Expression], TXT " = ", second[BinaryTerm*Expression])
VIEW Inclusion : Inclusion (TXT "RULE ", first[BinaryTerm*Expression], TXT " |- ", second[BinaryTerm*Expression])
-- VIEW Truth : Truth (TXT "RULE ", I[Expression])
Expand All @@ -30,10 +32,6 @@ PROCESS "Expression definitions"
VIEW LeftResidual : LeftResidual (TXT "(", first[BinaryTerm*Expression], TXT "/" , second[BinaryTerm*Expression], TXT ")")
VIEW RightResidual : RightResidual (TXT "(", first[BinaryTerm*Expression], TXT "\\" , second[BinaryTerm*Expression], TXT ")")


CONCEPT Rule ""
RELATION formalExpression[Rule*Expression] [UNI,TOT]

CONCEPT Operator ""
REPRESENT Operator TYPE ALPHANUMERIC
CONCEPT BinaryTerm ""
Expand Down Expand Up @@ -78,7 +76,7 @@ PROCESS "Expression definitions"
CLASSIFY RelationalAddition ISA BinaryTerm
CLASSIFY LeftResidual ISA BinaryTerm
CLASSIFY RightResidual ISA BinaryTerm
ENDPROCESS
ENDPATTERN

RELATION showADL[Expression*ShowADL] [UNI,TOT]
REPRESENT ShowADL TYPE BIGALPHANUMERIC
Expand Down
11 changes: 6 additions & 5 deletions AmpersandData/FormalAmpersand/Expressions.ifc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
CONTEXT AST IN ENGLISH
CONTEXT AST IN ENGLISH
INCLUDE "Expressions.adl"
INCLUDE "Views.adl"
INCLUDE "Atoms.adl"

INTERFACE Atoms (name[Concept*Identifier], name[Relation*Identifier]) : '_SESSION'
TABS[ relations : V[SESSION*Relation]
BOX<SCOLS>
[ relation : I[Relation]
, "pair(s)" : in~
, "pair(s)" : in[Pair*Relation]~
]
, concepts :V[SESSION*Concept]
BOX<SCOLS>
Expand All @@ -22,7 +23,7 @@ TABS[ relations : V[SESSION*Relation]
, pairs : V[SESSION*Pair]
BOX<SCOLS>
[ pair : I[Pair]
, "relation(s)" : in
, "relation(s)" : in[Pair*Relation]
]
-- , atoms : V[SESSION*Atom]
-- BOX<SCOLS>
Expand All @@ -35,7 +36,6 @@ TABS[ relations : V[SESSION*Relation]
REPRESENT Atom TYPE ALPHANUMERIC
--VIEW Atom : Atom(repr) -- When observing an atom, its representation is what you can see.
VIEW Concept : Concept(name)
VIEW Pair : Pair(TXT "(",lAtom,TXT ",",rAtom,TXT ")")
VIEW Relation : Relation(name,TXT "[",source;name,TXT "*",target;name,TXT "]")
VIEW Equivalence : Equivalence(TXT "RULE ", first, TXT " = ", second)

Expand All @@ -46,7 +46,7 @@ ROWS [ name : name
]

INTERFACE Pair(lAtom,rAtom,in[Pair*Relation]) : I[Pair]
ROWS [ "relation(s)" : in
ROWS [ "relation(s)" : in[Pair*Relation]
, lAtom : lAtom
, rAtom : rAtom
]
Expand All @@ -57,5 +57,6 @@ ROWS [ name : name
, target : target
]

VIEW BindedRelation : BindedRelation (bind)

ENDCONTEXT
2 changes: 1 addition & 1 deletion AmpersandData/FormalAmpersand/FormalAmpersand.adl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONTEXT FormalAmpersand IN ENGLISH LATEX
CONTEXT RAP3 IN ENGLISH LATEX

INCLUDE "AST.adl"
THEMES Plugs, Context, Specialization
Expand Down
Loading

0 comments on commit 0d679b3

Please sign in to comment.