diff --git a/TODO.md b/TODO.md index f3e5025..e69de29 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +0,0 @@ -[docs] syntax design diff --git a/docs/diary/2023-11-10-syntax-design.md b/docs/diary/2023-11-10-syntax-design.md index a3043d3..e15c263 100644 --- a/docs/diary/2023-11-10-syntax-design.md +++ b/docs/diary/2023-11-10-syntax-design.md @@ -5,3 +5,31 @@ date: 2023-11-10 --- The syntax should be optimized for sequential routing (the most used use case). + +The main idea is to use function application to build nets (just like iNet). +A transition has both input and output, thus we can not just use `f(x, y)`, +I decide to use something like the following ASCII art like syntax +for transition application: + +``` +(inputArg, ...) -> [transition] -> (outputArg, ...) +``` + +``` +transition processComplaint( + place input: Complaint + ------------------------ + place output: ComplaintArchive +) { + (input) -> [register] -> (c1, c2) + (c1) -> [sendQuestionnaire] -> (c3) + (c3) -> [processQuestionnaire] -> (c5) + (c3) -> [timeout] -> (c5) + + (c5, c6) -> [archive] -> (output) + + (c2) -> -> (c6, c7) + (c5, c7) -> [processComplaint] -> (c5, c8) + (c8) -> -> (c6, c7) +} +```