forked from AnB2Murphi/Strand_Space2Murphi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proctype.ml
82 lines (72 loc) · 1.68 KB
/
proctype.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
open Core
(* part 1 type definition *)
type label = string
type roleName = string
type identifier = string
type messName = string
type index = int
(*type nonce = string *)
type message = [
| `Null
| `Var of identifier (*variable*)
| `Str of roleName
| `Tmp of messName
| `Const of identifier
| `Mod of message * message
| `Exp of message * message
| `Concat of message list
| `Aenc of message * message (* Asymmetric encryption *)
| `Senc of message * message (* Symmetric encryption *)
| `Sign of message * message
| `Hash of message
| `Pk of roleName
| `Sk of roleName
| `K of roleName * roleName
]
type sign = [
| `Plus
| `Minus
]
type action = [
| `Send of int * sign * roleName * message list * message
| `Receive of int * sign * message
| `Actlist of action list
| `Null
]
type knowledge = [
| `Knowledge of roleName * message
| `Knowledge_list of knowledge list
| `Null
]
type mode = [
| `Agent of roleName list
| `Number of message list
| `Modelist of mode list
| `Null
]
type environment = [
|`Env_agent of roleName * int * message
|`Envlist of environment list
|`Null
]
type agent = [
|`Agent of roleName * message list * action list
|`Agentlist of agent list
|`Null
]
type goal = [
|`Secretgoal of identifier * message
|`Secretgoal1 of identifier * message * roleName * roleName
|`Agreegoal of identifier * roleName * roleName * message
|`Agreegoal1 of identifier * int * roleName * roleName * message
|`Goallist of goal list
|`Null
]
type pocolcontext = [
| `Pocol of mode * knowledge * agent * goal * environment
| `Null
]
type protocols = [
| `Protocol of label * pocolcontext
| `Null
]