Skip to content

Commit

Permalink
Merge pull request #1437 from AmpersandTarski/feature/namespaces-part1
Browse files Browse the repository at this point in the history
Feature/namespaces part1
  • Loading branch information
hanjoosten committed Feb 4, 2024
2 parents 2ec5b6d + 9575629 commit 48f8cb0
Show file tree
Hide file tree
Showing 339 changed files with 10,098 additions and 5,110 deletions.
173 changes: 170 additions & 3 deletions .ampersand
Original file line number Diff line number Diff line change
@@ -1,5 +1,172 @@
AmpersandData/FormalAmpersand/FormalAmpersand.adl
AmpersandData/PrototypeContext/PrototypeContext.adl
testing/performance/Issue1409/Issue1409A.adl
testing/performance/Issue1409/Issue1409B.adl

testing/Travis/testcases/Misc/FraakTest1.adl
testing/Travis/testcases/Misc/FraakTest2.adl
testing/Travis/testcases/Misc/ARM20-Test7.adl
testing/Travis/testcases/Misc/ArchiTest1.adl
testing/Travis/testcases/Misc/ARM20-Test6.adl
testing/Travis/testcases/Misc/ARM20-Test4.adl
testing/Travis/testcases/Misc/ArchiTest3.adl
testing/Travis/testcases/Misc/ARM20-Test5.adl
testing/Travis/testcases/Misc/Hello.adl
testing/Travis/testcases/Misc/ARM20-Test1.adl
testing/Travis/testcases/Misc/ARM20-Test2.adl
testing/Travis/testcases/Misc/ArchiTest5.adl
testing/Travis/testcases/Misc/ArchiTest4.adl
testing/Travis/testcases/Misc/ARM20-Test3.adl
testing/Travis/testcases/Misc/ARM20-Test8.adl
testing/Travis/testcases/Misc/ARM-Test2.adl
testing/Travis/testcases/Misc/Arbeidsduur.adl
testing/Travis/testcases/Misc/ARM-Test1.adl
testing/Travis/testcases/Misc/Kernmodel.adl
testing/Travis/testcases/tutorial/MyModel.adl
testing/Travis/testcases/Bugs/CurrentMultiFile/Bug388_Retina/RETINABUG.adl
testing/Travis/testcases/Bugs/Fixed/Other/Bug_GeneratedTables.adl
testing/Travis/testcases/Bugs/Fixed/Other/Bug_DiamondOperator.adl
testing/Travis/testcases/Bugs/Fixed/Other/Bug_InjectiveFunction_Fatal152.adl
testing/Travis/testcases/Bugs/Fixed/Other/Bug_ColumnProperties.adl
testing/Travis/testcases/Bugs/Fixed/SQL/Bug_RelAdd.adl
testing/Travis/testcases/Bugs/Fixed/SQL/Bug_SingletonExpression.adl
testing/Travis/testcases/Bugs/Fixed/SQL/Bug_Totality.adl
testing/Travis/testcases/Bugs/Fixed/SQL/Bug_HaskellViolationTest.adl
testing/Travis/testcases/Bugs/Current/SQL/ARM20-Test8.adl
testing/Travis/testcases/Bugs/NoSentinel/Bug30_InterfaceRefBug.adl
testing/Travis/testcases/Bugs/NoSentinel/Bug434.adl
testing/Travis/testcases/Bugs/NoSentinel/TechDataModelTest.adl
testing/Travis/testcases/Bugs/NoSentinel/Bug29_InterfaceRefLoop.adl
testing/Travis/testcases/prototype/shouldSucceed/Try50.adl
testing/Travis/testcases/prototype/shouldSucceed/Try44.adl
testing/Travis/testcases/prototype/shouldSucceed/try18fail.adl
testing/Travis/testcases/prototype/shouldSucceed/try45.adl
testing/Travis/testcases/prototype/shouldSucceed/Try51.adl
testing/Travis/testcases/prototype/shouldSucceed/NoMinMinValidate-Issue557/Archimate1.adl
testing/Travis/testcases/prototype/shouldSucceed/try47.adl
testing/Travis/testcases/prototype/shouldSucceed/Try53.adl
testing/Travis/testcases/prototype/shouldSucceed/SequencesBug.adl
testing/Travis/testcases/prototype/shouldSucceed/validate/Issue862a.adl
testing/Travis/testcases/prototype/shouldSucceed/validate/Issue865.adl
testing/Travis/testcases/prototype/shouldSucceed/validate/Issue148.adl
testing/Travis/testcases/prototype/shouldSucceed/validate/Issue1293.adl
testing/Travis/testcases/prototype/shouldSucceed/Try52.adl
testing/Travis/testcases/prototype/shouldSucceed/Try46.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue257.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue280.adl
testing/Travis/testcases/prototype/shouldSucceed/EscapeTest.adl
testing/Travis/testcases/prototype/shouldSucceed/try43a.adl
testing/Travis/testcases/prototype/shouldSucceed/try42.adl
testing/Travis/testcases/prototype/shouldSucceed/Try43.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket398.adl
testing/Travis/testcases/prototype/shouldSucceed/try9.adl
testing/Travis/testcases/prototype/shouldSucceed/MultipleDeclaredRules.adl
testing/Travis/testcases/prototype/shouldSucceed/try41.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue1413.adl
testing/Travis/testcases/prototype/shouldSucceed/IdentTest.adl
testing/Travis/testcases/prototype/shouldSucceed/try40.adl
testing/Travis/testcases/prototype/shouldSucceed/Try54.adl
testing/Travis/testcases/prototype/shouldSucceed/try8.adl
testing/Travis/testcases/prototype/shouldSucceed/propertytests.adl
testing/Travis/testcases/prototype/shouldSucceed/Try33.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue785.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue746.adl
testing/Travis/testcases/prototype/shouldSucceed/try26.adl
testing/Travis/testcases/prototype/shouldSucceed/Try32.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue194.adl
testing/Travis/testcases/prototype/shouldSucceed/try18.adl
testing/Travis/testcases/prototype/shouldSucceed/try24.adl
testing/Travis/testcases/prototype/shouldSucceed/try30.adl
testing/Travis/testcases/prototype/shouldSucceed/try31.adl
testing/Travis/testcases/prototype/shouldSucceed/try25.adl
testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest4.adl
testing/Travis/testcases/prototype/shouldSucceed/try19.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue340.adl
testing/Travis/testcases/prototype/shouldSucceed/try13b.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue142.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue1261.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue152.adl
testing/Travis/testcases/prototype/shouldSucceed/Try35.adl
testing/Travis/testcases/prototype/shouldSucceed/Bug435.adl
testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest1.adl
testing/Travis/testcases/prototype/shouldSucceed/Try34.adl
testing/Travis/testcases/prototype/shouldSucceed/try20.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue192.adl
testing/Travis/testcases/prototype/shouldSucceed/try36.adl
testing/Travis/testcases/prototype/shouldSucceed/try22.adl
testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest3.adl
testing/Travis/testcases/prototype/shouldSucceed/InterfaceRefCheck.adl
testing/Travis/testcases/prototype/shouldSucceed/specializeTest.adl
testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest2.adl
testing/Travis/testcases/prototype/shouldSucceed/try23.adl
testing/Travis/testcases/prototype/shouldSucceed/try37.adl
testing/Travis/testcases/prototype/shouldSucceed/IDENT-test-succeed.adl
testing/Travis/testcases/prototype/shouldSucceed/try12.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue766.adl
testing/Travis/testcases/prototype/shouldSucceed/ARM-Test12.adl
testing/Travis/testcases/prototype/shouldSucceed/try13.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket445.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue148.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue174.adl
testing/Travis/testcases/prototype/shouldSucceed/Try39.adl
testing/Travis/testcases/prototype/shouldSucceed/try11.adl
testing/Travis/testcases/prototype/shouldSucceed/try10.adl
testing/Travis/testcases/prototype/shouldSucceed/Try38.adl
testing/Travis/testcases/prototype/shouldSucceed/ARM_Test10.adl
testing/Travis/testcases/prototype/shouldSucceed/TTypeTest1.adl
testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/residutest.adl
testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/SpecEdit.adl
testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/PossibleSQLbug.adl
testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/CheckDanglingPurposes.adl
testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/Ticket440.adl
testing/Travis/testcases/prototype/shouldSucceed/try28.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue760.adl
testing/Travis/testcases/prototype/shouldSucceed/try29.adl
testing/Travis/testcases/prototype/shouldSucceed/try15.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket35GitHub.adl
testing/Travis/testcases/prototype/shouldSucceed/empty.adl
testing/Travis/testcases/prototype/shouldSucceed/FlipPHPBug.adl
testing/Travis/testcases/prototype/shouldSucceed/try16.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket454.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue1281.adl
testing/Travis/testcases/prototype/shouldSucceed/try5.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue260.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue142TooGeneric.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue711.adl
testing/Travis/testcases/prototype/shouldSucceed/BroadTableTest.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue1026.adl
testing/Travis/testcases/prototype/shouldSucceed/try6.adl
testing/Travis/testcases/prototype/shouldSucceed/SelectExprTest.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket342.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue1018.adl
testing/Travis/testcases/prototype/shouldSucceed/aliasTests.adl
testing/Travis/testcases/prototype/shouldSucceed/Ticket237.adl
testing/Travis/testcases/prototype/shouldSucceed/Issue855.adl
testing/Travis/testcases/prototype/shouldSucceed/try7.adl
testing/Travis/testcases/prototype/shouldSucceed/try3.adl
testing/Travis/testcases/prototype/shouldSucceed/fatal313bug.adl
testing/Travis/testcases/prototype/shouldSucceed/CP23xBug2.adl
testing/Travis/testcases/prototype/shouldSucceed/try41a.adl
testing/Travis/testcases/prototype/shouldSucceed/try2.adl
testing/Travis/testcases/prototype/shouldSucceed/CPLbug2.adl
testing/Travis/testcases/prototype/shouldSucceed/CP23xBug1.adl
testing/Travis/testcases/prototype/shouldSucceed/try1.adl
testing/Travis/testcases/prototype/shouldSucceed/CPLbug1.adl
testing/Travis/testcases/prototype/ISAtest/Strange.adl
testing/Travis/testcases/prototype/ISAtest/Limorange.adl
testing/Travis/testcases/prototype/ISAtest/ISAtest1.adl
testing/Travis/testcases/prototype/ISAtest/ISAtest2.adl
testing/Travis/testcases/Simple/DeliverySimpleOPA.adl
testing/Travis/testcases/Simple/Delivery.adl
testing/Travis/testcases/Simple/DeliverySimple.adl
testing/Travis/testcases/Simple/Roles.adl
testing/Travis/testcases/Parsing/shouldSucceed/Issue1014.adl
testing/Travis/testcases/Parsing/shouldSucceed/Issue1189.adl
testing/Travis/testcases/Parsing/shouldSucceed/Issue960.adl
testing/Travis/testcases/Parsing/shouldSucceed/Issue899b.adl
testing/Travis/testcases/Parsing/shouldSucceed/Issue1183.adl
testing/Travis/testcases/Parsing/xlsxParsing/Issue1056.adl
testing/Travis/testcases/Check/NamespaceRule.adl
testing/Travis/testcases/Check/EnforceTest1.adl
testing/Travis/testcases/FuncSpec/testIssue1183.adl
testing/Travis/testcases/FuncSpec/testPredLogic.adl
testing/Travis/testcases/FuncSpec/Issue1275.adl
testing/Travis/testcases/FuncSpec/Mandatering/Mandatering.adl
testing/Travis/testcases/FuncSpec/Mandatering/ToevoegenMandaat.adl
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"context": "..",
"dockerfile": "Dockerfile"
},
// "postCreateCommand": "sudo apt-get update && sudo apt-get install -y openssh-client",
"postStartCommand": "stack build",
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Checkout project contents 📡
uses: actions/checkout@v3
- name: Use cache (manually) 📦 # See https://github.com/freckle/stack-cache-action/issues/5
uses: actions/cache@v2.1.3
uses: actions/cache@v3.3.2
# TODO: Cache might be done better, see for inspiration: https://github.com/godu/advent-of-code-2020/blob/46796832f59d185457a8edf8de043a54a451d688/.github/workflows/ci.yml
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
- name: Checkout project contents 📡
uses: actions/checkout@v3
- name: Use cache (manually) 📦 # See https://github.com/freckle/stack-cache-action/issues/5
uses: actions/cache@v2.1.3
uses: actions/cache@v3.3.2
# TODO: Cache might be done better, see for inspiration: https://github.com/godu/advent-of-code-2020/blob/46796832f59d185457a8edf8de043a54a451d688/.github/workflows/ci.yml
with:
path: |
Expand Down
36 changes: 18 additions & 18 deletions AmpersandData/FormalAmpersand/Concepts.adl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ CONTEXT FormalAmpersand IN ENGLISH
PATTERN Concepts
RELATION name[Concept*ConceptName] [UNI,SUR]

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

