Skip to content

Commit 5ca719c

Browse files
committed
[net] createNet
1 parent 891660c commit 5ca719c

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

TODO.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# net
22

3-
net/createNet
3+
[net] PlaceEntry -- has queue of values
4+
[net] addPlace
5+
[net] addTransition
46

5-
apply/applyTransition
7+
[connect] connectTransitionToPlaces(net: Net, transition: Transition, place: Place)
68

7-
run
9+
[run] run
810

911
- everytime a marking changes,
1012
loop through and try to execute every transitions.

src/lang/net/createNet.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Net } from "./Net"
2+
3+
export function createNet(): Net {
4+
return {
5+
placeEntries: new Map(),
6+
transitionEntries: new Map(),
7+
}
8+
}

src/lang/net/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export * from "./Net"
2+
export * from "./createNet"

0 commit comments

Comments
 (0)