summary refs log tree commit diff stats
path: root/doc/uml/128002.diagram
blob: 3c359d4240e9db499293f2221b4b39ece9f06838 (plain) (blame)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
format 70

classcanvas 128002 class_ref 128002 // Displayable
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 301.407 212.109 2000
end
classcanvas 128130 class_ref 128130 // UI
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 240.852 390.327 2000
end
classcanvas 128258 class_ref 128258 // DefaultUI
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 217.717 473.896 2000
end
classcanvas 128642 class_ref 128386 // DisplayableContainer
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 224.704 309.894 2006
end
classcanvas 129410 class_ref 135042 // TitleBar
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 629.233 351.65 2000
end
classcanvas 129666 class_ref 135170 // FileList
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 539.259 352.907 2000
end
classcanvas 129922 class_ref 135298 // FileListContainer
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 471.3 421.8 2000
end
classcanvas 131970 class_ref 135426 // Console
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 722.435 351.987 2000
end
note 132738 "Only one instance, since it initializes curses!"
  xyzwh 68 390 2012 89 113
classcanvas 132994 class_ref 141954 // FileManagerAware
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 138 98 2000
end
classcanvas 133122 class_ref 142082 // SettingsAware
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 153 151 2000
end
classcanvas 133250 class_ref 142210 // EnvironmentAware
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 134 50 2005
end
classcanvas 134530 class_ref 156034 // Widget
  draw_all_relations default hide_attributes default hide_operations default hide_getset_operations default show_members_full_definition default show_members_visibility default show_members_stereotype default show_members_multiplicity default show_members_initialization default show_attribute_modifiers default member_max_width 0 show_parameter_dir default show_parameter_name default package_name_in_tab default class_drawing_mode default drawing_language default show_context_mode default auto_label_position default show_relation_modifiers default show_relation_visibility default show_infonote default shadow default show_stereotype_properties default
  xyz 600 232 2000
end
note 136962 "Defines no methods, just for classification"
  xyzwh 608 99 2000 135 77
relationcanvas 128386 relation_ref 128002 // <generalisation>
  decenter_begin 529
  from ref 128258 z 2001 to ref 128130
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 128898 relation_ref 128386 // <generalisation>
  decenter_begin 625
  decenter_end 339
  from ref 128642 z 2007 to ref 128002
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130178 relation_ref 135554 // <generalisation>
  decenter_end 715
  from ref 129922 z 2007 to point 349 395
  line 132610 z 2007 to ref 128642
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130562 relation_ref 135810 // <aggregation>
  decenter_begin 693
  from ref 129922 z 2001 to ref 129666
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 130690 relation_ref 135938 // <aggregation>
  decenter_begin 720
  decenter_end 495
  from ref 128642 z 2007 to ref 128002
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 132354 relation_ref 128258 // <generalisation>
  decenter_begin 487
  decenter_end 205
  from ref 128130 z 2007 to ref 128642
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 133378 relation_ref 142850 // <generalisation>
  decenter_begin 505
  from ref 128002 z 2006 to point 348 66
  line 133762 z 2006 to ref 133250
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 133506 relation_ref 142978 // <generalisation>
  decenter_begin 313
  from ref 128002 z 2001 to point 329 115
  line 133890 z 2001 to ref 132994
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 134274 relation_ref 149634 // <generalisation>
  decenter_begin 116
  from ref 128002 z 2001 to point 307 168
  line 134402 z 2001 to ref 133122
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 134658 relation_ref 170754 // <generalisation>
  decenter_end 708
  from ref 134530 z 2001 to ref 128002
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 134786 relation_ref 170882 // <generalisation>
  from ref 131970 z 2001 to ref 134530
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 134914 relation_ref 171010 // <generalisation>
  from ref 129410 z 2001 to ref 134530
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 135042 relation_ref 171138 // <generalisation>
  from ref 129666 z 2001 to ref 134530
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 135938 relation_ref 171266 // <generalisation>
  decenter_begin 333
  from ref 129922 z 2001 to point 517 316
  line 136066 z 2001 to ref 134530
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
relationcanvas 136194 relation_ref 178178 // <aggregation>
  from ref 128258 z 2001 to point 366 492
  line 136706 z 2001 to point 456 291
  line 136834 z 2001 to ref 134530
  no_role_a no_role_b
  no_multiplicity_a no_multiplicity_b
end
line 132866 -_-_
  from ref 132738 z 2013 to ref 128130
line 137090 -_-_
  from ref 136962 z 2001 to ref 134530
end
or: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
def random generator:&:stream:num -> result:num, fail?:bool, generator:&:stream:num [
  local-scope
  load-inputs
  {
    break-if generator
    # generator is 0? use real random-number generator
    result <- real-random
    return result, false
  }
  result, fail?, generator <- read generator
]

# helper for tests
def assume-random-numbers -> result:&:stream:num [
  local-scope
  load-inputs
  # compute result-len, space to allocate in result
  result-len:num <- copy 0
  {
    _, arg-received?:bool <- next-input
    break-unless arg-received?
    result-len <- add result-len, 1
    loop
  }
  rewind-inputs
  result-data:&:@:num <- new number:type, result-len
  idx:num <- copy 0
  {
    curr:num, arg-received?:bool <- next-input
    break-unless arg-received?
    *result-data <- put-index *result-data, idx, curr
    idx <- add idx, 1
    loop
  }
  result <- new-stream result-data
]

scenario random-numbers-in-scenario [
  local-scope
  source:&:stream:num <- assume-random-numbers 34, 35, 37
  1:num/raw, 2:bool/raw <- random source
  3:num/raw, 4:bool/raw <- random source
  5:num/raw, 6:bool/raw <- random source
  7:num/raw, 8:bool/raw <- random source
  memory-should-contain [
    1 <- 34
    2 <- 0  # everything went well
    3 <- 35
    4 <- 0  # everything went well
    5 <- 37
    6 <- 0  # everything went well
    7 <- 0  # empty result
    8 <- 1  # end of stream
  ]
]

# generate a random integer in the semi-open interval [start, end)
def random-in-range generator:&:stream:num, start:num, end:num -> result:num, fail?:bool, generator:&:stream:num [
  local-scope
  load-inputs
  result, fail?, generator <- random generator
  return-if fail?
  delta:num <- subtract end, start
  _, result <- divide-with-remainder result, delta
  result <- add result, start
]

scenario random-in-range [
  local-scope
  source:&:stream:num <- assume-random-numbers 91
  1:num/raw <- random-in-range source, 40, 50
  memory-should-contain [
    1 <- 41
  ]
]