RAP is a tool that lets you analyse Ampersand models, generate functional specifications and make prototypes of information systems. It is the primary tool for students of the Open University of the Netherlands in the course Rule Based Design.
5
stars
3
forks
source link
Link to generated prototype gives a page with `Bad Gateway` #372
Click here to see the script
```ampersand
CONTEXT "ProjectAdministration" IN ENGLISH
--[ Conceptual model (including concepts and relations) ]----------------------
CONCEPT Project "Planned set of interrelated tasks"
projectName :: Project * ProjectName [UNI,TOT]
projectStatus :: Project * ProjectStatus [UNI,TOT] DEFAULT TGT VALUE "In preparation"
projectDescription :: Project * Description [UNI]
projectStartDate :: Project * Date [UNI]
projectActive :: Project * Project [PROP]
projectKeyword :: Project * Keyword
pl :: Project * Person [UNI]
member :: Project * Person
CONCEPT Person "Person"
personFirstName :: Person * FirstName [UNI]
personLastName :: Person * LastName [UNI]
personStatus :: Person * PersonStatus [UNI] DEFAULT TGT VALUE "Test"
personEmail :: Person * Email [UNI]
workswith :: Person * Person [IRF,SYM]
REPRESENT Date TYPE DATE
REPRESENT ProjectName, ProjectStatus, Keyword TYPE ALPHANUMERIC
REPRESENT FirstName, LastName, PersonStatus, Email TYPE ALPHANUMERIC
REPRESENT Description TYPE BIGALPHANUMERIC
--[ Invariant rules ]----------------------------------------------------------
RULE "r1" : I[Project] |- projectName;projectName~
MEANING "Every project MUST have a name"
MESSAGE "There are projects that don't have a name"
VIOLATION ( TXT "Project "
, SRC I
, TXT " does not have a name"
)
ROLE "Planner" MAINTAINS "r1"
RULE "Active projects must have a projectleader" : projectActive |- I /\ pl;pl~
ROLE "ExecEngine" MAINTAINS "Every projectleader is also projectmember"
RULE "Every projectleader is also projectmember" : pl |- member
VIOLATION (TXT "{EX}InsPair;member;Project;", SRC I, TXT ";Person;", TGT I)
--[ Public interfaces ]--------------------------------------------------------
INTERFACE "Active projects" : V[SESSION*Project];projectActive BOX
What happend?
I followed the steps to deploy RAP with docker on my local machine.
I created an account and wrote a new script.
Click here to see the script
```ampersand CONTEXT "ProjectAdministration" IN ENGLISH --[ Conceptual model (including concepts and relations) ]---------------------- CONCEPT Project "Planned set of interrelated tasks" projectName :: Project * ProjectName [UNI,TOT] projectStatus :: Project * ProjectStatus [UNI,TOT] DEFAULT TGT VALUE "In preparation" projectDescription :: Project * Description [UNI] projectStartDate :: Project * Date [UNI] projectActive :: Project * Project [PROP] projectKeyword :: Project * Keyword pl :: Project * Person [UNI] member :: Project * Person CONCEPT Person "Person" personFirstName :: Person * FirstName [UNI] personLastName :: Person * LastName [UNI] personStatus :: Person * PersonStatus [UNI] DEFAULT TGT VALUE "Test" personEmail :: Person * Email [UNI] workswith :: Person * Person [IRF,SYM] REPRESENT Date TYPE DATE REPRESENT ProjectName, ProjectStatus, Keyword TYPE ALPHANUMERIC REPRESENT FirstName, LastName, PersonStatus, Email TYPE ALPHANUMERIC REPRESENT Description TYPE BIGALPHANUMERIC --[ Invariant rules ]---------------------------------------------------------- RULE "r1" : I[Project] |- projectName;projectName~ MEANING "Every project MUST have a name" MESSAGE "There are projects that don't have a name" VIOLATION ( TXT "Project " , SRC I , TXT " does not have a name" ) ROLE "Planner" MAINTAINS "r1" RULE "Active projects must have a projectleader" : projectActive |- I /\ pl;pl~ ROLE "ExecEngine" MAINTAINS "Every projectleader is also projectmember" RULE "Every projectleader is also projectmember" : pl |- member VIOLATION (TXT "{EX}InsPair;member;Project;", SRC I, TXT ";Person;", TGT I) --[ Public interfaces ]-------------------------------------------------------- INTERFACE "Active projects" : V[SESSION*Project];projectActive BOX