├── docs ├── modeling │ ├── architecture.md │ ├── limitations-of-ampersand.md │ └── legal-modeling.md ├── the-tools-we-use │ ├── rap3-student.md │ ├── rap3-tutor.md │ ├── book.json │ ├── Documentation.md │ ├── assets │ │ ├── image.png │ │ ├── login.png │ │ ├── Login2.png │ │ ├── import.png │ │ ├── logout.png │ │ ├── image (1).png │ │ ├── import (1).png │ │ ├── logo-2x-1.png │ │ ├── parseError.png │ │ ├── phpMyAdmin.png │ │ ├── CompilationOK.png │ │ ├── Docker store.png │ │ ├── NieuwScript.png │ │ ├── menuNieuwScript.png │ │ ├── appveyor_logo.svg.png │ │ ├── release-train-rap3.png │ │ ├── Filezilla with RAP3.png │ │ ├── MySQL authorization.png │ │ ├── create pull request.PNG │ │ ├── create-pull-request.PNG │ │ ├── initial RAP3 screen.png │ │ ├── modify-release-title.PNG │ │ ├── reopen-in-container.png │ │ ├── travisci-full-color-1.png │ │ ├── Comparing master and development.PNG │ │ ├── Filezilla transfer confirmation.png │ │ ├── comparing-master-and-development.PNG │ │ ├── schermafbeelding-2021-07-31-om-08.31.22.png │ │ ├── schermafbeelding-2021-07-31-om-08.36.16.png │ │ └── schermafbeelding-2021-07-31-om-08.37.47.png │ ├── Modify release title.PNG │ ├── create pull request.PNG │ ├── Initial loading of RAP.JPG │ └── building │ │ └── README.md ├── styles │ ├── pdf.css │ ├── ebook.css │ ├── print.css │ └── website.css ├── empty.md ├── reference-material │ ├── syntactical-conventions │ │ ├── README.md │ │ └── language-support.md │ └── README.md ├── docker │ ├── 4-prototype-multi-stage-build.md │ └── 5-prototype-database.md ├── assets │ ├── image.png │ ├── ssh1.png │ ├── ssh2.png │ ├── ssh3.png │ ├── ssh4.png │ ├── ssh5.png │ ├── import.png │ ├── afbeelding.png │ ├── brokenLink.png │ ├── phpMyAdmin.png │ ├── screenshot.png │ ├── untitled.png │ ├── Docker store.png │ ├── create-field.png │ ├── crud-buttons.png │ ├── login button.png │ ├── login-button.png │ ├── untitled (1).png │ ├── Register button.png │ ├── box-crud-create.png │ ├── box-crud-delete.png │ ├── box-crud-update.png │ ├── create script.png │ ├── create-script.png │ ├── docker-compose.png │ ├── register-button.png │ ├── Before migration.png │ ├── Compiler messages.png │ ├── compiler-messages.png │ ├── create script (1).png │ ├── create script (2).png │ ├── create script (3).png │ ├── create-script (1).png │ ├── create-script (2).png │ ├── create-script (3).png │ ├── field-crud-delete.png │ ├── field-crud-update.png │ ├── insecure password.png │ ├── insecure-password.png │ ├── screenshot-import.png │ ├── Building a prototype.png │ ├── COLS layout example.png │ ├── Create script button.png │ ├── Directory structure.png │ ├── InterfaceLovellRaw.jpg │ ├── ROWS layout example.png │ ├── TechnicalDataModel.png │ ├── building-a-prototype.png │ ├── cols-layout-example.png │ ├── concepts-presidents.png │ ├── create-script-button.png │ ├── databaseuserconfig.jpg │ ├── docker-compose (1).png │ ├── docker-compose (2).png │ ├── release-train-rap3.png │ ├── rows-layout-example.png │ ├── untitled-diagram-10.png │ ├── untitled-diagram-2.png │ ├── untitled-diagram-3.png │ ├── untitled-diagram-4.png │ ├── untitled-diagram-5.png │ ├── untitled-diagram-6.png │ ├── untitled-diagram-7.png │ ├── untitled-diagram-8.png │ ├── CDRuleModuleEnrollment.png │ ├── br-course-pagina-1 (1).png │ ├── concepts-presidents-2.png │ ├── concepts-presidents-3.png │ ├── insecure password (1).png │ ├── insecure-password (1).png │ ├── presidents-data-model.png │ ├── untitled-diagram-3 (1).png │ ├── untitled-diagram-7 (1).png │ ├── Architectuur Ampersand FW.png │ ├── InterfaceAlphaBoardNested.jpg │ ├── InterfaceLovellEditable.jpg │ ├── InterfaceLovellTabsCRUD.png │ ├── Overzicht IAM processen.png │ ├── Script editor new script.png │ ├── ampersand-prototype-nosql.png │ ├── migration_system_deployed.png │ ├── screenshot-docker-compose.png │ ├── screenshot-upload-excel.png │ ├── Ampersand Prototype (NoSQL).png │ ├── ampersand-prototype-swagger.png │ ├── br-course-pagina-1 (1) (1).png │ ├── Ampersand Prototype (OWL RDFS).png │ ├── Ampersand Prototype (swagger).png │ ├── Ampersand Prototype Currently.png │ ├── Finished processing your model.png │ ├── InterfaceAlphaBoardFormatted.jpg │ ├── InterfaceAlphaBoardNestedCRUD.jpg │ ├── ampersand-prototype-currently.png │ ├── ampersand-prototype-owl-rdfs.png │ ├── views_controllers_interfaces.png │ ├── ampersand-prototype-directories.png │ ├── state-of-ampersand-project-2019.png │ ├── Ampersand Prototype (directories).png │ ├── towards-multiple-types-of-persistence.png │ ├── Ampersand Prototype (reactive front end).png │ └── ampersand-prototype-reactive-front-end.png ├── landingpage │ ├── 0-intro.md │ └── 2-student.md ├── AmpersandDocsStructure.png ├── Copy of Propositiescan.xlsx ├── conceptual │ └── datamigration-Pre-migration.drawio.png ├── videos.md └── troubleshooting.md ├── outputTemplates ├── default.haddock ├── default.jira ├── default.textile ├── default.dokuwiki ├── default.xwiki ├── default.mediawiki ├── default.zimwiki ├── default.opml ├── default.plain ├── default.commonmark ├── default.markdown ├── default.org ├── default.asciidoc ├── default.man ├── default.texinfo ├── default.asciidoctor ├── default.rst ├── default.rtf ├── default.muse ├── default.docbook5 └── default.docbook4 ├── .gitattributes ├── AmpersandData ├── FormalAmpersand │ ├── .ampersand │ ├── MinimalAST.xlsx │ ├── README.txt │ └── FormalAmpersand.adl ├── PrototypeContext │ ├── .ampersand │ └── PrototypeContext.adl ├── Semantics │ ├── AST.xlsx │ ├── Atoms.xlsx │ ├── Login.xlsx │ ├── Tables.xlsx │ ├── Terms.xlsx │ ├── Views.xlsx │ ├── Contexts.xlsx │ ├── ContextsTry.xlsx │ ├── MinimalAST.xlsx │ ├── ADLTool.adl │ └── Authorisation.adl └── Repo Interfaces │ ├── IS.ifc │ ├── admin_interfaces.ifc │ └── Views.ifc ├── testing ├── Travis │ ├── testcases │ │ ├── Misc │ │ │ ├── css │ │ │ │ └── Custom.css │ │ │ ├── testinfo.yaml │ │ │ ├── ARM-Test2.adl │ │ │ ├── Issue1499.adl │ │ │ ├── ArchiTest5.adl │ │ │ ├── FraakTest1.adl │ │ │ ├── ARM20-Test1.adl │ │ │ ├── ArchiTest3.adl │ │ │ ├── FraakTest2.adl │ │ │ ├── ARM20-Test2.adl │ │ │ ├── ARM20-Test6.adl │ │ │ └── ARM-Test1.adl │ │ ├── prototype │ │ │ ├── shouldFail │ │ │ │ ├── ParserOrTypecheckFailures │ │ │ │ │ ├── ParseFail.adl │ │ │ │ │ ├── testinfo.yaml │ │ │ │ │ ├── Issue726.adl │ │ │ │ │ ├── Ticket726.adl │ │ │ │ │ ├── typecheckerror.adl │ │ │ │ │ ├── Issue142Fail.adl │ │ │ │ │ ├── Try34.adl │ │ │ │ │ ├── 443_InterfaceRefType.adl │ │ │ │ │ ├── try36.adl │ │ │ │ │ ├── RuleNamesMustBeUnique.adl │ │ │ │ │ ├── try2b.adl │ │ │ │ │ ├── Issue181.adl │ │ │ │ │ ├── Ticket442.adl │ │ │ │ │ ├── try18b.adl │ │ │ │ │ ├── InterfaceTest1.adl │ │ │ │ │ ├── try9.adl │ │ │ │ │ ├── CyclicInterfaceRef.adl │ │ │ │ │ ├── ARM_Test10.adl │ │ │ │ │ ├── phone.adl │ │ │ │ │ ├── try4.adl │ │ │ │ │ ├── try2.adl │ │ │ │ │ ├── Issue163.adl │ │ │ │ │ ├── try17b.adl │ │ │ │ │ ├── DuplicateInterfaces.adl │ │ │ │ │ ├── SingleRoot.adl │ │ │ │ │ ├── ComparisonTest2.adl │ │ │ │ │ ├── Issue757.adl │ │ │ │ │ ├── try17.adl │ │ │ │ │ ├── DoubleLabel.adl │ │ │ │ │ ├── Ticket237.adl │ │ │ │ │ ├── try14.adl │ │ │ │ │ ├── Try1.adl │ │ │ │ │ ├── Try41.adl │ │ │ │ │ └── try7.adl │ │ │ │ └── InvariantViolations │ │ │ │ │ ├── testinfo.yaml │ │ │ │ │ ├── Issue708.adl │ │ │ │ │ └── showViolationMessages.adl │ │ │ ├── ISAtest │ │ │ │ ├── testinfo.yaml │ │ │ │ └── Limorange-EditValidation │ │ │ │ │ ├── AddOwnedCitrus.edit.json │ │ │ │ │ └── AddOwnedLimorange.edit.json │ │ │ └── shouldSucceed │ │ │ │ ├── empty.adl │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── validate │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Issue865.adl │ │ │ │ └── Issue148.adl │ │ │ │ ├── Try39.adl │ │ │ │ ├── NoMinMinValidate-Issue557 │ │ │ │ ├── testinfo.yaml │ │ │ │ └── README.md │ │ │ │ ├── Issue1018.adl │ │ │ │ ├── Issue142.xlsx │ │ │ │ ├── Issue192.xlsx │ │ │ │ ├── Issue194.xlsx │ │ │ │ ├── CP23xBug2.adl │ │ │ │ ├── Issue142TooGeneric.xlsx │ │ │ │ ├── BroadTableTest.adl │ │ │ │ ├── CPLbug1.adl │ │ │ │ ├── try41.adl │ │ │ │ ├── CP23xBug1.adl │ │ │ │ ├── try41a.adl │ │ │ │ ├── aliasTests.adl │ │ │ │ ├── Issue142.adl │ │ │ │ ├── Try33.adl │ │ │ │ ├── Issue1413.adl │ │ │ │ ├── Try50.adl │ │ │ │ ├── Issue785.adl │ │ │ │ ├── fatal313bug.adl │ │ │ │ ├── try43a.adl │ │ │ │ ├── Try51.adl │ │ │ │ ├── Try32.adl │ │ │ │ ├── Bug435.adl │ │ │ │ ├── try36.adl │ │ │ │ ├── Issue142TooGeneric.adl │ │ │ │ ├── Ticket35GitHub.adl │ │ │ │ ├── Try35.adl │ │ │ │ ├── try12.adl │ │ │ │ ├── try16.adl │ │ │ │ ├── try1.adl │ │ │ │ ├── Issue855.adl │ │ │ │ ├── try22.adl │ │ │ │ ├── try26.adl │ │ │ │ ├── try8.adl │ │ │ │ ├── Issue1281.adl │ │ │ │ ├── Ticket445.adl │ │ │ │ ├── Issue280.adl │ │ │ │ ├── try23.adl │ │ │ │ ├── try25.adl │ │ │ │ ├── Issue766.adl │ │ │ │ ├── Ticket454.adl │ │ │ │ ├── Try46.adl │ │ │ │ ├── Try54.adl │ │ │ │ ├── try9.adl │ │ │ │ ├── try45.adl │ │ │ │ ├── try10.adl │ │ │ │ ├── try7.adl │ │ │ │ ├── InterfaceTest1.adl │ │ │ │ ├── Issue194.adl │ │ │ │ ├── InterfaceTest4.adl │ │ │ │ ├── Bug335_Kl0Kl1.adl │ │ │ │ ├── ARM-Test12.adl │ │ │ │ ├── Issue1261.adl │ │ │ │ ├── Try38.adl │ │ │ │ ├── Issue192.adl │ │ │ │ ├── try20.adl │ │ │ │ ├── try15.adl │ │ │ │ ├── try31.adl │ │ │ │ ├── try11.adl │ │ │ │ ├── try30.adl │ │ │ │ ├── try13.adl │ │ │ │ ├── try18.adl │ │ │ │ ├── try37.adl │ │ │ │ ├── try47.adl │ │ │ │ ├── try3.adl │ │ │ │ ├── MultipleDeclaredRules.adl │ │ │ │ ├── Issue1026.adl │ │ │ │ ├── try18fail.adl │ │ │ │ ├── try6.adl │ │ │ │ ├── Try44.adl │ │ │ │ ├── IdentTest.adl │ │ │ │ ├── Try34.adl │ │ │ │ ├── WithMeatgrinder │ │ │ │ └── testinfo.yaml │ │ │ │ ├── Issue174.adl │ │ │ │ ├── InterfaceTest2.adl │ │ │ │ ├── try29.adl │ │ │ │ ├── FlipPHPBug.adl │ │ │ │ ├── Issue152.adl │ │ │ │ ├── try24.adl │ │ │ │ ├── Ticket237.adl │ │ │ │ ├── try28.adl │ │ │ │ ├── Issue760.adl │ │ │ │ ├── ARM_Test10.adl │ │ │ │ ├── InterfaceTest3.adl │ │ │ │ ├── Issue746.adl │ │ │ │ ├── Ticket398.adl │ │ │ │ ├── Try43.adl │ │ │ │ ├── Issue340.adl │ │ │ │ ├── Issue148.adl │ │ │ │ ├── Issue260.adl │ │ │ │ ├── try2.adl │ │ │ │ ├── try13b.adl │ │ │ │ ├── TTypeTest1.adl │ │ │ │ ├── try19.adl │ │ │ │ ├── try40.adl │ │ │ │ ├── try42.adl │ │ │ │ └── Try52.adl │ │ ├── Check │ │ │ ├── testinfo.yaml │ │ │ ├── ShouldFail │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Issue406.adl │ │ │ │ ├── Issue335.adl │ │ │ │ ├── Issue1281.adl │ │ │ │ ├── Issue298.adl │ │ │ │ ├── Issue1063.adl │ │ │ │ └── EnforceTest1.adl │ │ │ ├── Issue_1531.adl │ │ │ ├── NamespaceRule.adl │ │ │ └── EnforceTest1.adl │ │ ├── Parsing │ │ │ ├── shouldSucceed │ │ │ │ ├── Issue1014.adl │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Issue899b.adl │ │ │ │ ├── Issue960.adl │ │ │ │ ├── Issue1183.adl │ │ │ │ ├── Issue1189.adl │ │ │ │ └── Issue1537.adl │ │ │ ├── xlsxParsing │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Issue1056.xlsx │ │ │ │ └── Issue1056.adl │ │ │ └── shouldFail │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Issue923.adl │ │ │ │ ├── Issue1189.adl │ │ │ │ ├── Issue1029b.adl │ │ │ │ ├── Issue1029a.adl │ │ │ │ └── Issue980.adl │ │ ├── Simple │ │ │ ├── testinfo.yaml │ │ │ ├── DeliverySimple.css │ │ │ └── Roles.adl │ │ ├── tutorial │ │ │ ├── testinfo.yaml │ │ │ └── README.md │ │ ├── Archimate │ │ │ └── testinfo.yaml │ │ ├── Bugs │ │ │ ├── Fixed │ │ │ │ ├── SQL │ │ │ │ │ ├── testinfo.yaml │ │ │ │ │ ├── Bug_Totality.adl │ │ │ │ │ ├── Bug_RelAdd.adl │ │ │ │ │ ├── Bug_HaskellViolationTest.adl │ │ │ │ │ └── Bug_SingletonExpression.adl │ │ │ │ └── Other │ │ │ │ │ ├── testinfo.yaml │ │ │ │ │ ├── Bug_InjectiveFunction_Fatal152.adl │ │ │ │ │ ├── Bug_GeneratedTables.adl │ │ │ │ │ └── Bug_ColumnProperties.adl │ │ │ ├── Current │ │ │ │ ├── SQL │ │ │ │ │ └── testinfo.yaml │ │ │ │ └── SQLFail │ │ │ │ │ ├── testinfo.yaml │ │ │ │ │ ├── Bug331_TotalInjective.adl │ │ │ │ │ └── Bug302_IgnoredV.adl │ │ │ ├── NoSentinel │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── TechDataModelTest.adl │ │ │ │ └── Bug29_InterfaceRefLoop.adl │ │ │ └── CurrentMultiFile │ │ │ │ └── Bug388_Retina │ │ │ │ └── testinfo.yaml │ │ ├── Preprocessor │ │ │ ├── testinfo.yaml │ │ │ └── includes │ │ │ │ └── PreprocTest.adl │ │ ├── meatgrinder │ │ │ ├── Issue1487.adl │ │ │ ├── testinfo.yaml │ │ │ └── Issue1484.adl │ │ └── FuncSpec │ │ │ ├── testinfo.yaml │ │ │ ├── Issue1275.adl │ │ │ ├── testPredLogic.adl │ │ │ └── testIssue1183.adl │ └── README.md ├── Sentinel │ ├── Tests │ │ ├── ShouldFail │ │ │ ├── OnlyProto │ │ │ │ └── testinfo.yaml │ │ │ └── singletontest.adl │ │ ├── ShouldSucceed │ │ │ ├── OnlyValidation │ │ │ │ ├── Issue751.adl │ │ │ │ ├── testinfo.yaml │ │ │ │ ├── Bug337_FatalONE.adl │ │ │ │ ├── Issue853.adl │ │ │ │ ├── Issue280.adl │ │ │ │ └── Ticket580.adl │ │ │ └── testinfo.yaml │ │ └── NoSentinel │ │ │ ├── Issue192.xlsx │ │ │ ├── Issue1465Test.xlsx │ │ │ ├── Issue192Test.adl │ │ │ └── Issue1465Test.adl │ └── README.md ├── StillUnsupported │ ├── Issue1127.xlsx │ ├── Issue166_2.adl │ ├── Issue1397.adl │ ├── Issue1419.adl │ ├── Issue1397-1.adl │ ├── Issue1420.adl │ ├── singletontest.adl │ ├── Issue1127.adl │ └── Issue166.adl └── performance │ └── Issue1409 │ └── Issue1409.xlsx ├── composer.json ├── ampersand └── .gitignore ├── app ├── Test │ └── Main.hs ├── AmpPreProc │ └── Main.hs └── Ampersand │ └── Main.hs ├── .ghci ├── weeder.dhall ├── .dockerignore ├── .devcontainer ├── Dockerfile └── .editorconfig ├── ArchitectureAndDesign ├── Parser ABI voorbereiding.doc ├── AmpersandCompilerArchitecture.png └── Syntax │ └── README.md ├── src ├── Ampersand │ ├── Output.hs │ ├── Misc │ │ └── Defaults.hs │ ├── Input.hs │ ├── Core │ │ └── ShowPStruct.hs │ ├── Options │ │ ├── ValidateOptsParser.hs │ │ ├── ProofOptsParser.hs │ │ ├── TestOptsParser.hs │ │ ├── InputOutputOpts.hs │ │ ├── DevoutputOptsParser.hs │ │ └── DaemonParser.hs │ ├── Test.hs │ ├── Classes.hs │ ├── Commands │ │ ├── Init.hs │ │ └── Validate.hs │ ├── Basics.hs │ └── Output │ │ ├── ToJSON │ │ └── Settings.hs │ │ └── ToPandoc.hs └── Ampersand.hs ├── hie.yaml ├── miscellaneous └── Berichten │ ├── lib │ ├── headerdoc │ │ └── sbdh.html │ ├── header.html │ ├── main.html │ └── menu.html │ └── index.html ├── .github ├── ISSUE_TEMPLATE │ ├── documentation.md │ └── feature_request.md └── workflows │ └── triggerDocsUpdate.yml └── README.md /docs/modeling/architecture.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/the-tools-we-use/rap3-student.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/the-tools-we-use/rap3-tutor.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/styles/pdf.css: -------------------------------------------------------------------------------- 1 | /* CSS for pdf */ 2 | -------------------------------------------------------------------------------- /outputTemplates/default.haddock: -------------------------------------------------------------------------------- 1 | $body$ 2 | -------------------------------------------------------------------------------- /docs/empty.md: -------------------------------------------------------------------------------- 1 | This page is intentionally blank -------------------------------------------------------------------------------- /docs/styles/ebook.css: -------------------------------------------------------------------------------- 1 | /* CSS for ebook */ 2 | -------------------------------------------------------------------------------- /docs/styles/print.css: -------------------------------------------------------------------------------- 1 | /* CSS for print */ 2 | -------------------------------------------------------------------------------- /docs/styles/website.css: -------------------------------------------------------------------------------- 1 | /* CSS for website */ 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.xlsx diff=excel 2 | *.xls diff=excel 3 | -------------------------------------------------------------------------------- /docs/reference-material/syntactical-conventions/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AmpersandData/FormalAmpersand/.ampersand: -------------------------------------------------------------------------------- 1 | FormalAmpersand.adl -------------------------------------------------------------------------------- /AmpersandData/PrototypeContext/.ampersand: -------------------------------------------------------------------------------- 1 | PrototypeContext.adl -------------------------------------------------------------------------------- /docs/reference-material/syntactical-conventions/language-support.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/the-tools-we-use/book.json: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": ["mathjax"] 3 | } 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/css/Custom.css: -------------------------------------------------------------------------------- 1 | @import url("Oblomilan.css"); 2 | -------------------------------------------------------------------------------- /docs/docker/4-prototype-multi-stage-build.md: -------------------------------------------------------------------------------- 1 | # Prototype multi-stage build 2 | 3 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "autoload": { 3 | "psr-4": { "": "src/" } 4 | } 5 | } -------------------------------------------------------------------------------- /docs/modeling/limitations-of-ampersand.md: -------------------------------------------------------------------------------- 1 | # Limitations of Ampersand 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/ParseFail.adl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ampersand/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore -------------------------------------------------------------------------------- /docs/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/image.png -------------------------------------------------------------------------------- /docs/assets/ssh1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ssh1.png -------------------------------------------------------------------------------- /docs/assets/ssh2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ssh2.png -------------------------------------------------------------------------------- /docs/assets/ssh3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ssh3.png -------------------------------------------------------------------------------- /docs/assets/ssh4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ssh4.png -------------------------------------------------------------------------------- /docs/assets/ssh5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ssh5.png -------------------------------------------------------------------------------- /docs/landingpage/0-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Introduction 3 | --- 4 | 5 | # Ampersand documentation 6 | -------------------------------------------------------------------------------- /docs/assets/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/import.png -------------------------------------------------------------------------------- /app/Test/Main.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import MainApps 4 | 5 | main :: IO () 6 | main = mainTest 7 | -------------------------------------------------------------------------------- /docs/assets/afbeelding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/afbeelding.png -------------------------------------------------------------------------------- /docs/assets/brokenLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/brokenLink.png -------------------------------------------------------------------------------- /docs/assets/phpMyAdmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/phpMyAdmin.png -------------------------------------------------------------------------------- /docs/assets/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/screenshot.png -------------------------------------------------------------------------------- /docs/assets/untitled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled.png -------------------------------------------------------------------------------- /docs/assets/Docker store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Docker store.png -------------------------------------------------------------------------------- /docs/assets/create-field.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-field.png -------------------------------------------------------------------------------- /docs/assets/crud-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/crud-buttons.png -------------------------------------------------------------------------------- /docs/assets/login button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/login button.png -------------------------------------------------------------------------------- /docs/assets/login-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/login-button.png -------------------------------------------------------------------------------- /docs/assets/untitled (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled (1).png -------------------------------------------------------------------------------- /app/AmpPreProc/Main.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import MainApps 4 | 5 | main :: IO () 6 | main = preProcessor 7 | -------------------------------------------------------------------------------- /app/Ampersand/Main.hs: -------------------------------------------------------------------------------- 1 | module Main (main) where 2 | 3 | import MainApps 4 | 5 | main :: IO () 6 | main = ampersand 7 | -------------------------------------------------------------------------------- /docs/AmpersandDocsStructure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/AmpersandDocsStructure.png -------------------------------------------------------------------------------- /docs/assets/Register button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Register button.png -------------------------------------------------------------------------------- /docs/assets/box-crud-create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/box-crud-create.png -------------------------------------------------------------------------------- /docs/assets/box-crud-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/box-crud-delete.png -------------------------------------------------------------------------------- /docs/assets/box-crud-update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/box-crud-update.png -------------------------------------------------------------------------------- /docs/assets/create script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create script.png -------------------------------------------------------------------------------- /docs/assets/create-script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-script.png -------------------------------------------------------------------------------- /docs/assets/docker-compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/docker-compose.png -------------------------------------------------------------------------------- /docs/assets/register-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/register-button.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/Documentation.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | ## How to contribute to the documentation of Ampersand 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand check --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /.ghci: -------------------------------------------------------------------------------- 1 | :set -fwarn-unused-binds -fwarn-unused-imports -fwarn-orphans -fwarn-incomplete-patterns -ferror-spans 2 | :set -isrc 3 | -------------------------------------------------------------------------------- /AmpersandData/Semantics/AST.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/AST.xlsx -------------------------------------------------------------------------------- /docs/Copy of Propositiescan.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/Copy of Propositiescan.xlsx -------------------------------------------------------------------------------- /docs/assets/Before migration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Before migration.png -------------------------------------------------------------------------------- /docs/assets/Compiler messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Compiler messages.png -------------------------------------------------------------------------------- /docs/assets/compiler-messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/compiler-messages.png -------------------------------------------------------------------------------- /docs/assets/create script (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create script (1).png -------------------------------------------------------------------------------- /docs/assets/create script (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create script (2).png -------------------------------------------------------------------------------- /docs/assets/create script (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create script (3).png -------------------------------------------------------------------------------- /docs/assets/create-script (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-script (1).png -------------------------------------------------------------------------------- /docs/assets/create-script (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-script (2).png -------------------------------------------------------------------------------- /docs/assets/create-script (3).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-script (3).png -------------------------------------------------------------------------------- /docs/assets/field-crud-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/field-crud-delete.png -------------------------------------------------------------------------------- /docs/assets/field-crud-update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/field-crud-update.png -------------------------------------------------------------------------------- /docs/assets/insecure password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/insecure password.png -------------------------------------------------------------------------------- /docs/assets/insecure-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/insecure-password.png -------------------------------------------------------------------------------- /docs/assets/screenshot-import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/screenshot-import.png -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue1014.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1014 2 | 3 | CLASSIFY CVE ISA CVE 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Simple/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/tutorial/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /weeder.dhall: -------------------------------------------------------------------------------- 1 | { roots = [ "^Main.main$" 2 | , "Paths_ampersand.*" 3 | ] 4 | , type-class-roots = True 5 | } -------------------------------------------------------------------------------- /AmpersandData/Semantics/Atoms.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Atoms.xlsx -------------------------------------------------------------------------------- /AmpersandData/Semantics/Login.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Login.xlsx -------------------------------------------------------------------------------- /AmpersandData/Semantics/Tables.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Tables.xlsx -------------------------------------------------------------------------------- /AmpersandData/Semantics/Terms.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Terms.xlsx -------------------------------------------------------------------------------- /AmpersandData/Semantics/Views.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Views.xlsx -------------------------------------------------------------------------------- /docs/assets/Building a prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Building a prototype.png -------------------------------------------------------------------------------- /docs/assets/COLS layout example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/COLS layout example.png -------------------------------------------------------------------------------- /docs/assets/Create script button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Create script button.png -------------------------------------------------------------------------------- /docs/assets/Directory structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Directory structure.png -------------------------------------------------------------------------------- /docs/assets/InterfaceLovellRaw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceLovellRaw.jpg -------------------------------------------------------------------------------- /docs/assets/ROWS layout example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ROWS layout example.png -------------------------------------------------------------------------------- /docs/assets/TechnicalDataModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/TechnicalDataModel.png -------------------------------------------------------------------------------- /docs/assets/building-a-prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/building-a-prototype.png -------------------------------------------------------------------------------- /docs/assets/cols-layout-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/cols-layout-example.png -------------------------------------------------------------------------------- /docs/assets/concepts-presidents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/concepts-presidents.png -------------------------------------------------------------------------------- /docs/assets/create-script-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/create-script-button.png -------------------------------------------------------------------------------- /docs/assets/databaseuserconfig.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/databaseuserconfig.jpg -------------------------------------------------------------------------------- /docs/assets/docker-compose (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/docker-compose (1).png -------------------------------------------------------------------------------- /docs/assets/docker-compose (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/docker-compose (2).png -------------------------------------------------------------------------------- /docs/assets/release-train-rap3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/release-train-rap3.png -------------------------------------------------------------------------------- /docs/assets/rows-layout-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/rows-layout-example.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-10.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-2.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-3.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-4.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-5.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-6.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-7.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-8.png -------------------------------------------------------------------------------- /testing/Travis/testcases/Archimate/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand data-analysis --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/SQL/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand check --verbose 3 | exitcode: 0 -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/xlsxParsing/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 -------------------------------------------------------------------------------- /testing/Travis/testcases/Preprocessor/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand export --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .* 2 | ArchitectureAndDesign/ 3 | docker/ 4 | miscellaneous/ 5 | *.lock 6 | README* 7 | travis_long 8 | .dockerignore 9 | -------------------------------------------------------------------------------- /AmpersandData/Semantics/Contexts.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/Contexts.xlsx -------------------------------------------------------------------------------- /docs/assets/CDRuleModuleEnrollment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/CDRuleModuleEnrollment.png -------------------------------------------------------------------------------- /docs/assets/br-course-pagina-1 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/br-course-pagina-1 (1).png -------------------------------------------------------------------------------- /docs/assets/concepts-presidents-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/concepts-presidents-2.png -------------------------------------------------------------------------------- /docs/assets/concepts-presidents-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/concepts-presidents-3.png -------------------------------------------------------------------------------- /docs/assets/insecure password (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/insecure password (1).png -------------------------------------------------------------------------------- /docs/assets/insecure-password (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/insecure-password (1).png -------------------------------------------------------------------------------- /docs/assets/presidents-data-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/presidents-data-model.png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-3 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-3 (1).png -------------------------------------------------------------------------------- /docs/assets/untitled-diagram-7 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/untitled-diagram-7 (1).png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/image.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/login.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldFail/OnlyProto/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand proto --verbose 3 | exitcode: 130 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Current/SQL/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/Other/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/NoSentinel/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand export --verbose 3 | exitcode: 10 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ARM-Test2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARMTest2 IN DUTCH 2 | 3 | RULE ARMTest: I[JaNee] |- "Ja" \/ "Nee" 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand export --verbose 3 | exitcode: 10 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/ISAtest/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/empty.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Empty IN DUTCH 2 | ENDCONTEXT 3 | 4 | -- There is not much in here... -------------------------------------------------------------------------------- /AmpersandData/Semantics/ContextsTry.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/ContextsTry.xlsx -------------------------------------------------------------------------------- /AmpersandData/Semantics/MinimalAST.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/Semantics/MinimalAST.xlsx -------------------------------------------------------------------------------- /docs/assets/Architectuur Ampersand FW.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Architectuur Ampersand FW.png -------------------------------------------------------------------------------- /docs/assets/InterfaceAlphaBoardNested.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceAlphaBoardNested.jpg -------------------------------------------------------------------------------- /docs/assets/InterfaceLovellEditable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceLovellEditable.jpg -------------------------------------------------------------------------------- /docs/assets/InterfaceLovellTabsCRUD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceLovellTabsCRUD.png -------------------------------------------------------------------------------- /docs/assets/Overzicht IAM processen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Overzicht IAM processen.png -------------------------------------------------------------------------------- /docs/assets/Script editor new script.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Script editor new script.png -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-nosql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-nosql.png -------------------------------------------------------------------------------- /docs/assets/migration_system_deployed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/migration_system_deployed.png -------------------------------------------------------------------------------- /docs/assets/screenshot-docker-compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/screenshot-docker-compose.png -------------------------------------------------------------------------------- /docs/assets/screenshot-upload-excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/screenshot-upload-excel.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/Login2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/Login2.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/import.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/import.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/logout.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/Issue751.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue751 IN ENGLISH 2 | 3 | CLASSIFY X ISA X 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1127.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/StillUnsupported/Issue1127.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Current/SQLFail/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 10 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue899b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ISSUE899b 2 | CLASSIFY A ISA B 3 | CLASSIFY B ISA A 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ampersandtarski/ampersand-devcontainer:ghc9-6-6 2 | 3 | ENV DEBIAN_FRONTEND=dialog 4 | 5 | ENTRYPOINT ["/bin/bash"] -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype (NoSQL).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype (NoSQL).png -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-swagger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-swagger.png -------------------------------------------------------------------------------- /docs/assets/br-course-pagina-1 (1) (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/br-course-pagina-1 (1) (1).png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/image (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/image (1).png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/import (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/import (1).png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/logo-2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/logo-2x-1.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/parseError.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/parseError.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/phpMyAdmin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/phpMyAdmin.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /AmpersandData/FormalAmpersand/MinimalAST.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/AmpersandData/FormalAmpersand/MinimalAST.xlsx -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype (OWL RDFS).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype (OWL RDFS).png -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype (swagger).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype (swagger).png -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype Currently.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype Currently.png -------------------------------------------------------------------------------- /docs/assets/Finished processing your model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Finished processing your model.png -------------------------------------------------------------------------------- /docs/assets/InterfaceAlphaBoardFormatted.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceAlphaBoardFormatted.jpg -------------------------------------------------------------------------------- /docs/assets/InterfaceAlphaBoardNestedCRUD.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/InterfaceAlphaBoardNestedCRUD.jpg -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-currently.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-currently.png -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-owl-rdfs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-owl-rdfs.png -------------------------------------------------------------------------------- /docs/assets/views_controllers_interfaces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/views_controllers_interfaces.png -------------------------------------------------------------------------------- /docs/reference-material/README.md: -------------------------------------------------------------------------------- 1 | This section describes the full language Ampersand. Please use it as a reference rather than an introductory course. -------------------------------------------------------------------------------- /docs/the-tools-we-use/Modify release title.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/Modify release title.PNG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/CompilationOK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/CompilationOK.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/Docker store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/Docker store.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/NieuwScript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/NieuwScript.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/create pull request.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/create pull request.PNG -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/InvariantViolations/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate 3 | exitcode: 10 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/validate/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/performance/Issue1409/Issue1409.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/performance/Issue1409/Issue1409.xlsx -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-directories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-directories.png -------------------------------------------------------------------------------- /docs/assets/state-of-ampersand-project-2019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/state-of-ampersand-project-2019.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/Initial loading of RAP.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/Initial loading of RAP.JPG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/menuNieuwScript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/menuNieuwScript.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/NoSentinel/Issue192.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Sentinel/Tests/NoSentinel/Issue192.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/CurrentMultiFile/Bug388_Retina/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue960.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue960 2 | 3 | VIEW Note : Note HTML TEMPLATE "Note.html" ENDVIEW 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /ArchitectureAndDesign/Parser ABI voorbereiding.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/ArchitectureAndDesign/Parser ABI voorbereiding.doc -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype (directories).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype (directories).png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/appveyor_logo.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/appveyor_logo.svg.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/release-train-rap3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/release-train-rap3.png -------------------------------------------------------------------------------- /testing/Travis/testcases/meatgrinder/Issue1487.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1487 2 | 3 | CONCEPT Foo "This concept is not used anywhere in the script." 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /docs/assets/towards-multiple-types-of-persistence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/towards-multiple-types-of-persistence.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/Filezilla with RAP3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/Filezilla with RAP3.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/MySQL authorization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/MySQL authorization.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/create pull request.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/create pull request.PNG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/create-pull-request.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/create-pull-request.PNG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/initial RAP3 screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/initial RAP3 screen.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/modify-release-title.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/modify-release-title.PNG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/reopen-in-container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/reopen-in-container.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/NoSentinel/Issue1465Test.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Sentinel/Tests/NoSentinel/Issue1465Test.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 10 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try39.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try39 IN ENGLISH 2 | CLASSIFY A ISA B 3 | RELATION r[A*B] 4 | RELATION s[B*A] [MAP] 5 | ENDCONTEXT -------------------------------------------------------------------------------- /ArchitectureAndDesign/AmpersandCompilerArchitecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/ArchitectureAndDesign/AmpersandCompilerArchitecture.png -------------------------------------------------------------------------------- /docs/assets/Ampersand Prototype (reactive front end).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/Ampersand Prototype (reactive front end).png -------------------------------------------------------------------------------- /docs/assets/ampersand-prototype-reactive-front-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/assets/ampersand-prototype-reactive-front-end.png -------------------------------------------------------------------------------- /docs/conceptual/datamigration-Pre-migration.drawio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/conceptual/datamigration-Pre-migration.drawio.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/travisci-full-color-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/travisci-full-color-1.png -------------------------------------------------------------------------------- /testing/Travis/testcases/FuncSpec/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand documentation --verbose --format docx --no-graphics --Diagnosis 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/NoMinMinValidate-Issue557/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand population --verbose 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /outputTemplates/default.jira: -------------------------------------------------------------------------------- 1 | $for(include-before)$ 2 | $include-before$ 3 | 4 | $endfor$ 5 | $body$ 6 | $for(include-after)$ 7 | 8 | $include-after$ 9 | $endfor$ 10 | -------------------------------------------------------------------------------- /testing/Travis/testcases/meatgrinder/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand population --build-recipe Grind --verbose --output-format JSON 3 | exitcode: 0 4 | -------------------------------------------------------------------------------- /outputTemplates/default.textile: -------------------------------------------------------------------------------- 1 | $for(include-before)$ 2 | $include-before$ 3 | 4 | $endfor$ 5 | $body$ 6 | $for(include-after)$ 7 | 8 | $include-after$ 9 | $endfor$ 10 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/Other/Bug_InjectiveFunction_Fatal152.adl: -------------------------------------------------------------------------------- 1 | CONTEXT BugInjectiveFunctionFatal152 IN ENGLISH 2 | 3 | RELATION r[A*B] [UNI,TOT,INJ] 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/xlsxParsing/Issue1056.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Travis/testcases/Parsing/xlsxParsing/Issue1056.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Issue726.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test 2 | RELATION r [A*B] 3 | REPRESENT B TYPE INTEGER 4 | RULE r;"Aap" 5 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue1018.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1018 2 | 3 | CONCEPT X "X" 4 | INTERFACE Test: V[Session*X] BOX [ "line": TXT "something" ] 5 | 6 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue142.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Travis/testcases/prototype/shouldSucceed/Issue142.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue192.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Travis/testcases/prototype/shouldSucceed/Issue192.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue194.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Travis/testcases/prototype/shouldSucceed/Issue194.xlsx -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/Comparing master and development.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/Comparing master and development.PNG -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/Filezilla transfer confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/Filezilla transfer confirmation.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/comparing-master-and-development.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/comparing-master-and-development.PNG -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Ticket726.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test 2 | RELATION r [A*B] 3 | REPRESENT B TYPE INTEGER 4 | RULE r;"Aap" 5 | ENDCONTEXT 6 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/CP23xBug2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT CP23xBug2 IN ENGLISH 2 | PURPOSE CONTEXT CP23xBug2 3 | {+Here we state the purpose of this context+} 4 | 5 | ENDCONTEXT -------------------------------------------------------------------------------- /src/Ampersand/Output.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Output 2 | ( module Ampersand.Output.FSpec2SQL, 3 | ) 4 | where 5 | 6 | import Ampersand.Output.FSpec2SQL (databaseStructureSql, dumpSQLqueries) 7 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/Issue_1531.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue IN DUTCH 2 | 3 | RELATION r[A*Prio] [UNI] 4 | 5 | INTERFACE Eenheid : I[Eenheid] BOX 6 | [ Eenheid : I 7 | ] 8 | 9 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue166_2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue166_2 IN ENGLISH 2 | 3 | RULE test : -'Sinterklaas'[Persoon] 4 | MEANING "There is no atom Sinterklaas in the concept Persoon" 5 | 6 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Current/SQLFail/Bug331_TotalInjective.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug_TotalInjective IN ENGLISH 2 | RELATION rel[A*B][TOT,INJ] 3 | RELATION populateA[A*A] = [("a1", "a1")] 4 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/tutorial/README.md: -------------------------------------------------------------------------------- 1 | # Tutorial 2 | 3 | This directory contains ampersand models that are used in online tutorials of Ampersand. They are here to enable automatic tests on them. -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.31.22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.31.22.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.36.16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.36.16.png -------------------------------------------------------------------------------- /docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.37.47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/docs/the-tools-we-use/assets/schermafbeelding-2021-07-31-om-08.37.47.png -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | - command: ampersand validate --verbose 3 | exitcode: 0 4 | - command: ampersand proto --verbose --no-frontend 5 | exitcode: 0 6 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Current/SQLFail/Bug302_IgnoredV.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH -- exposes bug #302 2 | 3 | RELATION dummy[A*A] = [("A1", "A2")] 4 | 5 | RULE bug : V[A]-(V;"A1") 6 | 7 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/Issue1499.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1499 2 | 3 | CONCEPT BusinessUnit LABEL "Business Unit" "" 4 | 5 | RELATION organisation[BusinessUnit * Organisation] [UNI,TOT] 6 | 7 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue142TooGeneric.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AmpersandTarski/Ampersand/HEAD/testing/Travis/testcases/prototype/shouldSucceed/Issue142TooGeneric.xlsx -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/Issue923.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue923 2 | 3 | RELATION r[A*A] 4 | 5 | RULE R : r = -r 6 | VIOLATION (TXT "Source atom: ", SRC I, TXT ", Target atom:", TGT I") 7 | 8 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/BroadTableTest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT BroadTableTest IN ENGLISH 2 | 3 | CLASSIFY Asml ISA A 4 | CLASSIFY Bsml ISA B 5 | 6 | RELATION r[B*Asml][UNI,INJ,SUR] 7 | 8 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/CPLbug1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT CPLbug1 IN DUTCH 2 | 3 | RELATION r[A*A] [PROP] 4 | RELATION r[B*A] 5 | 6 | POPULATION r[B*A] CONTAINS [ ( "aap", "noot" ) ] 7 | 8 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try41.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try41 IN ENGLISH 2 | 3 | 4 | PATTERN Try41 5 | 6 | RELATION r[A*B] 7 | 8 | RULE Try41: r\r 9 | 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | -------------------------------------------------------------------------------- /src/Ampersand/Misc/Defaults.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE FlexibleInstances #-} 2 | 3 | module Ampersand.Misc.Defaults where 4 | 5 | import RIO.FilePath 6 | 7 | defaultDirPrototype :: FilePath 8 | defaultDirPrototype = ".proto" 9 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/CP23xBug1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT CP23xBug1 IN ENGLISH 2 | PURPOSE CONTEXT CP23xBug1 3 | {+Here we state the purpose of this context+} 4 | 5 | INCLUDE "CP23xBug2.adl" 6 | 7 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try41a.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try41a IN ENGLISH 2 | 3 | 4 | PATTERN Try41a 5 | 6 | RELATION r[A*B] 7 | 8 | RULE Try41a: r/r 9 | 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | -------------------------------------------------------------------------------- /outputTemplates/default.dokuwiki: -------------------------------------------------------------------------------- 1 | $for(include-before)$ 2 | $include-before$ 3 | 4 | $endfor$ 5 | $if(toc)$ 6 | __TOC__ 7 | 8 | $endif$ 9 | $body$ 10 | $for(include-after)$ 11 | 12 | $include-after$ 13 | $endfor$ 14 | -------------------------------------------------------------------------------- /outputTemplates/default.xwiki: -------------------------------------------------------------------------------- 1 | $for(include-before)$ 2 | $include-before$ 3 | 4 | $endfor$ 5 | $if(toc)$ 6 | {{toc /}} 7 | 8 | $endif$ 9 | $body$ 10 | $for(include-after)$ 11 | 12 | $include-after$ 13 | $endfor$ 14 | -------------------------------------------------------------------------------- /outputTemplates/default.mediawiki: -------------------------------------------------------------------------------- 1 | $for(include-before)$ 2 | $include-before$ 3 | 4 | $endfor$ 5 | $if(toc)$ 6 | __TOC__ 7 | 8 | $endif$ 9 | $body$ 10 | $for(include-after)$ 11 | 12 | $include-after$ 13 | $endfor$ 14 | -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/Bug337_FatalONE.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH 2 | 3 | PATTERN Developer 4 | RULE Triviality : I[ONE] = I[ONE] 5 | ROLE Developer MAINTAINS Triviality 6 | ENDPATTERN 7 | 8 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/aliasTests.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test 2 | 3 | CLASSIFY A ISA B 4 | CLASSIFY B ISA C 5 | CLASSIFY C ISA A 6 | 7 | RELATION r [A * B] [UNI,INJ, SUR,TOT,SYM,ASY,TRN,RFX,IRF,PROP] 8 | ENDCONTEXT -------------------------------------------------------------------------------- /src/Ampersand/Input.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Input 2 | ( module Ampersand.Input.ADL1.CtxError, 3 | module Ampersand.Input.Parsing, 4 | ) 5 | where 6 | 7 | import Ampersand.Input.ADL1.CtxError 8 | import Ampersand.Input.Parsing 9 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/Issue1189.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1189 2 | 3 | RELATION r[A * B] DEFAULT TGT EVALPHP "Ordina" SRC VALUE 10, 20 4 | 5 | ENDCONTEXT 6 | 7 | -- This should fail, because 10 should match the TType of A -------------------------------------------------------------------------------- /src/Ampersand/Core/ShowPStruct.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Core.ShowPStruct (Pretty, showP) where 2 | 3 | import Ampersand.ADL1.PrettyPrinters 4 | import Ampersand.Basics 5 | 6 | showP :: (Pretty a) => a -> Text 7 | showP = prettyPrint . pretty 8 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/NamespaceRule.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH 2 | 3 | PATTERN Developer 4 | RULE Triviality : I[ONE] = I[ONE] 5 | ENDPATTERN 6 | 7 | ENDCONTEXT 8 | 9 | {- The name of a rule is not a proper name. It is quoted. -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue142.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue142 IN DUTCH 2 | INCLUDE "Issue142.xlsx" 3 | -- CLASSIFY Box ISA Thing 4 | CLASSIFY Application ISA Box 5 | RELATION boxDoc[Box*Documentation][UNI,TOT] 6 | ENDCONTEXT -------------------------------------------------------------------------------- /docs/docker/5-prototype-database.md: -------------------------------------------------------------------------------- 1 | # Prototype database 2 | 3 | To run a database that can be used by the Ampersand prototype framework, you can easily use a Docker image from: `docker.pkg.github.com/ampersandtarski/prototype-db/prototype-db` 4 | 5 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/Issue1029b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1029a 2 | 3 | RULE aap : I[A] 4 | 5 | PATTERN Dummy1 6 | RULE aap: I[B] 7 | ENDPATTERN 8 | 9 | PATTERN Dummy2 10 | RULE aap: I[C] 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue1183.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ISSUE1183 2 | 3 | CONCEPT SomeConcept "description" "this description comes out of thin air" 4 | MEANING {+this is some markup for an explainaition of the concept+} 5 | 6 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try33.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try33 IN ENGLISH 2 | 3 | PATTERN Try33 4 | CLASSIFY B ISA A 5 | CLASSIFY C ISA A 6 | RELATION mandatoryAttribute[A*D] [MAP] 7 | RELATION optionalAttribute[B*D] [MAP] 8 | ENDPATTERN 9 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1397.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1397 2 | 3 | CLASSIFY Application ISA MaintainedItem 4 | 5 | RELATION deployed[MaintainedItem*Platform] 6 | RELATION loaded[Application*Platform] 7 | 8 | ENFORCE loaded >: deployed 9 | 10 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue1413.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1413 2 | 3 | REPRESENT Bool TYPE BOOLEAN 4 | 5 | RELATION flip[SESSION*Bool] [UNI] 6 | 7 | INTERFACE switch : "_SESSION"[SESSION] BOX 8 | [ flipje : flip 9 | ] 10 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Sentinel/Tests/NoSentinel/Issue192Test.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue192 IN DUTCH 2 | INCLUDE "Issue192.xlsx" 3 | CLASSIFY Auto ISA Voertuig 4 | RELATION eigenaar [Voertuig * Persoon] [UNI,TOT] 5 | RELATION aantalWielen [ Auto * Aantal] [UNI,TOT] 6 | ENDCONTEXT 7 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/Issue406.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue406a IN ENGLISH 2 | INTERFACE Foo : I[A] 3 | RELATION s[A*B] 4 | ENDCONTEXT 5 | 6 | -- Every INTERFACE expression needs a BOX part. See https://github.com/AmpersandTarski/Ampersand/issues/406 7 | -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1419.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1419 2 | -- This script should succeed on compile time. 3 | 4 | CLASSIFY Ss ISA S 5 | CLASSIFY Uu ISA U 6 | 7 | RELATION r[S*T] 8 | RELATION s[T*U] 9 | RELATION t[Ss*Uu] 10 | 11 | ENFORCE t >: r;s 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try50.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try47 IN DUTCH 2 | 3 | PATTERN Medewerkers 4 | CLASSIFY S ISA G 5 | RELATION r[G*Iets] 6 | RELATION s[S*S] 7 | ENDPATTERN 8 | 9 | INTERFACE TeValideren : I[G] 10 | BOX [ iets : s;r ] 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/Issue335.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue335 IN ENGLISH 2 | 3 | REPRESENT B TYPE BIGALPHANUMERIC 4 | REPRESENT C TYPE BIGALPHANUMERIC 5 | 6 | RULE InitializeS: I[B] |- I[C] 7 | 8 | ENDCONTEXT 9 | 10 | -- This script shows a type error in the rule -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/Issue1029a.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1029a 2 | 3 | RULE aap : I[A] 4 | 5 | PATTERN Dummy1 6 | RULE aap : I[B] 7 | RULE aap : I[B] 8 | ENDPATTERN 9 | 10 | PATTERN Dummy2 11 | RULE aap : I[C] 12 | ENDPATTERN 13 | 14 | ENDCONTEXT 15 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue785.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue785 2 | 3 | RELATION prop[A*A] [PROP] 4 | 5 | RULE goodTerm: (I - prop);V;"Some text"[B] 6 | RULE buggyTerm: (I - prop)#"Some text"[B] 7 | 8 | POPULATION B CONTAINS [ "Some Text" ] 9 | 10 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/fatal313bug.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH 2 | 3 | RELATION r1[A*B] 4 | RELATION r2[A*B] 5 | RELATION s[A*C] 6 | 7 | INTERFACE Piet : I[B] 8 | BOX[ "label" : (r1 \/ r2)~;s 9 | BOX[ "label2" : I 10 | ] ] 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try43a.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try43 IN ENGLISH 2 | RELATION r[B*A] [UNI] 3 | RELATION s[A*C] [UNI] 4 | RELATION t[A*D] [UNI] 5 | 6 | INTERFACE Try43 : I[ONE];V[ONE*B] 7 | BOX 8 | [ foo : r /\ r;(s;s~ /\ t;t~ ) 9 | ] 10 | 11 | ENDCONTEXT -------------------------------------------------------------------------------- /AmpersandData/FormalAmpersand/README.txt: -------------------------------------------------------------------------------- 1 | This directory contains a formal specification of Ampersand in Ampersand. 2 | 3 | 4 | The RAP.adl file and its included files are used to generate a repository. In this initial version, they are exact copies of the files in the RAP branch. 5 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/SQL/Bug_Totality.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ELMStrippedStripped IN ENGLISH 2 | 3 | RELATION session[Session*Session] [TOT] = [ ("S", "S") ] 4 | 5 | RELATION sessionUser[Session*Userid] [UNI] 6 | 7 | RULE bug: sessionUser; sessionUser~ |- I[Session] 8 | 9 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/typecheckerror.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TYPECHECKERROR IN ENGLISH 2 | CLASSIFY A ISA B -- make sure the I really is ambiguous instead of type-incorrect 3 | INTERFACE IFC : I[A] 4 | BOX[ r : I 5 | BOX[ s : I[B] 6 | ] ] 7 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.zimwiki: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | $for(include-before)$ 5 | $include-before$ 6 | 7 | $endfor$ 8 | $if(toc)$ 9 | __TOC__ 10 | 11 | $endif$ 12 | $body$ 13 | $for(include-after)$ 14 | 15 | $include-after$ 16 | $endfor$ 17 | -------------------------------------------------------------------------------- /.devcontainer/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*.hs] 6 | indent_style = space 7 | indent_size = 2 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [Makefile] 14 | indent_style = tab 15 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue1189.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1189 2 | 3 | RELATION r[A * B] DEFAULT TGT EVALPHP "getdate()" SRC VALUE 10, 20 4 | REPRESENT A TYPE INTEGER 5 | REPRESENT B TYPE DATE --beware, the PHP function is not validated by the Ampersand typechecker. 6 | ENDCONTEXT 7 | 8 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Issue142Fail.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue142 IN DUTCH 2 | CLASSIFY Application ISA Box 3 | RELATION boxDoc[Box*Documentation][UNI,TOT] 4 | POPULATION boxDoc[Application*Documentation] CONTAINS 5 | [("App1","App1Doc")] 6 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Try34.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try34 IN ENGLISH 2 | 3 | RELATION r[A*B] 4 | RULE I[A] |- r 5 | 6 | 7 | {- Het spreekt voor zich dat de regel niet goed is getypeerd. Echter, ampersand versie 1072 klaagt hier niet over.... -} 8 | 9 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/Issue1281.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1281 2 | 3 | RELATION r[A*B] 4 | RELATION s[C*D] 5 | 6 | ENFORCE r := s 7 | 8 | ENDCONTEXT 9 | 10 | -- The types of expressions at both sides of the `:=` operator must match. In this case, they do not. Hence, this script must fail. -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/ISAtest/Limorange-EditValidation/AddOwnedCitrus.edit.json: -------------------------------------------------------------------------------- 1 | [{"dbCmd":"update","relation":"rel_ownsCitrus_Person_Citrus","isFlipped":false,"parentAtom":"martijn","parentConcept":"Person","childAtom":"New Citrus","childConcept":"Citrus","parentOrChild":"child","originalAtom":""}] -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try51.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try51 IN DUTCH 2 | 3 | PATTERN Medewerkers 4 | CLASSIFY S ISA G 5 | RELATION r[G*Iets] 6 | RELATION s[S*S] 7 | ENDPATTERN 8 | 9 | INTERFACE TeValideren : I[G] 10 | BOX [ iets : s;r 11 | , gen : r 12 | ] 13 | 14 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try32.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try32 IN ENGLISH 2 | RELATION clientName[Client*Name] [UNI,TOT] 3 | ENDCONTEXT 4 | 5 | {- This script failed in revision 1069, when called with --haskell. 6 | For this reason, it is in the Try-sequence. 7 | Of course, this should pass. 8 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/InvariantViolations/Issue708.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue708 2 | 3 | RELATION aá_p [A*B] = [("1","foo")] 4 | RELATION aa_p [A*B] 5 | RELATION aà_p [A*B] = [("1","bar")] 6 | 7 | RULE one : aá_p=aa_p 8 | RULE two : aa_p=aà_p 9 | RULE three : aá_p=aà_p 10 | 11 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.opml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $title$ 5 | $date$ 6 | $for(author)$$author$$sep$; $endfor$ 7 | 8 | 9 | $body$ 10 | 11 | 12 | -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1397-1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1397-1 2 | 3 | CLASSIFY Application ISA MaintainedItem 4 | 5 | RELATION deployed[MaintainedItem*Platform] 6 | RELATION loaded[Application*Platform] 7 | RELATION flv[Application*Discipline] [UNI] 8 | 9 | ENFORCE deployed >: flv#"FLV" - loaded 10 | 11 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/ISAtest/Limorange-EditValidation/AddOwnedLimorange.edit.json: -------------------------------------------------------------------------------- 1 | [{"dbCmd":"update","relation":"rel_ownsLimoranges_Person_Limorange","isFlipped":false,"parentAtom":"martijn","parentConcept":"Person","childAtom":"New Limorange","childConcept":"Limorange","parentOrChild":"child","originalAtom":""}] -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Bug435.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug435 IN ENGLISH 2 | -- Erroneously yields violations: 3 | -- Inconsistencies in rule "UNI r[C*D]": 4 | -- - [("b","b")] 5 | 6 | POPULATION r[A*B] CONTAINS [("a","b")] 7 | RELATION r[A*B] [UNI] 8 | RELATION r[C*D] [UNI] 9 | 10 | ENDCONTEXT 11 | -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1420.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1420 2 | -- This script should fail on runtime, with an error 3 | -- refering to the univalence of s. 4 | 5 | RELATION r[S*T] 6 | RELATION s[S*T] [UNI] 7 | POPULATION r[S*T] CONTAINS 8 | [ ("aap","noot"), ("aap","mies") ] 9 | 10 | ENFORCE s >: r 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/443_InterfaceRefType.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue443 IN ENGLISH 2 | 3 | INTERFACE Main : I[A] 4 | BOX [ l : I[A] INTERFACE B -- Should give a type error 5 | ] 6 | 7 | INTERFACE B : I[B] 8 | BOX [ l : I[B] 9 | ] 10 | 11 | ENDCONTEXT 12 | -------------------------------------------------------------------------------- /testing/StillUnsupported/singletontest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT SingletonTest IN DUTCH 2 | 3 | RULE ErIsEenKoning : "De koning" [Koning] 4 | 5 | ENDCONTEXT 6 | 7 | {- Purpose: 8 | This script should fail, because there is no population specified explicitly, so the rule is violated. See https://github.com/AmpersandTarski/Ampersand/issues/166 9 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try36.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION r[A*C] 6 | RULE Test: r = r 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: This script is there to ensure that multiple declarations are ignored 13 | Result: PASS 14 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue142TooGeneric.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue142TooGeneric IN DUTCH 2 | INCLUDE "Issue142TooGeneric.xlsx" 3 | CLASSIFY Box ISA Thing 4 | CLASSIFY Application ISA Box 5 | RELATION boxDoc[Box*Documentation][UNI,TOT] 6 | ENDCONTEXT 7 | 8 | -- The population in the .xlsx uses a too generic concept. -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Ticket35GitHub.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket35GitHub IN ENGLISH 2 | 3 | RELATION normtextNH[NormText*NormHierarchy] 4 | RELATION normID[Norm*NormID] 5 | 6 | IDENT Norms: Norm(normtextNH,normID) 7 | 8 | CLASSIFY Norm ISA NormText 9 | RELATION isSubsidiaryToNorm[NormText*Norm] 10 | 11 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try36.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION r[A*B] 6 | RULE r = r 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: This script is there to ensure that we get disambiguation errors 13 | Result: PASS 14 | -} -------------------------------------------------------------------------------- /AmpersandData/Repo Interfaces/IS.ifc: -------------------------------------------------------------------------------- 1 | CONTEXT RAP IN ENGLISH LATEX 2 | 3 | INTERFACE ruleOverview : I[ONE] 4 | BOX [ rules : V[ONE*Rule] 5 | BOX [ rule : I 6 | , term : characteristic 7 | ] 8 | ] 9 | 10 | INTERFACE newRule : I[Rule] 11 | BOX [ rule : I 12 | , term : characteristic 13 | ] 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Simple/DeliverySimple.css: -------------------------------------------------------------------------------- 1 | @import url("Oblomilan.css"); 2 | 3 | /* show name for atom with subinterface in Zoek klant op nr */ 4 | [editing=true] .Interface[label="Zoek klant op nr"] .Interface[label=Klantnr] > .AtomList > .AtomRow[rowType=Normal] > .AtomListElt > .Atom > .AtomName { 5 | display: block; 6 | float: none; 7 | } -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try35.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try33 IN ENGLISH 2 | CLASSIFY D ISA DOrA 3 | CLASSIFY A ISA DOrA 4 | 5 | PATTERN Try33 6 | CLASSIFY B ISA A 7 | CLASSIFY C ISA A 8 | RELATION mandatoryAttribute[A*D] [UNI,TOT] 9 | RELATION optionalAttribute[B*D] [UNI,TOT] 10 | CLASSIFY C ISA D 11 | ENDPATTERN 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try12.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test9 4 | RELATION r[A*B] 5 | RULE Test: r = r;V 6 | ENDPATTERN 7 | 8 | ENDCONTEXT 9 | 10 | {- 11 | Purpose: a superficial check whether type deduction works. 12 | Result: PASS 13 | Reason: The type of V can be deduced to [B*B]. 14 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try16.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test16 4 | RELATION r[X*Y] 5 | RELATION s[X*Y] 6 | RULE Test: I;r 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: This script tests type checking wrt I. 13 | Result: PASS 14 | Reason: the type on ; is inferred as I[X] 15 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION t[B*C] 7 | RELATION t[Q*C] 8 | RULE Test:r = s;t 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: This script is a simple correct script with = and ; 15 | Result: PASS 16 | -} -------------------------------------------------------------------------------- /outputTemplates/default.plain: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | $titleblock$ 3 | 4 | $endif$ 5 | $for(header-includes)$ 6 | $header-includes$ 7 | 8 | $endfor$ 9 | $for(include-before)$ 10 | $include-before$ 11 | 12 | $endfor$ 13 | $if(toc)$ 14 | $table-of-contents$ 15 | 16 | $endif$ 17 | $body$ 18 | $for(include-after)$ 19 | 20 | $include-after$ 21 | $endfor$ 22 | -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue1127.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1127 IN ENGLISH 2 | INCLUDE "Issue1127.xlsx" 3 | 4 | RELATION name[Concept*ConceptName] [UNI] 5 | RELATION name[Relation*RelationName] [UNI] 6 | 7 | -- This testcase should fail, because the .xlsx file contains a population for a relation that isn't declared explicitly in this .adl script. 8 | 9 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/SQL/Bug_RelAdd.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH 2 | 3 | RELATION r1[A*B] [UNI] 4 | 5 | RELATION r2[A*C] [] 6 | = [ ("a1", "c1") ] 7 | 8 | RULE relAdd : r1~ ! r2 -- creates an SQL error because of a problem in selectExpr for ERad 9 | 10 | -- test with Bug_RelAdd/php/Database.php?testRule=relAdd 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue855.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue855 2 | 3 | CLASSIFY Specific, SpeciFIK ISA Generic 4 | -- CLASSIFY Specific ISA Generic 5 | -- CLASSIFY SpeciFIK ISA Generic 6 | 7 | RELATION xGeneric[X*Generic] 8 | RELATION xSpecific[X*Specific] 9 | 10 | RULE SpecificsAreGenerics : xSpecific |- xGeneric 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.commonmark: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | $titleblock$ 3 | 4 | $endif$ 5 | $for(header-includes)$ 6 | $header-includes$ 7 | 8 | $endfor$ 9 | $for(include-before)$ 10 | $include-before$ 11 | 12 | $endfor$ 13 | $if(toc)$ 14 | $table-of-contents$ 15 | 16 | $endif$ 17 | $body$ 18 | $for(include-after)$ 19 | 20 | $include-after$ 21 | $endfor$ 22 | -------------------------------------------------------------------------------- /outputTemplates/default.markdown: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | $titleblock$ 3 | 4 | $endif$ 5 | $for(header-includes)$ 6 | $header-includes$ 7 | 8 | $endfor$ 9 | $for(include-before)$ 10 | $include-before$ 11 | 12 | $endfor$ 13 | $if(toc)$ 14 | $table-of-contents$ 15 | 16 | $endif$ 17 | $body$ 18 | $for(include-after)$ 19 | 20 | $include-after$ 21 | $endfor$ 22 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/RuleNamesMustBeUnique.adl: -------------------------------------------------------------------------------- 1 | CONTEXT RulenamesMustBeUnique IN ENGLISH 2 | 3 | RELATION r[A*B] 4 | 5 | -- Different rules should have different names 6 | RULE rulename : I |- r;r~ 7 | RULE rulename : r;r~ |- I 8 | 9 | RULE rulename : I |- r;r~ 10 | RULE rulename : r;r~ |- I 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try22.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test11 4 | RELATION r[A*A] 5 | RELATION r[B*C] 6 | RULE Test: r = r[A*A]-I 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: a superficial check on type deduction 13 | Result: PASS 14 | Reason: The type of I can be determined from its context 15 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try26.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test26 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION t[C*B] 7 | RELATION t[C*Q] 8 | RULE Test: r = s;t~ 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: This script tests whether flip works, after try1 was successful. 15 | Result: PASS 16 | -} -------------------------------------------------------------------------------- /hie.yaml: -------------------------------------------------------------------------------- 1 | cradle: 2 | stack: 3 | - path: "./src/" 4 | component: "ampersand:lib" 5 | 6 | - path: "./app/AmpPreProc/Main.hs" 7 | component: "ampersand:exe:ampPreProc" 8 | 9 | - path: "./app/Ampersand/Main.hs" 10 | component: "ampersand:exe:ampersand" 11 | 12 | - path: "./app/Test" 13 | component: "ampersand:test:ampersand-test" 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try8.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try8 IN ENGLISH 2 | 3 | PATTERN Try8 4 | RELATION r[A*C] 5 | RELATION r2[A*D] [UNI,TOT] 6 | RELATION s[A*B] 7 | RELATION t[B*C] 8 | CLASSIFY Q ISA B 9 | RULE Try8 : r = s;(t /\ V[Q*C]) 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: Test on proper type casting... 16 | Result: PASS 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/meatgrinder/Issue1484.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1484 IN ENGLISH 2 | PATTERN Courses 3 | 4 | CONCEPT Student "Someone who wants to study at this institute" 5 | CONCEPT Module "An educational entity with a single exam" 6 | RELATION isEnrolledFor [Student*Module] 7 | MEANING "Students enroll for each module in the course separately" 8 | 9 | ENDPATTERN 10 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try2b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test2 4 | RELATION t[Q*Y] [UNI,TOT] 5 | RULE t = t[B*Y] 6 | ENDPATTERN 7 | 8 | ENDCONTEXT 9 | 10 | {- 11 | Purpose: This script shows that a type conflict occurs when t is illegally bound. 12 | Result: FAIL 13 | Reason: t[B*Y] is not declared 14 | -} -------------------------------------------------------------------------------- /docs/videos.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue1281.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1281 2 | 3 | CLASSIFY Vrijwilliger ISA Person 4 | 5 | RELATION personalia[AanmeldingVrijwilliger*Vrijwilliger] 6 | RELATION nationaliteit[Person*Tekst] 7 | RELATION nationaliteit[AanmeldingVrijwilliger*Tekst] 8 | ENFORCE nationaliteit[Person*Tekst] >: personalia~;nationaliteit 9 | 10 | ENDCONTEXT 11 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Ticket445.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket445 IN DUTCH 2 | -------------------------------------------------------- 3 | 4 | RELATION sessionAccount[SESSION*Account] [UNI] 5 | 6 | INTERFACE MijnAccount : V[ONE*SESSION];"_SESSION";sessionAccount 7 | BOX[ "Account" : I 8 | ] 9 | 10 | ----------------------------------------------------------- 11 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue280.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue280 IN ENGLISH 2 | 3 | RELATION p[A*B] [UNI,TOT] 4 | RELATION q[A*C] [UNI] 5 | RELATION r[B*C] [UNI] 6 | RELATION s[A*C] [UNI] 7 | RELATION t[B*C] [UNI] 8 | 9 | RULE Issue280 : 10 | (q;V /\ p;(I-r;r~)) \/ (p /\ q;-I;r~) 11 | \/ 12 | (s;V /\ p;(I-t;t~)) \/ (p /\ s;-I;t~) 13 | |- -V 14 | 15 | ENDCONTEXT 16 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try23.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION t[B*C] 7 | RELATION t[Q*C] 8 | RULE Test: -(V[A*C] \/ s;t) 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: The purpose of this test is to see if a complement on the top level is dealt with correctly. 15 | Result: PASS 16 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try25.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test25 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION s[A*C] 7 | RELATION t[B*C] 8 | RELATION t[Q*C] 9 | RULE Test: s;I;t = r 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: The purpose of this test is to see if the right declaration of t is selected. 16 | Result: PASS 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/NoMinMinValidate-Issue557/README.md: -------------------------------------------------------------------------------- 1 | ## This directory is because of a workaround for Issue #557 2 | 3 | This issue is about rules that have a lot of violations. Whenever PHP is called to check the violations, the resulting set causes a buffering problem. 4 | Therefor, scripts that show these problems, are set aside in this directory, until there is a better solution. -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldFail/singletontest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT SingletonTest IN DUTCH 2 | 3 | RULE Koning LABEL "Er is een koning" : 'De koning'[Koning] 4 | 5 | ENDCONTEXT 6 | 7 | {- Purpose: 8 | This script should fail, because there is no population specified explicitly, so the rule is violated. 9 | To correct the script, add the following line: 10 | 11 | POPULATION Koning : [ "Koning Willem-Alexander" ] 12 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/SQL/Bug_HaskellViolationTest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bugs IN ENGLISH 2 | 3 | RELATION r2[A*C] [UNI,SUR] 4 | = [ ("a1", "c1") ] 5 | 6 | RELATION r1[A*B] [UNI] 7 | 8 | RULE totalityBug : I |- (r2; r2~) \/ r1; r1~ 9 | -- yields a violation of "tot r1", but totality of r is not an implication of this rule 10 | 11 | -- test by simply generating a prototype without --dev 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Issue181.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try53 IN ENGLISH 2 | 3 | RELATION r[A*A] 4 | RELATION s[B*B] 5 | 6 | POPULATION A CONTAINS [ 3, 6] 7 | -- This example should fail, because A and B are in the same typology, however ther repersentation-types are different. 8 | CLASSIFY B ISA A 9 | REPRESENT A TYPE INTEGER 10 | REPRESENT B TYPE FLOAT 11 | 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Ticket442.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TEST IN ENGLISH 2 | 3 | RELATION r[A*B] =[ ("a", "b") ] 4 | 5 | INTERFACE A : I[ONE] 6 | BOX[ "A's" : V[ONE*A] 7 | BOX[ "A" : I 8 | , "r" : r 9 | ] 10 | , "B's" : V[ONE*B] 11 | BOX[ "B" : I 12 | , "r~" : r~ 13 | ] 14 | , "A details" : V[ONE*A] INTERFACE ShowA 15 | ] 16 | 17 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue766.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue766 IN ENGLISH 2 | 3 | CLASSIFY Datatype ISA Class 4 | 5 | RELATION subClassOf[Class*Class] [IRF,ASY] 6 | RELATION baseDatatype[Datatype*Datatype] [UNI] 7 | 8 | RULE Issue766: subClassOf;baseDatatype |- baseDatatype 9 | VIOLATION (TXT "some text ", SRC I[Datatype], TXT " other text ", SRC subClassOf) 10 | 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Ticket454.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket454 IN ENGLISH 2 | {- 3 | PURPOSE: 4 | Inside the Ampersand compiler, this script causes an EEps term with EEps B (Sign B B) 5 | That is not harmful, but rare. Therefore this script should succeed. 6 | -} 7 | 8 | CLASSIFY B ISA C 9 | 10 | RELATION r[A*B] 11 | RELATION s[C*C] 12 | 13 | RULE Ticket454: I[C] /\ r~;r |- s 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try46.adl: -------------------------------------------------------------------------------- 1 | CONTEXT SelectExprTest IN ENGLISH 2 | 3 | PURPOSE PATTERN SelectExprTest IN ENGLISH 4 | {+ 5 | This pattern is meant to test the translation of Terms in Ampersand into 6 | SELECT statements in SQL. 7 | +} 8 | 9 | PATTERN SelectExprTest 10 | RELATION s[B*C] 11 | RELATION t[D*C] 12 | ENDPATTERN 13 | 14 | RULE equiv: s~\t~ = (t/s)~ 15 | 16 | ENDCONTEXT 17 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try54.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try54 2 | 3 | PATTERN Twovalued 4 | RULE twovalued : I[Position] = "valid" \/ "invalid" 5 | VIOLATION (SRC I, TXT " is not a Position. Please pick 'valid' or 'invalid'.") 6 | ENDPATTERN 7 | 8 | POPULATION Position CONTAINS [ "valid", "invalid" ] 9 | 10 | INTERFACE Twovalued : "_SESSION"[SESSION] 11 | BOX [ probeer : V[SESSION*Position] ] 12 | ENDCONTEXT -------------------------------------------------------------------------------- /src/Ampersand/Options/ValidateOptsParser.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.ValidateOptsParser (validateOptsParser) where 2 | 3 | import Ampersand.Misc.HasClasses (ValidateOpts (..)) 4 | import Ampersand.Options.ProtoOptsParser 5 | import Options.Applicative 6 | 7 | -- | Command-line parser for ValidateOpts. 8 | validateOptsParser :: Parser ValidateOpts 9 | validateOptsParser = 10 | ValidateOpts 11 | <$> protoOptsParser 12 | -------------------------------------------------------------------------------- /testing/Sentinel/README.md: -------------------------------------------------------------------------------- 1 | # Sentinel test functionality 2 | 3 | `Sentinel` will run the tests in this direcory every night. 4 | Testcases for Sentinel tipically are the ones that are testcases for unresolved issues. 5 | Sentinel wil signal about testcases that do not pass the tests. 6 | Once a corresponding issue is fixed, that test will pass. 7 | It is recommended to move that testcase to the Travis directory as a regression test. -------------------------------------------------------------------------------- /outputTemplates/default.org: -------------------------------------------------------------------------------- 1 | $if(title)$ 2 | #+TITLE: $title$ 3 | 4 | $endif$ 5 | $if(author)$ 6 | #+AUTHOR: $for(author)$$author$$sep$; $endfor$ 7 | $endif$ 8 | $if(date)$ 9 | #+DATE: $date$ 10 | 11 | $endif$ 12 | $for(header-includes)$ 13 | $header-includes$ 14 | 15 | $endfor$ 16 | $for(include-before)$ 17 | $include-before$ 18 | 19 | $endfor$ 20 | $body$ 21 | $for(include-after)$ 22 | 23 | $include-after$ 24 | $endfor$ 25 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try9.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | --PATTERN Test9 4 | RELATION r[A*A] 5 | RULE Test: r = r\/I 6 | --ENDPATTERN 7 | 8 | ENDCONTEXT 9 | 10 | {- 11 | Purpose: a superficial check whether type deduction works. 12 | Result: PASS 13 | Reason: This is not entirely trivial. Relation I takes its type from r, 14 | so the checker deduces that I[A] is meant. 15 | -} -------------------------------------------------------------------------------- /src/Ampersand/Options/ProofOptsParser.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.ProofOptsParser (proofOptsParser) where 2 | 3 | import Ampersand.Basics 4 | import Ampersand.Misc.HasClasses (ProofOpts (..)) 5 | import Ampersand.Options.FSpecGenOptsParser 6 | import Options.Applicative 7 | 8 | -- | Command-line parser for ProofOpts. 9 | proofOptsParser :: Parser ProofOpts 10 | proofOptsParser = 11 | ProofOpts 12 | <$> fSpecGenOptsParser False 13 | -------------------------------------------------------------------------------- /src/Ampersand/Test.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Test 2 | ( module Ampersand.Test.Regression, 3 | module Ampersand.Test.Parser.ParserTest, 4 | module Ampersand.Test.Parser.QuickChecks, 5 | ) 6 | where 7 | 8 | import Ampersand.Test.Parser.ParserTest 9 | ( parseScripts, 10 | showErrors, 11 | ) 12 | import Ampersand.Test.Parser.QuickChecks (doAllQuickCheckPropertyTests) 13 | import Ampersand.Test.Regression (regressionTest) 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/EnforceTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT EnforceTest1 IN DUTCH 2 | 3 | 4 | CLASSIFY NPForm, NPReg ISA NatuurlijkPersoon 5 | CLASSIFY NatuurlijkPersoon ISA Person 6 | CLASSIFY Voornaam ISA FirstName 7 | REPRESENT FirstName TYPE ALPHANUMERIC 8 | 9 | RELATION npRoepnaam[NatuurlijkPersoon*Voornaam] [UNI] 10 | RELATION personFirstName[Person*FirstName] 11 | 12 | ENFORCE personFirstName := I[NPReg];npRoepnaam 13 | 14 | ENDCONTEXT -------------------------------------------------------------------------------- /src/Ampersand/Classes.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Classes 2 | ( module Ampersand.Classes.ConceptStructure, 3 | module Ampersand.Classes.Relational, 4 | module Ampersand.Classes.ViewPoint, 5 | ) 6 | where 7 | 8 | import Ampersand.Classes.ConceptStructure (ConceptStructure (..)) 9 | import Ampersand.Classes.Relational (HasProps (..), Relational (..), isONE, isSESSION) 10 | import Ampersand.Classes.ViewPoint (Language (..), ruleFromIdentity) 11 | -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/Issue853.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue853 2 | 3 | RELATION compArgs[Computation*Person] 4 | RELATION compProcdArgs[Computation*Person] 5 | RELATION compResIsValid[Computation*Computation] [PROP] 6 | 7 | ROLE ExecEngine MAINTAINS Validate 8 | RULE Validate LABEL "Validate computation result": I /\ (compArgs<>compProcdArgs~) |- compResIsValid 9 | VIOLATION (SRC I, TXT " - ", TGT I) 10 | 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try45.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try45 IN ENGLISH 2 | CLASSIFY D ISA DOrB 3 | CLASSIFY B ISA DOrB 4 | 5 | PATTERN Try 6 | CLASSIFY A ISA B 7 | CLASSIFY C ISA B 8 | CLASSIFY C ISA D 9 | RULE Try45: x = I[A];I[B];I[C];I[D] 10 | RELATION x[A*D] 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This script is there to test different epsilons throughout the normaliser 17 | Result: PASS 18 | -} -------------------------------------------------------------------------------- /AmpersandData/Semantics/ADLTool.adl: -------------------------------------------------------------------------------- 1 | CONTEXT RAP3 IN ENGLISH 2 | 3 | INCLUDE "FormalAmpersand.adl" 4 | 5 | PURPOSE CONTEXT RAP IN ENGLISH LATEX 6 | {+RAP is a Repository for Ampersand Projects. 7 | Its purpose is to provide a collaboration platform to groups of designers who work on Ampersand projects. 8 | This document is a step on the way of specifying RAP. 9 | It has largely been generated by the Ampersand toolset. 10 | +} 11 | 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try10.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test10 4 | RELATION r[A*A] 5 | RELATION r[B*C] 6 | RULE Test: r[A*A] = r\/I 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: a superficial check whether type deduction works. 13 | Result: PASS 14 | Reason: This is not entirely trivial. Relation I takes its type from r, 15 | so the checker deduces that I[A] is meant. 16 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try7.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION s[A*C] 7 | RELATION t[B*C] 8 | RELATION t[Q*C] 9 | RULE Test: r = s;t 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: This script is a simple correct script with = and ; 16 | A bit harder than try1, as both s and t must be matched together 17 | Result: PASS 18 | -} -------------------------------------------------------------------------------- /miscellaneous/Berichten/lib/headerdoc/sbdh.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