Expand All @@ -20,7 +20,7 @@ PATTERN Concepts
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]
-- RULE IdentifiabilityConcepts LABEL "Identifiability of concepts" : name[Concept*ConceptName];name[Concept*ConceptName]~ |- I[Concept]

PATTERN Specialization
RELATION gengen[Isa*Concept] [UNI,TOT]
Expand All @@ -33,7 +33,7 @@ PATTERN Specialization
MEANING "A generalization rule refers to one or more specific concepts."
ENDPATTERN

PATTERN "Compute Closures"
PATTERN ComputeClosures LABEL "Compute Closures"
RELATION isa[Concept*Concept] [ASY]
MEANING "s isa g means that each element of concept s is defined to be an element of concept g as well."
RELATION isaStar[Concept*Concept] -- Transitive, reflexive closure of isa, aka isa*
Expand All @@ -42,46 +42,46 @@ PATTERN "Compute Closures"
MEANING "s isaPlus g means that each element of concept s is an element of concept g as well."

RELATION isaCopy[Concept*Concept] -- necessary only for calling the Transitive closure function.
ROLE ExecEngine MAINTAINS "Compute transitive closure of isa"
RULE "Compute transitive closure of isa" : isa[Concept*Concept] = isaCopy[Concept*Concept]
ROLE ExecEngine MAINTAINS ComputeTransitiveClosureISA
RULE ComputeTransitiveClosureISA LABEL "Compute transitive closure of isa" : isa[Concept*Concept] = isaCopy[Concept*Concept]
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} TransitiveClosure;isa[Concept*Concept];Concept;isaCopy[Concept*Concept];isaPlus")

