-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #849 from AmpersandTarski/development
Release 3.11.5
- Loading branch information
Showing
12 changed files
with
509 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,19 @@ | ||
CONTEXT SystemContext IN ENGLISH | ||
|
||
PATTERN SystemSpecific | ||
CONCEPT SESSION "een semi-permanente interactieve informatie-uitwisseling, ook bekend als een dialoog, een gesprek of een vergadering, tussen twee of meer communicerende apparaten, of tussen een computer en gebruiker" | ||
PURPOSE CONCEPT SESSION IN DUTCH | ||
{+Sessies zijn nodig om de dialoog aan te kunnen duiden tussen de gebruiker en de computer+} | ||
PURPOSE CONCEPT SESSION IN ENGLISH | ||
{+Sessions are required to allow for associating information with individual visitors+} | ||
CONCEPT Role "een functie of onderdeel die speciaal in een bepaalde bewerking of proces wordt uitgevoerd" | ||
PURPOSE CONCEPT Role IN DUTCH | ||
{+We hebben rollen nodig om een basale vorm van beveiliging te implementeren, gebaseerd op permissies. +} | ||
PURPOSE CONCEPT Role IN ENGLISH | ||
{+We need roles to implement a basic form of security based on permissions. +} | ||
CONCEPT DateTime "een specifiek moment, tijdstip" | ||
PURPOSE CONCEPT DateTime IN DUTCH | ||
{+Om bewerkingen te kunnen plaatsen in de tijd is het nodig om het over specifieke momenten te kunnen hebben.+} | ||
PURPOSE CONCEPT DateTime IN ENGLISH | ||
{+Telling the time enables some ordering of events in time.+} | ||
|
||
REPRESENT DateTime TYPE DATETIME | ||
|
||
RELATION lastAccess[SESSION*DateTime] [UNI] | ||
MEANING IN DUTCH "het moment waarop de sessie voor het laatst actief was" | ||
MEANING IN ENGLISH "the last timestamp that a session was active" | ||
PURPOSE RELATION lastAccess IN DUTCH | ||
{+Een sessie kan op een bepaald moment actief zijn. Deze relatie bevat de informatie wanneer dat voor de laatste keer was.+} | ||
PURPOSE RELATION lastAccess IN ENGLISH | ||
{+A session can be active at some moment in time. This relation holds the information when that was for the last time.+} | ||
RELATION sessionAccount[SESSION*Account] [UNI] | ||
RELATION sessionAllowedRoles[SESSION*Role] | ||
MEANING IN DUTCH "een rol kan zijn toegestaan gedurende een sessie" | ||
MEANING IN ENGLISH "a role can be allowed during a session" | ||
PURPOSE RELATION sessionAllowedRoles IN DUTCH | ||
{+Aan een gebruiker kunnen specifieke rollen zijn toegekend.+} | ||
PURPOSE RELATION sessionAllowedRoles IN ENGLISH | ||
{+A user can be granted specific roles.+} | ||
RELATION sessionActiveRoles[SESSION*Role] | ||
MEANING IN DUTCH "een rol kan in gebruik zijn gedurende een sessie" | ||
MEANING IN ENGLISH "a role can be active during a session" | ||
PURPOSE RELATION sessionActiveRoles IN DUTCH | ||
{+Gedurende een sessie kan een gebruiker over de permissies van specifieke rollen beschikken.+} | ||
PURPOSE RELATION sessionActiveRoles IN ENGLISH | ||
{+During a session the user can have roles, that grants permission for specific events.+} | ||
|
||
PURPOSE CONCEPT "ONE" IN DUTCH | ||
{+De universele singleton+} | ||
PURPOSE CONCEPT "ONE" IN ENGLISH | ||
{+The universal singleton+} | ||
|
||
-- The following rule is required for the access control mechanism. It ensures that only allowed roles can be activated | ||
RULE "Active roles MUST be a subset of allowed roles" : sessionActiveRoles |- sessionAllowedRoles | ||
RULE "Active roles MUST be a subset of allowed roles": -- This rule is required for the access control mechanism. | ||
sessionActiveRoles |- sessionAllowedRoles -- It ensures that only allowed roles can be activated. | ||
|
||
RELATION sessionAccount[SESSION*Account] [UNI] | ||
REPRESENT DateTime TYPE DATETIME | ||
RELATION lastAccess[SESSION*DateTime] [UNI] | ||
RELATION accMostRecentLogin[Account*DateTime] [UNI] | ||
RELATION accLoginTimestamps[Account*DateTime] | ||
|
||
ENDPATTERN | ||
|
||
ENDCONTEXT | ||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
CONTEXT SystemContext IN ENGLISH | ||
{-This file contains the heritage documentation of SystemContext.adl. | ||
This heritage documentation, however, still has several problems, e.g: | ||
- The default texts are not ENGLISH, even though this is specified in the CONTEXT statement. | ||
- The texts in Dutch say different things that the texts in English. | ||
- The texts may not be appropriate in every situation, whereas the CONTEXT itself, of course, is. | ||
|
||
For a better explanation of stuff around sessions, roles, accounts, etc., see SIAMv3. | ||
-} | ||
PATTERN SystemSpecific | ||
CONCEPT SESSION "een semi-permanente interactieve informatie-uitwisseling, ook bekend als een dialoog, een gesprek of een vergadering, tussen twee of meer communicerende apparaten, of tussen een computer en gebruiker" | ||
PURPOSE CONCEPT SESSION IN DUTCH | ||
{+Sessies zijn nodig om de dialoog aan te kunnen duiden tussen de gebruiker en de computer+} | ||
PURPOSE CONCEPT SESSION IN ENGLISH | ||
{+Sessions are required to allow for associating information with individual visitors+} | ||
CONCEPT Role "een functie of onderdeel die speciaal in een bepaalde bewerking of proces wordt uitgevoerd" | ||
PURPOSE CONCEPT Role IN DUTCH | ||
{+We hebben rollen nodig om een basale vorm van beveiliging te implementeren, gebaseerd op permissies. +} | ||
PURPOSE CONCEPT Role IN ENGLISH | ||
{+We need roles to implement a basic form of security based on permissions. +} | ||
CONCEPT DateTime "een specifiek moment, tijdstip" | ||
PURPOSE CONCEPT DateTime IN DUTCH | ||
{+Om bewerkingen te kunnen plaatsen in de tijd is het nodig om het over specifieke momenten te kunnen hebben.+} | ||
PURPOSE CONCEPT DateTime IN ENGLISH | ||
{+Telling the time enables some ordering of events in time.+} | ||
|
||
RELATION lastAccess[SESSION*DateTime] [UNI] -- This definition is only needed for `MEANING` to be interpreted correctly. | ||
MEANING IN DUTCH "het moment waarop de sessie voor het laatst actief was" | ||
MEANING IN ENGLISH "the last timestamp that a session was active" | ||
PURPOSE RELATION lastAccess IN DUTCH | ||
{+Een sessie kan op een bepaald moment actief zijn. Deze relatie bevat de informatie wanneer dat voor de laatste keer was.+} | ||
PURPOSE RELATION lastAccess IN ENGLISH | ||
{+A session can be active at some moment in time. This relation holds the information when that was for the last time.+} | ||
|
||
RELATION sessionAllowedRoles[SESSION*Role] -- This definition is only needed for `MEANING` to be interpreted correctly. | ||
MEANING IN DUTCH "een rol kan zijn toegestaan gedurende een sessie" | ||
MEANING IN ENGLISH "a role can be allowed during a session" | ||
PURPOSE RELATION sessionAllowedRoles IN DUTCH | ||
{+Aan een gebruiker kunnen specifieke rollen zijn toegekend.+} | ||
PURPOSE RELATION sessionAllowedRoles IN ENGLISH | ||
{+A user can be granted specific roles.+} | ||
|
||
RELATION sessionActiveRoles[SESSION*Role] -- This definition is only needed for `MEANING` to be interpreted correctly. | ||
MEANING IN DUTCH "een rol kan in gebruik zijn gedurende een sessie" | ||
MEANING IN ENGLISH "a role can be active during a session" | ||
PURPOSE RELATION sessionActiveRoles IN DUTCH | ||
{+Gedurende een sessie kan een gebruiker over de permissies van specifieke rollen beschikken.+} | ||
PURPOSE RELATION sessionActiveRoles IN ENGLISH | ||
{+During a session the user can have roles, that grants permission for specific events.+} | ||
|
||
PURPOSE CONCEPT "ONE" IN DUTCH | ||
{+De universele singleton+} | ||
PURPOSE CONCEPT "ONE" IN ENGLISH | ||
{+The universal singleton+} | ||
|
||
ENDPATTERN | ||
|
||
ENDCONTEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: ampersand | ||
version: 3.11.4 | ||
version: 3.11.5 | ||
author: Stef Joosten | ||
maintainer: [email protected] | ||
synopsis: Toolsuite for automated design of enterprise information systems. | ||
|
@@ -132,6 +132,7 @@ library | |
Ampersand.Input.ADL1.Parser, | ||
Ampersand.Input.ADL1.ParsingLib, | ||
Ampersand.Input.Parsing, | ||
Ampersand.Input.PreProcessor, | ||
Ampersand.Input.Xslx.XLSX, | ||
Ampersand.Misc, | ||
Ampersand.Misc.Options, | ||
|
@@ -183,6 +184,15 @@ executable ampersand | |
default-extensions:NoImplicitPrelude | ||
build-depends: base == 4.11.*, | ||
ampersand | ||
|
||
executable ampPreProc | ||
hs-source-dirs: preProcApp | ||
main-is: Main.hs | ||
default-language: Haskell2010 | ||
ghc-options: -Wall -threaded | ||
default-extensions:NoImplicitPrelude | ||
build-depends: base == 4.11.*, | ||
ampersand | ||
|
||
Test-Suite regression-test | ||
type: exitcode-stdio-1.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Main where | ||
|
||
import Ampersand | ||
import System.Environment | ||
import Ampersand.Input.PreProcessor | ||
import Ampersand.Basics.UTF8 (readUTF8File) | ||
|
||
main :: IO () | ||
main = | ||
do | ||
filename:defs <- getArgs; | ||
input <- readUTF8File filename | ||
inputString <- return $ either id id input | ||
putStr $ either show id (preProcess' filename defs inputString) ++ "\n" |
Oops, something went wrong.