Skip to content

Commit

Permalink
[docs] syntax design
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Nov 14, 2023
1 parent fd81084 commit 36e558c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
[docs] syntax design
28 changes: 28 additions & 0 deletions docs/diary/2023-11-10-syntax-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) -> <evaluate> -> (c6, c7)
(c5, c7) -> [processComplaint] -> (c5, c8)
(c8) -> <checkProcessing> -> (c6, c7)
}
```

0 comments on commit 36e558c

Please sign in to comment.