Last active
March 27, 2024 16:23
-
-
Save mbillingr/70b699e1e8ed5291f75490dfb08d1fb0 to your computer and use it in GitHub Desktop.
A few example types
This file contains hidden or 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
digraph { | |
subgraph cluster1 { | |
label="Any" | |
0 [ color=blue; label = "0: Var(0)" ] | |
1 [ color=red; label = "1: Value((VTop, Span(5)))" ] | |
} | |
subgraph cluster2 { | |
label="Never" | |
4 [ color=red; label = "4: Var(4)" ] | |
5 [ color=blue; label = "5: Use((UBot, Span(8)))" ] | |
} | |
subgraph cluster3 { | |
label="Any -> Never" | |
8 [ label = "8: Var(8)" ] | |
9 [ label = "9: Value((VTop, Span(11)))" ] | |
10 [ label = "10: Var(10)" ] | |
11 [ label = "11: Use((UBot, Span(12)))" ] | |
12 [ color=red; label = "12: Value((VFunc { arg: Use(8), ret: Value(10) }, Span(13)))" ] | |
13 [ color=blue; label = "13: Use((UFunc { arg: Value(9), ret: Use(11) }, Span(13)))" ] | |
12 -> 8 [ style=dashed ] | |
12 -> 10 [ style=dashed ] | |
13 -> 9 [ style=dashed ] | |
13 -> 11 [ style=dashed ] | |
} | |
subgraph cluster4 { | |
label="'a -> 'a" | |
14 [ label = "14: Var(14)" ] | |
15 [ color=red; label = "15: Value((VFunc { arg: Use(14), ret: Value(14) }, Span(16)))" ] | |
16 [ color=blue; label = "16: Use((UFunc { arg: Value(14), ret: Use(14) }, Span(23)))" ] | |
15 -> 14 [ style=dashed ] | |
15 -> 14 [ style=dashed ] | |
16 -> 14 [ style=dashed ] | |
16 -> 14 [ style=dashed ] | |
} | |
subgraph cluster5 { | |
label="{'a with x: Int}" | |
20 [ label = "20: Var(20)" ] | |
21 [ color=blue; label = "21: Var(21)" ] | |
22 [ label = "22: Value((VNamed(\"Int\"), Span(35)))" ] | |
23 [ label = "23: Use((UNamed(\"Int\"), Span(35)))" ] | |
24 [ label = "24: Use((UObj { field: Some((\"x\", Use(23))) }, Span(34)))" ] | |
25 [ color=red; label = "25: Value((VObj { fields: {\"x\": Value(22)}, proto: Some(Value(20)) }, Span(36)))" ] | |
21 -> 20 [ label = "" ] | |
21 -> 24 [ label = "" ] | |
24 -> 23 [ style=dashed ] | |
25 -> 22 [ style=dashed ] | |
25 -> 20 [ style=dashed ] | |
} | |
subgraph cluster6 { | |
label="{x: Int, y: Int}" | |
26 [ label = "26: Var(26)" ] | |
27 [ color=blue; label = "27: Var(27)" ] | |
28 [ label = "28: Value((VNamed(\"Int\"), Span(40)))" ] | |
29 [ label = "29: Use((UNamed(\"Int\"), Span(40)))" ] | |
30 [ label = "30: Use((UObj { field: Some((\"x\", Use(29))) }, Span(39)))" ] | |
31 [ label = "31: Value((VNamed(\"Int\"), Span(42)))" ] | |
32 [ label = "32: Use((UNamed(\"Int\"), Span(42)))" ] | |
33 [ label = "33: Use((UObj { field: Some((\"y\", Use(32))) }, Span(41)))" ] | |
34 [ color=red; label = "34: Value((VObj { fields: {\"x\": Value(28), \"y\": Value(31)}, proto: None }, Span(43)))" ] | |
27 -> 30 [ label = "" ] | |
27 -> 33 [ label = "" ] | |
30 -> 29 [ style=dashed ] | |
33 -> 32 [ style=dashed ] | |
34 -> 28 [ style=dashed ] | |
34 -> 31 [ style=dashed ] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment