Skip to content

Commit 3f2e8ff

Browse files
committed
TransitionEntry has inputParameters and outputParameters
- Parameter = { name, t }
1 parent 2fc3d21 commit 3f2e8ff

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

src/lang/net/Net.ts

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
1+
/*
2+
3+
A Petri net is a directed bipartite graph,
4+
where nodes are partitioned to two kinds -- places and transitions.
5+
6+
We implement a net by adjacency list.
7+
8+
*/
9+
10+
import { Value } from "../value"
11+
112
export type Net = {
213
placeEntries: Map<string, PlaceEntry>
314
transitionEntries: Map<string, TransitionEntry>
415
}
516

17+
export type Parameter = {
18+
name: string
19+
t: Value
20+
}
21+
622
export type TransitionEntry = {
723
id: string
824
name: string
25+
inputParameters: Array<Parameter>
26+
outputParameters: Array<Parameter>
927
inputs: Array<PlaceEntry>
1028
outputs: Array<PlaceEntry>
1129
}
1230

1331
export type PlaceEntry = {
1432
id: string
1533
name: string
16-
}
17-
18-
export type ChoiceEntry = {
19-
//
34+
inputs: Array<TransitionEntry>
35+
outputs: Array<TransitionEntry>
2036
}

src/lang/value/Value.ts

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export type Value = {
2+
//
3+
}

src/lang/value/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./Value"

0 commit comments

Comments
 (0)