Skip to content

Commit 4be54d3

Browse files
committed
port to 8.6 and new Travis/OPAm approach
1 parent e13f7fb commit 4be54d3

13 files changed

+268
-141
lines changed

.travis-ci.sh

+5-22
Original file line numberDiff line numberDiff line change
@@ -7,38 +7,21 @@ opam repo add coq-released https://coq.inria.fr/opam/released
77
opam repo add distributedcomponents-dev http://opam-dev.distributedcomponents.net
88

99
opam pin add coq $COQ_VERSION --yes --verbose
10-
opam pin add coq-mathcomp-ssreflect $SSREFLECT_VERSION --yes --verbose
11-
opam pin add coq-aac-tactics $AAC_TACTICS_VERSION --yes --verbose
12-
13-
opam install coq-mathcomp-fingroup coq-mathcomp-algebra StructTact InfSeqExt verdi verdi-cheerios --yes --verbose
1410

1511
case $MODE in
16-
analytics)
17-
./script/analytics.sh &
12+
proofalytics)
13+
opam pin add verdi-aggregation-proofalytics . --yes --verbose &
1814
# Output to the screen every 9 minutes to prevent a travis timeout
1915
export PID=$!
2016
while [[ `ps -p $PID | tail -n +2` ]]; do
2117
echo 'proofalyzing...'
2218
sleep 540
2319
done
2420
;;
25-
tree-test)
26-
opam install verdi-runtime ounit.2.0.0 uuidm.0.9.6 --yes --verbose
27-
./build.sh tree-test
28-
;;
29-
tree-dynamic-test)
30-
opam install verdi-runtime ounit.2.0.0 uuidm.0.9.6 --yes --verbose
31-
./build.sh tree-dynamic-test
32-
;;
33-
aggregation-test)
34-
opam install verdi-runtime ounit.2.0.0 uuidm.0.9.6 --yes --verbose
35-
./build.sh aggregation-test
36-
;;
37-
aggregation-dynamic-test)
38-
opam install verdi-runtime ounit.2.0.0 uuidm.0.9.6 portaudio.0.2.1 --yes --verbose
39-
./build.sh aggregation-dynamic-test
21+
aggregation-dynamic)
22+
opam pin add aggregation-dynamic . --yes --verbose
4023
;;
4124
*)
42-
./build.sh
25+
opam pin add verdi-aggregation . --yes --verbose
4326
;;
4427
esac

.travis.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ addons:
1010
- portaudio19-dev
1111
env:
1212
global:
13-
- COQ_VERSION=8.5.3
14-
- SSREFLECT_VERSION=1.6
15-
- AAC_TACTICS_VERSION=8.5.1
13+
- COQ_VERSION=8.6
1614
matrix:
1715
- MODE=build
18-
- MODE=aggregation-test
19-
- MODE=aggregation-dynamic-test
20-
- MODE=analytics
16+
- MODE=aggregation-dynamic OPAMBUILDTEST=1
17+
- MODE=proofalytics
2118
before_install:
2219
- openssl aes-256-cbc -K $encrypted_80476f3400be_key -iv $encrypted_80476f3400be_iv -in .travis/travis_rsa.enc -out .travis/travis_rsa -d
2320
- cp .travis/travis_rsa ~/.ssh

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
PYTHON=python2.7
2-
COQVERSION := $(shell coqc --version|grep "version 8.5")
2+
COQVERSION := $(shell coqc --version|egrep "version (8\\.6|trunk)")
33

44
ifeq "$(COQVERSION)" ""
5-
$(error "Verdi Aggregation is only compatible with Coq version 8.5")
5+
$(error "Verdi Aggregation is only compatible with Coq version 8.6")
66
endif
77

88
COQPROJECT_EXISTS=$(wildcard _CoqProject)

aggregation-dynamic.install

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin: ["extraction/aggregation-dynamic/_build/ocaml/TreeAggregationMain.native" {"aggregation-dynamic"}]