ROLE ExecEngine MAINTAINS "Compute transitive closure of isa by Ins", "Compute transitive closure of isa by Del"
RULE "Compute transitive closure of isa by Ins" : isaPlus\/I |- isaStar
ROLE ExecEngine MAINTAINS ComputeTransitiveClosureISAbyIns, ComputeTransitiveClosureISAbyDel
RULE ComputeTransitiveClosureISAbyIns LABEL "Compute transitive closure of isa by Ins" : isaPlus\/I |- isaStar
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} InsPair;isaStar;Concept;", SRC I, TXT ";Concept;", TGT I)
RULE "Compute transitive closure of isa by Del" : isaStar |- isaPlus\/I
RULE ComputeTransitiveClosureISAbyDel LABEL "Compute transitive closure of isa by Del" : isaStar |- isaPlus\/I
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} DelPair;isaStar;Concept;", SRC I, TXT ";Concept;", TGT I)
ENDPATTERN

PATTERN "Reflexive isa closures"
PATTERN ReflexiveISAclosures LABEL "Reflexive isa closures"
RELATION isaRfxStar[Concept*Concept] -- Transitive, reflexive closure of isa[Concept*Concept]\/isa[Concept*Concept]~
MEANING "s isaRfxStar g means that s is g or each element of concept s is an element of concept g or vice-versa."
RELATION isaRfxPlus[Concept*Concept] -- Transitive closure of isa[Concept*Concept]\/isa[Concept*Concept]~
MEANING "s isaRfxPlus g means that each element of concept s is an element of concept g or vice-versa."

