From 2cfc990d5edfdbdef4f85ffbc77485d35e30a45a Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 27 Dec 2016 00:37:43 -0500 Subject: [PATCH] more --- docs/w.dot | 39 ++++++++++++++++++++++----------------- docs/w2.dot | 52 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 56 insertions(+), 35 deletions(-) diff --git a/docs/w.dot b/docs/w.dot index 09bebfa..37e71e4 100644 --- a/docs/w.dot +++ b/docs/w.dot @@ -31,7 +31,7 @@ digraph { WM_P_compute_key -> WM_P_post_version [label="pake ok"] WM_P_compute_key -> WM_P_mood_scary [label="pake bad"] - WM_P_mood_scary [shape="box" label="MM_close()\nmood=scary"] + WM_P_mood_scary [shape="box" label="M_close()\nmood=scary"] WM_P_mood_scary -> WM_P_notify_failure WM_P_notify_failure [shape="box" label="notify_failure()" color="red"] @@ -54,7 +54,7 @@ digraph { WM_P_accept_msg [label="deliver\ninbound\nmsg()" shape="box"] WM_P_accept_msg -> WM_P_send_queued - WM_P_send_queued [shape="box" label="M_send()\nany queued\nmessages"] + WM_P_send_queued [shape="box" label="M_send()\nqueued"] WM_P_send_queued -> WM_S_verified_key WM_S_verified_key [color="green"] @@ -62,10 +62,10 @@ digraph { WM_S_verified_key -> WM_P_mood_happy [label="close"] WM_S_verified_key -> WM_P_send [label="API_send"] - WM_P_mood_happy [shape="box" label="MM_close()\nmood=happy"] + WM_P_mood_happy [shape="box" label="M_close()\nmood=happy"] WM_P_mood_happy -> WM_S_closed - WM_P_mood_lonely [shape="box" label="MM_close()\nmood=lonely"] + WM_P_mood_lonely [shape="box" label="M_close()\nmood=lonely"] WM_P_mood_lonely -> WM_S_closed WM_P_send [shape="box" label="M_send(msg)"] @@ -80,7 +80,7 @@ digraph { WCM_S_unknown -> WCM_P_set_code [label="set"] WCM_P_set_code [shape="box" label="WM_set_code()"] WCM_P_set_code -> WCM_S_known - WCM_S_known [label="known"] + WCM_S_known [label="known" color="green"] WCM_S_unknown -> WCM_P_list_nameplates [label="input"] WCM_S_typing_nameplate [label="typing\nnameplate"] @@ -198,16 +198,21 @@ digraph { */ /* ConnectionMachine */ - /* - WCM_S_known -> CM_start [style="invis"] - CM_start [label="Connection\nMachine" style="dotted"] - CM_start -> CM_S_neither [style="invis"] - CM_S_neither [label="neither"] - CM_S_neither -> CM_S_unbound - CM_S_unbound [label="unbound"] - CM_S_unbound -> CM_P_bind - CM_P_bind [shape="box" label="C_send(bind)"] - CM_P_bind -> CM_S_bound - CM_S_bound [label="bound"] - */ + C_start [label="Connection\nMachine" style="dotted"] + C_start -> C_S_connecting [label="C_start()"] + C_S_connecting [label="connecting"] + C_S_connecting -> C_S_connected [label="connected"] + C_S_connecting -> C_P_stop_connecting [label="C_stop()"] + C_P_stop_connecting [shape="box" label="cancel\nconnection\nattempt"] + C_P_stop_connecting -> C_S_stopped + C_S_connected [label="connected" color="green"] + C_S_connected -> C_S_waiting [label="lost"] + C_S_waiting [label="waiting"] + C_S_waiting -> C_S_connecting [label="expire"] + C_S_waiting -> C_S_stopped [label="C_stop()"] + C_S_connected -> C_S_stopping [label="C_stop()"] + C_S_stopping [label="stopping"] + C_S_stopping -> C_S_stopped [label="stopped"] + C_S_stopped [label="stopped"] + } diff --git a/docs/w2.dot b/docs/w2.dot index 29aa198..b9aa9c2 100644 --- a/docs/w2.dot +++ b/docs/w2.dot @@ -29,12 +29,12 @@ digraph { M_S2B -> M_S2 [label="lose()"] M_P_claim2 [shape="box" label="tx claim()"] M_P_claim2 -> M_S2B - M_S2 -> M_P2_queue [label="M_send(msg)"] - M_P2_queue [shape="box" label="queue"] - M_P2_queue -> M_S2 - M_S2B -> M_P2B_queue [label="M_send(msg)"] - M_P2B_queue [shape="box" label="queue"] - M_P2B_queue -> M_S2B + M_S2 -> M_P2_queue [label="M_send(msg)" style="dotted"] + M_P2_queue [shape="box" label="queue" style="dotted"] + M_P2_queue -> M_S2 [style="dotted"] + M_S2B -> M_P2B_queue [label="M_send(msg)" style="dotted"] + M_P2B_queue [shape="box" label="queue" style="dotted"] + M_P2B_queue -> M_S2B [style="dotted"] M_S2 -> M_S3 [label="(none)" style="invis"] M_S2B -> M_P_open [label="rx_claimed()"] @@ -53,17 +53,20 @@ digraph { M_S3B -> M_P3_send [label="M_send(msg)"] M_P3_send [shape="box" label="queue\ntx add(msg)"] M_P3_send -> M_S3B - M_S3 -> M_P3_queue [label="M_send(msg)"] - M_P3_queue [shape="box" label="queue"] - M_P3_queue -> M_S3 + M_S3 -> M_P3_queue [label="M_send(msg)" style="dotted"] + M_P3_queue [shape="box" label="queue" style="dotted"] + M_P3_queue -> M_S3 [style="dotted"] M_S3 -> M_S4 [label="(none)" style="invis"] M_S3B -> M_P3_process_ours [label="rx_message(side=me)"] - M_P3_process_ours [shape="box" label="process message"] + M_P3_process_ours [shape="box" label="dequeue"] M_P3_process_ours -> M_S3B M_S3B -> M_P3_process_theirs [label="rx_message(side!=me)"] M_P3_process_theirs [shape="box" label="tx release()\nprocess message"] M_P3_process_theirs -> M_S4B + M_S3B -> M_P3_close [label="M_close()"] + M_P3_close [shape="box" label="tx release()\n"] + M_P3_close -> M_P_close {rank=same; M_S4 M_P4_release M_S4B M_P4_process M_P4_send M_P4_queue} M_S4 [label="4: released\nunwant nameplate\nwant mailbox\nopen\n"] @@ -78,9 +81,9 @@ digraph { M_S4B -> M_P4_send [label="M_send(msg)"] M_P4_send [shape="box" label="queue\ntx add(msg)"] M_P4_send -> M_S4B - M_S4 -> M_P4_queue [label="M_send(msg)"] - M_P4_queue [shape="box" label="queue"] - M_P4_queue -> M_S4 + M_S4 -> M_P4_queue [label="M_send(msg)" style="dotted"] + M_P4_queue [shape="box" label="queue" style="dotted"] + M_P4_queue -> M_S4 [style="dotted"] M_P4_release -> M_S4B M_S4B -> M_S4 [label="lose()"] @@ -96,7 +99,7 @@ digraph { seed -> M_S5 {rank=same; seed M_S5 M_S5B M_P5_open M_P5_process} M_S5 [label="5: released\nunwant nameplate\nwant mailbox\nopen\n"] - M_S5B [label="5: released\nunwant nameplate\nwant mailbox\nopen\n(bound)"] + M_S5B [label="5: released\nunwant nameplate\nwant mailbox\nopen\n(bound)" color="green"] M_S5 -> M_P5_open [label="connect()"] M_P5_open [shape="box" label="tx open()\ntx add(queued)"] M_P5_open -> M_S5B @@ -107,11 +110,12 @@ digraph { M_S5B -> M_P5_send [label="M_send(msg)"] M_P5_send [shape="box" label="queue\ntx add(msg)"] M_P5_send -> M_S5B - M_S5 -> M_P5_queue [label="M_send(msg)"] - M_P5_queue [shape="box" label="queue"] - M_P5_queue -> M_S5 + M_S5 -> M_P5_queue [label="M_send(msg)" style="dotted"] + M_P5_queue [shape="box" label="queue" style="dotted"] + M_P5_queue -> M_S5 [style="dotted"] M_S5 -> M_S6 [label="M_close()"] + /*M_S5 -> M_P7_drop [label="M_close()"]*/ M_S5B -> M_P_close [label="M_close()"] M_P_close [shape="box" label="tx close()"] M_P_close -> M_S6B @@ -129,8 +133,9 @@ digraph { M_S6 -> M_S6 [label="M_send()"] M_S6 -> M_S7 [label="(none)" style="invis"] + /*M_S6 -> M_P7_drop [label="M_close()"]*/ M_S6B -> M_P7_drop [label="rx_closed()"] - M_P7_drop [shape="box" label="C_drop()"] + M_P7_drop [shape="box" label="C_stop()"] M_P7_drop -> M_S7B {rank=same; M_S7 M_S7B} @@ -141,4 +146,15 @@ digraph { M_S7B -> M_S7B [label="M_close()"] M_S7B -> M_S7B [label="M_send()"] + + M_process [shape="box" label="process"] + M_process_me [shape="box" label="dequeue"] + M_process -> M_process_me [label="side == me"] + M_process_them [shape="box" label="" style="dotted"] + M_process -> M_process_them [label="side != me"] + M_process_them -> M_process_pake [label="phase == pake"] + M_process_pake [shape="box" label="WM_rx_pake()"] + M_process_them -> M_process_other [label="phase in (version,numbered)"] + M_process_other [shape="box" label="WM_rx_msg()"] + }