aggregation-dynamic.opam

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
opam-version: "1.2"
2+
version: "dev"
3+
maintainer: "[email protected]"
4+
5+
homepage: "https://github.com/DistributedComponents/verdi-aggregation"
6+
dev-repo: "https://github.com/DistributedComponents/verdi-aggregation.git"
7+
bug-reports: "https://github.com/DistributedComponents/verdi-aggregation/issues"
8+
license: "Proprietary"
9+
10+
build: [
11+
[ "./configure" ]
12+
[ make "-j%{jobs}%" "aggregation-dynamic" ]
13+
]
14+
build-test: [make "aggregation-dynamic-test"]
15+
available: [ ocaml-version >= "4.02.3" ]
16+
depends: [
17+
"coq" {>= "8.6" & < "8.7~"}
18+
"coq-mathcomp-ssreflect" {>= "1.6" & < "1.7~"}
19+
"coq-mathcomp-algebra" {>= "1.6" & < "1.7~"}
20+
"coq-mathcomp-fingroup" {>= "1.6" & < "1.7~"}
21+
"coq-aac-tactics" {>= "8.6.1"}
22+
"verdi" {= "dev"}
23+
"StructTact" {= "dev"}
24+
"InfSeqExt" {= "dev"}
25+
"cheerios" {= "dev"}
26+
"verdi-cheerios" {= "dev"}
27+
"ocamlbuild" {build}
28+
"ocamlfind" {build}
29+
"verdi-runtime" {= "dev"}
30+
"uuidm" {>= "0.9.6"}
31+
"portaudio" {>= "0.2.1"}
32+
"ounit" {test & >= "2.0.0"}
33+
]
34+
35+
authors: [
36+
"Karl Palmskog <>"
37+
"Ryan Doenges <>"
38+
]

systems/AggregationDynamicCorrect.v

+16-15
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Require Import Orders.
1717
Require Import MSetFacts.
1818
Require Import MSetProperties.
1919
Require Import Sorting.Permutation.
20+
Require FMapFacts.
2021

2122
Require Import mathcomp.ssreflect.ssreflect.
2223
Require Import mathcomp.ssreflect.ssrbool.
@@ -60,7 +61,7 @@ Module NSetFacts := Facts NSet.
6061
Module NSetProps := Properties NSet.
6162
Module NSetOrdProps := OrdProperties NSet.
6263

63-
Require Import FMapFacts.
64+
Import FMapFacts.
6465
Module NMapFacts := Facts NMap.
6566

