added alt/else, loops and other group shortcuts
This commit is contained in:
Binary file not shown.
@ -33,15 +33,38 @@ Alice <-- Bob: Another authentication Response
|
||||
#chronos.diagram({
|
||||
import chronos: *
|
||||
_seq("Alice", "Bob", comment: "Authentication Request")
|
||||
_seq("Bob", "Alice", comment: "Authentication Failure")
|
||||
|
||||
_grp("My own label", desc: "My own label2", {
|
||||
_seq("Alice", "Log", comment: "Log attack start")
|
||||
_grp("loop", desc: "1000 times", {
|
||||
_seq("Alice", "Bob", comment: "DNS Attack")
|
||||
})
|
||||
_seq("Alice", "Bob", comment: "Log attack end")
|
||||
_alt(
|
||||
"successful case", {
|
||||
_seq("Bob", "Alice", comment: "Authentication Accepted")
|
||||
},
|
||||
"some kind of failure", {
|
||||
_seq("Bob", "Alice", comment: "Authentication Failure")
|
||||
|
||||
_grp("My own label", desc: "My own label2", {
|
||||
_seq("Alice", "Log", comment: "Log attack start")
|
||||
_loop("1000 times", {
|
||||
_seq("Alice", "Bob", comment: "DNS Attack")
|
||||
})
|
||||
_seq("Alice", "Log", comment: "Log attack end")
|
||||
})
|
||||
},
|
||||
"Another type of failure", {
|
||||
_seq("Bob", "Alice", comment: "Please repeat")
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
#chronos.diagram({
|
||||
import chronos: *
|
||||
_par("a", display-name: box(width: 1.5em, height: .5em), show-bottom: false)
|
||||
_par("b", display-name: box(width: 1.5em, height: .5em), show-bottom: false)
|
||||
_col("a", "b", width: 2cm)
|
||||
_loop("a<1", min: 1, {
|
||||
_seq("a", "b", end-tip: ">>")
|
||||
_seq("b", "a", end-tip: ">>")
|
||||
})
|
||||
_seq("a", "b", end-tip: ">>")
|
||||
})
|
||||
|
||||
#chronos.diagram({
|
||||
|
Reference in New Issue
Block a user