Standard Business Document Header

8 |

Documentation is available at GS1

9 | 10 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldSucceed/Issue1537.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1537 2 | 3 | 4 | PATTERN CarGroups 5 | RELATION tier[CarGroup*Tier] 6 | REPRESENT Tier TYPE INTEGER 7 | POPULATION tier CONTAINS 8 | [ ("economy", 0) 9 | , ("compact", 1) 10 | ] 11 | ENDPATTERN 12 | 13 | REPRESENT Age TYPE INTEGER 14 | RELATION age[CarGroup*Age] 15 | POPULATION age CONTAINS 16 | [ ("economy", 0) 17 | , ("compact", 1) 18 | ] 19 | 20 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try18b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test18 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | RELATION t[Q*Y] 8 | RULE r = s;I[A];t 9 | RULE I[D] = I[A]/\I[B] 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: This script is a more difficult version of try18.adl, as t cannot be matched to I[A] literally 16 | Result: PASS 17 | 18 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT InterfaceTest1 IN ENGLISH 2 | 3 | INTERFACE Identifier : I[BusinessActor] 4 | BOX[ name : name ] 5 | 6 | PATTERN Business 7 | RELATION name[BusinessActor*Identifier] [UNI] 8 | ENDPATTERN 9 | 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: This script tests the mechanism of matching the source of an interface field to the target of the interface term. 14 | Result: PASS 15 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue194.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue194 IN DUTCH 2 | INCLUDE "Issue194.xlsx" 3 | CLASSIFY Auto ISA Voertuig 4 | RELATION eigenaar [Voertuig * Persoon] [UNI,TOT] 5 | RELATION aantalWielen [ Auto * Getal] [UNI,TOT] 6 | 7 | REPRESENT Getal TYPE INTEGER 8 | 9 | RULE ThisShouldHoldForTheGivenExcelSheet 10 | : (I[Voertuig] /\ eigenaar;"Piet";eigenaar~) |- aantalWielen;4;aantalWielen~ 11 | 12 | ENDCONTEXT 13 | 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/validate/Issue865.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue865 2 | 3 | RELATION isSuccessorOf[Assignment*Assignment] [UNI,INJ,ASY] -- IRF, 4 | 5 | POPULATION isSuccessorOf CONTAINS [ ("Ass2", "Ass1") ] 6 | POPULATION isSuccessorOf CONTAINS [ ("Ass3", "Ass2"), ("aap","aap") ] 7 | 8 | 9 | ROLE Iemand MAINTAINS NietSuccessorVanZichzelf 10 | RULE NietSuccessorVanZichzelf : I[Assignment] |- -isSuccessorOf 11 | 12 | ENDCONTEXT 13 | 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest4.adl: -------------------------------------------------------------------------------- 1 | CONTEXT InterfaceTest4 IN DUTCH 2 | 3 | PATTERN ProefMetView 4 | 5 | RELATION r[A*B] PRAGMA "" " is door " " ingevuld" 6 | VIEW A : A(TXT "(", I, TXT ",", r, TXT ")") 7 | ENDPATTERN 8 | 9 | POPULATION r CONTAINS [ ("Champagne","Hans") ; ("Champagne","Jan") ; ("Champagne","Piet")] 10 | 11 | INTERFACE Proefje : V[ONE*B] 12 | BOX [ B : I 13 | , "rechter element : " : r~ 14 | ] 15 | 16 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Sentinel/Tests/NoSentinel/Issue1465Test.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1465Test IN DUTCH 2 | INCLUDE "Issue1465Test.xlsx" 3 | CLASSIFY Auto ISA Voertuig 4 | RELATION eigenaar [Voertuig * Persoon] [UNI,TOT] 5 | RELATION aantalWielen [ Auto * Getal] [UNI,TOT] 6 | 7 | REPRESENT Getal TYPE INTEGER 8 | 9 | ENDCONTEXT 10 | 11 | {* The purpose of this script is to show that the Excel importer (at least the one in Haskell) must be adapted 12 | because this test should succeed. 13 | *} 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ArchiTest5.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ArchiTest5 IN ENGLISH 2 | 3 | PATTERN Business 4 | CLASSIFY BusinessCollaboration ISA BusinessRole 5 | 6 | RELATION comp[BusinessRole*BusinessCollaboration] PRAGMA "Business role " " is a component of Business collaboration ". 7 | RULE R001: comp |- (V[BusinessRole * BusinessRole]-I[BusinessRole]); comp 8 | MEANING "A business collaboration is composed of two or more business roles." 9 | 10 | ENDPATTERN 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Bug335_Kl0Kl1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug335Kl0Kl1 IN ENGLISH 2 | 3 | PATTERN SelectExprTest 4 | RELATION r[A*A] 5 | ENDPATTERN 6 | 7 | INTERFACE Overview : I[ONE] 8 | BOX [ as : V[ONE*A] 9 | BOX [ "id" : I 10 | ] 11 | ] 12 | 13 | INTERFACE Id : I[A] 14 | BOX [ "r*" : r* 15 | , "r+" : r+ 16 | ] 17 | 18 | POPULATION r CONTAINS 19 | [ ("a", "a") 20 | ] 21 | 22 | ENDCONTEXT 23 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/xlsxParsing/Issue1056.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1056 2 | 3 | -- This test is about the parsing of multiple atoms in a single cell 4 | INCLUDE "Issue1056.xlsx" 5 | 6 | REPRESENT A,B TYPE ALPHANUMERIC 7 | RELATION r[A * B] [TOT] 8 | POPULATION r CONTAINS [ ("a1", "b1") 9 | -- , ("a1", "b2") -- This is the additional pair that should be read from the .xlsx file 10 | ] 11 | RULE moreThanOne : r |- r;-I[B] 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/InvariantViolations/showViolationMessages.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN DUTCH 2 | -- We're testing that violation messages are shown in the way specified in the user's script. 3 | -- For this purpose I added VIOLATION statements to this script. 4 | 5 | RELATION r[A * B] 6 | 7 | RULE TotalR : I |- r;r~ 8 | VIOLATION (TXT "For atom ", SRC I, TXT " there is no B in relation r.") 9 | 10 | POPULATION "A" CONTAINS [ "Uiversum" ] 11 | 12 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/InterfaceTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT InterfaceTest1 IN ENGLISH 2 | 3 | INTERFACE Identifier : I[BusinessActor] 4 | BOX[ name : name~ ] 5 | 6 | PATTERN Business 7 | RELATION name[BusinessActor*Identifier] [UNI] 8 | ENDPATTERN 9 | 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: This script tests the mechanism of matching the source of an interface field to the target of the interface term. 14 | Result: PASS 15 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/ARM-Test12.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARMTest12 IN DUTCH 2 | 3 | RELATION bfGebruiktARM20DefProp[Bedrijfsfunctie*Bedrijfsfunctie] [PROP] 4 | 5 | ENDCONTEXT 6 | 7 | {- This script generates the following erro: 8 | prototype.exe: !fatal error 62 (module RelBinGenSQL, Prototype v2.2.1.2804 (lib: Ampersand v2.2.1.1242)) 9 | Multiple plugs for relation RELATION bfGebruiktARM20DefProp [Bedrijfsfunctie*Bedrijfsfunctie] Nothing PRAGMA "" "" "" 10 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue1261.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1261 2 | -- This script generates SQL for a singleton in a term. In such case, single quotes should be used. 3 | -- This can be verified (manually :( ) in conjuncts.json. Search for 'god'. (Aren't we all?) 4 | 5 | -- For system bootstrapping purposes, we need a "God"-account that has all permissions/roles. 6 | POPULATION Account CONTAINS [ "god" ] 7 | 8 | RULE godRule: "god"[Account] 9 | 10 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try38.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try38 IN ENGLISH 2 | PATTERN Try38 3 | 4 | RELATION property[C*C] [PROP] 5 | 6 | ENDPATTERN 7 | ENDCONTEXT 8 | 9 | {- 10 | Purpose: This script is there to ensure that the following error will be fixed: 11 | 12 | ampersand.exe: !fatal 167 (module Output.ToPandoc.ChapterDataAnalysis) Ampersand v2.2.1.121 13 | This should have become an attribute of this Class! 14 | 15 | Result: PASS 16 | -} -------------------------------------------------------------------------------- /miscellaneous/Berichten/lib/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Rechtspraak

9 | 13 | 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/SQL/Bug_SingletonExpression.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bugs IN ENGLISH 2 | 3 | RELATION rel[A*B] [] 4 | = [ ("a1", "b1"); ("a1", "b2"); ("a2", "b1"); ("a2", "b2")] 5 | 6 | INTERFACE Accounts : V[ONE*B] 7 | BOX [ bug : "b1" ] 8 | 9 | PATTERN Bugs 10 | ROLE tester MAINTAINS singletonBug1, singletonBug2 11 | RULE singletonBug1 : "b1"[B] -- fixed: yields b1b1 12 | RULE singletonBug2 : rel; "b1" -- fixed: yields a1b1 a2b1 13 | ENDPATTERN 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/Issue298.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue298 IN DUTCH 2 | 3 | {- This scipt should fail to produce a prototype. 4 | "thisShouldFail" is not in Even and is not in Odd. 5 | -} 6 | RULE ruleOne : I[Natural] |- I[Even] \/ I[Odd] 7 | CLASSIFY Even ISA Natural 8 | CLASSIFY Odd ISA Natural 9 | 10 | POPULATION Natural CONTAINS ["thisShouldFail" , "one" , "two"] 11 | POPULATION Even CONTAINS ["two"] 12 | POPULATION Odd CONTAINS ["one"] 13 | 14 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue192.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue192 IN DUTCH 2 | 3 | INCLUDE "Issue192.xlsx" 4 | 5 | CLASSIFY Auto ISA Voertuig 6 | 7 | RELATION eigenaar [Voertuig * Persoon] [UNI,TOT] 8 | RELATION aantalWielen [ Auto * Aantal] [UNI,TOT] 9 | 10 | --POPULATION eigenaar[Auto*Persoon] CONTAINS 11 | -- [ ("wagen1", "Piet") 12 | -- ] 13 | --POPULATION aantalWielen[Auto*Aantal] CONTAINS 14 | -- [ ( "wagen1", "vier")] 15 | 16 | ENDCONTEXT 17 | 18 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try20.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try20 IN ENGLISH 2 | PATTERN Try20 3 | 4 | RELATION orderedBy[Order*Client] 5 | RELATION orderReceived[Order*Client] 6 | RELATION orderAccepted[Order*Client] 7 | 8 | RULE allReceived: orderedBy |- (orderReceived \/ orderAccepted) 9 | MEANING "All accepted orders have been received" 10 | 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This file tests the union \/ 17 | Desired Result: PASS 18 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try15.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test15 4 | RELATION r[A*A] 5 | RELATION r[B*C] 6 | RULE Test:r[A*A] = r\/I 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: to verify that the checker can deduce that r\/I::[A*A] 13 | Result: PASS 14 | Reason: Relation I takes its type from r, 15 | so the checker deduces that I[A] is meant. 16 | By the way, this should work for r[A*A] = r/\I as well. 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try31.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try31 IN ENGLISH 2 | 3 | PATTERN Try31 4 | CLASSIFY Medewerker ISA Persoon 5 | CLASSIFY Student ISA Persoon 6 | 7 | RULE Try31: I[Persoon] - I[Student] |- I[Medewerker] 8 | MEANING "Een persoon die geen student is, is een medewerker" 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: A test to see if the typechecker can handle multiple ISA relations with the same root concept. 15 | Result: PASS 16 | 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try9.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test9 4 | RELATION r[A*B] 5 | RULE r;V 6 | ENDPATTERN 7 | 8 | ENDCONTEXT 9 | 10 | {- 11 | Purpose: a superficial check whether type deduction works. 12 | Result: FAIL 13 | Reason: The target of V is ambiguous. 14 | Message: 15 | The pattern named "Test9" contains errors: 16 | line 5:8, file "try9.adl": 17 | The target of V is ambiguous. 18 | 19 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try11.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test1 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION s[A*C] 7 | RELATION t[B*C] 8 | RELATION t[B*D] 9 | RULE Test : r = s;t 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: This script is a simple correct script with = and ; 16 | A bit harder than try1, as both s and t must be matched together 17 | (Possibly easier than try7) 18 | Result: PASS 19 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try30.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try30 IN ENGLISH 2 | 3 | PATTERN Try30 4 | CLASSIFY Medewerker ISA Persoon 5 | CLASSIFY Student ISA Persoon 6 | 7 | RULE Try30: I[Persoon] |- I[Student] \/ I[Medewerker] 8 | MEANING "Een persoon is of een student of een medewerker (of beide)." 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: A test to see if the typechecker can handle multiple ISA relations with the same root concept. 15 | Result: PASS 16 | 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/CyclicInterfaceRef.adl: -------------------------------------------------------------------------------- 1 | CONTEXT CyclicInterfaceRef IN ENGLISH 2 | -- Test context that should fail to compile because of cyclic interface references 3 | 4 | INTERFACE GrandParent : I[A] 5 | BOX[ label : V[A*B] INTERFACE Parent 6 | ] 7 | 8 | INTERFACE Parent : I[B] 9 | BOX[ label : V[B*C] INTERFACE Child 10 | ] 11 | 12 | INTERFACE Child : I[C] 13 | BOX[ label : V[C*A] INTERFACE GrandParent 14 | ] 15 | 16 | ENDCONTEXT 17 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try13.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test13 4 | RELATION r[A*A] 5 | -- r[B*C] -- enabled in try15.adl 6 | RULE Test: r[A*A] = r\/I 7 | ENDPATTERN 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: to verify that the checker can deduce that r\/I::[A*A] 13 | Result: PASS 14 | Reason: Relation I takes its type from r, 15 | so the checker deduces that I[A] is meant. 16 | By the way, this should work for r[A*A] = r/\I as well. 17 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try18.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | CLASSIFY A ISA AOrB 3 | CLASSIFY B ISA AOrB 4 | 5 | PATTERN Test18 6 | RELATION r[X*Y] 7 | RELATION s[X*A] 8 | RELATION t[B*Y] 9 | RELATION t[Q*Y] 10 | RULE Test : r = s;I[B];t 11 | CLASSIFY D IS A/\B 12 | -- was: RULE I[D] = I[A]/\I[B] 13 | ENDPATTERN 14 | 15 | ENDCONTEXT 16 | 17 | {- 18 | Purpose: This script was made a bit easier, this way it is possible to handle the script 19 | Result: PASS 20 | 21 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/ARM_Test10.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARM_Test10 IN DUTCH -- (project ARMisa) 2 | {- This script should produce a compiler error saying that 3 | the source of: critText [Criterium*Blob] does not match the type of the BOX, Gewetensvraag. 4 | -} 5 | RELATION critText[Criterium*Blob] [MAP] 6 | INTERFACE Gewetensvraag : I[Gewetensvraag] 7 | BOX[ gewetensvragen: I[Gewetensvraag] 8 | BOX[ gewetensvraag: I 9 | , criterium : critText 10 | ] 11 | ] 12 | ENDCONTEXT 13 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/phone.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TypExample IN DUTCH 2 | 3 | RELATION reachableBy[Person*PhoneNumber] 4 | RELATION carrier[CellPhone*Person] 5 | RELATION number[Phone*PhoneNumber] 6 | RELATION carrier[PhoneNumber*NetworkProvider] 7 | RULE carrier~ ; number |- reachableBy 8 | CLASSIFY CellPhone ISA Phone 9 | 10 | 11 | {- Het spreekt voor zich dat de regel niet goed is getypeerd. Echter, ampersand versie 1072 klaagt hier niet over.... -} 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try37.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try37 IN ENGLISH 2 | CLASSIFY G ISA GOrEOrF 3 | CLASSIFY E ISA GOrEOrF 4 | CLASSIFY F ISA GOrEOrF 5 | 6 | PATTERN Try37 7 | CLASSIFY B IS G/\E 8 | CLASSIFY D IS B/\F 9 | CLASSIFY C ISA E 10 | ENDPATTERN 11 | 12 | CLASSIFY D ISA A 13 | CLASSIFY A ISA F 14 | CLASSIFY A ISA C 15 | 16 | ENDCONTEXT 17 | 18 | {- 19 | Purpose: This script is there to ensure that the ordering of concepts in the same kernel is handled 20 | Result: PASS 21 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try47.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try47 IN ENGLISH 2 | 3 | IDENT Context: ContextX(name[ContextX*ContextIdentifier]) 4 | RELATION name[ContextX*ContextIdentifier] [UNI,TOT,INJ] 5 | 6 | IDENT Pattern: PatternX(name[PatternX*PatternIdentifier]) 7 | RELATION name[PatternX*PatternIdentifier] [UNI,TOT,INJ] 8 | 9 | ENDCONTEXT 10 | 11 | {- 12 | Purpose: This script tests the mechanism of matching the source of an IDENT term to the Concept of the IDENT 13 | Result: PASS 14 | -} 15 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/Issue1063.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1063 IN DUTCH 2 | 3 | {- This scipt should fail the standard check, because there are violations of an invariant. 4 | "thisShouldFail" is not in Even and is not in Odd. 5 | -} 6 | RULE ruleOne : I[Natural] |- I[Even] \/ I[Odd] 7 | CLASSIFY Even ISA Natural 8 | CLASSIFY Odd ISA Natural 9 | 10 | POPULATION Natural CONTAINS ["thisShouldFail" , "one" , "two"] 11 | POPULATION Even CONTAINS ["two"] 12 | POPULATION Odd CONTAINS ["one"] 13 | 14 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try4.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test4 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | CLASSIFY B ISA E 8 | CLASSIFY A ISA E 9 | CLASSIFY D ISA B 10 | CLASSIFY D ISA A 11 | RULE r = s;t 12 | ENDPATTERN 13 | 14 | ENDCONTEXT 15 | 16 | {- 17 | Purpose: This script demonstrates how NOT to specify an intersection type between A and B. 18 | Result: FAIL 19 | Reason: the intersection between A and B exists as concept D 20 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try3.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test3 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | RULE Test: r = s;t 8 | CLASSIFY D IS A/\B 9 | CLASSIFY A ISA AOrB 10 | CLASSIFY B ISA AOrB 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This script shows that a type conflict (between A and B) can be resolved 17 | by defining an intersection type D. 18 | Result: PASS 19 | Reason: the type on ; is inferred as I[D] 20 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/FraakTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT FraakTest1 IN ENGLISH 2 | 3 | PATTERN HandleBookings 4 | 5 | RELATION status[Booking*Status] [UNI] PRAGMA "A " " can have a certain status". 6 | 7 | ROLE FacilityDesk MAINTAINS acceptedCancelledOrRejectedBookings 8 | 9 | RULE acceptedCancelledOrRejectedBookings: I |- (status;("Accepted"\/"Cancelled"\/"Rejected");status~) 10 | MESSAGE "All bookings must be accepted, cancelled or rejected" 11 | VIOLATION (SRC I) 12 | 13 | ENDPATTERN 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/MultipleDeclaredRules.adl: -------------------------------------------------------------------------------- 1 | CONTEXT MultipleDeclaredRules IN ENGLISH 2 | {- 3 | The purpose of this testcase is to verify that it is possible to declare the same relation multiple times. 4 | There is also a propertyrule created because of the UNI. Hence, a (property)rule can be declared in more than a single place. 5 | -} 6 | 7 | RELATION r[A*B][UNI] 8 | PATTERN Foo 9 | RELATION r[A*B][UNI] 10 | ENDPATTERN 11 | 12 | PATTERN Bar 13 | RELATION r[A*B][UNI] 14 | ENDPATTERN 15 | 16 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Check/ShouldFail/EnforceTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT EnforceTest1 IN DUTCH 2 | 3 | 4 | --CLASSIFY NPForm, NPReg ISA NatuurlijkPersoon 5 | --CLASSIFY NatuurlijkPersoon ISA Person 6 | --CLASSIFY Voornaam ISA FirstName 7 | REPRESENT FirstName TYPE ALPHANUMERIC 8 | 9 | RELATION npRoepnaam[NatuurlijkPersoon*Voornaam] [UNI] 10 | RELATION personFirstName[Person*FirstName] 11 | 12 | ENFORCE personFirstName := I[NPReg];npRoepnaam 13 | 14 | -- This test should fail, because the relation npRoepnaam[NPReg*???] is not defined. 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/FuncSpec/Issue1275.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1275 2 | 3 | PATTERN Foo 4 | RELATION r[A*B] 5 | ENDPATTERN 6 | 7 | PATTERN Foo 8 | RELATION s[A*B] 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | {- SJ 2022-02-08 13 | This test demonstrates that duplicate pattern names are allowed. The intended semantics is that there is just one pattern named Foo and the contents of that pattern is the union of the two patterns in the script: 14 | ``` 15 | PATTERN Foo 16 | RELATION r[A*B] 17 | RELATION s[A*B] 18 | ENDPATTERN 19 | ``` 20 | -} -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Comment / error /typo in the documentation 3 | about: Any suggestion on improving documentation 4 | title: '' 5 | labels: 'status: needs triage' 6 | assignees: '' 7 | --- 8 | 9 | 10 | 11 | # What is the page that your suggestion is about? 12 | 13 | # What Is your comment? 14 | 15 | 16 | -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/Issue280.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue280 IN ENGLISH 2 | 3 | RELATION in[Item*Sequence] [UNI,TOT] 4 | RELATION pref[Item*SinText] [UNI] 5 | RELATION spref[Sequence*SinText] [UNI] 6 | RELATION post[Item*SinText] [UNI] 7 | RELATION spost[Sequence*SinText] [UNI] 8 | 9 | RULE Issue280 : 10 | (pref;V /\ in;(I-spref;spref~)) \/ (in /\ pref;-I;spref~) 11 | \/ 12 | (post;V /\ in;(I-spost;spost~)) \/ (in /\ post;-I;spost~) 13 | |- -V 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test2 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | RULE r = s;t 8 | ENDPATTERN 9 | 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: This script is a simply incorrect with = and ; 14 | Result: FAIL 15 | Reason: type error on ; 16 | Error message: 17 | 18 | line 7:11, file "try2.adl": 19 | Inside term s;t, 20 | between the target of s and the source of t, 21 | concepts A and B are in conflict. 22 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue1026.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue1026 IN ENGLISH 2 | 3 | RELATION r[A*B] 4 | RELATION s[A*B] 5 | 6 | PATTERN SameName 7 | RULE ifRthenS : r |- s 8 | PURPOSE RULE ifRthenS IN DUTCH 9 | {+Dit is de tekst voor de regel ifRthenS. Deze staat in het eerste pattern met de naam Try46.+} 10 | ENDPATTERN 11 | 12 | PATTERN SameName 13 | RULE ifSthenR : s |- r 14 | PURPOSE RULE ifSthenR IN DUTCH 15 | {+Dit is de tekst voor de regel ifSthenR. Deze staat in het tweede pattern met de naam Try46.+} 16 | ENDPATTERN 17 | 18 | ENDCONTEXT 19 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try18fail.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | CLASSIFY A ISA AOrB 3 | CLASSIFY B ISA AOrB 4 | 5 | PATTERN Test18 6 | RELATION r[X*Y] 7 | RELATION s[X*A] 8 | RELATION t[A*Y] 9 | RELATION t[B*Y] 10 | RULE Test:r = s;I[A];t 11 | CLASSIFY D IS A/\B 12 | -- was: RULE I[D] = I[A]/\I[B] 13 | ENDPATTERN 14 | 15 | ENDCONTEXT 16 | 17 | {- 18 | Purpose: Since try18b fails, this script is no longer ambiguous and should succeed. 19 | Reason: can pick t[A*Y] because concept A is closer than concept B. 20 | Result: PASS 21 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try6.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try6 IN ENGLISH 2 | 3 | PATTERN Try6 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | RELATION u[E*Y] 8 | CLASSIFY B IS F /\ B 9 | CLASSIFY B IS B /\ G 10 | CLASSIFY F ISA D 11 | CLASSIFY G ISA D 12 | CLASSIFY E ISA F 13 | CLASSIFY A ISA G 14 | -- CLASSIFY B ISA G 15 | -- CLASSIFY B ISA F 16 | -- CLASSIFY F IS B /\ F 17 | -- CLASSIFY G IS B /\ G 18 | RULE Try6 : r = s!(t\/u) 19 | ENDPATTERN 20 | 21 | ENDCONTEXT 22 | 23 | {- 24 | testing generalisations: the resulting type will be 25 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Parsing/shouldFail/Issue980.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue980 IN ENGLISH 2 | 3 | CONCEPT Fruit "Most general concept" 4 | CLASSIFY Citrus ISA Fruit 5 | CLASSIFY Orange ISA Citrus 6 | CLASSIFY Lemon ISA Citrus 7 | 8 | RELATION name[Citrus*Name] 9 | RELATION name[A * B] -- This relation's purpose is to distract the typechecker. 10 | 11 | INTERFACE Orange: I[Orange] 12 | BOX [ "I" LABEL "" : I 13 | , "name" : name 14 | ] 15 | 16 | INTERFACE Lemon: I[Lemon] 17 | BOX [ "I" LABEL "" : I 18 | , "name" : name[Citrus*Name] 19 | ] 20 | 21 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Issue163.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue163 IN ENGLISH 2 | 3 | RELATION r[A*A] 4 | RELATION s[B*B] 5 | 6 | POPULATION A CONTAINS [ 3, 6, 42 ] 7 | -- This example should fail, because A and B are in the same typology, and B has TYPE INTEGER. 8 | -- The target concept of an INTERFACE's expresion must be of type OBJECT (which is the default) 9 | CLASSIFY B ISA A 10 | REPRESENT B TYPE INTEGER 11 | 12 | INTERFACE Issue163 : V[SESSION*A] 13 | BOX [ ie : I 14 | , r : r 15 | , s : s 16 | ] 17 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try17b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test17b IN ENGLISH 2 | 3 | PATTERN Test17b 4 | RELATION r[A*C] 5 | RELATION s[A*D] 6 | RELATION q[B*C] 7 | CLASSIFY X ISA D 8 | CLASSIFY X ISA B 9 | RULE r = s;q 10 | ENDPATTERN 11 | 12 | ENDCONTEXT 13 | 14 | {- 15 | Purpose: This script is meant to study correct derivation of concept at ; 16 | Result: FAIL 17 | Reason: This requires an intersection type between A and B, which is not there. 18 | The concept X is not sufficient, as atoms in A/\B may not be in X. 19 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try44.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try44 IN ENGLISH 2 | ----------------------------------------------------------- 3 | PATTERN DocumentationByLanguage LABEL "Documentation by Language" 4 | 5 | PURPOSE CONCEPT X IN ENGLISH {+Some english text+} 6 | PURPOSE CONCEPT X IN DUTCH {+Enige nederlandse woorden+} 7 | 8 | ENDPATTERN 9 | ----------------------------------------------------------- 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: This script should succeed, because any concept can be documented in multiple languages. 14 | Result: PASS 15 | -} -------------------------------------------------------------------------------- /src/Ampersand/Options/TestOptsParser.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.TestOptsParser (testOptsParser) where 2 | 3 | import Ampersand.Basics 4 | import Ampersand.Misc.HasClasses (TestOpts (..)) 5 | import Options.Applicative 6 | 7 | -- | Command-line parser for TestOpts. 8 | testOptsParser :: FilePath -> Parser TestOpts 9 | testOptsParser dir = 10 | TestOpts 11 | <$> strArgument 12 | ( metavar "TESTDIRECTORY" 13 | <> value dir 14 | <> showDefault 15 | <> help "The root of the directory tree where the regression test cases can be found." 16 | ) 17 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/IdentTest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT IdentTest1 IN DUTCH 2 | 3 | CLASSIFY Nederlander ISA Europeaan 4 | 5 | IDENT Nederlander : Nederlander(bsn) 6 | RELATION bsn[Nederlander*BSN] [UNI, TOT] 7 | = [ ( "Piet", "12345") 8 | ] 9 | RELATION geboorteland[Europeaan*Land] [UNI] 10 | = [ ( "John Smith" , "Engeland" ) 11 | ] 12 | RULE Buitenlander LABEL "een buitenlander heeft geen BSN" : -I[Nederlander] |- -(bsn;bsn~) 13 | {- Met deze test kunnen we aantonen dat het mogelijk is om een IDENT te zetten op een specialisatie-concept. 14 | -} 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try34.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try34 IN ENGLISH 2 | 3 | PATTERN Try34 4 | CLASSIFY Verplichting ISA Criterium 5 | CLASSIFY Verwachting ISA Criterium 6 | RELATION scope[Criterium*Bedrijfsfunctie] 7 | 8 | RELATION tav[Verplichting*Bedrijfsfunctie] 9 | 10 | RELATION tav[Verwachting*Bedrijfsfunctie] 11 | 12 | RULE Try34: scope/\tav[Verplichting*Bedrijfsfunctie] |- tav[Verwachting*Bedrijfsfunctie] 13 | 14 | ENDPATTERN 15 | ENDCONTEXT 16 | {- This file gave type errors on July 11th, 2013. However, the condensed graph proved that there should be no type errors. -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/DuplicateInterfaces.adl: -------------------------------------------------------------------------------- 1 | CONTEXT DuplicateInterfaces IN ENGLISH 2 | 3 | -- Should yield exactly one error about multiple declarations of InterfaceA for role A, at lines 5 and 9 4 | 5 | INTERFACE InterfaceA FOR A : I[ONE] 6 | BOX [ l : V[ONE] 7 | ] 8 | 9 | INTERFACE InterfaceA FOR A,B : I[ONE] 10 | BOX [ l : V[ONE] 11 | ] 12 | 13 | INTERFACE InterfaceA FOR C : I[ONE] 14 | BOX [ l : V[ONE] 15 | ] 16 | 17 | INTERFACE InterfaceB FOR A : I[ONE] 18 | BOX [ l : V[ONE] 19 | ] 20 | 21 | ENDCONTEXT 22 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/WithMeatgrinder/testinfo.yaml: -------------------------------------------------------------------------------- 1 | testCmds: 2 | # The intention of this testcase is to test the meatgrinder. 3 | # - command: ampersand validate --verbose --build-recipe AtlasComplete 4 | # exitcode: 0 5 | - command: ampersand population --verbose --build-recipe Standard 6 | exitcode: 0 7 | - command: ampersand population --verbose --build-recipe Prototype 8 | exitcode: 0 9 | - command: ampersand population --verbose --build-recipe Grind 10 | exitcode: 0 11 | - command: ampersand population --verbose --build-recipe RAP 12 | exitcode: 0 -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/SingleRoot.adl: -------------------------------------------------------------------------------- 1 | CONTEXT SingleRoot IN ENGLISH 2 | {- 3 | To enable the use of tables, each typology should have a single root element (the most generic concept). 4 | If there is none, it is feasable to have & create one automatically. However, then a name must be choosen. 5 | We have decided to have the modeller choose a name for such a largest concept, by adding CLASSIFY statements. 6 | -} 7 | 8 | -- Also see issue https://github.com/AmpersandTarski/ampersand/issues/292 9 | CLASSIFY A ISA B 10 | CLASSIFY A ISA C 11 | 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue174.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue174 IN ENGLISH 2 | 3 | RELATION bfRLIType[BusinessFunction*RLIType] [UNI] 4 | RELATION impactTypeOf[Impact*RLIType] 5 | RELATION likelihoodTypeOf[Likelihood*RLIType] 6 | RELATION riskTypeOf[Risk*RLIType] 7 | 8 | RULE RLIType : -- invariant 9 | bfRLIType |- bfRLIType;(impactTypeOf~;impactTypeOf /\ likelihoodTypeOf~;likelihoodTypeOf /\ riskTypeOf~;riskTypeOf) 10 | MEANING "A BusinessFunction may only use a predefined RLIType" 11 | VIOLATION (SRC I, TXT " attempts to use the non predefined RLIType '", TGT I, TXT "'") 12 | 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Sentinel/Tests/ShouldSucceed/OnlyValidation/Ticket580.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket444 IN DUTCH 2 | -------------------------------------------------------- 3 | PATTERN Ticket444 4 | RELATION nhIsDashboard[Normenhiërarchie*Normenhiërarchie] [PROP] 5 | RELATION ouDashboardNH[OrgUnit*Normenhiërarchie] [UNI] 6 | RELATION bfDashboardNH[Bedrijfsfunctie*Normenhiërarchie] [UNI] 7 | 8 | --ROLE Developer MAINTAINS Regeltje 9 | RULE Regeltje : I /\ (bfDashboardNH~;bfDashboardNH \/ ouDashboardNH~;ouDashboardNH) |- nhIsDashboard 10 | 11 | ENDPATTERN 12 | ------------------------------------------------------------ 13 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/README.md: -------------------------------------------------------------------------------- 1 | # Automatic test functionality 2 | 3 | To increase the quality of the Ampersand software, every time a commit is done in the Git repo, the executable is built from scratch, and a couple of tests are performed. The directory testcases contains those tests. 4 | 5 | The tests consist of one or more Ampersand scripts in a directory. All those scripts are tested based on information from the file `testinfo.yaml` in that directory. An Ampersand script must have the extention `.adl` to be recognized as such. This enables having `INCLUDE` files in the same directory, without them being tested on its own. -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/ComparisonTest2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT CompareBooleans IN DUTCH 2 | 3 | -- This test forces a compare on atoms with TTYPE BOOLEAN. That should not be allowed. 4 | 5 | CONCEPT Boolean "" 6 | REPRESENT Boolean TYPE BOOLEAN 7 | 8 | POPULATION Boolean CONTAINS [ TRUE, FALSE ] 9 | 10 | RELATION toTrue[A*Boolean] 11 | POPULATION toTrue CONTAINS[ 12 | ("Foo", TRUE) 13 | ] 14 | RELATION toFalse[A*Boolean] 15 | POPULATION toFalse CONTAINS[ 16 | ("Foo", FALSE) 17 | ] 18 | 19 | RULE compareBooleans : "Foo" |- toTrue;>;toFalse~ 20 | 21 | 22 | 23 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Issue757.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue757 2 | 3 | CLASSIFY RegForm1 ISA Form 4 | CLASSIFY RegForm2 ISA Form 5 | 6 | RELATION regFormProcessReq[RegForm1*RegForm1] [PROP] 7 | RELATION registrationform[Person*Form] [UNI] -- Form by which the Person is registered 8 | RELATION sessionRegForm2[SESSION*RegForm2] [UNI] -- Only one registration form allowed in any session. 9 | 10 | RULE Rule2 : registrationform;regFormProcessReq |- -V 11 | VIOLATION (TXT "{EX} DelPair;sessionRegForm2;SESSION;", TGT sessionRegForm2~, TXT ";RegForm2;", TGT I) 12 | 13 | ENDCONTEXT 14 | -------------------------------------------------------------------------------- /testing/Travis/testcases/FuncSpec/testPredLogic.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TestPredLogic 2 | 3 | 4 | RELATION r[A * B] [UNI,TOT] 5 | 6 | RELATION s[A * B] 7 | PURPOSE RULE s1 8 | {+Rule s1 should be documented with the MEANING, in natural language, without predicate logic.+} 9 | RULE s1 : s~;-I;s |- -I[B] 10 | MEANING "IF a differs from a' then s(a) differs from s(a')." 11 | 12 | RELATION t[A * B] 13 | PURPOSE RULE t1 14 | {+Rule t1 should be documented in predicate logic, because the user did not specify a MEANING.+} 15 | RULE t1 : t~;-I;t |- -I[B] 16 | 17 | RULE s2 : s;t~ 18 | RULE r2 : r~;s;t~ 19 | RULE r3 : r~;s;t~/\t~ 20 | 21 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try17.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test17 4 | RELATION r[X*Y] 5 | RELATION s[X*A] 6 | RELATION t[B*Y] 7 | RULE r = s;t 8 | RULE I[D] = I[A]\/I[B] 9 | ENDPATTERN 10 | 11 | ENDCONTEXT 12 | 13 | {- 14 | Purpose: This script shows that a type conflict (between A and B) can be resolved 15 | by defining a union type D. 16 | Result: FAIL 17 | Reason: This requires an intersection type between A and B, which is not there. 18 | Adding RULE I[E] = I[A]/\I[B] helps, because this yields concept E to be the type between s and t. 19 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT InterfaceTest2 IN ENGLISH 2 | 3 | PATTERN TryECA1 4 | RELATION r[A*C] 5 | RELATION s[A*C] 6 | ROLE tester MAINTAINS invariant 7 | RULE invariant : r |- s 8 | ENDPATTERN 9 | 10 | POPULATION r[A*C] CONTAINS 11 | [ ("Aap", "Cent") ] 12 | 13 | INTERFACE overview : I[ONE] 14 | BOX [ "As" : V[ONE*A] 15 | , "Cs" : V[ONE*C] 16 | ] 17 | 18 | INTERFACE edit: I[A] 19 | BOX [ "source" : I 20 | , "target of r" : r 21 | , "target of s" : s 22 | ] 23 | ENDCONTEXT 24 | 25 | {- 26 | Purpose: This script tests ECA rules 27 | Result: PASS 28 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try29.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try29 IN ENGLISH 2 | 3 | PATTERN Try29 4 | CLASSIFY Medewerker ISA Persoon 5 | CLASSIFY Student ISA Persoon 6 | RELATION studentNr[Student*StudentNummer] [MAP] 7 | RELATION salNr[Medewerker*SalarisNummer] [MAP] 8 | 9 | RULE identificatie : I[Persoon] |- studentNr;studentNr~ \/ salNr;salNr~ 10 | MEANING "Elke persoon moet een studentnummer dan wel een salarisnummer hebben" 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: A test to see if the typechecker can handle multiple ISA relations with the same root concept. 17 | Result: PASS 18 | 19 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/FlipPHPBug.adl: -------------------------------------------------------------------------------- 1 | CONTEXT FlipPHPBug IN ENGLISH 2 | 3 | CLASSIFY Lime ISA Citrus 4 | 5 | RELATION ownsCitrus[Person*Citrus] 6 | 7 | INTERFACE Overview : I[ONE] 8 | BOX [ "All people" : V[ONE*Person] 9 | ] 10 | 11 | INTERFACE Person : I[Person] 12 | BOX [ "php error 1" : (ownsCitrus;(I[Lime];I[Citrus]));(I[Citrus];I[Citrus])~ -- Bug, gives php error 13 | , "php error 2" : (ownsCitrus;I[Citrus]~) -- Same, probably related 14 | ] 15 | 16 | POPULATION ownsCitrus[Person*Citrus] CONTAINS 17 | [ ("martijn", "lime1") 18 | ] 19 | 20 | ENDCONTEXT 21 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue152.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue152 IN ENGLISH 2 | 3 | VIEW SessionProperty: SESSION { value : I } ENDVIEW 4 | 5 | -- For system bootstrapping purposes, we need a "God"-account that has all permissions/roles. 6 | POPULATION Account CONTAINS [ "god" ] 7 | 8 | RELATION sessionLoginAssist[SESSION*SESSION] [PROP] 9 | 10 | INTERFACE Login : "_SESSION"[SESSION] 11 | BOX[ "Please help" : sessionLoginAssist 12 | , " " : sessionLoginAssist;V[SESSION*SESSION];V[SESSION*Account];(-I[Account]!"god");V[Account*Message];"There are no Accounts!!!"[Message] 13 | ] 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/Other/Bug_GeneratedTables.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bugs IN ENGLISH 2 | 3 | RELATION r2[A*C] [UNI,SUR] 4 | 5 | RELATION r1[A*B] [UNI] 6 | 7 | -- The created tables are 8 | -- A B C 9 | -- ____________ __________ ____ 10 | -- |A |r2| r1 | |B |fillB| |C | 11 | -- |--+--+----| |--|-----| |--| 12 | -- |a1|c1|NULL| |b1| b1 | |c1| 13 | -- |----------| |--|-----| |--| 14 | -- 15 | -- Seems buggy. Why is the concept table of C not a column in A? 16 | -- It may contain duplicates, but some concept tables also contain duplicates (which may instead be the bug here) 17 | 18 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try24.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try24 IN ENGLISH 2 | 3 | CLASSIFY A ISA B 4 | RELATION r[A*C] [UNI] 5 | 6 | RELATION s[A*D] 7 | = [ ( "aap" , "noot") 8 | ; ( "mies", "vuur") 9 | ] 10 | 11 | 12 | {- In version 914 of ampersand (but also long before, e.g. version 699), this script generates an error: 13 | 14 | D:\data\hjo20125\ampersand>prototype -p --haskell try30.adl 15 | Inconsistencies in rule "TOT A[A*B]": 16 | - [("aap","aap"),("mies","mies")] 17 | 18 | 19 | ERROR: No prototype generated because of rule violations. 20 | (Compile with --dev to generate a prototype regardless of violations) 21 | 22 | -} 23 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.asciidoc: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | = $title$ 3 | $if(author)$ 4 | $for(author)$$author$$sep$; $endfor$ 5 | $endif$ 6 | $if(date)$ 7 | $date$ 8 | $endif$ 9 | $if(keywords)$ 10 | :keywords: $for(keywords)$$keywords$$sep$, $endfor$ 11 | $endif$ 12 | $if(lang)$ 13 | :lang: $lang$ 14 | $endif$ 15 | $if(toc)$ 16 | :toc: 17 | $endif$ 18 | 19 | $endif$ 20 | $if(abstract)$ 21 | [abstract] 22 | == Abstract 23 | $abstract$ 24 | 25 | $endif$ 26 | $for(header-includes)$ 27 | $header-includes$ 28 | 29 | $endfor$ 30 | $for(include-before)$ 31 | $include-before$ 32 | 33 | $endfor$ 34 | $body$ 35 | $for(include-after)$ 36 | 37 | $include-after$ 38 | $endfor$ 39 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Ticket237.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket237 IN DUTCH 2 | 3 | PATTERN Ticket237 4 | CLASSIFY Citrus ISA Fruit 5 | 6 | RELATION r[Fruit*Citrus] 7 | POPULATION r[Fruit*Citrus] CONTAINS 8 | [ ("1", "2") ; ("2", "2") ; ("3", "1") ] 9 | 10 | RULE Ticket237: I[Fruit] /\ (V[Fruit]-I[Citrus]) = I[Fruit]-I[Citrus] 11 | ENDPATTERN 12 | 13 | PURPOSE CONTEXT Ticket237 MARKDOWN 14 | {+This script should succeed, because `I[Fruit]-I[Citrus]` must 15 | be interpreted as `I[Fruit] /\ (V[Fruit]-I[Citrus])`. 16 | This is to prove that `I[Fruit]-I[Citrus]` may not be interpreted as `I[Fruit] /\ (V[Citrus]-I[Citrus])` 17 | +} 18 | 19 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try28.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try28 IN ENGLISH 2 | RELATION clientName[Client*Name] [MAP] 3 | RELATION clientAddress[Client*Address] [MAP] 4 | 5 | VIEW Client: Client(clientName, TXT ", ", clientAddress) 6 | 7 | {- Purpose This script demonstrates a bug where the relations in a VIEW are not taken into account in the typechecker. 8 | The produced message: 9 | ampersand: !fatal error 1601 (module ADL1.P2A_Converters, Ampersand v2.2.1.986:987M) 10 | Term clientName (line 5:34, file "try28.adl") was not found in 2 bindings. 11 | RELATION clientName[Client*Name] 12 | RELATION clientAddress[Client*Address] 13 | -} 14 | ENDCONTEXT -------------------------------------------------------------------------------- /AmpersandData/FormalAmpersand/FormalAmpersand.adl: -------------------------------------------------------------------------------- 1 | CONTEXT FormalAmpersand IN ENGLISH LATEX 2 | --! 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 !-- 3 | INCLUDE "Concepts.adl" 4 | -- INCLUDE "Conjuncts.adl" 5 | INCLUDE "Contexts.adl" 6 | INCLUDE "Documentation.adl" 7 | INCLUDE "Generics.adl" 8 | INCLUDE "Interfaces.adl" 9 | --INCLUDE "MinimalAST.xlsx" -- Contains minimal population. Anything discarded from it must violate an invariant 10 | INCLUDE "Relations.adl" 11 | INCLUDE "Rules.adl" 12 | -- INCLUDE "Tables.adl" 13 | INCLUDE "Terms.adl" 14 | --INCLUDE "Views.adl" 15 | 16 | 17 | ENDCONTEXT 18 | -------------------------------------------------------------------------------- /outputTemplates/default.man: -------------------------------------------------------------------------------- 1 | $if(has-tables)$ 2 | .\"t 3 | $endif$ 4 | $if(pandoc-version)$ 5 | .\" Automatically generated by Pandoc $pandoc-version$ 6 | .\" 7 | $endif$ 8 | $if(adjusting)$ 9 | .ad $adjusting$ 10 | $endif$ 11 | .TH "$title/nowrap$" "$section/nowrap$" "$date/nowrap$" "$footer/nowrap$" "$header/nowrap$" 12 | $if(hyphenate)$ 13 | .hy 14 | $else$ 15 | .nh 16 | $endif$ 17 | $for(header-includes)$ 18 | $header-includes$ 19 | $endfor$ 20 | $for(include-before)$ 21 | $include-before$ 22 | $endfor$ 23 | $body$ 24 | $for(include-after)$ 25 | $include-after$ 26 | $endfor$ 27 | $if(author)$ 28 | .SH AUTHORS 29 | $for(author)$$author$$sep$; $endfor$. 30 | $endif$ 31 | -------------------------------------------------------------------------------- /src/Ampersand/Commands/Init.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE FlexibleContexts #-} 3 | 4 | -- | Generate a configuration file for a new project. 5 | module Ampersand.Commands.Init 6 | ( init, 7 | InitOpts (..), 8 | HasInitOpts (..), 9 | ) 10 | where 11 | 12 | import Ampersand.Basics 13 | import Ampersand.Misc.HasClasses 14 | import Ampersand.Types.Config 15 | 16 | -- | Generate a configuration file for a new project. 17 | init :: 18 | (HasRunner env) => -- , Show env, HasProtoOpts env, HasAllowInvariantViolations env, HasDirPrototype env, HasRootFile env) 19 | RIO env () 20 | init = do 21 | logInfo "Still has to be implemented..." 22 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ARM20-Test1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARM20bug IN DUTCH 2 | ------------------------------------------------------------ 3 | PATTERN ARM20bug LABEL "ARM 2.0 bug" 4 | 5 | RELATION oblBF[Verplichting*Bedrijfsfunctie] [MAP] 6 | RELATION expBF[Verwachting*Bedrijfsfunctie] [MAP] 7 | RELATION oblexp[Verplichting*Verwachting] 8 | 9 | RULE Verplichting LABEL "Verplichting and expectation integrity": oblexp |- oblBF;expBF~ 10 | VIOLATION (TXT "Verplichting '", SRC I, TXT "' is van '", SRC oblBF, TXT "' terwijl verwachting '", TGT I, TXT "' van '", TGT expBF, TXT "' is.") 11 | 12 | ENDPATTERN 13 | ------------------------------------------------------------ 14 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue760.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug760 IN ENGLISH 2 | 3 | RELATION myFatherIs[Person*Person] [UNI,INJ] -- (Src) Person has (Tgt) Person as its predecessor 4 | 5 | POPULATION myFatherIs CONTAINS [ ( "Stein", "Rieks" ) ] 6 | POPULATION myFatherIs CONTAINS [ ( "Rieks", "Pierre" ) ] 7 | POPULATION myFatherIs CONTAINS [ ( "Pierre", "Harry" ) ] 8 | POPULATION myFatherIs CONTAINS [ ( "Harry", "Peter" ) ] 9 | 10 | INTERFACE Persons: "_SESSION";V[SESSION*Person] cRud BOX 11 | [ "Me" : I cRud 12 | , "My father" : myFatherIs cRud 13 | , "My son" : myFatherIs~ cRud 14 | ] 15 | 16 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Simple/Roles.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Roles IN ENGLISH 2 | {- Simple script for explaining and testing roles -} 3 | 4 | INTERFACE All : I[ONE] 5 | BOX [ "one" : I[ONE] ] 6 | 7 | INTERFACE ProducerAndConsumer FOR Producer, Consumer : I[ONE] 8 | BOX [ "one" : V[ONE] ] 9 | 10 | INTERFACE Producer FOR Producer : I[ONE] 11 | BOX [ "one" : V[ONE] ] 12 | 13 | INTERFACE Consumer FOR Consumer : I[ONE] 14 | BOX [ "one" : V[ONE] ] 15 | 16 | 17 | PATTERN Test 18 | 19 | RULE ProducerSignal : V[ONE] 20 | 21 | RULE ConsumerSignal : V[ONE] 22 | 23 | ROLE Producer MAINTAINS ProducerSignal 24 | 25 | ROLE Consumer MAINTAINS ConsumerSignal 26 | 27 | ENDPATTERN 28 | 29 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/ARM_Test10.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARMTest10 IN DUTCH -- (project ARMisa) 2 | CLASSIFY Verplichting ISA Criterium 3 | CLASSIFY Verwachting ISA Criterium 4 | CLASSIFY Gewetensvraag IS Verplichting /\ Verwachting 5 | CLASSIFY Gewetensvraag ISA Criterium 6 | RELATION critText[Criterium*Blob] [MAP] 7 | RELATION afdekking[Criterium*Verwachtingsverzameling] [UNI] 8 | RELATION vvVerwachting[Verwachtingsverzameling*Criterium] 9 | INTERFACE Gewetensvraag : I[Gewetensvraag] 10 | BOX[ afdekking : afdekking 11 | BOX[ gewetensvragen: vvVerwachting;I[Gewetensvraag] 12 | BOX[ gewetensvraag: I 13 | , criterium : critText 14 | ] 15 | ] 16 | ] 17 | ENDCONTEXT 18 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/InterfaceTest3.adl: -------------------------------------------------------------------------------- 1 | CONTEXT InterfaceTest3 IN ENGLISH 2 | 3 | RELATION r[A*C] 4 | RELATION s[B*D] 5 | CLASSIFY B ISA A 6 | 7 | INTERFACE T :I[B] 8 | BOX [ self: I 9 | -- , r : I[B];r 10 | , s : s 11 | ] 12 | ENDCONTEXT 13 | 14 | {- 15 | The type of the box is evident: it must be [B], because of the explicit type of the interface. 16 | Hence, the type of `self:I` must be infered to B 17 | However, in Ampersand v2.2.1.1026 we get the following error message: 18 | 19 | Error(s) found: 20 | line 8:13, file "InterfaceTest3.adl": 21 | the source and target of I 22 | are in conflict with respect to concepts A and B. 23 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/Fixed/Other/Bug_ColumnProperties.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug IN ENGLISH --ticket #214 2 | 3 | RELATION rel[A*B] [INJ,SUR] 4 | 5 | -- yields column properties: [{-NUL+UNQ} A] [{-NUL+UNQ} B , {+NUL-UNQ} rel] 6 | -- but this should be .. {-NUL-UNQ} .. 7 | 8 | -- compare with UNI and TOT: 9 | 10 | -- rel[A*B] [INJ] [{-NUL+UNQ} A] [{-NUL+UNQ} B , {+NUL-UNQ} rel] 11 | -- rel[A*B] [INJ,SUR] [{-NUL+UNQ} A] [{-NUL+UNQ} B , {+NUL-UNQ} rel] <- wrong 12 | -- rel[A*B] [UNI] [{-NUL+UNQ} A, {+NUL-UNQ} rel] [{-NUL+UNQ} B] 13 | -- rel[A*B] [UNI,TOT] [{-NUL+UNQ} A, {-NUL-UNQ} rel] [{-NUL+UNQ} B] 14 | 15 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.texinfo: -------------------------------------------------------------------------------- 1 | \input texinfo 2 | @documentencoding UTF-8 3 | $for(header-includes)$ 4 | $header-includes$ 5 | $endfor$ 6 | 7 | $if(strikeout)$ 8 | @macro textstrikeout{text} 9 | ~~\text\~~ 10 | @end macro 11 | 12 | $endif$ 13 | @ifnottex 14 | @paragraphindent 0 15 | @end ifnottex 16 | $if(titlepage)$ 17 | @titlepage 18 | @title $title$ 19 | $for(author)$ 20 | @author $author$ 21 | $endfor$ 22 | $if(date)$ 23 | $date$ 24 | $endif$ 25 | @end titlepage 26 | 27 | $endif$ 28 | $for(include-before)$ 29 | $include-before$ 30 | 31 | $endfor$ 32 | $if(toc)$ 33 | @contents 34 | 35 | $endif$ 36 | $body$ 37 | $for(include-after)$ 38 | 39 | $include-after$ 40 | $endfor$ 41 | 42 | @bye 43 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/DoubleLabel.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | INTERFACE Overview : I[ONE] 4 | BOX [ l : V[ONE] 5 | , l : V[ONE] 6 | ] 7 | 8 | ENDCONTEXT 9 | 10 | {- 11 | Purpose: to examine the error message caused by multiple instances of the same field. 12 | Result: FAIL 13 | Reason: Field names in interfaces must be unique, because they are being referred to. 14 | 15 | Message: 16 | The interface named "Overview" contains errors: 17 | line 3:11, file "DoubleLabel.adl": Different fields have the same name: 18 | (Unknown origin) "l" : V[ONE*ONE] 19 | (Unknown origin) "l" : V[ONE*ONE] 20 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Ticket237.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket237 IN DUTCH 2 | 3 | PATTERN Ticket237 4 | CLASSIFY Citrus ISA Fruit 5 | 6 | RULE I[Fruit] /\ -I[Citrus] = I[Fruit]-I[Citrus] 7 | ENDPATTERN 8 | 9 | PURPOSE CONTEXT Ticket237 MARKDOWN 10 | {+This script should produce a type error, because `I[Fruit] /\ -I[Citrus]` is ambiguous. 11 | It can be interpreted as `I[Fruit] /\ (V[Citrus]-I[Citrus])` or as `I[Fruit] /\ (V[Fruit]-I[Citrus])` 12 | The ambiguity can be exposed by adding the following population: 13 | 14 | RELATION r[Fruit*Citrus] 15 | POPULATION r[Fruit*Citrus] CONTAINS 16 | [ ("1", "2") ; ("2", "2") ; ("3", "1") ] 17 | -} 18 | 19 | ENDCONTEXT -------------------------------------------------------------------------------- /outputTemplates/default.asciidoctor: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | = $title$ 3 | $if(author)$ 4 | $for(author)$$author$$sep$; $endfor$ 5 | $endif$ 6 | $if(date)$ 7 | $date$ 8 | $endif$ 9 | $if(keywords)$ 10 | :keywords: $for(keywords)$$keywords$$sep$, $endfor$ 11 | $endif$ 12 | $if(lang)$ 13 | :lang: $lang$ 14 | $endif$ 15 | $if(toc)$ 16 | :toc: 17 | $endif$ 18 | $if(math)$ 19 | :stem: latexmath 20 | $endif$ 21 | 22 | $endif$ 23 | $if(abstract)$ 24 | [abstract] 25 | == Abstract 26 | $abstract$ 27 | 28 | $endif$ 29 | $for(header-includes)$ 30 | $header-includes$ 31 | 32 | $endfor$ 33 | $for(include-before)$ 34 | $include-before$ 35 | 36 | $endfor$ 37 | $body$ 38 | $for(include-after)$ 39 | 40 | $include-after$ 41 | $endfor$ 42 | -------------------------------------------------------------------------------- /src/Ampersand.hs: -------------------------------------------------------------------------------- 1 | module Ampersand 2 | ( module Ampersand.ADL1, 3 | module Ampersand.Basics, 4 | module Ampersand.Classes, 5 | module Ampersand.Misc.Commands, 6 | module Ampersand.Daemon.Daemon, 7 | module Ampersand.FSpec, 8 | module Ampersand.Input, 9 | module Ampersand.Misc.HasClasses, 10 | module Ampersand.Output, 11 | module Ampersand.Test, 12 | ) 13 | where 14 | 15 | import Ampersand.ADL1 16 | import Ampersand.Basics hiding (Identity) 17 | import Ampersand.Classes 18 | import Ampersand.Daemon.Daemon 19 | import Ampersand.FSpec 20 | import Ampersand.Input 21 | import Ampersand.Misc.Commands 22 | import Ampersand.Misc.HasClasses 23 | import Ampersand.Output 24 | import Ampersand.Test 25 | -------------------------------------------------------------------------------- /outputTemplates/default.rst: -------------------------------------------------------------------------------- 1 | $if(titleblock)$ 2 | $titleblock$ 3 | 4 | $endif$ 5 | $for(author)$ 6 | :Author: $author$ 7 | $endfor$ 8 | $if(date)$ 9 | :Date: $date$ 10 | $endif$ 11 | $if(author)$ 12 | 13 | $else$ 14 | $if(date)$ 15 | 16 | $endif$ 17 | $endif$ 18 | $if(rawtex)$ 19 | .. role:: raw-latex(raw) 20 | :format: latex 21 | .. 22 | 23 | $endif$ 24 | $for(include-before)$ 25 | $include-before$ 26 | 27 | $endfor$ 28 | $if(toc)$ 29 | .. contents:: 30 | :depth: $toc-depth$ 31 | .. 32 | 33 | $endif$ 34 | $if(number-sections)$ 35 | .. section-numbering:: 36 | 37 | $endif$ 38 | $for(header-includes)$ 39 | $header-includes$ 40 | 41 | $endfor$ 42 | $body$ 43 | $for(include-after)$ 44 | 45 | $include-after$ 46 | $endfor$ 47 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue746.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue746 IN DUTCH 2 | 3 | RULE sinterklaasBestaatNiet : -("Sinterklaas";I[Persoon]) 4 | MEANING "De persoon 'Sinterklaas' bestaat niet." 5 | 6 | RULE sinterklaasBestaat : "Sinterklaas";I[Idee] 7 | MEANING "Het is ondenkbaar dat de idee 'Sinterklaas' niet bestaat." 8 | 9 | POPULATION Idee CONTAINS ["Sinterklaas"] 10 | 11 | INTERFACE Personen : "_SESSION"[SESSION] 12 | BOX [ "Sinterklaas mag hier niet" : V[SESSION*Persoon] ] 13 | 14 | INTERFACE Ideeen : "_SESSION"[SESSION] 15 | BOX [ "Sinterklaas moet hier altijd" : V[SESSION*Idee] ] 16 | 17 | ENDCONTEXT 18 | 19 | {- 20 | This issue is about the sql implementation of terms containing singleton terms. 21 | -} 22 | -------------------------------------------------------------------------------- /testing/Travis/testcases/FuncSpec/testIssue1183.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TestIssue1183 2 | 3 | PATTERN FOO 4 | CONCEPT A123 "string 1" "ref" 5 | MEANING {+ string 2 +} 6 | 7 | CONCEPT A123L "string 1" "ref" 8 | MEANING LATEX {+ string 2 +} 9 | 10 | CONCEPT A13 "string 1" 11 | MEANING {+ string 2 +} 12 | 13 | CONCEPT A13L "string 1" 14 | MEANING LATEX {+ string 2 +} 15 | 16 | CONCEPT A12 "string 1" "ref" 17 | 18 | CONCEPT A1 "string 1" 19 | 20 | CONCEPT A123 "string 3" "ref" 21 | MEANING {+ string 4 +} 22 | 23 | RELATION foo[A123 * A123L] 24 | RELATION foo[A133 * A13L] 25 | RELATION foo[A1 * A12] 26 | ENDPATTERN 27 | 28 | CONCEPT A3 29 | MEANING {+ string 5 +} 30 | 31 | CONCEPT A3L 32 | MEANING LATEX {+ string 6 +} 33 | 34 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Ticket398.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Ticket398 IN ENGLISH 2 | 3 | PATTERN Ticket398 4 | RELATION actTask[Activity*Task] [MAP] MEANING "Activities are carried out as part of a task" 5 | RELATION actEndTime[Activity*Timestamp] [UNI] MEANING "Activities may be completed at a specific time" 6 | RELATION taskCompleted[Task*Task] [PROP] MEANING "Tasks may have the property of being completed" 7 | 8 | RELATION taskCmpStatIsGreen[Task*Task] 9 | ROLE Developer MAINTAINS CompleteTask 10 | RULE CompleteTask: I[Task] /\ (-actTask~!(I /\ actEndTime;actEndTime~));actTask |- taskCmpStatIsGreen MEANING "When all activities of the task have terminated, the task status must be Green" 11 | 12 | ENDPATTERN 13 | ENDCONTEXT -------------------------------------------------------------------------------- /docs/the-tools-we-use/building/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: This chapter describes how and why the various items are built. 3 | --- 4 | 5 | # Building 6 | 7 | | Item | build tool | Purpose | 8 | | :--- | :--- | :--- | 9 | | [Ampersand Compiler](haskell.md) | Stack | build a binary on MacOS or Windows | 10 | | [Ampersand Compiler](building-an-ampersand-compiler-as-docker-image.md) | Docker | build a Docker image for the Ampersand compiler | 11 | | Application | Docker | build a Docker image for an application generated by Ampersand. | 12 | | RAP | Docker | build a Docker image for RAP | 13 | | [Automated build](automated-builds.md) | Docker Cloud | explains the automated build process that produces up-to-date images on docker cloud. | 14 | 15 | -------------------------------------------------------------------------------- /miscellaneous/Berichten/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Rechtspraak 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | This page contains frames. 16 | 17 | 18 | -------------------------------------------------------------------------------- /outputTemplates/default.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 Courier;}} 2 | {\colortbl;\red255\green0\blue0;\red0\green0\blue255;} 3 | \widowctrl\hyphauto 4 | $for(header-includes)$ 5 | $header-includes$ 6 | $endfor$ 7 | 8 | $if(title)$ 9 | {\pard \qc \f0 \sa180 \li0 \fi0 \b \fs36 $title$\par} 10 | $endif$ 11 | $for(author)$ 12 | {\pard \qc \f0 \sa180 \li0 \fi0 $author$\par} 13 | $endfor$ 14 | $if(date)$ 15 | {\pard \qc \f0 \sa180 \li0 \fi0 $date$\par} 16 | $endif$ 17 | $if(spacer)$ 18 | {\pard \ql \f0 \sa180 \li0 \fi0 \par} 19 | $endif$ 20 | $if(toc)$ 21 | $table-of-contents$ 22 | $endif$ 23 | $for(include-before)$ 24 | $include-before$ 25 | $endfor$ 26 | $body$ 27 | $for(include-after)$ 28 | $include-after$ 29 | $endfor$ 30 | } 31 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try14.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try14 IN ENGLISH 2 | 3 | PATTERN Try14 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION q[B*C] 7 | RULE r = -(-s;-q) 8 | ENDPATTERN 9 | 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: This script is meant to study the ambiguity of interpretation in terms with complements. 14 | Result: FAIL 15 | An ambiguity arises in type checking. Be more specific in the terms -s and -q. 16 | You could add more types inside the term, or write: 17 | (V[A*B] - s) 18 | (V[B*C] - q) 19 | Error at symbol () in file try14.adl at line 7 : 14 20 | 21 | In issue #241 we have restored the law r-s = r/\-s. In order to achieve this, Bas had to tighten the ambiguity rules. 22 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try43.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try43 IN ENGLISH 2 | 3 | PATTERN Try43 4 | RELATION z[A*B] 5 | RELATION t[A*A] 6 | RELATION m[A*A] 7 | RELATION b[A*A] 8 | ENDPATTERN 9 | 10 | INTERFACE Try43 : V[ONE*B] 11 | BOX 12 | [ 13 | "dossiers" : z~ /\ z~;(t /\ (-m \/ -b)) 14 | ] 15 | 16 | ENDCONTEXT 17 | 18 | {- This test case has originated from a bug chase in DemoLamicieCode702. 19 | It produced the error message: 20 | Prototype: !fatal 430 (module Core.AbstractSyntaxTree) Ampersand v3.0.1.1270:1271M 21 | Cannot unite (with operator "\/") term 22 | EFlp (EDcD RELATION z [A*B]) 23 | with EUni (ECpl (EDcD RELATION m [A*A]),ECpl (EDcD RELATION b [A*A])). 24 | 25 | This bug has been fixed on Febr 9th, 2014. 26 | -} 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | 11 | 12 | 13 | **Describe the solution you'd like** 14 | 15 | 16 | 17 | **Describe alternatives you've considered** 18 | 19 | 20 | 21 | **Additional context** 22 | 23 | -------------------------------------------------------------------------------- /src/Ampersand/Commands/Validate.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE ConstraintKinds #-} 2 | {-# LANGUAGE FlexibleContexts #-} 3 | 4 | -- | Generate a prototype from a project. 5 | module Ampersand.Commands.Validate 6 | ( validate, 7 | ValidateOpts (..), 8 | HasValidateOpts (..), 9 | ) 10 | where 11 | 12 | import Ampersand.Basics 13 | import Ampersand.FSpec 14 | import Ampersand.Misc.HasClasses 15 | import Ampersand.Prototype.ValidateSQL (validateRulesSQL) 16 | 17 | -- | Builds a prototype of the current project. 18 | validate :: 19 | (HasLogFunc env) => 20 | FSpec -> 21 | RIO env () 22 | validate fSpec = do 23 | logInfo "Validating SQL expressions..." 24 | errMsg <- validateRulesSQL fSpec 25 | unless (null errMsg) (exitWith $ InvalidSQLExpression errMsg) 26 | -------------------------------------------------------------------------------- /docs/modeling/legal-modeling.md: -------------------------------------------------------------------------------- 1 | # Legal modeling 2 | 3 | ## Purpose 4 | 5 | The purpose of legal modeling is usually software related. The most popular use is to obtain decision rules that can be executed by a computer. A much mentioned problem is the legal language of the legislative domain that is being modeled. A modeler who is unfamiliar with the domain language will require trial and error to formulate decision rules that ar both executable and legally compliant. Another problem is that the modeler is sometimes legally educated, sometimes technically educated, but rarely both. It requires a modeler who is both technically and legally competent to make this trial-and-error process converge. This explains why legal modeling can be very time consuming. 6 | 7 | ### to be continued 8 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/NoSentinel/TechDataModelTest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TechDataModelTest IN ENGLISH 2 | 3 | -- Kernel concepts should not get type Bool 4 | 5 | CLASSIFY B ISA A 6 | 7 | CONCEPT E "testconcept E" -- disconnected concept, should not appear in technical data model 8 | 9 | RELATION r1[B*C] [SUR,UNI,INJ] 10 | RELATION r2[A*C] [SUR,UNI,INJ] 11 | RELATION r3[A*D] 12 | 13 | RELATION r5[X*B] -- should not point at sugar cube B, but at its root A 14 | 15 | -- No table should be shown for X and D, as wide tables with one column are basically scalars 16 | -- (fixing this will also remove disconnected concepts like E) 17 | 18 | RELATION x[X*X] -- creates sugar cube for X in old version, as assocs point to concept 'X' but corresponding class has sql name 'X1' 19 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue340.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue340 IN ENGLISH 2 | 3 | {- Checks all 16 combinations of UNI,TOT,INJ,SUR -} 4 | 5 | RELATION r[A*B] 6 | 7 | RELATION rUni[A*B] [UNI] 8 | RELATION rUniTot[A*B] [UNI,TOT] 9 | RELATION rUniInj[A*B] [UNI,INJ] 10 | RELATION rUniSur[A*B] [UNI,SUR] 11 | 12 | RELATION rUniTotInj[A*B] [UNI,TOT,INJ] 13 | RELATION rUniTotSur[A*B] [UNI,TOT,SUR] 14 | RELATION rUniInjSur[A*B] [UNI,INJ,SUR] 15 | RELATION rUniTotInjSur[A*B] [UNI,TOT,INJ,SUR] 16 | 17 | RELATION rTot[A*B] [TOT] 18 | RELATION rTotInj[A*B] [TOT,INJ] 19 | RELATION rTotSur[A*B] [TOT,SUR] 20 | RELATION rTotInjSur[A*B] [TOT,INJ,SUR] 21 | 22 | RELATION rInj[A*B] [INJ] 23 | RELATION rInjSur[A*B] [INJ,SUR] 24 | 25 | RELATION rSur[A*B] [SUR] 26 | 27 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue148.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue148 IN DUTCH 2 | 3 | REPRESENT Boolean TYPE BOOLEAN 4 | POPULATION Boolean CONTAINS [FALSE,TRUE] 5 | 6 | REPRESENT Date TYPE DATE 7 | POPULATION Date CONTAINS [ 2015-10-10 ] 8 | REPRESENT DateTime TYPE DATETIME 9 | POPULATION DateTime CONTAINS [ 2015-10-10T23:59:59Z 10 | , 2015-10-10T23:59:59+05:30 11 | , 2015-10-10T23:59:59-06:15 12 | , 2015-10-10T23:59Z 13 | , 2015-10-10T23:59:59.123Z 14 | ] 15 | 16 | REPRESENT Integer TYPE INTEGER 17 | POPULATION Integer CONTAINS [1 ,44, 3,5] 18 | REPRESENT Float TYPE FLOAT 19 | POPULATION Float CONTAINS [1 ,5.6756 , 3.5] 20 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Issue260.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue260 IN DUTCH 2 | 3 | RELATION r[A*B] 4 | REPRESENT B TYPE INTEGER 5 | 6 | POPULATION r CONTAINS 7 | [( "Foo" , 2 )] 8 | 9 | ENDCONTEXT 10 | 11 | {- This tiny script is perfectly allright. It could be succesfully compiled with Ampersand v3.2.0[master:62e159f*] 12 | However, it fails when using Ampersand v3.3.0[master:91e0569] 13 | It throws the following error: 14 | 15 | Error(s) found: 16 | Representation mismatch 17 | Found: `2`, 18 | as representation of an atom in concept `B`. 19 | However, the representation-type of that concept is (implicitly) 20 | defined as ALPHANUMERIC. The found value does not match that type. 21 | Error at symbol () in file Issue260.adl at line 7 : 15 22 | -} -------------------------------------------------------------------------------- /src/Ampersand/Options/InputOutputOpts.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.InputOutputOpts (outputFileOptsParser) where 2 | 3 | import Ampersand.Basics 4 | import Ampersand.Misc.HasClasses (InputOutputOpts (..)) 5 | import Ampersand.Options.FSpecGenOptsParser 6 | import Options.Applicative 7 | 8 | -- | Command-line parser for OutputFileOpts. 9 | outputFileOptsParser :: FilePath -> Parser InputOutputOpts 10 | outputFileOptsParser defOutputFile = 11 | InputOutputOpts 12 | <$> fSpecGenOptsParser False 13 | <*> outputfileP 14 | where 15 | outputfileP :: Parser FilePath 16 | outputfileP = 17 | strArgument 18 | ( metavar "OUTPUTFILE" 19 | <> value defOutputFile 20 | <> showDefault 21 | <> help "The name of the output file." 22 | ) 23 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ArchiTest3.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ArchiTest3 IN ENGLISH 2 | 3 | {- RJ/20130308: Als je de tweede definitie van 'connect' weggooit (regel 11), dan doet-ie het wel. 4 | -- RJ/20130308: Hij doet het ook als je in RULE R004 de hele signatuur meegeeft, als volgt: 5 | RULE R004: I[CommunicationPath] |- connect[Node * CommunicationPath]~; -I[Node]; connect[Node * CommunicationPath] 6 | -} 7 | 8 | PATTERN ArchiTest3 9 | 10 | RELATION connect[Node*Communicationpath] PRAGMA "Node " " is connected to Communication path ". 11 | RELATION connect[Device*Network] PRAGMA "Device " " is connected to network ". 12 | 13 | RULE R004: I[Communicationpath] |- connect~; -I[Node]; connect 14 | MEANING "A communication path connects two or more nodes." 15 | 16 | ENDPATTERN 17 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | CLASSIFY A ISA AOrB 3 | CLASSIFY B ISA AOrB 4 | 5 | PATTERN Test2 6 | RELATION r[X*Y] 7 | RELATION s[X*A] 8 | RELATION t[B*Y] 9 | RELATION t[Q*Y] 10 | RULE Test: r = s;t[B*Y] 11 | CLASSIFY D IS A/\B 12 | -- was: RULE I[D] = I[A]/\I[B] 13 | -- RULE 'THING'[A] |- t[B*Y];V[Y*A] -- there is something of A in t 14 | ENDPATTERN 15 | 16 | ENDCONTEXT 17 | 18 | {- 19 | Purpose: This script shows that a type conflict (between A and B) can be resolved 20 | by defining an intersection type D. 21 | Besides, it shows that the type checker can choose the right type for 22 | subterm t, which is t[B*Y] (line 6) 23 | Result: PASS 24 | Reason: the type on ; is inferred as I[D] 25 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Bugs/NoSentinel/Bug29_InterfaceRefLoop.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Bug29InterfaceRefLoop IN ENGLISH 2 | {- Context that yields an incorrect infinite loop error for interface refs in the new front-end. 3 | This script should fail because it uses Concepts A and B, which are not declared. 4 | They should occur in a relation declaration, a classify statement, or a concept definition. 5 | See issue 6 | -} 7 | 8 | INTERFACE Buggy FOR Dummy : I[SESSION] 9 | BOX [ "Ref" : V[SESSION*B] INTERFACE Ref -- is incorrectly recognized as an cyclic ref by the server 10 | ] 11 | 12 | REPRESENT A TYPE OBJECT 13 | INTERFACE Ref : V[B*A] 14 | BOX [ "Atom" : I[A] 15 | , "Ref2" : I[A] BOX 16 | [ "Raf" : V[A*A] 17 | , "Rbf" : V[A*B] 18 | ] 19 | ] 20 | 21 | ENDCONTEXT 22 | -------------------------------------------------------------------------------- /outputTemplates/default.muse: -------------------------------------------------------------------------------- 1 | $if(author)$ 2 | #author $for(author)$$author$$sep$; $endfor$ 3 | $endif$ 4 | $if(title)$ 5 | #title $title$ 6 | $endif$ 7 | $if(lang)$ 8 | #lang $lang$ 9 | $endif$ 10 | $if(LISTtitle)$ 11 | #LISTtitle $LISTtitle$ 12 | $endif$ 13 | $if(subtitle)$ 14 | #subtitle $subtitle$ 15 | $endif$ 16 | $if(SORTauthors)$ 17 | #SORTauthors $SORTauthors$ 18 | $endif$ 19 | $if(SORTtopics)$ 20 | #SORTtopics $SORTtopics$ 21 | $endif$ 22 | $if(date)$ 23 | #date $date$ 24 | $endif$ 25 | $if(notes)$ 26 | #notes $notes$ 27 | $endif$ 28 | $if(source)$ 29 | #source $source$ 30 | $endif$ 31 | 32 | $for(header-includes)$ 33 | $header-includes$ 34 | 35 | $endfor$ 36 | $for(include-before)$ 37 | $include-before$ 38 | 39 | $endfor$ 40 | $body$ 41 | $for(include-after)$ 42 | 43 | $include-after$ 44 | $endfor$ 45 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/validate/Issue148.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Issue148 IN DUTCH 2 | 3 | REPRESENT Boolean TYPE BOOLEAN 4 | POPULATION Boolean CONTAINS [FALSE,TRUE] 5 | 6 | REPRESENT Date TYPE DATE 7 | POPULATION Date CONTAINS [ 2015-10-10 ] 8 | REPRESENT DateTime TYPE DATETIME 9 | POPULATION DateTime CONTAINS [ 2015-10-10T23:59:59Z 10 | , 2015-10-10T23:59:59+05:30 11 | , 2015-10-10T23:59:59-06:15 12 | , 2015-10-10T23:59Z 13 | , 2015-10-10T23:59:59.123Z 14 | ] 15 | 16 | REPRESENT Integer TYPE INTEGER 17 | POPULATION Integer CONTAINS [1 ,44, 3,5] 18 | REPRESENT Float TYPE FLOAT 19 | POPULATION Float CONTAINS [1 ,5.6756 , 3.5] 20 | 21 | 22 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/FraakTest2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT FraakTest2 IN ENGLISH 2 | 3 | {-Prototype.exe (Ampersand v2.2.1.1016, build time: 6-May-13 13:46.54) geeft de volgende fouten: 4 | Checking on rule violations... 5 | Inconsistencies in rule "TOT Beamer[Beamer*Resource]": 6 | - [("Beamer 001","Beamer 001"),("Beamer Gn 1.147","Beamer Gn 1.147")] 7 | 8 | Inconsistencies in rule "TOT Room[Room*Resource]": 9 | - [("Gn secretariaat","Gn secretariaat"),("Gn 1.147","Gn 1.147")] 10 | -} 11 | 12 | PATTERN FraakTest2 13 | 14 | CLASSIFY Room ISA Resource 15 | CLASSIFY Beamer ISA Resource 16 | 17 | RELATION beamerLocation[Beamer*Room] 18 | 19 | ENDPATTERN 20 | 21 | POPULATION beamerLocation CONTAINS 22 | [ ("Beamer 001", "Gn secretariaat") 23 | ; ("Beamer Gn 1.147", "Gn 1.147") 24 | ] 25 | 26 | ENDCONTEXT -------------------------------------------------------------------------------- /miscellaneous/Berichten/lib/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Documentation

9 |

10 | Het bevorderen van eenheid in taal ten bate van effectieve gegevensuitwisseling en 11 | informatiedeling is een belangrijke voorwaarde om onder meer een integer en integraal 12 | persoonsbeeld te kunnen bieden. Centrale ondersteuning daarbij is voor de ketenpartners 13 | gewenst en zelfs als noodzakelijk geacht. De Justitiele Informatiedienst (JustID) 14 | heeft daarvoor een aparte dienst in huis: EBV (wat formeel staat voor Elektronisch 15 | BerichtenVerkeer). 16 |

17 | 18 | 19 | -------------------------------------------------------------------------------- /testing/StillUnsupported/Issue166.adl: -------------------------------------------------------------------------------- 1 | CONTEXT SinterklaasTest IN DUTCH 2 | 3 | RULE toBeOrNotToBe : -'Sinterklaas'[Persoon] 4 | MEANING "De persoon 'Sinterklaas' bestaat niet." 5 | 6 | ENDCONTEXT 7 | 8 | {- This test is all about the question of what is in the initial population. 9 | Are singletons, mentioned in terms only, part of that population? 10 | 11 | Currently, a singleton is part of the initial population. In this case, a prototype cannot be generated, 12 | It gives the following error message: 13 | 14 | Checking on rule violations... 15 | Inconsistencies in rule "toBeOrNotToBe": 16 | - [("Sinterklaas","Sinterklaas")] 17 | 18 | Signals for initial population: 19 | Conjunct: -'Sinterklaas'[Persoon] 20 | - [("Sinterklaas","Sinterklaas")] 21 | 22 | ERROR: No prototype generated because of rule violations. 23 | 24 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Try1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try1 IN ENGLISH 2 | 3 | PATTERN Try1 4 | RELATION r[A*B] 5 | CLASSIFY A ISA B 6 | RULE r |- (V[A*A]-I[B]) ; r 7 | RULE r |- (V[A*B]-I[B]) ; r 8 | RULE r |- (V[B*A]-I[B]) ; r 9 | RULE r |- (V[B*B]-I[B]) ; r 10 | RULE r |- -I[B] ; r 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | {- 15 | Purpose: to expose the ambiguity in the complement of I[B] (line 10). 16 | Result: FAIL 17 | Reason: The user should pick one of the alternatives above, each of which is acceptable. 18 | 19 | Message: 20 | line 10:20, file "Try1.adl": 21 | The complement of I[B] is ambiguous with respect to 22 | concepts A and B. 23 | Use (V[ * ]-I[B]) to disambiguate the complement. 24 | -} -------------------------------------------------------------------------------- /.github/workflows/triggerDocsUpdate.yml: -------------------------------------------------------------------------------- 1 | # Workflow to update documentation on our landingpage AmpersandTarski.gihub.io 2 | name: Trigger Documentation Update 3 | 4 | on: 5 | push: 6 | branches: 7 | - main 8 | - documentation 9 | paths: 10 | - "docs/**" 11 | 12 | jobs: 13 | deploy: 14 | runs-on: ubuntu-22.04 15 | steps: 16 | # Trigger the "DeployToPages" workflow in the "AmpersandTarski.github.io" repository 17 | - run: | 18 | curl -XPOST -u "${{secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" \ 19 | -H "Accept: application/vnd.github.everest-preview+json" -H \ 20 | "Content-Type: application/json" https://api.github.com/repos/AmpersandTarski/AmpersandTarski.github.io/actions/workflows/DeployToPages.yml/dispatches \ 21 | --data '{"ref": "main"}' 22 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try13b.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test13 4 | RELATION r[A*A] 5 | RELATION r[B*C] 6 | RULE T1: r = r[A*A]/\I 7 | RULE T2: r = r[A*A]\/I 8 | RULE T5: r = r[A*A];I 9 | RULE T6: r = r[B*C];I 10 | RULE T7: r = r[A*A]!I 11 | RULE T8: r = r[B*C]!I 12 | ENDPATTERN 13 | 14 | ENDCONTEXT 15 | 16 | {- 17 | Purpose: a superficial check on type deduction 18 | Result: PASS 19 | Reason: The type of I cannot always be determined from its context 20 | The following type errors have been found in the past: 21 | 22 | line 7:8, file "try13.adl" 23 | Ambiguous equation r = r[A*A] \/ I 24 | 25 | line 10:8, file "try13.adl" 26 | Ambiguous equation r = r[A*A]!I 27 | 28 | line 11:8, file "try13.adl" 29 | Ambiguous equation r = r[B*C]!I 30 | 31 | -} -------------------------------------------------------------------------------- /AmpersandData/Repo Interfaces/admin_interfaces.ifc: -------------------------------------------------------------------------------- 1 | CONTEXT Atlas IN ENGLISH 2 | INTERFACE# Files FOR Admin: I[ONE] 3 | BOX ["loaded files": V[ONE*File];(sourcefile~;sourcefile \/ parseerror;parseerror~ \/ typeerror;typeerror~) 4 | BOX ["name":filename 5 | ,"dir":filepath 6 | ,"created at":filetime 7 | ,"first loaded with":firstloadedwith 8 | ,"syntax error":parseerror BOX [act:pe_action,pos:pe_position,exp:pe_expecting] 9 | ,"type error":typeerror BOX [msg:te_message] 10 | ,"context" : sourcefile~ 11 | BOX ["name":ctxnm 12 | ,"source files":(sourcefile \/ includes);filename 13 | ,"number of rules":countrules 14 | ,"number of relations":countdecls 15 | ,"number of concepts":countcpts] 16 | ] 17 | ] 18 | ENDCONTEXT 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Ampersand/Options/DevoutputOptsParser.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.DevoutputOptsParser (devoutputOptsParser) where 2 | 3 | import Ampersand.Basics 4 | import Ampersand.Misc.HasClasses (DevOutputOpts (..)) 5 | import Ampersand.Options.FSpecGenOptsParser 6 | import Options.Applicative 7 | 8 | -- | Command-line parser for DevOutputOpts. 9 | devoutputOptsParser :: FilePath -> Parser DevOutputOpts 10 | devoutputOptsParser defOutputdir = 11 | DevOutputOpts 12 | <$> fSpecGenOptsParser False 13 | <*> outputdirP 14 | where 15 | outputdirP :: Parser FilePath 16 | outputdirP = 17 | strArgument 18 | ( metavar "OUTPUTDIRECTORY" 19 | <> value defOutputdir 20 | <> showDefault 21 | <> help "The name of the directory where the diagnostic files will be written to." 22 | ) 23 | -------------------------------------------------------------------------------- /src/Ampersand/Options/DaemonParser.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Options.DaemonParser where 2 | 3 | import Ampersand.Basics 4 | import Ampersand.Misc.HasClasses 5 | import Ampersand.Options.FSpecGenOptsParser 6 | import Options.Applicative 7 | import Options.Applicative.Builder.Extra (boolFlags) 8 | 9 | -- | Command-line parser for the daemon command. 10 | daemonOptsParser :: Parser DaemonOpts 11 | daemonOptsParser = 12 | DaemonOpts 13 | <$> strOption 14 | ( long "daemonconfig" 15 | <> metavar "CONFIGFILE" 16 | <> value ".ampersand" 17 | <> showDefault 18 | <> help "The config file contains the list of files to be monitored." 19 | ) 20 | <*> fSpecGenOptsParser True 21 | <*> boolFlags 22 | True 23 | "warnings" 24 | "show warnings in the output, if any. " 25 | mempty 26 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/TTypeTest1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT TtypesTest IN ENGLISH 2 | 3 | RELATION huisnummer[NAW*Huisnummer] [TOT,UNI] 4 | REPRESENT Huisnummer TYPE INTEGER 5 | RELATION straat[NAW*Straat] [TOT,UNI] 6 | RELATION woonplaats[NAW*Woonplaats] [TOT,UNI] 7 | RELATION foto[NAW*Foto] [UNI] 8 | REPRESENT Foto TYPE BINARY 9 | 10 | POPULATION huisnummer CONTAINS [ ("adres van Han" , 12) ] 11 | POPULATION straat CONTAINS [ ("adres van Han" , "Eikenlaan") ] 12 | POPULATION woonplaats CONTAINS [ ("adres van Han" , "Peize") ] 13 | 14 | 15 | INTERFACE Adressen FOR admin : "_SESSION"[SESSION] 16 | BOX ["Adressen" : V[SESSION*NAW] 17 | ] 18 | INTERFACE Adres FOR admin :I[NAW] 19 | BOX [ ie: I 20 | , huisnummer : huisnummer 21 | , straat : straat 22 | , woonplaats : woonplaats 23 | ] 24 | 25 | 26 | ENDCONTEXT -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try19.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try19 IN ENGLISH 2 | PATTERN Try19 3 | 4 | RELATION orderedBy[Order*Client] 5 | RELATION orderReceived[Order*Client] 6 | RELATION orderAccepted[Order*Vendor] 7 | 8 | RULE allReceived: orderedBy |- (orderReceived; orderReceived~ /\ -(orderAccepted; V[Vendor * Order])); orderedBy -- == TOT extended to allow hyperlinking to vendor in violation 9 | MEANING "All accepted orders have been received" 10 | 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This file illustrates the need for a "closed world assumption". 17 | For practical purposes, we need to be able to say 'not'. For example: 18 | For each order that has been ordered by a client, must either be a client to receive that order, or it has not (yet) been accepted by a vendor. 19 | Desired Result: PASS 20 | -} -------------------------------------------------------------------------------- /src/Ampersand/Basics.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Basics 2 | ( module Ampersand.Basics.Auxiliaries, 3 | module Ampersand.Basics.Exit, 4 | module Ampersand.Basics.Hashing, 5 | module Ampersand.Basics.Languages, 6 | module Ampersand.Basics.Name, 7 | module Ampersand.Basics.PandocExtended, 8 | module Ampersand.Basics.Prelude, 9 | module Ampersand.Basics.String, 10 | module Ampersand.Basics.Unique, 11 | module Ampersand.Basics.Version, 12 | ) 13 | where 14 | 15 | import Ampersand.Basics.Auxiliaries 16 | import Ampersand.Basics.Exit 17 | import Ampersand.Basics.Hashing 18 | import Ampersand.Basics.Languages 19 | import Ampersand.Basics.Name 20 | import Ampersand.Basics.PandocExtended 21 | import Ampersand.Basics.Prelude 22 | import Ampersand.Basics.String 23 | import Ampersand.Basics.Unique 24 | import Ampersand.Basics.Version 25 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try40.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try40 IN ENGLISH 2 | 3 | RELATION orderUnit[Order*Unit] 4 | 5 | RELATION unitID[Unit*UnitID] [TOT] 6 | =[ ("11 LMB", "11 Luchtmobiele Brigade") 7 | ; ("11 INFbat", "11 Infanterie Bataljon") 8 | ; ("11 INFbat", "Garderegiment Grenadiers en Jagers") 9 | ] 10 | 11 | POPULATION orderUnit CONTAINS [ ("Order_1", "11 LMB") ] 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This script is because of ticket #374 17 | exeucting this with Prototype.exe v3.0.1.2828 results in the following 18 | errors: 19 | 20 | Checking on rule violations... 21 | Inconsistencies in rule "TOT unitID[Unit*UnitID]": 22 | - [("11 LMB","11 LMB")] 23 | 24 | ERROR: No prototype generated because of rule violations. 25 | (Compile with --dev to generate a prototype regardless of violations) 26 | -} 27 | -------------------------------------------------------------------------------- /outputTemplates/default.docbook5: -------------------------------------------------------------------------------- 1 | 2 | 3 |
12 | 13 | $title$ 14 | $if(subtitle)$ 15 | $subtitle$ 16 | $endif$ 17 | $if(author)$ 18 | 19 | $for(author)$ 20 | 21 | $author$ 22 | 23 | $endfor$ 24 | 25 | $endif$ 26 | $if(date)$ 27 | $date$ 28 | $endif$ 29 | 30 | $for(include-before)$ 31 | $include-before$ 32 | $endfor$ 33 | $body$ 34 | $for(include-after)$ 35 | $include-after$ 36 | $endfor$ 37 |
38 | -------------------------------------------------------------------------------- /src/Ampersand/Output/ToJSON/Settings.hs: -------------------------------------------------------------------------------- 1 | {-# LANGUAGE DeriveGeneric #-} 2 | {-# LANGUAGE MultiParamTypeClasses #-} 3 | 4 | module Ampersand.Output.ToJSON.Settings (Settings) where 5 | 6 | import Ampersand.Output.ToJSON.JSONutils 7 | 8 | data Settings = Settings 9 | { sngJSONglobal_contextName :: Text, 10 | sngJSONcompiler_version :: Text, 11 | sngJSONcompiler_env :: Text, 12 | sngJSONcompiler_modelHash :: Text 13 | } 14 | deriving (Generic, Show) 15 | 16 | instance ToJSON Settings where 17 | toJSON = amp2Jason' 18 | 19 | instance JSON' FSpec Settings where 20 | fromAmpersand' env fSpec _ = 21 | Settings 22 | { sngJSONglobal_contextName = fullName fSpec, 23 | sngJSONcompiler_version = longVersion appVersion, 24 | sngJSONcompiler_env = tshow env, 25 | sngJSONcompiler_modelHash = tshow . hash $ fSpec 26 | } 27 | -------------------------------------------------------------------------------- /AmpersandData/Semantics/Authorisation.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Authorisation IN ENGLISH 2 | 3 | INCLUDE "Login.adl" 4 | PATTERN Authorizations 5 | PURPOSE PATTERN Authorizations 6 | {+ 7 | +} 8 | PURPOSE RELATION owner[Context*Account] 9 | {+In RAP, every context must have one owner, who can exercise all ownership rights that contexts have. 10 | Initially, the creator of a context is its owner. 11 | +} 12 | RELATION owner[Context*Account] [UNI] 13 | MEANING "A context has an owner, which is an account." 14 | ROLE ExecEngine MAINTAINS TOTowner 15 | RULE TOTowner : (I[Context]#"_SESSION"[SESSION]);ingelogd |- owner[Context*Account] 16 | MEANING "The creator of a context is the account that was logged in when the context was created." 17 | VIOLATION ( TXT "{EX} InsPair;owner[Context*Account];Context;", SRC I, TXT ";Account;", TGT I ) 18 | ENDPATTERN 19 | 20 | ENDCONTEXT -------------------------------------------------------------------------------- /ArchitectureAndDesign/Syntax/README.md: -------------------------------------------------------------------------------- 1 | # Railroad diagrams of syntax 2 | 3 | 4 | The [railroad diagram of the current student version](https://rawgit.com/AmpersandTarski/ampersand/master/ArchitectureAndDesign/Syntax/Current%20Student%20version/ui.xhtml) is the syntax as it is currently in use at the course [Ontwerpen met bedrijfsregels, course T18311] (http://portal.ou.nl/web/ontwerpen-met-bedrijfsregels/cursusinformatie) of the [Open University](www.ou.nl). 5 | 6 | In the underlying folders you can find .ebnf files of specific versions of Ampersand. These files can be used to [generate Railroad diagrams at the site of Gunther Rademacher] (http://www.bottlecaps.de/rr/ui) 7 | 8 | Unfortunately there is currently no way to automatically keep the .ebnf files in sync with the Ampersand parser sourcecode. Therefore, the actual syntax may differ from what is mentioned in the .ebnf files. 9 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/Try41.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try41 IN ENGLISH 2 | CLASSIFY ONE ISA A 3 | RELATION r[ONE*B] 4 | RELATION s[A*B] 5 | RULE s/\r 6 | ENDCONTEXT 7 | 8 | {- 9 | Purpose: This script is meant show that ONE is not an ordinary concept. 10 | Result: FAIL 11 | Reason: ONE is the universal singleton concept, so: 12 | 1. I[ONE]=V[ONE*ONE] 13 | 2. If ONE ISA A, and we would show the atoms of A in an interface, we could see the representation of the atom that is the instance of ONE. 14 | Because ONE represents the universal singleton, we do not wish to represent its contents. Ever. 15 | So ONE ISA A should result in a failure. 16 | Error message: 17 | The current error message is a syntax error. That is not the right kind of error, so we should make a ticket for that. 18 | 19 | -} -------------------------------------------------------------------------------- /outputTemplates/default.docbook4: -------------------------------------------------------------------------------- 1 | 2 | $if(mathml)$ 3 | 5 | $else$ 6 | 8 | $endif$ 9 |
10 | 11 | $title$ 12 | $if(author)$ 13 | 14 | $for(author)$ 15 | 16 | $author$ 17 | 18 | $endfor$ 19 | 20 | $endif$ 21 | $if(date)$ 22 | $date$ 23 | $endif$ 24 | 25 | $for(include-before)$ 26 | $include-before$ 27 | $endfor$ 28 | $body$ 29 | $for(include-after)$ 30 | $include-after$ 31 | $endfor$ 32 |
33 | -------------------------------------------------------------------------------- /AmpersandData/PrototypeContext/PrototypeContext.adl: -------------------------------------------------------------------------------- 1 | CONTEXT PrototypeContext IN ENGLISH 2 | 3 | INCLUDE "Interfaces.adl" 4 | INCLUDE "Interfaces.ifc" 5 | 6 | INCLUDE "Navbar.adl" 7 | INCLUDE "Navbar.ifc" 8 | 9 | INCLUDE "Roles.adl" 10 | 11 | RELATION PrototypeContext.sessionAllowedRoles[SESSION*PrototypeContext.Role] 12 | RELATION PrototypeContext.sessionActiveRoles[SESSION*PrototypeContext.Role] 13 | 14 | RULE PrototypeContext.ActiveRoles LABEL "Active roles MUST be a subset of allowed roles" : -- This rule is required for the access control mechanism. 15 | PrototypeContext.sessionActiveRoles |- PrototypeContext.sessionAllowedRoles -- It ensures that only allowed roles can be activated. 16 | 17 | REPRESENT PrototypeContext.DateTime TYPE DATETIME 18 | RELATION PrototypeContext.lastAccess[SESSION*PrototypeContext.DateTime] [UNI] 19 | 20 | ENDCONTEXT 21 | -------------------------------------------------------------------------------- /src/Ampersand/Output/ToPandoc.hs: -------------------------------------------------------------------------------- 1 | module Ampersand.Output.ToPandoc 2 | ( module Ampersand.Output.ToPandoc.ChapterIntroduction, 3 | module Ampersand.Output.ToPandoc.ChapterNatLangReqs, 4 | module Ampersand.Output.ToPandoc.ChapterDiagnosis, 5 | module Ampersand.Output.ToPandoc.ChapterConceptualAnalysis, 6 | module Ampersand.Output.ToPandoc.ChapterDataAnalysis, 7 | module Ampersand.Output.ToPandoc.SharedAmongChapters, 8 | ) 9 | where 10 | 11 | import Ampersand.Output.ToPandoc.ChapterConceptualAnalysis (chpConceptualAnalysis) 12 | import Ampersand.Output.ToPandoc.ChapterDataAnalysis (chpDataAnalysis) 13 | import Ampersand.Output.ToPandoc.ChapterDiagnosis (chpDiagnosis) 14 | import Ampersand.Output.ToPandoc.ChapterIntroduction (chpIntroduction) 15 | import Ampersand.Output.ToPandoc.ChapterNatLangReqs (chpNatLangReqs) 16 | import Ampersand.Output.ToPandoc.SharedAmongChapters 17 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ARM20-Test2.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARM20Test2 IN DUTCH 2 | --$ Ondertaand pattern geeft een beoogde fout -} 3 | ------------------------------------------------------------ 4 | PATTERN ARM20Test2 5 | 6 | RELATION critBF[Criterium*Bedrijfsfunctie] [MAP] PRAGMA "" " wordt gehanteerd binnen " 7 | CLASSIFY Verwachting ISA Criterium 8 | RELATION expID[Verwachting*ExpectationID] [MAP] PRAGMA "" "staat in de business bekend als" 9 | 10 | VIEW Verwachtingen: Verwachting(critBF, expID) 11 | --$FOUTMELDING voor bovenstaande regel: 12 | --!Type mismatch for the equality arising at critBF. 13 | --!The source of I[Verwachting] is Verwachting. 14 | --!The source of critBF is Criterium. 15 | --?Fout kan worden 'opgelost' door VIEW Verwachtingen: Verwachting(I[Verwachting];critBF, expID) 16 | 17 | ENDPATTERN 18 | ------------------------------------------------------------ 19 | ENDCONTEXT 20 | -------------------------------------------------------------------------------- /testing/Travis/testcases/Preprocessor/includes/PreprocTest.adl: -------------------------------------------------------------------------------- 1 | CONTEXT PreprocTest1 2 | 3 | INCLUDE "./PreprocTestPopulation.adl" --# [ "!GenerateErrorIfThisVarIsSet" ] 4 | 5 | RELATION r1[A*B1] 6 | RELATION r2[A*B2] 7 | 8 | INTERFACE Test: I[SESSION] cRud BOX
9 | [ "Vars": V[SESSION*Var] cRud 10 | , "NoVars": V[SESSION*NoVar] cRud 11 | , "Ifc" : V[SESSION*A] cRud BOX
12 | [ "A = ": I[A] cRud 13 | --#IF EditableInterfaceA 14 | --#IFNOT DoNotShowR1 15 | , "r1": r1 cRUd 16 | --# ENDIF 17 | --#IF ShowR2 18 | , "r2": r2 cRUd 19 | --#ENDIF 20 | --#ENDIF 21 | --#IFNOT EditableInterfaceA 22 | --#IFNOT DoNotShowR1 23 | , "r1": r1 cRud 24 | --#ENDIF 25 | --#IF ShowR2 26 | , "r2": r2 cRud 27 | --#ENDIF 28 | --#ENDIF 29 | ] 30 | ] 31 | 32 | --#IF ErrorIfUnset 33 | ENDCONTEXT 34 | --#ENDIF 35 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldFail/ParserOrTypecheckFailures/try7.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Test IN ENGLISH 2 | 3 | PATTERN Test7 4 | RELATION r[A*C] 5 | RELATION s[A*B] 6 | RELATION t[B*C] 7 | RULE r = s;t 8 | RULE r |- s;t 9 | RULE s;t 10 | RULE r;(s=t) 11 | ENDPATTERN 12 | 13 | ENDCONTEXT 14 | 15 | {- 16 | Purpose: This script that there are three types of rules: an equivalence, an implication, and an term. 17 | It also shows that the equivalence cannot be used inside another rule, which holds for the implication as well. 18 | Result: FAIL 19 | Reason: the rule on line 10 will not parse. 20 | Error message: 21 | 22 | Parse error: 23 | 24 | Expecting symbol ) or symbol [ or "!" or "*" or "-" or "/" or "/\\" or ";" or "\ 25 | \" or "\\/" or ("*" or "+" or "~" ...)* 26 | before "=" at line 10, column 10 of file "try7.adl" 27 | Try inserting symbol symbol ) 28 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/try42.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try42 IN ENGLISH 2 | 3 | RELATION s[A*B] [UNI] 4 | 5 | INTERFACE Interf1 : I[ONE] 6 | BOX[ "Box1" : V[ONE*A]; 7 | (I /\ I /\ s;s~ 8 | ) 9 | ] 10 | ENDCONTEXT 11 | 12 | {- 13 | Purpose: a superficial check on type deduction 14 | Result: PASS 15 | Reason: The type of I cannot always be determined from its context 16 | The following type errors have been found in the past: 17 | 18 | prototype: !fatal 428 (module Core.AbstractSyntaxTree) Ampersand v3.0.1.1261:126 19 | 2M 20 | Cannot intersect (with operator "/\") term 21 | EDcV [ONE*A] 22 | with EIsc (EDcI A,ECps (EDcD RELATION s [A*B] Nothing PRAGMA "" "" "",EFlp (E 23 | DcD RELATION s [A*B] Nothing PRAGMA "" "" ""))). 24 | 25 | NOTE In version v3.0.1.1261 this error occurs, but it dissapears when the term in the box is simplified to : (I /\ s;s~ ) 26 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ARM20-Test6.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARM20Test6 IN DUTCH 2 | {-Het onderstaande script geeft de volgende output: 3 | 4 | "C:\Ampersand\AMPprogs\ampersand.exe" "ARM20-Test6" -o".\fspec" --fspec=Latex --language=EN 5 | 6 | ampersand.exe: !fatal error 167 (module Output.ToPandoc.ChapterDataAnalysis.hs, Ampersand v 7 | 2.2.1.1079) 8 | This should have become an attribute of this Class! 9 | 10 | Observaties: 11 | 1) Als je de woorden PATTERN en ENDPATTERN verwijdert, deze fout niet meer optreedt! 12 | 2) Als je [INJ] verwijdert is de fout ook weg. 13 | -} 14 | ------------------------------------------------------------ 15 | PATTERN ARM20Test6 LABEL "ARM20-Test6" 16 | 17 | RELATION bfEigenaar[Bedrijfsfunctie*BFeigenaar] 18 | 19 | RELATION biaBF[BIAlijst*Bedrijfsfunctie] [INJ] 20 | 21 | ENDPATTERN 22 | ------------------------------------------------------------ 23 | ENDCONTEXT -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ampersand 2 | 3 | [![Build & Test 🚀](https://github.com/AmpersandTarski/Ampersand/actions/workflows/ci2.yml/badge.svg)](https://github.com/AmpersandTarski/Ampersand/actions/workflows/ci2.yml) 4 | [![Latest Release](https://img.shields.io/github/release/AmpersandTarski/Ampersand.svg)](https://github.com/AmpersandTarski/Ampersand/releases/latest) 5 | 6 | ## Releases 7 | 8 | Check out the [release notes](https://github.com/AmpersandTarski/Ampersand/blob/main/ReleaseNotes.md) and [![all Releases](https://img.shields.io/github/release/AmpersandTarski/Ampersand.svg)](https://github.com/AmpersandTarski/Ampersand/releases) 9 | 10 | ## Documentation 11 | 12 | Our [documentation](https://ampersandtarski.github.io/) features full-text search and it contains all documentation of several repositories in a single place. We are still [working](https://github.com/AmpersandTarski/Ampersand/issues/1315) on structuring it. 13 | -------------------------------------------------------------------------------- /docs/landingpage/2-student.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: For students 3 | --- 4 | 5 | # What can I learn on this site? 6 | 7 | If you are excited and eager to learn how to use Ampersand, you have come to the right place. 8 | You can learn about the language Ampersand, and learn how to make a prototype of an information system and run it. 9 | 10 | ## Get started 11 | 12 | - Do the [tutorial](../tutorial-rap4), to get an idea of an Ampersand application 13 | - Learn about the [syntax of Ampersand](../reference-material/syntax-of-ampersand), to write correct Ampersand code. 14 | - Learn about [relation algebra](https://en.wikipedia.org/wiki/Relational_algebra) on Wikipedia, to understand more about this fascinating field of mathematics. 15 | - Find [examples](../examples) of Ampersand specifications, to get started making your own. 16 | - Find [exercises](../exercises.md) that help you improve your skills in specifying information systems. 17 | -------------------------------------------------------------------------------- /miscellaneous/Berichten/lib/menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

Home

9 |

10 | 12 |

Business Vocabulary

13 | 15 |

Business Documents

16 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /AmpersandData/Repo Interfaces/Views.ifc: -------------------------------------------------------------------------------- 1 | CONTEXT Experiment IN ENGLISH 2 | INCLUDE "Views.adl" 3 | INCLUDE "Views.xlsx" 4 | 5 | VIEW Session : Session(TXT "demo") 6 | 7 | INTERFACE Overview : "_SESSION" 8 | BOX 9 | [ Concepts : V[SESSION*Concept] 10 | BOX
11 | [ Concept : I 12 | , isa : isa 13 | , "defined View" : concept~ 14 | , viewBy : viewBy 15 | , "Viewable by" : viewBy;concept~ 16 | ] 17 | , Atoms : V[SESSION*Atom] 18 | BOX
19 | [ atom : I 20 | , pop : pop 21 | , "Viewable by" : pop;viewBy;concept~ 22 | ] 23 | , Views : V[SESSION*View] 24 | BOX
25 | [ View : I 26 | , concept : concept 27 | , Concepts : concept;viewBy~ 28 | ] 29 | ] 30 | 31 | ENDCONTEXT -------------------------------------------------------------------------------- /docs/troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Troubleshooting 2 | Whenever you run into problems with Ampersand, and you cannot find what you are looking for in this documentation, have a look at the common problems below. When your problem isn't there, see if you can find an issue for it. Otherwise, do one of: 3 | 4 | 1. If your problem is with this documentation (you miss some explanation), or just [file an issue that is specific for this documentation](http://github.com/AmpersandTarski/Ampersand/issues) . 5 | 2. If your problem is with the ampersand method or tooling, you can [file an issue that is specific for Ampersand itself](http://github.com/AmpersandTarski/ampersand/issues). 6 | 7 | ## Common Problems 8 | 11 | 1. The documentation is far from complete. We are working on it though. If you are stuck, please create an issue! You are more than welcome! 12 | 13 | -------------------------------------------------------------------------------- /testing/Travis/testcases/prototype/shouldSucceed/Try52.adl: -------------------------------------------------------------------------------- 1 | CONTEXT Try52 IN DUTCH 2 | 3 | PATTERN Test 4 | RELATION r[A*B] 5 | RELATION r[C*D] 6 | ENDPATTERN 7 | 8 | INTERFACE Overview : I[ONE] 9 | BOX [ "r[A*B]" : V[ONE*A] BOX [ "r[A*B]" : r[A*B] ] 10 | , "r[C*D]" : V[ONE*C] BOX [ "r[C*D]" : r[C*D] ] 11 | ] 12 | 13 | INTERFACE fromA : I[A] 14 | BOX [ "I" LABEL "" : I 15 | , "r[A*B]" : r[A*B] 16 | ] 17 | 18 | INTERFACE fromC : I[C] 19 | BOX [ "I" LABEL "" : I 20 | , "r[C*D]" : r[C*D] 21 | ] 22 | 23 | ENDCONTEXT 24 | {-The purpose of this test is to check whether overloading works. 25 | The following experiment should succeed: 26 | compile a prototype with 27 | D:>Prototype --verbose -pD:\htdocs\klad Try52.adl 28 | Then try to insert tuples in r[A*B] and r[C*D] and verify that they are registered in the correct place. 29 | 30 | Note that the sentinel cannot perform this test (yet?), so it must be performed by hand. 31 | -} -------------------------------------------------------------------------------- /testing/Travis/testcases/Misc/ARM-Test1.adl: -------------------------------------------------------------------------------- 1 | CONTEXT ARMTest1 IN ENGLISH 2 | 3 | RELATION critBF[Criterium*Bedrijfsfunctie] [MAP] 4 | RELATION critTAV[Criterium*Bedrijfsfunctie] [MAP] 5 | RELATION biaVerplichtingDef[Bedrijfsfunctie*Verplichting] [INJ] 6 | 7 | CLASSIFY Verplichting ISA Criterium 8 | CLASSIFY ExterneVerplichting ISA Verplichting 9 | 10 | RULE BIAlijstIntegriteit LABEL "BIAlijst integriteit" : -- Invariant 11 | biaVerplichtingDef |- biaVerplichtingDef;I[ExterneVerplichting] 12 | MEANING "De BIA-lijst bevat alleen externe verplichtingen." 13 | VIOLATION (TXT "De BIA-lijst van ", SRC I, TXT " mag alleen externe verplichtingen bevatten; ", TGT I[Verplichting], TXT " is dat niet.") 14 | 15 | ENDCONTEXT 16 | 17 | {- prototype.exe v3.0.1.2953.exe: !fatal 36 (module ADL1.Disambiguate) Ampersand v3.0.1.1297 18 | Types of concepts are not defined here 19 | 20 | Deze foutmelding verdwijnt als de VIOLATION op regel 13 wordt verwijderd. 21 | -} 22 | --------------------------------------------------------------------------------