2
;; Generic Routing Module of GeNoC
4
;; File: GeNoC-routing.lisp
8
;; we import the previous books
9
(include-book "GeNoC-scheduling") ;; imports GeNoC-misc and GeNoC-nodeset
10
(include-book "GeNoC-routing")
12
(in-theory (disable mv-nth))
14
;;------------------------------------------------------------------------
18
;;------------------------------------------------------------------------
20
;; Tail definition of GeNoC_t
21
;; --------------------------
22
(defun GeNoC_t (M NodeSet att TrLst)
23
;; The composition of Routing and Scheduling is built by function GeNoC_t.
24
;; It takes as arguments:
25
;; - a list of missives, M
26
;; - the set of existing nodes, NodeSet
27
;; - the list of attempts, att
28
;; - an accumulator of travels, TrLst
30
;; we set the measure to be SumOfAttempts(att)
31
(declare (xargs :measure (SumOfAttempts att)))
32
(if (zp (SumOfAttempts att))
33
;; if every attempt has been consumed, we return the accumulator
34
;; TrLst and the remaining missives M
37
(let ((V (Routing M NodeSet)))
38
;; we compute the routes. This produces the travel list V.
39
(mv-let (Scheduled Delayed newAtt)
40
;; we call function scheduling
42
;; we enter the recursive call and accumulate the
44
(GeNoC_t (ToMissives Delayed) NodeSet newAtt
45
(append Scheduled TrLst))))))
48
;; Correctness of GeNoC_t
49
;; ----------------------
50
(defun CorrectRoutes-GeNoC_t (routes m-dest)
51
;; GeNoC_t is correct if every element ctr of the output list
52
;; is such that (a) FrmV(ctr) = FrmM(m) and (b) forall r in
53
;; RoutesV(ctr) Last(r) = DestM(m). For the m such that
55
;; This function checks that (b) holds.
58
(let ((r (car routes)))
59
(and (equal (car (last r)) m-dest)
60
(CorrectRoutes-GeNoC_t (cdr routes) m-dest)))))
62
(defun GeNoC_t-correctness1 (TrLst M/TrLst)
63
;; we complement the correctness of GeNoC_t
68
(let* ((tr (car TrLst))
74
(and (equal v-frm m-frm)
75
(CorrectRoutes-GeNoC_t routes m-dest)
76
(GeNoC_t-correctness1 (cdr TrLst)
79
(defun GeNoC_t-correctness (TrLst M)
80
;; before checking correctness we filter M
81
;; according to the ids of TrLst
82
(let ((M/TrLst (extract-sublst M (V-ids TrLst))))
83
(GeNoC_t-correctness1 TrLst M/TrLst)))
86
;; Non tail definition of GeNoC_t
87
;; ------------------------------
88
(defun GeNoC_t-non-tail-Comp (M NodeSet att)
89
;; we define a non tail function that computes the
90
;; first output of GeNoC_t, i.e the completed transactions
91
(declare (xargs :measure (SumOfAttempts att)))
92
(if (zp (SumOfAttempts att))
93
;; if every attempt has been consumed, we return the accumulator
94
;; TrLst and the remaining missives M
97
(let ((V (Routing M NodeSet)))
98
;; we compute the routes. This produces the travel list V.
99
(mv-let (Scheduled Delayed newAtt)
100
;; we call function scheduling
102
;; we enter the recursive call and accumulate the
104
(append (GeNoC_t-non-tail-Comp (ToMissives Delayed)
108
;; we now prove that this function is right
110
(defthm true-listp-GeNoC_t-non-tail-comp
111
(true-listp (GeNoC_t-non-tail-Comp M NodeSet att))
112
:rule-classes :type-prescription)
114
(defthm GeNoC_t-non-tail-=-tail-comp
115
(implies (true-listp TrLst)
116
(equal (car (GeNoC_t M NodeSet att TrLst))
117
(append (GeNoC_t-non-tail-Comp M NodeSet Att)
120
;; Proof of GeNoC_t correctness
121
;; ----------------------------
123
;; first we add a lemma that tells ACL2 that
124
;; converting the travels that are routed and delayed
125
;; produced a valid list of missives
126
(defthm missivesp-mv-nth1-scheduling-routing
127
(let ((NodeSet (NodeSetGenerator Params)))
128
(implies (and (Missivesp M NodeSet)
129
(ValidParamsp Params))
131
(ToMissives (mv-nth 1
132
(scheduling (routing M NodeSet)
141
;; the recursive call of genoc_t-non-tail-comp calls append
142
;; we put the append at the top.
143
;; to do so we add the two rules below:
146
;; the ids of an append is the append of the ids
147
(equal (v-ids (append a b))
148
(append (v-ids a) (v-ids b))))
150
(defthm extract-sublst-append
151
;; filtering according to an append is the append
153
(equal (extract-sublst M (append id1 id2))
154
(append (extract-sublst M id1)
155
(extract-sublst M id2))))
158
;; then to split the proof is two cases, we replace the
159
;; append by a conjunction.
160
;; the rule below allows this decomposition:
162
(defthm correctroutess1-append
163
(implies (and (equal (len a) (len c))
164
(equal (len b) (len d)))
165
(equal (genoc_t-correctness1 (append a b)
167
(and (Genoc_T-Correctness1 a c)
168
(Genoc_T-Correctness1 b d)))))
170
;; To have this lemma used we need to prove some
171
;; additional properties between len and extract-sublst
172
;; and len and v-ids (e.g. a is a call to v-ids)
174
(defthm len-extract-sublst
175
(equal (len (extract-sublst L ids))
179
(equal (len (v-ids x))
182
;; now we need to prove some lemmas so that previous rules
183
;; (from GeNoC-misc) about extract-sublst, tomissives, etc could
186
(defthm subsetp-trans
187
;; transitivity of subsetp
188
(implies (and (subsetp x y)
192
(defthm v-ids-GeNoC_t-non-tail-comp
193
;; the ids of the output of genoc_t-non-tail-comp is a
194
;; subset of those of M
195
;; for this theorem the rule ids-routing is useful
196
(let ((NodeSet (NodeSetGenerator Params)))
197
(implies (and (Missivesp M NodeSet)
198
(ValidParamsp Params))
199
(let ((Gnt (Genoc_T-Non-Tail-Comp M NodeSet att)))
200
(subsetp (V-ids Gnt) (M-ids M)))))
203
(disable missivesp TrLstp))
206
((:instance subsetp-scheduled-delayed-ids
207
(TrLst (Routing M (NodeSetGenerator Params)))))
209
(disable subsetp-scheduled-delayed-ids Missivesp TrLstp))))
211
(defthm not-in-no-duplicatesp-equal-append
212
;; if x is not in y and both do not have duplicates then
213
;; their append has no duplicate too
214
(implies (and (no-duplicatesp-equal x)
216
(no-duplicatesp-equal y))
217
(no-duplicatesp-equal (append x y))))
219
(defthm subsetp-not-in
220
;; if a list y and no element in common with z
221
;; then any sublist x of y has no element in z
222
(implies (and (not-in delayed scheduled)
224
(not-in x scheduled)))
226
(defthm not-in-v-ids-genoc_t-non-tail-comp
227
;; if the ids of a list have no common element with
228
;; another ids then the output of genoc_t-non-tail-comp does
229
;; not introduce any new id
230
(let ((NodeSet (NodeSetGenerator Params)))
231
(implies (and (not-in (m-ids delayed) Sched-ids)
232
(Missivesp delayed NodeSet)
233
(ValidParamsp Params))
234
(not-in (v-ids (genoc_t-non-tail-comp delayed NodeSet att))
239
:in-theory (disable missivesp))))
242
;; because we disable trlstp, this rule adds its content
244
(implies (TrLstp TrLst)
245
(and (validfields-trlst trlst)
247
(no-duplicatesp-equal (v-ids trlst))))
248
:rule-classes :forward-chaining)
250
(defthm v-ids-GeNoC_t-non-tail-comp-no-dup
251
;; the ids of the output of genoc_t-non-tail-comp have no dup
252
(let ((NodeSet (NodeSetGenerator Params)))
253
(implies (and (Missivesp M NodeSet)
254
(ValidParamsp Params))
255
(let ((Gnt (Genoc_T-Non-Tail-Comp M NodeSet att)))
256
(no-duplicatesp-equal (V-ids Gnt)))))
259
:do-not '(eliminate-destructors generalize)
261
:induct (genoc_t-non-tail-comp M (nodeSetGenerator Params) att)
262
:in-theory (disable missivesp TrLstp))
266
not-in-v-ids-genoc_t-non-tail-comp
268
(mv-nth 1 (scheduling
269
(routing M (nodeSetGenerator Params))
271
(att (mv-nth 2 (scheduling
272
(routing M (nodeSetGenerator Params))
274
(Sched-ids (v-ids (mv-nth 0 (scheduling
275
(routing M (nodeSetGenerator Params))
277
(:instance trlstp-scheduled
278
(TrLst (routing M (Nodesetgenerator Params)))))
280
(disable trlstp-scheduled mv-nth trlstp
281
not-in-v-ids-genoc_t-non-tail-comp Missivesp))))
283
(defthm extract-sublst-subsetp-m-ids
284
;; filtering a list l according to a subset ids of its identifiers
285
;; produces a list the ident. of which are ids
286
(implies (and (subsetp ids (M-ids l))
289
(equal (M-ids (extract-sublst l ids))
292
(defthm ToMissives-Delayed/Rtg
293
;; we prove that the conversion of the delayed travels
294
;; into a list of missives is equal to the filtering
295
;; of the initial list of missives M according to the ids
296
;; of the delayed travels.
297
(let ((NodeSet (NodeSetGenerator Params)))
298
(mv-let (Scheduled/Rtg Delayed/Rtg newAtt)
299
(scheduling (Routing M NodeSet) att)
300
(declare (ignore Scheduled/Rtg newAtt))
301
(implies (and (Missivesp M NodeSet)
302
(ValidParamsp Params))
303
(equal (ToMissives Delayed/Rtg)
304
(extract-sublst M (V-ids Delayed/Rtg))))))
308
:do-not '(eliminate-destructors generalize fertilize)
309
:use ((:instance ToMissives-extract-sublst
310
(L (Routing M (NodeSetGenerator Params)))
314
(Routing M (NodeSetGenerator Params))
316
(:instance delayed-travel-correctness
317
(TrLst (Routing M (NodeSetGenerator Params))))
318
(:instance subsetp-scheduled-delayed-ids
319
(TrLst (Routing M (NodeSetGenerator Params)))))
320
:in-theory (disable TrLstp Missivesp
321
ToMissives-extract-sublst
322
subsetp-scheduled-delayed-ids))))
324
(defthm valid-missive-assoc-equal
325
;; a list of a member of a valid list of missives
326
;; is a valid list of missives
327
(implies (and (Missivesp M NodeSet)
328
(member-equal e (M-ids M)))
329
(Missivesp (list (assoc-equal e M)) NodeSet)))
331
(defthm missivesp-cons
332
;; lemma used in the next defthm
333
;; if we cons a valid missive to a filtered valid list
334
;; of missives, we obtain a valid list of missives if the
335
;; the id of the consed missive is not in the filter
336
(implies (and (missivesp (extract-sublst M ids) nodeset)
337
(missivesp (list (assoc-equal e M)) nodeset)
338
(not (member-equal e ids))
339
(subsetp ids (M-ids M)))
340
(missivesp (cons (assoc-equal e M)
341
(extract-sublst M ids))
345
(defthm missivesp-extract-sublst
346
(let ((NodeSet (NodeSetGenerator Params)))
347
(implies (and (missivesp M NodeSet)
348
(ValidParamsp Params)
350
(no-duplicatesp-equal ids)
351
(subsetp ids (M-ids M)))
352
(Missivesp (extract-sublst M ids) NodeSet)))
354
:in-theory (disable missivesp))
356
:in-theory (enable missivesp))))
359
(defthm fwd-missivesp
360
;; as missivesp is disabled we prove this rule to add
361
;; the content of missivesp as hypotheses
362
(implies (missivesp M NodeSet)
363
(and (Validfields-M M)
364
(subsetp (M-orgs M) NodeSet)
365
(subsetp (M-dests M) NodeSet)
367
(No-duplicatesp (M-ids M))))
368
:rule-classes :forward-chaining)
371
(defthm v-ids_G_nt_sigma_subsetp-v-ids-delayed/rtg
372
;; this lemma is used in the subsequent proofs
373
;; it makes a fact "explicit"
374
(let ((NodeSet (NodeSetGenerator Params)))
375
(mv-let (scheduled/rtg delayed/rtg newAtt)
376
(scheduling (routing M NodeSet) att)
377
(declare (ignore scheduled/rtg))
378
(implies (and (Missivesp M NodeSet)
379
(ValidParamsp Params))
382
(genoc_t-non-tail-comp
383
(extract-sublst M (v-ids delayed/rtg))
385
(V-ids delayed/rtg)))))
390
((:instance subsetp-scheduled-delayed-ids
391
(TrLst (Routing M (NodeSetGenerator Params))))
392
(:instance trlstp-delayed
393
(TrLst (routing M (NodeSetGenerator Params))))
394
;; the following is required because in the conclusion of the
395
;; rule there is no call to extract-sublst
396
(:instance v-ids-GeNoC_t-non-tail-comp
399
(V-ids (mv-nth 1 (scheduling
400
(routing M (NodeSetGenerator Params))
402
(att (mv-nth 2 (scheduling
403
(routing M (NodeSetGenerator Params))
405
:in-theory (disable subsetp-scheduled-delayed-ids
407
v-ids-GeNoC_t-non-tail-comp
411
;; Scheduled/Rtg does not modify frames
412
;; ---------------------------------------
414
(defthm s/d-travel-v-frms
415
(implies (and (TrLstp sd-trlst)
416
(s/d-travel-correctness sd-trlst TrLst/sd-ids))
417
(equal (V-frms sd-trlst) (V-frms TrLst/sd-ids))))
419
(defthm m-frms-to-v-frms
420
;; this rule is only used to rewrite the next theorem to
422
(equal (m-frms (toMissives x))
425
(defthm Scheduled-v-frms-m-frms
426
;; we prove that the frames of the scheduled travels
427
;; are equal to the frames of the conversion of the initial list of travels
428
;; filtered according to the ids of the scheduled travels
429
(mv-let (Scheduled Delayed newAtt)
430
(scheduling TrLst att)
431
(declare (ignore Delayed newAtt))
432
(implies (and (TrLstp TrLst)
433
(ValidParamsp Params))
437
(ToMissives (extract-sublst TrLst
438
(v-ids scheduled)))))))
440
:use ((:instance s/d-travel-v-frms
442
(mv-nth 0 (scheduling TrLst att)))
447
(mv-nth 0 (scheduling TrLst att))))))
448
(:instance scheduled-travels-correctness))
449
:in-theory (disable TrLstp s/d-travel-v-frms mv-nth))))
451
(in-theory (disable m-frms-to-v-frms))
453
(defthm Scheduled/Rtg_not_modify_frames
454
;; we prove the the frames of the scheduled travels produced
455
;; by scheduling and routing are equal to the frames
456
;; of the initial list of missives
457
(let ((NodeSet (NodeSetGenerator Params)))
458
(mv-let (Scheduled/Rtg Delayed/Rtg newAtt)
459
(scheduling (routing M NodeSet) att)
460
(declare (ignore Delayed/Rtg newAtt))
461
(implies (and (Missivesp M NodeSet)
462
(ValidParamsp Params))
463
(equal (V-frms Scheduled/Rtg)
466
M (v-ids Scheduled/Rtg)))))))
469
:do-not '(eliminate-destructors generalize fertilize)
470
:use ((:instance Scheduled-v-frms-m-frms
471
(TrLst (routing M (NodeSetGenerator Params))))
472
(:instance subsetp-scheduled-delayed-ids
473
(TrLst (routing M (NodeSetGenerator Params)))))
474
:in-theory (disable TrLstp Missivesp
475
subsetp-scheduled-delayed-ids
476
scheduled-v-frms-m-frms))))
478
(defthm correctroutesp-vm-frms-gc1
479
;; the correctness of routes and equality of frames imply
480
;; the main predicate (correctness of genoc_t-non-tail-comp)
481
(implies (and (correctroutesp L (extract-sublst M (v-ids L))
484
(m-frms (extract-sublst M (v-ids L)))))
485
(Genoc_T-Correctness1 L
486
(extract-sublst m (v-ids L)))))
488
(defthm GC1_scheduled/Rtg
489
;; we prove the correctness of the scheduled travels
490
(let ((NodeSet (NodeSetGenerator Params)))
491
(implies (And (missivesp M NodeSet)
492
(ValidParamsp Params))
493
(mv-let (scheduled/rtg delayed/rtg newAtt)
494
(scheduling (routing M NodeSet) att)
495
(declare (ignore delayed/rtg newAtt))
496
(genoc_t-correctness1
498
(extract-sublst M (v-ids scheduled/rtg))))))
502
:do-not '(eliminate-destructors generalize fertilize)
504
((:instance Scheduled/Rtg_not_modify_frames)
505
(:instance subsetp-scheduled-delayed-ids
506
(TrLst (Routing M (NodeSetGenerator Params))))
508
scheduling-preserves-route-correctness
509
(NodeSet (NodeSetGenerator Params))
510
(TrLst (routing M (NodeSetGenerator Params))))
511
(:instance correctroutesp-vm-frms-gc1
512
(NodeSet (NodeSetGenerator Params))
513
(L (mv-nth 0 (scheduling
514
(routing m (NodeSetGenerator Params))
516
:in-theory (disable TrLstp Missivesp
517
Correctroutesp-Vm-Frms-Gc1
518
subsetp-scheduled-delayed-ids
519
Scheduling-Preserves-Route-Correctness
520
Scheduled/Rtg_not_modify_frames))))
523
;; now we can prove the correctness of GeNoC_t
524
(let ((NodeSet (NodeSetGenerator Params)))
525
(implies (and (Missivesp M NodeSet)
526
(ValidParamsp Params))
528
(GeNoC_t M NodeSet att nil)
529
(declare (ignore Abt))
530
(GeNoC_t-correctness Cplt M))))
533
:induct (GeNoC_t-non-tail-comp M (NodeSetGenerator Params) Att)
534
:do-not '(eliminate-destructors generalize)
535
:in-theory (disable TrLstp Missivesp)
539
((:instance trlstp-delayed
540
(TrLst (routing M (NodeSetGenerator Params))))
541
(:instance subsetp-scheduled-delayed-ids
542
(TrLst (Routing M (NodeSetGenerator Params))))
543
(:instance GC1_scheduled/Rtg))
544
:in-theory (e/d (mv-nth)
545
(TrLstp missivesp trlstp-delayed
546
subsetp-scheduled-delayed-ids
547
GC1_scheduled/Rtg)))))
549
;;------------------------------------------------------------
550
;; Definition and Validation of GeNoC
551
;;------------------------------------------------------------
553
;; we load the generic definitions of the interfaces
554
(include-book "GeNoC-interfaces")
558
(defun ComputeMissives (Transactions)
559
;; apply the function p2psend to build a list of missives
560
;; from a list of transactions
561
(if (endp Transactions)
563
(let* ((trans (car Transactions))
567
(dest (DestT trans)))
568
(cons (list id org (p2psend msg) dest)
569
(ComputeMissives (cdr Transactions))))))
573
(defun ComputeResults (TrLst)
574
;; apply the function p2precv to build a list of results
575
;; from a list of travels
578
(let* ((tr (car TrLst))
580
(r (car (routesV tr)))
581
(dest (car (last r)))
583
(cons (list id dest (p2precv frm))
584
(ComputeResults (cdr TrLst))))))
588
(defun GeNoC (Trs NodeSet att)
590
(mv-let (Responses Aborted)
591
(GeNoC_t (ComputeMissives Trs) NodeSet att nil)
592
(mv (ComputeResults Responses) Aborted)))
596
(defun genoc-correctness (Results Trs/ids)
597
;; Trs/ids is the initial list of transactions filtered according
598
;; to the ids of the list of results.
599
;; We check that the messages and the destinations of these two lists
601
(and (equal (R-msgs Results)
603
(equal (R-dests Results)
606
(defthm M-ids-computesmissives
607
;; lemma for the next defthm
608
(equal (M-ids (computemissives Trs))
611
(defthm missivesp-computemissives
612
(implies (transactionsp trs NodeSet)
613
(missivesp (ComputeMissives trs) NodeSet)))
616
(defun all-frms-equal-to-p2psend (TrLst Trs)
617
;; check that every frame of TrLst is equal to the application
618
;; of p2psend to the corresponding message in the list of
624
(let* ((tr (car TrLst))
627
(t-msg (MsgT trans)))
628
(and (equal tr-frm (p2psend t-msg))
629
(all-frms-equal-to-p2psend (cdr TrLst) (cdr Trs))))))
631
(defthm GC1-=>-all-frms-equal-to-p2psend
632
(implies (GeNoC_t-correctness1 TrLst (ComputeMissives Trs))
633
(all-frms-equal-to-p2psend TrLst Trs)))
635
(defthm all-frms-equal-r-msgs-t-msgs
636
;; if frames have been computed by p2psend then
637
;; computeresults applies p2precv. We get thus the initial msg.
638
(implies (and (all-frms-equal-to-p2psend TrLst Trs)
639
(validfields-trlst TrLst))
640
(equal (R-msgs (ComputeResults TrLst))
643
(defthm R-ids-computeresults
644
(equal (R-ids (computeresults x))
647
(defthm m-dests-computemissives
648
(equal (M-dests (computeMissives trs))
652
(defthm GC1-r-dest-m-dests
653
(implies (and (GeNoC_t-correctness1 TrLst M/TrLst)
654
(validfields-trlst TrLst)
655
(Missivesp M/TrLst NodeSet))
656
(equal (R-dests (ComputeResults TrLst))
659
(defthm validfields-append
660
;; lemma for the next defthm
661
(implies (and (validfields-trlst l1)
662
(validfields-trlst l2))
663
(validfields-trlst (append l1 l2))))
666
(defthm validfields-trlst-GeNoC_nt
667
;; to use the lemma all-frms-equal-to-p2psend we need to establish
668
;; that GeNoC_nt contains travels with validfields
669
;; and that it contains no duplicated ids
670
(let ((NodeSet (NodeSetGenerator Params)))
671
(implies (and (Missivesp M NodeSet)
672
(ValidParamsp Params))
673
(validfields-trlst (genoc_t-non-tail-comp M NodeSet att))))
677
:induct (Genoc_T-Non-Tail-Comp M (NodeSetGenerator Params) att))
679
:use ((:instance trlstp-delayed
680
(TrLst (Routing M (NodeSetGenerator Params))))
681
(:instance trlstp-scheduled
682
(TrLst (Routing M (NodeSetGenerator Params))))
683
(:instance Missivesp-mv-nth-1-scheduling
684
(TrLst (routing M (NodeSetGenerator Params)))))
685
:in-theory (disable trlstp-delayed trlstp-scheduled
686
Missivesp-mv-nth-1-scheduling))))
688
;; the next four lemmas are similar to those used to prove
689
;; the lemma tomissives-extract-sublst .... (proof by analogy)
691
(defthm computemissives-append
692
(equal (computemissives (append a b))
693
(append (computemissives a) (computemissives b))))
695
(defthm member-equal-assoc-equal-not-nil-t-ids
696
;; if e is an Id of a travel of L
697
;; then (assoc-equal e L) is not nil
698
(implies (and (member-equal e (T-ids Trs))
700
(assoc-equal e Trs)))
702
(defthm computemissives-assoc-equal
703
;; if (assoc-equal e L) is not nil then we can link
704
;; assoc-equal and computemissives as follows:
705
;; (this lemma is needed to prove the next defthm)
706
(implies (assoc-equal e L)
707
(equal (computemissives (list (assoc-equal e L)))
708
(list (assoc-equal e (computemissives L))))))
710
(defthm computemissives-extract-sublst
711
;; calls of computemissives are moved into calls
713
(implies (and (subsetp ids (t-ids trs))
715
(equal (ComputeMissives (extract-sublst trs ids))
716
(extract-sublst (ComputeMissives trs) ids)))
719
:induct (extract-sublst Trs ids)
721
:in-theory (disable computemissives append))))
724
(defthm m-dest-t-dests-extract-sublst
725
(implies (and (subsetp ids (t-ids trs))
727
(equal (m-dests (extract-sublst (computemissives Trs) ids))
728
(t-dests (extract-sublst trs ids))))
731
:use (:instance m-dests-computemissives
732
(Trs (extract-sublst Trs ids)))
733
:in-theory (disable m-dests-computemissives))))
735
(defthm fwd-chaining-transactionsp
736
(implies (Transactionsp Trs NodeSet)
737
(and (validfields-t Trs)
739
(subsetp (t-orgs trs) nodeset)
740
(subsetp (t-dests trs) nodeset)
741
(no-duplicatesp-equal (t-ids trs))))
742
:rule-classes :forward-chaining)
744
(defthm GeNoC-is-correct
745
(let ((NodeSet (NodeSetGenerator Params)))
746
(mv-let (results aborted)
747
(GeNoC Trs NodeSet att)
748
(declare (ignore aborted))
749
(implies (and (Transactionsp Trs NodeSet)
750
(equal NodeSet (NodeSetGenerator Params))
751
(ValidParamsp Params))
754
(extract-sublst Trs (R-ids results))))))
758
:use ((:instance GeNoC_t-thm
759
(M (ComputeMissives Trs)))
760
(:instance v-ids-GeNoC_t-non-tail-comp
761
(M (computemissives trs)))
762
(:instance all-frms-equal-r-msgs-t-msgs
763
(TrLst (genoc_t-non-tail-comp
764
(computeMissives trs)
765
(Nodesetgenerator params) att))
766
(Trs (extract-sublst Trs
768
(genoc_t-non-tail-comp
769
(computeMissives trs)
770
(nodesetgenerator params)
772
(:instance GC1-r-dest-m-dests
773
(TrLst (genoc_t-non-tail-comp
774
(computeMissives trs)
775
(nodesetgenerator params) att))
777
(extract-sublst (ComputeMissives Trs)
778
(V-ids (genoc_t-non-tail-comp
779
(computeMissives trs)
780
(nodesetgenerator params)
782
(NodeSet (Nodesetgenerator params))))
783
:in-theory (e/d (mv-nth)
784
(GeNoC_t-thm missivesp trlstp
785
all-frms-equal-r-msgs-t-msgs
786
v-ids-GeNoC_t-non-tail-comp
787
transactionsp GC1-r-dest-m-dests)))))