RELATION isaRfx[Concept*Concept] -- isaRfx[Concept*Concept]=isa[Concept*Concept]\/isa[Concept*Concept]~
ROLE ExecEngine MAINTAINS "Compute isaRfxIns", "Compute isaRfxDel"
RULE "Compute isaRfxIns" : isa[Concept*Concept]\/isa[Concept*Concept]~ |- isaRfx[Concept*Concept]
ROLE ExecEngine MAINTAINS ComputeIsaRfxIns, ComputeIsaRfxDel
RULE ComputeIsaRfxIns LABEL "Compute isaRfxIns" : isa[Concept*Concept]\/isa[Concept*Concept]~ |- isaRfx[Concept*Concept]
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} InsPair;isaRfx[Concept*Concept];Concept;", SRC I, TXT ";Concept;", TGT I)
RULE "Compute isaRfxDel" : isaRfx[Concept*Concept] |- isa[Concept*Concept]\/isa[Concept*Concept]~
RULE ComputeIsaRfxDel LABEL "Compute isaRfxDel" : isaRfx[Concept*Concept] |- isa[Concept*Concept]\/isa[Concept*Concept]~
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} DelPair;isaRfx[Concept*Concept];Concept;", SRC I, TXT ";Concept;", TGT I)

RELATION isaRfxCopy[Concept*Concept] -- necessary only for calling the Transitive closure function.
ROLE ExecEngine MAINTAINS "Compute transitive closure of isa[Concept*Concept]\\/isa[Concept*Concept]~"
RULE "Compute transitive closure of isa[Concept*Concept]\\/isa[Concept*Concept]~" : isaRfx[Concept*Concept] = isaRfxCopy[Concept*Concept]
ROLE ExecEngine MAINTAINS ComputeTransitiveClosureISAconcept
RULE ComputeTransitiveClosureISAconcept LABEL "Compute transitive closure of isa[Concept*Concept]\\/isa[Concept*Concept]~" : isaRfx[Concept*Concept] = isaRfxCopy[Concept*Concept]
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} TransitiveClosure;isaRfx[Concept*Concept];Concept;isaRfxCopy[Concept*Concept];isaRfxPlus[Concept*Concept]")

