docs: move state machine diagrams into separate directory

This commit is contained in:
Brian Warner 2017-03-03 05:32:35 -08:00
parent 88cb42f95b
commit fcdcf30ba8
16 changed files with 10 additions and 119 deletions

4
.gitignore vendored
View File

@ -58,7 +58,5 @@ target/
/twistd.pid
/relay.sqlite
/misc/node_modules/
/docs/events.png
/docs/states-code.png
/docs/*.png
/.automat_visualize/
/docs/state-machines/*.png

View File

@ -1,98 +0,0 @@
digraph {
/*rankdir=LR*/
api_get_code [label="get_code" shape="hexagon" color="red"]
api_input_code [label="input_code" shape="hexagon" color="red"]
api_set_code [label="set_code" shape="hexagon" color="red"]
verify [label="verify" shape="hexagon" color="red"]
send [label="API\nsend" shape="hexagon" color="red"]
get [label="API\nget" shape="hexagon" color="red"]
close [label="API\nclose" shape="hexagon" color="red"]
event_connected [label="connected" shape="box"]
event_learned_code [label="learned\ncode" shape="box"]
event_learned_nameplate [label="learned\nnameplate" shape="box"]
event_received_mailbox [label="received\nmailbox" shape="box"]
event_opened_mailbox [label="opened\nmailbox" shape="box"]
event_built_msg1 [label="built\nmsg1" shape="box"]
event_mailbox_used [label="mailbox\nused" shape="box"]
event_learned_PAKE [label="learned\nmsg2" shape="box"]
event_established_key [label="established\nkey" shape="box"]
event_computed_verifier [label="computed\nverifier" shape="box"]
event_received_confirm [label="received\nconfirm" shape="box"]
event_received_message [label="received\nmessage" shape="box"]
event_received_released [label="ack\nreleased" shape="box"]
event_received_closed [label="ack\nclosed" shape="box"]
event_connected -> api_get_code
event_connected -> api_input_code
api_get_code -> event_learned_code
api_input_code -> event_learned_code
api_set_code -> event_learned_code
maybe_build_msg1 [label="build\nmsg1"]
maybe_claim_nameplate [label="claim\nnameplate"]
maybe_send_pake [label="send\npake"]
maybe_send_phase_messages [label="send\nphase\nmessages"]
event_connected -> maybe_claim_nameplate
event_connected -> maybe_send_pake
event_built_msg1 -> maybe_send_pake
event_learned_code -> maybe_build_msg1
event_learned_code -> event_learned_nameplate
maybe_build_msg1 -> event_built_msg1
event_learned_nameplate -> maybe_claim_nameplate
maybe_claim_nameplate -> event_received_mailbox [style="dashed"]
event_received_mailbox -> event_opened_mailbox
maybe_claim_nameplate -> event_learned_PAKE [style="dashed"]
maybe_claim_nameplate -> event_received_confirm [style="dashed"]
event_opened_mailbox -> event_learned_PAKE [style="dashed"]
event_learned_PAKE -> event_mailbox_used [style="dashed"]
event_learned_PAKE -> event_received_confirm [style="dashed"]
event_received_confirm -> event_received_message [style="dashed"]
send -> maybe_send_phase_messages
release_nameplate [label="release\nnameplate"]
event_mailbox_used -> release_nameplate
event_opened_mailbox -> maybe_send_pake
event_opened_mailbox -> maybe_send_phase_messages
event_learned_PAKE -> event_established_key
event_established_key -> event_computed_verifier
event_established_key -> check_confirmation
event_established_key -> maybe_send_phase_messages
check_confirmation [label="check\nconfirmation"]
event_received_confirm -> check_confirmation
notify_verifier [label="notify\nverifier"]
check_confirmation -> notify_verifier
verify -> notify_verifier
event_computed_verifier -> notify_verifier
check_confirmation -> error
event_received_message -> error
event_received_message -> get
event_established_key -> get
close -> close_mailbox
close -> release_nameplate
error [label="signal\nerror"]
error -> close_mailbox
error -> release_nameplate
release_nameplate -> event_received_released [style="dashed"]
close_mailbox [label="close\nmailbox"]
close_mailbox -> event_received_closed [style="dashed"]
maybe_close_websocket [label="close\nwebsocket"]
event_received_released -> maybe_close_websocket
event_received_closed -> maybe_close_websocket
maybe_close_websocket -> event_websocket_closed [style="dashed"]
event_websocket_closed [label="websocket\nclosed"]
}

View File

@ -1,18 +0,0 @@
/* this state machine is just about the code */
digraph {
need_code [label="need\ncode"]
asking_for_code [label="asking\nuser\nfor\ncode"]
creating_code [label="allocating\nnameplate"]
creating_code2 [label="generating\nsecret"]
know_code
need_code -> know_code [label="set_code()"]
need_code -> asking_for_code [label="input_code()"]
asking_for_code -> know_code [label="user typed code"]
need_code -> creating_code [label="get_code()"]
creating_code -> creating_code2 [label="rx allocation"]
creating_code2 -> know_code [label="generated secret"]
}

View File

@ -0,0 +1,9 @@
default: images
images: boss.png code.png key.png machines.png mailbox.png nameplate.png nameplate_lister.png order.png receive.png send.png terminator.png
.PHONY: default images
%.png: %.dot
dot -T png $< >$@