Last active
March 9, 2018 15:14
-
-
Save lepinekong/56c3a0a5c8f163b807cd5be0637aa130 to your computer and use it in GitHub Desktop.
DSL Draft for Modelisation and Simulation
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
Red [ | |
Title: "DSL for Modelisation and Simulation of Business Entities" | |
] | |
Simulate Bank: Model [ | |
Companies: [[Company]] ; companies is a collection of company which are potential clients of the bank | |
Company: [name Address (optional)] | |
Employees: [[Employee]] ; employees is a collection of employee | |
ThirdParties: [[ThirdParty]] ; thirdParties is a collection of thirdParty | |
ThirdParty: [ | |
name: | |
typeOf3rdParty: [Company or PhysicalPerson or Animal] | |
if typeOf3rdParty = PhysicalPerson [ | |
jobStatus: [Employee or Self-Employed or Unemployed] | |
] | |
] | |
typeOfRelation: [Prospect or Client or Contact] | |
if typeOfRelation = Client [ | |
birthDate: (mandatory) | |
Address: (mandatory) | |
] | |
Address: [city postalCode country] | |
BankRepresentative: [Employee] | |
if typeOf3rdParty = PhysicalPerson [ | |
customerRepresentative: [Employee] | |
] | |
if typeOf3rdParty = (Company) [ | |
typeOfCompany: ["Big" or "Small"] (optional) | |
] | |
] | |
PhysicalPerson: [fisrName LastName BirthDate (optional)] | |
Animal: [name BirthDate (optional)] | |
Employee: [PhysicalPerson title] | |
][ | |
Companies: [ | |
Company1: Company "The World Company" [Address: ["New York" "90000" "China"]] | |
Company2: Company "Microsoft" [Address: ["Minneapolis" "80000" "United States"]] | |
Company3: Company "Google"[Address: ["Seattle" "70000" "United States"]] | |
Company4: Company "Red Foundation" | |
] | |
Person1: PhysicalPerson "John" "Doe" 01/01/1970 | |
Clients: [ | |
Companies | |
Person1 | |
] | |
] | |
rules: [ | |
some [set-word! word! any [any-type!]] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Model takes 2 blocks for arguments: first block for defining the structure with dynamic rules and the second one for simulation.