ROLE ExecEngine MAINTAINS "Compute isaRfxStar by Ins", "Compute isaRfxStar by Del"
RULE "Compute isaRfxStar by Ins" : isaRfxPlus[Concept*Concept]\/I |- isaRfxStar[Concept*Concept]
ROLE ExecEngine MAINTAINS ComputeIsaRfxStarIns, ComputeIsaRfxStarDel
RULE ComputeIsaRfxStarIns LABEL "Compute isaRfxStar by Ins" : isaRfxPlus[Concept*Concept]\/I |- isaRfxStar[Concept*Concept]
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} InsPair;isaRfxStar[Concept*Concept];Concept;", SRC I, TXT ";Concept;", TGT I)
RULE "Compute isaRfxStar by Del" : isaRfxStar[Concept*Concept] |- isaRfxPlus[Concept*Concept]\/I
RULE ComputeIsaRfxStarDel LABEL "Compute isaRfxStar by Del" : isaRfxStar[Concept*Concept] |- isaRfxPlus[Concept*Concept]\/I
MEANING "TODO: MEANING ONTBREEKT"
VIOLATION (TXT "{EX} DelPair;isaRfxStar[Concept*Concept];Concept;", SRC I, TXT ";Concept;", TGT I)
ENDPATTERN
Expand Down
Loading

0 comments on commit 48f8cb0

Please sign in to comment.