6667
Instance Aggregation_FailureRecorder_base_params_pt_map : BaseParamsPartialMap Aggregation_BaseParams FR.FailureRecorder_BaseParams :=
@@ -960,7 +961,7 @@ end; simpl in *.
960961
by auto.
961962
- find_apply_lem_hyp net_handlers_NetHandler.
962963
net_handler_cases => //=; unfold update2, update in *; simpl in *; repeat break_if; break_and; subst_max; try find_injection; try by eauto.
963-
* have H_in: In (Aggregate x) (odnwPackets net0 n' n) by repeat find_rewrite; left.
964+
* have H_in: In (Aggregate x) (odnwPackets net0 n' to) by repeat find_rewrite; left.
964965
have IH := IHrefl_trans_1n_trace1 _ H6 H7 _ H8 _ H_in _ H4.
965966
find_rewrite.
966967
break_or_hyp; last by right; find_reverse_rewrite.
@@ -1163,7 +1164,7 @@ have H_bef := Aggregation_in_after_all_aggregate_new H_st _ H_n H_f _ H_dec m'.
11631164
destruct (odnwPackets net n' n) => //.
11641165
simpl in *.
11651166
find_injection.
1166-
move => H_in'.
1167+
move => H_in' {H_in}.
11671168
break_or_hyp => //.
11681169
break_or_hyp => //.
11691170
by break_and.
@@ -1638,7 +1639,7 @@ end; simpl in *.
16381639
by break_and.
16391640
* have H_neq: from <> to.
16401641
move => H_eq.
1641-
find_rewrite.
1642+
repeat find_rewrite.
16421643
by rewrite (Aggregation_self_channel_empty s1) in H3.
16431644
case (in_dec name_eq_dec from net.(odnwNodes)) => H_dec; last by rewrite (@ordered_dynamic_no_outgoing_uninitialized _ _ _ _ Aggregation_FailMsgParams _ _ _ s1) in H3.
16441645
case (in_dec name_eq_dec from failed0) => H_dec'; last first.
@@ -1662,7 +1663,7 @@ end; simpl in *.
16621663
by congruence.
16631664
* have H_neq: from <> to.
16641665
move => H_eq.
1665-
find_rewrite.
1666+
repeat find_rewrite.
16661667
by rewrite (Aggregation_self_channel_empty s1) in H3.
16671668
case (in_dec name_eq_dec from net.(odnwNodes)) => H_dec; last by rewrite (@ordered_dynamic_no_outgoing_uninitialized _ _ _ _ Aggregation_FailMsgParams _ _ _ s1) in H3.
16681669
unfold update2, update in *.
@@ -2368,10 +2369,10 @@ end; simpl.
23682369
net_handler_cases.
23692370
* destruct_update; repeat find_injection.
23702371
+ rewrite /update2 /=.
2371-
break_if; first by break_and; subst; find_rewrite_lem (Aggregation_self_channel_empty s1).
2372+
break_if; first by break_and; subst; repeat find_rewrite_lem (Aggregation_self_channel_empty s1).
23722373
break_or_hyp => //.
23732374
case (In_dec name_eq_dec from net.(odnwNodes)) => H_from_in; last by find_rewrite_lem (@ordered_dynamic_no_outgoing_uninitialized _ _ _ _ Aggregation_FailMsgParams _ _ _ s1 _ H_from_in).
2374-
destruct d1.
2375+
destruct d0.
23752376
simpl in *.
23762377
rewrite (Aggregation_self_channel_empty s1).
23772378
repeat find_rewrite.
@@ -2423,14 +2424,14 @@ end; simpl.
24232424
by find_rewrite.
24242425
* destruct_update; repeat find_injection.
24252426
+ rewrite /update2 /=.
2426-
break_if; first by break_and; subst; find_rewrite_lem (Aggregation_self_channel_empty s1).
2427+
break_if; first by break_and; subst; repeat find_rewrite_lem (Aggregation_self_channel_empty s1).
24272428
break_or_hyp => //.
24282429
case (In_dec name_eq_dec from net.(odnwNodes)) => H_from_in; last by find_rewrite_lem (@ordered_dynamic_no_outgoing_uninitialized _ _ _ _ Aggregation_FailMsgParams _ _ _ s1 _ H_from_in).
24292430
case (In_dec name_eq_dec from failed0) => H_from_f; last first.
24302431
have H_f := Aggregation_not_failed_no_fail s1 _ H_from_in H_from_f n.
24312432
rewrite H3 in H_f.
24322433
by case: H_f; left.
2433-
destruct d1.
2434+
destruct d0.
24342435
simpl in *.
24352436
rewrite (Aggregation_self_channel_empty s1).
24362437
repeat find_rewrite.
@@ -2488,10 +2489,10 @@ end; simpl.
24882489
by find_rewrite.
24892490
* destruct_update; repeat find_injection.
24902491
+ rewrite /update2 /=.
2491-
break_if; first by break_and; subst; find_rewrite_lem (Aggregation_self_channel_empty s1).
2492+
break_if; first by break_and; subst; repeat find_rewrite_lem (Aggregation_self_channel_empty s1).
24922493
break_or_hyp => //.
24932494
case (In_dec name_eq_dec from net.(odnwNodes)) => H_from_in; last by find_rewrite_lem (@ordered_dynamic_no_outgoing_uninitialized _ _ _ _ Aggregation_FailMsgParams _ _ _ s1 _ H_from_in).
2494-
destruct d1.
2495+
destruct d0.
24952496
simpl in *.
24962497
rewrite (Aggregation_self_channel_empty s1).
24972498
repeat find_rewrite.
@@ -2543,7 +2544,7 @@ end; simpl.
25432544
io_handler_cases.
25442545
* destruct_update; repeat find_injection.
25452546
+ rewrite /= (Aggregation_self_channel_empty s1).
2546-
destruct d1.
2547+
destruct d0.
25472548
simpl in *.
25482549
repeat find_rewrite.
25492550
by apply: (recv_local_self _ s1); eauto.
@@ -2567,7 +2568,7 @@ end; simpl.
25672568
have H_x_in: In x net.(odnwNodes).
25682569
have H_or := Aggregation_in_adj_or_incoming_fail s1 _ H_in_n H_in_f H2 H3.
25692570
by break_or_hyp; break_and.
2570-
destruct d1.
2571+
destruct d0.
25712572
simpl in *.
25722573
repeat find_rewrite.
25732574
apply: (send_aggregate_self s1) => //.
@@ -2896,7 +2897,7 @@ apply: (P_dual_inv H_st); rewrite /P_curr //= {P_curr tr H_st failed H_f H_f' H_
28962897
- move => net failed tr from ms m0 H_st H_in_n H_in_f H_eq H_in_from H_in_from' H_neq H_adj H_eq'.
28972898
move => d H_eq_d H_find IH H_ins H_ins' m1 H_find_m1 m2 H_find_m2.
28982899
subst.
2899-
find_apply_lem_hyp NSetFacts.remove_3.
2900+
repeat find_apply_lem_hyp NSetFacts.remove_3.
29002901
contradict H_ins.
29012902
by eapply Aggregation_node_not_adjacent_self; eauto.
29022903
- move => net failed tr from ms m0 H_st H_in_n H_in_f H_in_n' H_in_f' H_neq H_from_neq H_from_neq' H_in_from H_in_from' H_adj H_eq.
@@ -2912,7 +2913,7 @@ apply: (P_dual_inv H_st); rewrite /P_curr //= {P_curr tr H_st failed H_f H_f' H_
29122913
- move => net faild tr from ms H_st H_in_n H_in_f H_eq H_in_from H_neq_from H_adj H_eq'.
29132914
move => d H_eq_d IH H_ins H_ins' m0 H_find_m0 m1 H_find_m1.
29142915
subst.
2915-
find_apply_lem_hyp NSetFacts.add_3 => //.
2916+
repeat find_apply_lem_hyp NSetFacts.add_3 => //.
29162917
contradict H_ins.
29172918
by eapply Aggregation_node_not_adjacent_self; eauto.
29182919
- move => net failed tr ms H_st H_in_n H_in_f H_in_n' H_in_f' H_neq H_adj H_eq.

systems/AggregationStaticCorrect.v

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Require Import Orders.
1818
Require Import MSetFacts.
1919
Require Import MSetProperties.
2020
Require Import Sorting.Permutation.
21+
Require FMapFacts.
2122

2223
Require Import mathcomp.ssreflect.ssreflect.
2324
Require Import mathcomp.ssreflect.ssrbool.
@@ -62,7 +63,7 @@ Module NSetFacts := Facts NSet.
6263
Module NSetProps := Properties NSet.
6364
Module NSetOrdProps := OrdProperties NSet.
6465

65-
Require Import FMapFacts.
66+
Import FMapFacts.
6667
Module NMapFacts := Facts NMap.
6768

6869
Instance Aggregation_FailureRecorder_base_params_pt_map : BaseParamsPartialMap Aggregation_BaseParams FR.FailureRecorder_BaseParams :=
@@ -1907,6 +1908,7 @@ end; simpl.
19071908
exact: IHH_st1.
19081909
* have H_f := Aggregation_in_queue_fail_then_adjacent H_st1 to from H1.
19091910
rewrite H0 in H_f.
1911+
simpl in *.
19101912
concludes.
19111913
suff H_suff: NSet.In from (adjacent (onwState net to)).
19121914
have [m' H_ex] := Aggregation_in_set_exists_find_balance H_st1 _ H1 H_suff.

systems/FailureRecorderDynamicCorrect.v

+3-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ end; simpl.
115115
by eauto.
116116
* apply: NoDup_filter_rel.
117117
apply: NoDup_remove_all.
118-
by find_apply_lem_hyp ordered_dynamic_nodes_no_dup.
118+
by apply: ordered_dynamic_nodes_no_dup; eauto.
119119
* apply: related_filter_rel => //.
120120
exact: in_remove_all_preserve.
121121
rewrite collate_ls_not_in; last by move => H_in; find_apply_lem_hyp filter_rel_related; break_and.
@@ -437,7 +437,7 @@ end; simpl in *.
437437
by eauto.
438438
* apply: NoDup_filter_rel.
439439
apply: NoDup_remove_all.
440-
by find_apply_lem_hyp ordered_dynamic_nodes_no_dup.
440+
by apply: ordered_dynamic_nodes_no_dup; eauto.
441441
* apply: related_filter_rel => //.
442442
exact: in_remove_all_preserve.
443443
- find_apply_lem_hyp net_handlers_NetHandler.
@@ -1918,6 +1918,7 @@ have H_bef := Failure_in_after_all_fail_new H_st _ H_in_n H_in_f n'.
19181918
case (In_dec Msg_eq_dec New (odnwPackets net n' n)) => H_dec //.
19191919
destruct (odnwPackets net n' n) => //.
19201920
destruct m => //.
1921+
simpl in *.
19211922
case: H_dec => H_dec //.
19221923
find_apply_lem_hyp in_split.
19231924
break_exists.

systems/FailureRecorderDynamicLabeledCorrect.v

+3-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ end; simpl.
119119
by eauto.
120120
* apply: NoDup_filter_rel.
121121
apply: NoDup_remove_all.
122-
by find_apply_lem_hyp ordered_dynamic_nodes_no_dup.
122+
by apply: ordered_dynamic_nodes_no_dup; eauto.
123123
* apply: related_filter_rel => //.
124124
exact: in_remove_all_preserve.
125125
rewrite collate_ls_not_in; last by move => H_in; find_apply_lem_hyp filter_rel_related; break_and.
@@ -441,7 +441,7 @@ end; simpl in *.
441441
by eauto.
442442
* apply: NoDup_filter_rel.
443443
apply: NoDup_remove_all.
444-
by find_apply_lem_hyp ordered_dynamic_nodes_no_dup.
444+
by apply: ordered_dynamic_nodes_no_dup; eauto.
445445
* apply: related_filter_rel => //.
446446
exact: in_remove_all_preserve.
447447
- find_apply_lem_hyp net_handlers_NetHandler; break_exists.
@@ -1923,6 +1923,7 @@ have H_bef := Failure_in_after_all_fail_new H_st _ H_in_n H_in_f n'.
19231923
case (In_dec Msg_eq_dec New (odnwPackets net n' n)) => H_dec //.
19241924
destruct (odnwPackets net n' n) => //.
19251925
destruct m => //.
1926+
simpl in *.
19261927
case: H_dec => H_dec //.
19271928
find_apply_lem_hyp in_split.
19281929
break_exists.

systems/TreeAggregationDynamicLabeledCorrect.v

+2
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ Proof.
423423
by admit; break_exists_name h; break_and.
424424
assert (~ root h)
425425
by admit.
426+
(*
426427
find_eelim_prop non_root_nodes_have_unit; repeat find_rewrite; eauto.
427428
* intros; break_and; repeat find_rewrite.
428429
repeat (simpl in *; find_rewrite); find_injection.
@@ -450,6 +451,7 @@ Proof.
450451
[by eauto using in_remove_all_not_in|].
451452
find_rewrite.
452453
auto with datatypes.
454+
*)
453455
Admitted.
454456

455457
Theorem churn_free_stabilization :

0 commit comments

Comments
 (0)