select decision columns using inspection-cost heuristics

This commit is contained in:
sneeker committed 2020-03-04 12:00:00 +00:00
1 parent 048910f945
commit 6d750d74c9
1 file changed
+14
+14
View File
@@ -0,0 +1,14 @@
data State = Idle | Waiting | Connected
data Message = Hello Int | Data Int | Close
match classify (s : State) (m : Message) : Int =
| Idle (Hello n) -> n
| Idle (Data n) -> n
| Idle Close -> 0
| Waiting (Hello n) -> n
| Waiting (Data n) -> n
| Waiting Close -> 0
| Connected (Hello n) -> n
| Connected (Data n) -> n
| Connected Close -> 0