-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMML_MODEL.bon
984 lines (888 loc) · 18.3 KB
/
MML_MODEL.bon
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
system_chart SYSTEM_OF_MML_MODEL
explanation
"A description of your system."
cluster CLUSTER_OF_MML_MODEL
"A description of your cluster."
end
cluster_chart CLUSTER_OF_MML_MODEL
explanation
"A description of your cluster."
class MML_MODEL
"Mathematical models."
class MML_RELATION
"Finite relations."
class MML_SEQUENCE
"Finite sequence."
class MML_BAG
"Finite bags."
class MML_SET
"Finite sets."
class MML_INTERVAL
"Closed integer intervals."
class MML_MAP
"Finite maps."
end
class_chart MML_MODEL
indexing
author: "Nadia polikarpova.";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Mathematical models."
query
" Is this model mathematically equal to `other'?",
" Is this model mathematically equal to `other'?",
" Are `v1' and `v2' mathematically equal?\
\ If they are models use model equality, otherwise reference equality."
end
class_chart MML_RELATION
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Finite relations."
inherit
MML_MODEL
query
"has",
"is_empty",
"domain",
"range",
"image_of",
"image",
"count",
"is_model_equal",
"extended",
"removed",
"restricted",
"inverse",
"union",
"intersection",
"difference",
"sym_difference",
"lefts",
"rights",
"meq_left",
"meq_right"
command
" Is this model mathematically equal to `other'?",
" Are `v1' and `v2' mathematically equal?\
\ If they are models use model equality, otherwise reference equality.",
"make_from_arrays"
constraint
"lefts_exists",
"rights_exists",
"same_lower",
"same_upper",
"start_from_one"
end
class_chart MML_SEQUENCE
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Finite sequence."
inherit
MML_MODEL
query
"has",
"is_empty",
"is_constant",
"item",
"domain",
"range",
"to_bag",
"count",
"occurrences",
"is_model_equal",
"is_prefix_of",
"first",
"last",
"but_first",
"but_last",
"front",
"tail",
"interval",
"removed_at",
"restricted",
"removed",
"extended",
"extended_at",
"prepended",
"concatenation",
"replaced_at",
"inverse",
"array",
"meq"
command
"default_create",
" Are `v1' and `v2' mathematically equal?\
\ If they are models use model equality, otherwise reference equality.",
"make_from_array"
constraint
"array_exists",
"starts_from_one"
end
class_chart MML_BAG
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Finite bags."
inherit
MML_MODEL
query
"has",
"is_empty",
"is_constant",
"domain",
"occurrences",
"count",
"is_model_equal",
"extended",
"extended_multiple",
"removed",
"removed_multiple",
"removed_all",
"restricted",
"union",
"difference",
"keys",
"values",
"meq"
command
" Are `v1' and `v2' mathematically equal?\
\ If they are models use model equality, otherwise reference equality.",
"singleton",
"multiple",
"make_from_arrays"
constraint
"keys_exists",
"values_exists",
"same_lower",
"same_upper",
"start_at_one"
end
class_chart MML_SET
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Finite sets."
inherit
MML_MODEL
query
"has",
"is_empty",
"for_all",
"exists",
"any_item",
"extremum",
"filtered",
"count",
"is_model_equal",
"is_subset_of",
"is_superset_of",
"disjoint",
"extended",
"removed",
"union",
"intersection",
"difference",
"sym_difference",
"array",
"meq"
command
"default_create",
"singleton",
"make_from_array"
constraint
"array_exists",
"starts_from_one"
end
class_chart MML_INTERVAL
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Closed integer intervals."
inherit
MML_SET
query
"lower",
"upper"
command
"from_range",
"from_tuple"
end
class_chart MML_MAP
indexing
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
explanation
"Finite maps."
inherit
MML_MODEL
query
"has",
"is_empty",
"is_constant",
"item",
"domain",
"range",
"image",
"sequence_image",
"to_bag",
"count",
"is_model_equal",
"updated",
"removed",
"restricted",
"override",
"inverse",
"keys",
"values",
"meq_key",
"meq_value"
command
" Is this model mathematically equal to `other'?",
" Are `v1' and `v2' mathematically equal?\
\ If they are models use model equality, otherwise reference equality.",
"make_from_arrays"
constraint
"keys_exists",
"values_exists",
"same_lower",
"same_upper",
"start_from_one"
end
static_diagram SYSTEM_OF_MML_MODEL -- This is a comment.
component
cluster CLUSTER_OF_MML_MODEL
component
class MML_MODEL
indexing
description: "Mathematical models.";
author: "Nadia polikarpova.";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
feature -- Comparison
deferred is_model_equal: BOOLEAN
-- Is this model mathematically equal to `other'?
-> other: MML_MODEL
is_model_non_equal: BOOLEAN
-- Is this model mathematically equal to `other'?
-> other: MML_MODEL
model_equals: BOOLEAN
-- Are `v1' and `v2' mathematically equal?
-- If they are models use model equality,
-- otherwise reference equality.
-> v1: ANY
-> v2: ANY
end
class MML_RELATION [G, H]
indexing
description: "Finite relations.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_MODEL
feature {NONE}
default_create
-- Is this model mathematically equal to `other'?
singleton
-- Are `v1' and `v2' mathematically equal?
-- If they are models use model equality,
-- otherwise reference equality.
-> x: G#1
-> y: G#2
feature
has: BOOLEAN
-> x: G#1
-> y: G#2
is_empty: BOOLEAN
feature
domain: MML_SET [G#1]
range: MML_SET [G#2]
image_of: MML_SET [G#2]
-> x: G#1
image: MML_SET [G#2]
-> subdomain: MML_SET [G#1]
require
subdomain /= Void -- subdomain_exists
end
feature
count: INTEGER
feature
is_model_equal: BOOLEAN
-> other: MML_MODEL
feature
extended: MML_RELATION [G#1, G#2]
-> x: G#1
-> y: G#2
removed: MML_RELATION [G#1, G#2]
-> x: G#1
-> y: G#2
restricted: MML_RELATION [G#1, G#2]
-> subdomain: MML_SET [G#1]
require
subdomain /= Void -- subdomain_exists
end
inverse: MML_RELATION [G#2, G#1]
union: MML_RELATION [G#1, G#2]
-> other: MML_RELATION [G#1, G#2]
require
other /= Void -- other_exists
end
intersection: MML_RELATION [G#1, G#2]
-> other: MML_RELATION [G#1, G#2]
require
other /= Void -- other_exists
end
difference: MML_RELATION [G#1, G#2]
-> other: MML_RELATION [G#1, G#2]
require
other /= Void -- other_exists
end
sym_difference: MML_RELATION [G#1, G#2]
-> other: MML_RELATION [G#1, G#2]
require
other /= Void -- other_exists
end
feature {MML_MODEL}
lefts: V_ARRAY [G#1]
rights: V_ARRAY [G#2]
make_from_arrays
-> ls: V_ARRAY [G#1]
-> rs: V_ARRAY [G#2]
require
ls /= Void -- ls_exists
rs /= Void -- rs_exists
ls. = rs. -- same_lower
ls. = rs. -- same_upper
ls. = 1 -- start_from_one
end
meq_left: BOOLEAN
-> v1: G#1
-> v2: G#1
meq_right: BOOLEAN
-> v1: G#2
-> v2: G#2
invariant
lefts /= Void -- lefts_exists
rights /= Void -- rights_exists
lefts. = rights. -- same_lower
lefts. = rights. -- same_upper
lefts. = 1 -- start_from_one
end
class MML_SEQUENCE [G]
indexing
description: "Finite sequence.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_MODEL
feature {NONE}
default_create
singleton
-- Are `v1' and `v2' mathematically equal?
-- If they are models use model equality,
-- otherwise reference equality.
-> x: G#1
feature
has: BOOLEAN
-> x: G#1
is_empty: BOOLEAN
is_constant: BOOLEAN
-> c: G#1
feature
item: G#1
-> i: INTEGER
require
bracket_error -- in_domain
end
feature
domain: MML_INTERVAL
range: MML_SET [G#1]
to_bag: MML_BAG [G#1]
feature
count: INTEGER
occurrences: INTEGER
-> x: G#1
feature
is_model_equal: BOOLEAN
-> other: MML_MODEL
is_prefix_of: BOOLEAN
-> other: MML_SEQUENCE [G#1]
require
other /= Void -- other_exists
end
feature
first: G#1
require
not is_empty -- non_empty
end
last: G#1
require
not is_empty -- non_empty
end
but_first: MML_SEQUENCE [G#1]
require
not is_empty -- not_empty
end
but_last: MML_SEQUENCE [G#1]
require
not is_empty -- not_empty
end
front: MML_SEQUENCE [G#1]
-> upper: INTEGER
tail: MML_SEQUENCE [G#1]
-> lower: INTEGER
interval: MML_SEQUENCE [G#1]
-> lower: INTEGER
-> upper: INTEGER
removed_at: MML_SEQUENCE [G#1]
-> i: INTEGER
require
bracket_error -- in_domain
end
restricted: MML_SEQUENCE [G#1]
-> subdomain: MML_SET [INTEGER]
require
subdomain /= Void -- subdomain_exists
end
removed: MML_SEQUENCE [G#1]
-> subdomain: MML_SET [INTEGER]
require
subdomain /= Void -- subdomain_exists
end
feature
extended: MML_SEQUENCE [G#1]
-> x: G#1
extended_at: MML_SEQUENCE [G#1]
-> i: INTEGER
-> x: G#1
require
1 <= i or i <= count + 1 -- valid_position
end
prepended: MML_SEQUENCE [G#1]
-> x: G#1
concatenation: MML_SEQUENCE [G#1]
-> other: MML_SEQUENCE [G#1]
require
other /= Void -- other_exists
end
replaced_at: MML_SEQUENCE [G#1]
-> i: INTEGER
-> x: G#1
require
bracket_error -- in_domain
end
inverse: MML_RELATION [G#1, INTEGER]
feature {MML_MODEL}
array: V_ARRAY [G#1]
make_from_array
-> a: V_ARRAY [G#1]
require
a /= Void -- a_exists
a. = 1 -- starts_from_one
end
meq: BOOLEAN
-> v1: G#1
-> v2: G#1
invariant
array /= Void -- array_exists
array. = 1 -- starts_from_one
end
class MML_BAG [G]
indexing
description: "Finite bags.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_MODEL
feature {NONE}
default_create
-- Are `v1' and `v2' mathematically equal?
-- If they are models use model equality,
-- otherwise reference equality.
singleton
-> x: G#1
multiple
-> x: G#1
-> n: INTEGER
require
n >= 0 -- n_positive
end
feature
has: BOOLEAN
-> x: G#1
is_empty: BOOLEAN
is_constant: BOOLEAN
-> c: INTEGER
feature
domain: MML_SET [G#1]
feature
occurrences: INTEGER
-> x: G#1
count: INTEGER
feature
is_model_equal: BOOLEAN
-> other: MML_MODEL
feature
extended: MML_BAG [G#1]
-> x: G#1
extended_multiple: MML_BAG [G#1]
-> x: G#1
-> n: INTEGER
require
n >= 0 -- n_non_negative
end
removed: MML_BAG [G#1]
-> x: G#1
removed_multiple: MML_BAG [G#1]
-> x: G#1
-> n: INTEGER
require
n >= 0 -- n_non_negative
end
removed_all: MML_BAG [G#1]
-> x: G#1
restricted: MML_BAG [G#1]
-> subdomain: MML_SET [G#1]
require
subdomain /= Void -- subdomain_exists
end
union: MML_BAG [G#1]
-> other: MML_BAG [G#1]
require
other /= Void -- other_exists
end
difference: MML_BAG [G#1]
-> other: MML_BAG [G#1]
require
other /= Void -- other_exists
end
feature {MML_MODEL}
keys: V_ARRAY [G#1]
values: V_ARRAY [INTEGER]
make_from_arrays
-> ks: V_ARRAY [G#1]
-> vs: V_ARRAY [INTEGER]
-> n: INTEGER
require
ks /= Void -- ks_exists
vs /= Void -- vs_exists
ks. = vs. -- same_lower
ks. = vs. -- same_upper
ks. = 1 -- start_at_one
ks. -- ks_has_no_duplicates
vs. -- vs_positive
end
meq: BOOLEAN
-> v1: G#1
-> v2: G#1
invariant
keys /= Void -- keys_exists
values /= Void -- values_exists
keys. = values. -- same_lower
keys. = values. -- same_upper
keys. = 1 -- start_at_one
end
class MML_SET [G]
indexing
description: "Finite sets.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_MODEL
feature {NONE}
default_create
ensure
is_empty -- empty
end
singleton
-> x: G#1
ensure
count = 1 -- one_element
has -- has_x
end
feature
has: BOOLEAN
-> x: G#1
is_empty: BOOLEAN
ensure
Result = (count = 0) -- count_zero
end
for_all: BOOLEAN
-> test: PREDICATE [ANY, TUPLE [G#1]]
require
test /= Void -- test_exists
test. = 1 -- test_has_one_arg
end
exists: BOOLEAN
-> test: PREDICATE [ANY, TUPLE [G#1]]
require
test /= Void -- test_exists
test. = 1 -- test_has_one_arg
end
feature
any_item: G#1
require
not is_empty -- not_empty
ensure
has -- element
end
extremum: G#1
-> order: PREDICATE [ANY, TUPLE [G#1, G#1]]
require
not is_empty -- not_empty
order /= Void -- order_exists
order. = 2 -- order_has_one_arg
ensure
has -- element
for_all -- extremum
end
feature
filtered: MML_SET [G#1]
-> test: PREDICATE [ANY, TUPLE [G#1]]
require
test /= Void -- test_exists
test. = 1 -- test_has_one_arg
ensure
Result <= Current -- subset
Result -- satisfies_test
not Current - Result -- maximum
end
feature
count: INTEGER
feature
is_model_equal: BOOLEAN
-> other: MML_MODEL
is_subset_of: BOOLEAN
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result = for_all -- other_has_all
end
is_superset_of: BOOLEAN
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result = (other <= Current) -- other_is_subset
end
disjoint: BOOLEAN
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result = not other. -- no_common_elements
end
feature
extended: MML_SET [G#1]
-> x: G#1
ensure
Result ^ (Current +) -- singleton_union
end
removed: MML_SET [G#1]
-> x: G#1
ensure
Result ^ (Current -) -- singleton_difference
end
union: MML_SET [G#1]
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Current <= Result -- contains_current
other <= Result -- contains_other
Result -- minimal
end
intersection: MML_SET [G#1]
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result <= Current -- contained_in_current
Result <= other -- contained_in_other
for_all -- maximal
end
difference: MML_SET [G#1]
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result <= Current -- contained_in_current
Result -- disjoint_from_other
for_all -- maximal
end
sym_difference: MML_SET [G#1]
-> other: MML_SET [G#1]
require
other /= Void -- other_exists
ensure
Result ^ ((Current + other) - (Current * other)) -- definition
end
feature {MML_MODEL}
array: V_ARRAY [G#1]
make_from_array
-> a: V_ARRAY [G#1]
require
a /= Void -- a_exists
a. = 1 -- starts_from_one
a. -- no_duplicates
end
meq: BOOLEAN
-> v1: G#1
-> v2: G#1
invariant
array /= Void -- array_exists
array. = 1 -- starts_from_one
end
class MML_INTERVAL
indexing
description: "Closed integer intervals.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_SET
feature {NONE}
from_range
-> l: INTEGER
-> u: INTEGER
from_tuple
-> t: TUPLE [l: INTEGER; u: INTEGER]
require
t /= Void -- t_exists
end
feature
lower: INTEGER
require
not is_empty -- not_empty
end
upper: INTEGER
require
not is_empty -- not_empty
end
end
class MML_MAP [K, V]
indexing
description: "Finite maps.";
author: "Nadia Polikarpova";
date: "$Date$";
revision: "$Revision$";
belongs_to: "CLUSTER_OF_MML_MODEL"
inherit
MML_MODEL
feature {NONE}
default_create
-- Is this model mathematically equal to `other'?
singleton
-- Are `v1' and `v2' mathematically equal?
-- If they are models use model equality,
-- otherwise reference equality.
-> k: G#1
-> x: G#2
feature
has: BOOLEAN
-> x: G#2
is_empty: BOOLEAN
is_constant: BOOLEAN
-> c: G#2
feature
item: G#2
-> k: G#1
require
bracket_error -- in_domain
end
feature
domain: MML_SET [G#1]
range: MML_SET [G#2]
image: MML_SET [G#2]
-> subdomain: MML_SET [G#1]
require
subdomain /= Void -- subdomain_exists
end
sequence_image: MML_SEQUENCE [G#2]
-> s: MML_SEQUENCE [G#1]
require
s /= Void -- sequence_exists
end
to_bag: MML_BAG [G#2]
feature
count: INTEGER
feature
is_model_equal: BOOLEAN
-> other: MML_MODEL
feature
updated: MML_MAP [G#1, G#2]
-> k: G#1
-> x: G#2
removed: MML_MAP [G#1, G#2]
-> k: G#1
restricted: MML_MAP [G#1, G#2]
-> subdomain: MML_SET [G#1]
require
subdomain /= Void -- subdomain_exists
end
override: MML_MAP [G#1, G#2]
-> other: MML_MAP [G#1, G#2]
require
other /= Void -- other_exists
end
inverse: MML_RELATION [G#2, G#1]
feature {MML_MODEL}
keys: V_ARRAY [G#1]
values: V_ARRAY [G#2]
make_from_arrays
-> ks: V_ARRAY [G#1]
-> vs: V_ARRAY [G#2]
require
ks /= Void -- ks_exists
vs /= Void -- vs_exists
ks. = vs. -- same_lower
ks. = vs. -- same_upper
ks. = 1 -- start_from_one
ks. -- ks_has_no_duplicates
end
meq_key: BOOLEAN
-> k1: G#1
-> k2: G#1
meq_value: BOOLEAN
-> v1: G#2
-> v2: G#2
invariant
keys /= Void -- keys_exists
values /= Void -- values_exists
keys. = values. -- same_lower
keys. = values. -- same_upper
keys. = 1 -- start_from_one
end
end
end