From ff2458796244d3ea66576e7e129e387aa49e1d8d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 22:33:44 -0500 Subject: [PATCH 01/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 1ff7d47..eaacfc4 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.30 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -438,6 +438,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 2.30-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Wed Jan 11 2012 Jerry James - 2.30-5 - Patch to work with flocq 2.0.0 From 9497908b6a3befd09c1367f2adafb7ca300ae198 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 30 Jul 2012 08:39:16 +0100 Subject: [PATCH 02/97] Rebuild for OCaml 4.00.0 official. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index eaacfc4..72a5e3a 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.30 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -438,6 +438,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Jul 30 2012 Richard W.M. Jones - 2.30-7 +- Rebuild for OCaml 4.00.0 official. + * Sun Jul 22 2012 Fedora Release Engineering - 2.30-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 06edd92de33ee2ff00dac096648f8206443cc1cf Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 30 Jul 2012 20:55:08 -0600 Subject: [PATCH 03/97] New upstream version. Drop upstreamed patches. --- .gitignore | 2 +- gwhy-2.26.patch => gwhy-2.31.patch | 0 sources | 4 +- ...ile.in.patch => why-2.31-Makefile.in.patch | 12 +- why-apron.patch | 40 -- why-flocq2.patch | 510 ------------------ why.spec | 28 +- 7 files changed, 21 insertions(+), 575 deletions(-) rename gwhy-2.26.patch => gwhy-2.31.patch (100%) rename why-2.30-Makefile.in.patch => why-2.31-Makefile.in.patch (66%) delete mode 100644 why-apron.patch delete mode 100644 why-flocq2.patch diff --git a/.gitignore b/.gitignore index 3c891f7..719a194 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /krakatoa.pdf -/why-2.30.tar.gz +/why-2.31.tar.gz diff --git a/gwhy-2.26.patch b/gwhy-2.31.patch similarity index 100% rename from gwhy-2.26.patch rename to gwhy-2.31.patch diff --git a/sources b/sources index ae20770..c472a51 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -1e8d6c76e5c3cee018172e981309c68b krakatoa.pdf -c3f6c5616e32743e883ffb7609f96336 why-2.30.tar.gz +08f92283da47fdb190f516339472e575 krakatoa.pdf +d647f64049345be5654f8f3fdb077aa4 why-2.31.tar.gz diff --git a/why-2.30-Makefile.in.patch b/why-2.31-Makefile.in.patch similarity index 66% rename from why-2.30-Makefile.in.patch rename to why-2.31-Makefile.in.patch index eb43de5..9546b4b 100644 --- a/why-2.30-Makefile.in.patch +++ b/why-2.31-Makefile.in.patch @@ -1,7 +1,7 @@ ---- Makefile.in.orig 2011-10-24 09:21:06.000000000 -0600 -+++ Makefile.in 2011-10-25 15:37:54.600278865 -0600 -@@ -782,14 +782,9 @@ - cp -f $(V7FILES) $(LIBDIR)/why/coq7 +--- Makefile.in.orig 2012-07-19 12:33:10.000000000 -0600 ++++ Makefile.in 2012-07-30 20:28:33.062463838 -0600 +@@ -812,14 +812,9 @@ + mkdir -p $(LIBDIR)/why/coq7 cp -f $(VO7) $(LIBDIR)/why/coq7 install-coq-v8 install-coq-v8.1: - if test -w $(COQLIB) ; then \ @@ -9,9 +9,9 @@ - cp -f $(VO8) $(COQLIB)/user-contrib/Why ; \ - else \ - echo "Cannot copy to Coq standard library. Add \"-R $(LIBDIR)/why/coq Why\" to Coq options." ;\ -- mkdir -p $(LIBDIR)/why/coq ;\ -- cp -f $(VO8) $(V8FILES) $(LIBDIR)/why/coq ;\ - fi +- mkdir -p $(LIBDIR)/why/coq +- cp -f $(VO8) $(LIBDIR)/why/coq + mkdir -p $(COQLIB)/user-contrib/Why + cp -f $(V8FILES) $(COQLIB)/user-contrib/Why + cp -f $(VO8) $(COQLIB)/user-contrib/Why diff --git a/why-apron.patch b/why-apron.patch deleted file mode 100644 index 4e23767..0000000 --- a/why-apron.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- jc/jc_annot_inference.ml.orig 2011-10-24 09:21:06.000000000 -0600 -+++ jc/jc_annot_inference.ml 2011-11-23 13:47:40.438177237 -0700 -@@ -148,7 +148,7 @@ - Some(tptr,offt) - end - | JCTvar _ | JCTderef _ | JCTapp _ | JCTold _ | JCTat _ | JCTif _ -- | JCTrange _ | JCTmatch _ | JCTaddress _ | JCTbase_block _ -+ | JCTlet _ | JCTrange _ | JCTmatch _ | JCTaddress _ | JCTbase_block _ - | JCTconst _ | JCTbinary _ | JCTunary _ | JCToffset _ | JCTinstanceof _ - | JCTreal_cast _ | JCTrange_cast _ | JCTbitwise_cast _ | JCTcast _ -> - None -@@ -491,7 +491,7 @@ - in - Format.fprintf Format.str_formatter "%a" Jc_output.assertion a; - let formula = Format.flush_str_formatter () in -- let lab = Output.reg_pos "G" ?id ?kind ?name ~formula loc in -+ let lab = Output.old_reg_pos "G" ?id ?kind ?name ~formula (Loc.extract loc) in - new assertion_with ~mark:lab a - - -@@ -608,8 +608,8 @@ - Atp.Fn(atp_of_unop uop, [atp_of_term t1]) - | JCTvar _ | JCTderef _ | JCTapp _ | JCToffset _ -> - Atp.Var (Vwp.variable_for_term t) -- | JCTshift _ | JCTold _ | JCTat _ | JCTmatch _ | JCTinstanceof _ -- | JCTcast _ | JCTrange_cast _ | JCTbitwise_cast _ | JCTreal_cast _ -+ | JCTshift _ | JCTold _ | JCTat _ | JCTmatch _ | JCTinstanceof _ | JCTlet _ -+ | JCTcast _ | JCTrange_cast _ | JCTbitwise_cast _ | JCTreal_cast _ - | JCTaddress _ | JCTif _ | JCTrange _ | JCTunary _ | JCTbase_block _ -> - err () - -@@ -1198,7 +1198,7 @@ - | JCTunary _ | JCTshift _ | JCTinstanceof _ | JCTmatch _ - | JCTold _ | JCTat _ | JCTcast _ | JCTbitwise_cast _ - | JCTrange_cast _ | JCTreal_cast _ | JCTaddress _ | JCTbase_block _ -- | JCTrange _ | JCTif _ -> -+ | JCTlet _ | JCTrange _ | JCTif _ -> - err () - with Failure "linearize" -> - (TermMap.add t (Int 1) TermMap.empty, Int 0) diff --git a/why-flocq2.patch b/why-flocq2.patch deleted file mode 100644 index 27dda9f..0000000 --- a/why-flocq2.patch +++ /dev/null @@ -1,510 +0,0 @@ ---- ./lib/coq/WhyFloats.v.orig 2011-10-24 09:21:06.000000000 -0600 -+++ ./lib/coq/WhyFloats.v 2012-01-11 15:41:08.873131034 -0700 -@@ -19,17 +19,13 @@ Let emin := (3 - emax - prec)%Z. - Let fexp := FLT_exp emin prec. - Lemma Hprec': (0 < prec)%Z. revert Hprec. now case Zlt_bool_spec. Qed. - Lemma Hemax': (prec < emax)%Z. revert Hemax. now case Zlt_bool_spec. Qed. --Let binary_round_correct := binary_round_sign_shl_correct prec emax Hprec' Hemax'. -+Lemma fexp': Valid_exp fexp. apply FLT_exp_valid. apply Hprec'. Qed. - - Definition r_to_sd rnd x : binary_float prec emax := - let r := round radix2 fexp (round_mode rnd) x in - let m := Ztrunc (scaled_mantissa radix2 fexp r) in -- let e := canonic_exponent radix2 fexp r in -- match m with -- | Z0 => B754_zero prec emax false -- | Zpos m => FF2B _ _ _ (proj1 (binary_round_correct rnd false m e)) -- | Zneg m => FF2B _ _ _ (proj1 (binary_round_correct rnd true m e)) -- end. -+ let e := canonic_exp radix2 fexp r in -+ binary_normalize prec emax Hprec' Hemax' rnd m e false. - - Lemma is_finite_FF2B : - forall f H, -@@ -49,59 +45,19 @@ Theorem r_to_sd_correct : - (Rabs r < bpow radix2 emax)%R -> - is_finite prec emax (r_to_sd rnd x) = true /\ - r_to_sd rnd x = r :>R. --Proof. -+Proof with auto with typeclass_instances. - intros rnd x r Bx. - unfold r_to_sd. fold r. --assert (Gx: generic_format radix2 fexp r). --apply generic_format_round. --apply FLT_exp_correct. --exact Hprec'. --assert (Hr: Z2R (Ztrunc (scaled_mantissa radix2 fexp r)) = scaled_mantissa radix2 fexp r). --apply sym_eq. --now apply scaled_mantissa_generic. --revert Hr. --case_eq (Ztrunc (scaled_mantissa radix2 fexp r)). --(* *) --intros _ Hx. --repeat split. --apply Rmult_eq_reg_r with (bpow radix2 (- canonic_exponent radix2 fexp r)). --now rewrite Rmult_0_l. --apply Rgt_not_eq. --apply bpow_gt_0. --(* *) --intros p Hp Hx. --case binary_round_correct ; intros Hv. --unfold F2R, Fnum, Fexp, cond_Zopp. --rewrite Hx, scaled_mantissa_bpow. --rewrite round_generic with (1 := Gx). --rewrite Rlt_bool_true with (1 := Bx). --intros H. --split. --rewrite is_finite_FF2B. --revert H. --assert (0 <> r)%R. --intros H. --rewrite <- H, scaled_mantissa_0 in Hx. --now apply (Z2R_neq 0 (Zpos p)). --now case binary_round_sign_shl. --now rewrite B2R_FF2B. --(* *) --intros p Hp Hx. --case binary_round_correct ; intros Hv. --unfold F2R, Fnum, Fexp, cond_Zopp, Zopp. --rewrite Hx, scaled_mantissa_bpow. --rewrite round_generic with (1 := Gx). -+generalize (binary_normalize_correct prec emax Hprec' Hemax' rnd (Ztrunc (scaled_mantissa radix2 fexp r)) (canonic_exp radix2 fexp r) false). -+unfold r. -+elim generic_format_round... -+fold emin r. -+rewrite round_generic... - rewrite Rlt_bool_true with (1 := Bx). --intros H. --split. --rewrite is_finite_FF2B. --revert H. --assert (0 <> r)%R. --intros H. --rewrite <- H, scaled_mantissa_0 in Hx. --now apply (Z2R_neq 0 (Zneg p)). --now case binary_round_sign_shl. --now rewrite B2R_FF2B. -+now split. -+apply generic_format_round... -+apply fexp'. -+apply fexp'. - Qed. - - Theorem r_to_sd_format : -@@ -109,15 +65,14 @@ Theorem r_to_sd_format : - FLT_format radix2 emin prec x -> - (Rabs x < bpow radix2 emax)%R -> - r_to_sd rnd x = x :>R. --Proof. -+Proof with auto with typeclass_instances. - intros rnd x Fx Bx. - assert (Gx: generic_format radix2 fexp x). --apply -> FLT_format_generic. -+apply generic_format_FLT. - apply Fx. --exact Hprec'. --pattern x at 2 ; rewrite <- round_generic with (rnd := round_mode rnd) (1 := Gx). -+pattern x at 2 ; rewrite <- round_generic with (rnd := round_mode rnd) (2 := Gx)... - refine (proj2 (r_to_sd_correct _ _ _)). --now rewrite round_generic with (1 := Gx). -+rewrite round_generic... - Qed. - - End r_to_sd. -@@ -152,10 +107,10 @@ rewrite <- Zsucc_pred. - generalize (Zeq_bool_eq _ _ H1). clear. - rewrite Fcalc_digits.Z_of_nat_S_digits2_Pnat. - intros H. --apply (Fcalc_digits.Zpower_gt_digits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). -+apply (Fcalc_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). - revert H. - unfold FLT_exp. --generalize (Fcalc_digits.digits Fcalc_digits.radix2 (Zpos m)). -+generalize (Fcore_digits.Zdigits Fcalc_digits.radix2 (Zpos m)). - intros ; zify ; omega. - apply bpow_le. - now apply Zle_bool_imp_le. -@@ -172,6 +127,23 @@ Definition rnd_of_mode (m:mode) := - - (** Single precision *) - -+Definition binary32 := binary_float 24 128. -+ -+Let Hprec32 : (0 < 24)%Z. -+apply refl_equal. -+Qed. -+ -+Let Hprec32_emax : (24 < 128)%Z. -+apply refl_equal. -+Qed. -+ -+Definition b32_opp := Bopp 24 128. -+Definition b32_plus := Bplus _ _ Hprec32 Hprec32_emax. -+Definition b32_minus := Bminus _ _ Hprec32 Hprec32_emax. -+Definition b32_mult := Bmult _ _ Hprec32 Hprec32_emax. -+Definition b32_div := Bdiv _ _ Hprec32 Hprec32_emax. -+Definition b32_sqrt := Bsqrt _ _ Hprec32 Hprec32_emax. -+ - Record single : Set := mk_single { - single_float : binary32; - single_value := (single_float : R); -@@ -229,12 +201,12 @@ Theorem bounded_real_no_overflow_single - forall m x, - (Rabs x <= max_single)%R -> - no_overflow_single m x. --Proof. -+Proof with auto with typeclass_instances. - intros m x Hx. - apply Rabs_le. - assert (generic_format radix2 (FLT_exp (-149) 24) max_single). --apply generic_format_canonic_exponent. --unfold canonic_exponent. -+apply generic_format_F2R. -+unfold canonic_exp. - rewrite ln_beta_F2R. 2: easy. - rewrite (ln_beta_unique _ _ 24). - easy. -@@ -245,31 +217,40 @@ now apply Z2R_lt. - generalize (Rabs_le_inv _ _ Hx). - split. - erewrite <- round_generic with (x := Ropp max_single). --apply round_monotone with (2 := proj1 H0). --now apply FLT_exp_correct. -+unfold round_single. -+apply round_le... -+apply FLT_exp_valid. easy. -+easy. -+apply valid_rnd_round_mode. - now apply generic_format_opp. --rewrite <- round_generic with (rnd := round_mode (rnd_of_mode m)) (1 := H). --apply round_monotone with (2 := proj2 H0). --now apply FLT_exp_correct. -+unfold round_single. -+apply round_le_generic... -+apply FLT_exp_valid. -+apply Hprec'... -+easy. - Qed. - - Theorem round_single_monotonic : - forall m x y, (x <= y)%R -> - (round_single m x <= round_single m y)%R. --Proof. -+Proof with auto with typeclass_instances. - intros m x y Hxy. --apply round_monotone with (2 := Hxy). --now apply FLT_exp_correct. -+unfold round_single. -+apply round_le... -+apply FLT_exp_valid. -+apply Hprec'... - Qed. - - Theorem round_single_idempotent : - forall m1 m2 x, - round_single m1 (round_single m2 x) = round_single m2 x. --Proof. -+Proof with auto with typeclass_instances. - intros m1 m2 x. - apply round_generic. --apply generic_format_round. --now apply FLT_exp_correct. -+apply valid_rnd_round_mode. -+apply generic_format_round... -+apply FLT_exp_valid. -+apply Hprec'... - Qed. - - Theorem round_down_single_neg : -@@ -295,8 +276,9 @@ Theorem round_single_down_le : - (round_single down x <= x)%R. - Proof. - intros x. --eapply round_DN_pt. --now apply FLT_exp_correct. -+eapply round_DN_pt... -+apply FLT_exp_valid. -+apply Hprec'. easy. - Qed. - - Theorem round_up_single_ge : -@@ -305,12 +287,30 @@ Theorem round_up_single_ge : - Proof. - intros x. - apply Rle_ge. --eapply round_UP_pt. --now apply FLT_exp_correct. -+eapply round_UP_pt... -+apply FLT_exp_valid. -+apply Hprec'. easy. - Qed. - - (** Double precision *) - -+Definition binary64 := binary_float 53 1024. -+ -+Let Hprec64 : (0 < 53)%Z. -+apply refl_equal. -+Qed. -+ -+Let Hprec64_emax : (53 < 1024)%Z. -+apply refl_equal. -+Qed. -+ -+Definition b64_opp := Bopp 53 1024. -+Definition b64_plus := Bplus _ _ Hprec64 Hprec64_emax. -+Definition b64_minus := Bminus _ _ Hprec64 Hprec64_emax. -+Definition b64_mult := Bmult _ _ Hprec64 Hprec64_emax. -+Definition b64_div := Bdiv _ _ Hprec64 Hprec64_emax. -+Definition b64_sqrt := Bsqrt _ _ Hprec64 Hprec64_emax. -+ - Record double : Set := mk_double { - double_float : binary64; - double_value := (double_float : R); -@@ -368,12 +368,12 @@ Theorem bounded_real_no_overflow_double - forall m x, - (Rabs x <= max_double)%R -> - no_overflow_double m x. --Proof. -+Proof with auto with typeclass_instances. - intros m x Hx. - apply Rabs_le. - assert (generic_format radix2 (FLT_exp (-1074) 53) max_double). --apply generic_format_canonic_exponent. --unfold canonic_exponent. -+apply generic_format_F2R. -+unfold canonic_exp. - rewrite ln_beta_F2R. 2: easy. - rewrite (ln_beta_unique _ _ 53). - easy. -@@ -384,31 +384,40 @@ now apply Z2R_lt. - generalize (Rabs_le_inv _ _ Hx). - split. - erewrite <- round_generic with (x := Ropp max_double). --apply round_monotone with (2 := proj1 H0). --now apply FLT_exp_correct. -+unfold round_double. -+apply round_le... -+apply FLT_exp_valid. easy. -+easy. -+apply valid_rnd_round_mode. - now apply generic_format_opp. --rewrite <- round_generic with (rnd := round_mode (rnd_of_mode m)) (1 := H). --apply round_monotone with (2 := proj2 H0). --now apply FLT_exp_correct. -+unfold round_double. -+apply round_le_generic... -+apply FLT_exp_valid. -+apply Hprec'... -+easy. - Qed. - - Theorem round_double_monotonic : - forall m x y, (x <= y)%R -> - (round_double m x <= round_double m y)%R. --Proof. -+Proof with auto with typeclass_instances. - intros m x y Hxy. --apply round_monotone with (2 := Hxy). --now apply FLT_exp_correct. -+unfold round_double. -+apply round_le... -+apply FLT_exp_valid. -+apply Hprec'... - Qed. - - Theorem round_double_idempotent : - forall m1 m2 x, - round_double m1 (round_double m2 x) = round_double m2 x. --Proof. -+Proof with auto with typeclass_instances. - intros m1 m2 x. - apply round_generic. --apply generic_format_round. --now apply FLT_exp_correct. -+apply valid_rnd_round_mode. -+apply generic_format_round... -+apply FLT_exp_valid. -+apply Hprec'... - Qed. - - Theorem round_down_double_neg : -@@ -434,8 +443,9 @@ Theorem round_double_down_le : - (round_double down x <= x)%R. - Proof. - intros x. --eapply round_DN_pt. --now apply FLT_exp_correct. -+eapply round_DN_pt... -+apply FLT_exp_valid. -+apply Hprec'. easy. - Qed. - - Theorem round_up_double_ge : -@@ -444,8 +454,9 @@ Theorem round_up_double_ge : - Proof. - intros x. - apply Rle_ge. --eapply round_UP_pt. --now apply FLT_exp_correct. -+eapply round_UP_pt... -+apply FLT_exp_valid. -+apply Hprec'. easy. - Qed. - - (** Quad precision *) -@@ -566,8 +577,8 @@ unfold F2R. simpl. - split. - now rewrite Rmult_1_r. - now split. --apply <- FLT_format_generic. --2: easy. -+apply FLT_format_generic. -+apply Hprec'. easy. - change 2%Z with (radix_val radix2) in Bz. - destruct z as [|z|z] ; unfold Zabs in Bz. - apply generic_format_0. ---- ./lib/coq/WhyFloatsStrict.v.orig 2011-10-24 09:21:06.000000000 -0600 -+++ ./lib/coq/WhyFloatsStrict.v 2012-01-11 15:42:11.453663887 -0700 -@@ -155,30 +155,13 @@ repeat split. - exact H2. - Qed. - --Axiom Bplus_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- is_finite prec emax x = true -> -- is_finite prec emax y = true -> -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x + B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bplus prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x + B2R prec emax y) /\ -- is_finite prec emax (Bplus prec emax Hprec Hmax m x y) = true -- else -- B2FF prec emax (Bplus prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (Bsign prec emax x) /\ -- Bsign prec emax x = Bsign prec emax y. -- - Lemma add_single_specification : - forall m (x y : single), - no_overflow_single m (single_value x + single_value y) -> - exists z, add_single_post m x y z. - Proof. - intros m x y Br. --refine (_ (Bplus_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) -+refine (_ (Bplus_correct 24 128 Hprec32 Hprec32_emax (rnd_of_mode m) (single_float x) (single_float y) - (single_finite x) (single_finite y))). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. -@@ -189,27 +172,13 @@ repeat split. - exact H1. - Qed. - --Axiom Bmult_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x * B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bmult prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x * B2R prec emax y) /\ -- is_finite prec emax (Bmult prec emax Hprec Hmax m x y) = andb (is_finite prec emax x) (is_finite prec emax y) -- else -- B2FF prec emax (Bmult prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). -- - Lemma mul_single_specification : - forall m (x y : single), - no_overflow_single m (single_value x * single_value y) -> - exists z, mul_single_post m x y z. - Proof. - intros m x y Br. --refine (_ (Bmult_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y))). -+refine (_ (Bmult_correct 24 128 Hprec32 Hprec32_emax (rnd_of_mode m) (single_float x) (single_float y))). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. - fold b32_mult. -@@ -220,28 +189,13 @@ repeat split. - exact H1. - Qed. - --Axiom Bdiv_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- B2R prec emax y <> 0%R -> -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x / B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bdiv prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x / B2R prec emax y) /\ -- is_finite prec emax (Bdiv prec emax Hprec Hmax m x y) = is_finite prec emax x -- else -- B2FF prec emax (Bdiv prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). -- - Lemma div_single_specification : - forall m (x y : single), single_value y <> R0 -> - no_overflow_single m (single_value x / single_value y) -> - exists z, div_single_post m x y z. - Proof. - intros m x y Zy Br. --refine (_ (Bdiv_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) Zy)). -+refine (_ (Bdiv_correct 24 128 Hprec32 Hprec32_emax (rnd_of_mode m) (single_float x) (single_float y) Zy)). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. - fold b32_div. -@@ -252,20 +206,12 @@ repeat split. - exact H1. - Qed. - --Axiom Bsqrt_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x : binary_float prec emax), -- B2R prec emax (Bsqrt prec emax Hprec Hmax m x) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (sqrt (B2R prec emax x)) /\ -- is_finite prec emax (Bsqrt prec emax Hprec Hmax m x) = match x with B754_zero _ => true | B754_finite false _ _ _ => true | _ => false end. -- - Lemma sqrt_single_specification : - forall m (x : single), Rle 0 (single_value x) -> - exists z, sqrt_single_post m x z. - Proof. - intros m x Zx. --refine (_ (Bsqrt_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x))). -+refine (_ (Bsqrt_correct 24 128 Hprec32 Hprec32_emax (rnd_of_mode m) (single_float x))). - fold b32_sqrt. - intros (H1, H2). - assert (is_finite 24 128 (b32_sqrt (rnd_of_mode m) (single_float x)) = true). ---- ./lib/coq/JessieGappa.v.orig 2011-10-24 09:21:06.000000000 -0600 -+++ ./lib/coq/JessieGappa.v 2012-01-11 15:41:08.874131235 -0700 -@@ -571,7 +571,7 @@ unfold min_gen_float, min_float2. - case F ; apply bpow_gt_0. - rewrite <- round_of_min_gen with F m. - revert Bx1. --case F ; apply round_monotone ; now apply FLT_exp_correct. -+case F ; apply round_le... - Save. - - Lemma negative_constant : forall f m x, -@@ -592,7 +592,7 @@ case F ; apply bpow_ge_0. - apply Rle_lt_trans with (- min_gen_float F)%R. - rewrite <- round_of_opp_min_gen with F m. - revert Bx2. --case F ; apply round_monotone ; now apply FLT_exp_correct. -+case F ; apply round_le... - apply Ropp_lt_gt_0_contravar. - unfold min_gen_float, min_float2. - case F ; apply bpow_gt_0. -@@ -602,7 +602,7 @@ Lemma round_increasing: forall f m x y, - (x <= y)%R -> (round_float f m x <= round_float f m y)%R. - Proof. - intros F m x y. --case F ; apply round_monotone ; now apply FLT_exp_correct. -+case F ; apply round_le... - Save. - - Lemma round_greater_min: forall f m x, diff --git a/why.spec b/why.spec index 72a5e3a..95d490f 100644 --- a/why.spec +++ b/why.spec @@ -19,8 +19,8 @@ %global debug_package %{nil} Name: why -Version: 2.30 -Release: 7%{?dist} +Version: 2.31 +Release: 1%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -44,7 +44,7 @@ Source12: patch_jessie_pvs # about when bad parameters are passed to it - this patch fixes that. # Upstream has been informed about this issue and a better fix is on # their todo list -Patch0: gwhy-2.26.patch +Patch0: gwhy-2.31.patch # This patch makes a Fedora-specific fix to eliminate checking for the # location of Coq - since we're using the coq package, we know where @@ -52,14 +52,7 @@ Patch0: gwhy-2.26.patch # It also makes a fix necessary to correctly build the bytecode only # version of why by building the make_float_model tool correctly in # this case. -Patch1: why-2.30-Makefile.in.patch - -# This patch fixes some mildly bitrotted APRON support code. -# Applied upstream. -Patch2: why-apron.patch - -# This patch updates the flocq usage for flocq 2.0.0. It will be sent upstream. -Patch3: why-flocq2.patch +Patch1: why-2.31-Makefile.in.patch BuildRequires: auto-destdir BuildRequires: cvc3 @@ -218,8 +211,6 @@ based on Why, including various automated and interactive provers. %setup -q %patch0 %patch1 -%patch2 -%patch3 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ @@ -271,10 +262,11 @@ sed -e "s|-I +apron|-I +apron -I +mlgmpidl|" \ # Update the version numbers of external programs # Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ - -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.31"]/' \ +sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];' \ + -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ + -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.35"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ - -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.3pl2"]/' \ + -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.3pl4"]/' \ -e 's/versions_ok = \["4\.1"\]/versions_ok = ["5.0"]/' \ -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ @@ -438,6 +430,10 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Jul 30 2012 Jerry James - 2.31-1 +- New upstream version +- Drop upstreamed patches + * Mon Jul 30 2012 Richard W.M. Jones - 2.30-7 - Rebuild for OCaml 4.00.0 official. From b0853faa69a8d1c1516fe9c5eda0410f096693d8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 30 Jul 2012 21:11:07 -0600 Subject: [PATCH 04/97] Use the correct version of the patch. --- gwhy-2.31.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gwhy-2.31.patch b/gwhy-2.31.patch index 15a2576..c131f48 100644 --- a/gwhy-2.31.patch +++ b/gwhy-2.31.patch @@ -1,5 +1,5 @@ ---- bin/gwhy.sh.orig 2011-03-02 01:27:41.000000000 -0700 -+++ bin/gwhy.sh 2011-07-07 15:41:07.232455718 -0600 +--- bin/gwhy.sh.orig 2012-07-19 12:33:10.000000000 -0600 ++++ bin/gwhy.sh 2012-07-30 20:23:41.708914796 -0600 @@ -1,11 +1,17 @@ #!/bin/sh @@ -13,9 +13,9 @@ +case $file in *.java) - b=`basename $1 .java` -- krakatoa $1 || exit 1 +- krakatoa -gen-only $1 || exit 1 + b=`basename $file .java` -+ krakatoa $file || exit 1 ++ krakatoa -gen-only $file || exit 1 echo "krakatoa on $b.java done" - d=`dirname $1` + d=`dirname $file` @@ -29,7 +29,7 @@ - b=`basename $1 .c` - caduceus -why-opt -split-user-conj $1 || exit 1 + b=`basename $file .c` -+ caduceus -why-opt -split-user-conj $b.c || exit 1 ++ caduceus -why-opt -split-user-conj $file || exit 1 make -f $b.makefile gui ;; *.jc) From 3e44fceec96c4720b6ff20612d0666fb0e786322 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 30 Jul 2012 21:32:45 -0600 Subject: [PATCH 05/97] Fix a broken sed expression. --- why.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 95d490f..32108e0 100644 --- a/why.spec +++ b/why.spec @@ -262,7 +262,7 @@ sed -e "s|-I +apron|-I +apron -I +mlgmpidl|" \ # Update the version numbers of external programs # Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];' \ +sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];/' \ -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.35"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ From e03b7a68c6d17009974f2eeb1dd0cb6fa72efe57 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 22 Aug 2012 17:28:12 -0600 Subject: [PATCH 06/97] Add ocaml-mlgmpidl-devel and why3 BRs. Add -warning and -ocaml4 patches to fix the build. --- why-2.31-ocaml4.patch | 26 +++++++++++++ why-2.31-warning.patch | 88 ++++++++++++++++++++++++++++++++++++++++++ why.spec | 16 +++++++- 3 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 why-2.31-ocaml4.patch create mode 100644 why-2.31-warning.patch diff --git a/why-2.31-ocaml4.patch b/why-2.31-ocaml4.patch new file mode 100644 index 0000000..29e5e98 --- /dev/null +++ b/why-2.31-ocaml4.patch @@ -0,0 +1,26 @@ +--- ./jc/jc_stdlib_ge312.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./jc/jc_stdlib_ge312.ml 2012-07-31 15:26:24.760859244 -0600 +@@ -198,8 +198,9 @@ module Hashtbl = struct + + module type Std = sig + type ('a, 'b) t +- val create : int -> ('a, 'b) t ++ val create : ?random:bool -> int -> ('a, 'b) t + val clear : ('a, 'b) t -> unit ++ val reset : ('a, 'b) t -> unit + val add : ('a, 'b) t -> 'a -> 'b -> unit + val copy : ('a, 'b) t -> ('a, 'b) t + val find : ('a, 'b) t -> 'a -> 'b +@@ -210,8 +211,12 @@ module Hashtbl = struct + val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit + val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c + val length : ('a, 'b) t -> int ++ val randomize : unit -> unit ++ val stats : ('a, 'b) t -> Hashtbl.statistics + val hash : 'a -> int ++ val seeded_hash : int -> 'a -> int + val hash_param : int -> int -> 'a -> int ++ val seeded_hash_param : int -> int -> int -> 'a -> int + end + + include (Hashtbl : Std) diff --git a/why-2.31-warning.patch b/why-2.31-warning.patch new file mode 100644 index 0000000..302748d --- /dev/null +++ b/why-2.31-warning.patch @@ -0,0 +1,88 @@ +--- ./src/encoding_pred.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./src/encoding_pred.ml 2012-07-31 15:35:10.506221997 -0600 +@@ -266,11 +266,6 @@ let rec push d = + | Pnamed (s, p) -> + Pnamed (s, translate_eq p) + | p -> p in +- let rec lifted l p = +- match l with [] -> p +- | (_,a)::q -> +- lifted q (Forall(false, Ident.create a, Ident.create a, ut, [], p)) +- in + Queue.add (Dgoal + (loc, is_lemma, expl, name, + Env.empty_scheme +--- ./src/encoding_rec.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./src/encoding_rec.ml 2012-07-31 15:35:10.506221997 -0600 +@@ -397,11 +397,6 @@ let rec push d = + | Tconst (ConstUnit) as t -> plunge fv t PTunit + | Tconst (ConstFloat _) as t -> plunge fv t PTreal + | _ as t -> t in +- let rec lifted l p = +- match l with [] -> p +- | (_,a)::q -> +- lifted q (Forall(false, Ident.create a, Ident.create a, ut, [], p)) +- in + Queue.add (Dgoal + (loc, is_lemma, expl, name, + Env.empty_scheme +--- ./src/theoryreducer.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./src/theoryreducer.ml 2012-07-31 15:35:10.507222001 -0600 +@@ -191,11 +191,6 @@ struct + (** symbols the result **) + let symbolsSet = ref StringSet.empty in + let rec collect formula = +- let rec collectIntoAList l = match l with +- [] -> () +- | p :: r -> +- collect p ; +- collectIntoAList r in + match formula with + | Papp (id, [a; b], _) when is_eq id || is_neq id || id == t_zwf_zero-> + symbolsSet := StringSet.union (functionalSymbolsCollect a) +--- ./src/vcg.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./src/vcg.ml 2012-07-31 15:35:10.507222001 -0600 +@@ -615,13 +615,6 @@ let occur_as_var id = function + | Spred _ -> false + + let clean_sequent hyps concl = +- (* if a variable appears twice, we remove the first and its dependencies *) +- let rec filter_up_to x = function +- | [] -> [] +- | Svar (y, _) :: _ as hl when x = y -> hl +- | Spred (_, p) :: hl when occur_predicate x p -> filter_up_to x hl +- | h :: hl -> h :: filter_up_to x hl +- in + (* we remove variables not occuring at all in hypotheses or conclusion *) + let rec clean = function + | [] -> +--- ./src/theory_filtering.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./src/theory_filtering.ml 2012-07-31 15:35:10.507222001 -0600 +@@ -180,11 +180,6 @@ let symbols f = + (** symbols the result **) + let symbolsSet = ref Int_set.empty in + let rec collect formula = +- let rec collectIntoAList l = match l with +- [] -> () +- | p :: r -> +- collect p ; +- collectIntoAList r in + match formula with + | Papp (id, [a; b], _) when is_eq id || is_neq id || id == t_zwf_zero-> + symbolsSet := Int_set.union (functional_symbols a) +--- ./jc/jc_iterators.ml.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./jc/jc_iterators.ml 2012-07-31 15:35:52.481285428 -0600 +@@ -1057,13 +1057,6 @@ let replace_sub_expr e el = + | None -> None,el + | Some _ -> let e1,r = pop el in Some e1,r + in +- let rec popn n el = +- if n > 0 then +- let e,r = pop el in +- let el1,el2 = popn (n-1) r in +- e :: el1, el2 +- else [],el +- in + let enode = match e#node with + | JCEconst _ | JCEvar _ | JCEassert _ | JCEreturn_void as enode -> enode + | JCEcontract(req,dec,vi_result,behs,_e) -> diff --git a/why.spec b/why.spec index 32108e0..e778737 100644 --- a/why.spec +++ b/why.spec @@ -52,7 +52,13 @@ Patch0: gwhy-2.31.patch # It also makes a fix necessary to correctly build the bytecode only # version of why by building the make_float_model tool correctly in # this case. -Patch1: why-2.31-Makefile.in.patch +Patch1: %{name}-2.31-Makefile.in.patch + +# The build system uses -warn-error, so we are forced to clean up warnings. +Patch2: %{name}-2.31-warning.patch + +# Adapt to changes in OCaml 4.00.0. +Patch3: %{name}-2.31-ocaml4.patch BuildRequires: auto-destdir BuildRequires: cvc3 @@ -65,8 +71,10 @@ BuildRequires: ocaml BuildRequires: ocaml-apron-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-lablgtk-devel +BuildRequires: ocaml-mlgmpidl-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel +BuildRequires: why3 %if %{has_coq} BuildRequires: coq %endif @@ -211,6 +219,8 @@ based on Why, including various automated and interactive provers. %setup -q %patch0 %patch1 +%patch2 +%patch3 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ @@ -249,7 +259,7 @@ for f in examples-c/tutorial/average.c examples-c/tutorial/purse.c \ done # APRON support: add a missing include and a missing rpath -sed -e "s|-I +apron|-I +apron -I +mlgmpidl|" \ +sed -e "s|-I +apron|-I +apron -I +gmp|" \ -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ -i configure @@ -433,6 +443,8 @@ diff -u min.why min_why.why.result # Show differences from correct result. * Mon Jul 30 2012 Jerry James - 2.31-1 - New upstream version - Drop upstreamed patches +- Add ocaml-mlgmpidl-devel and why3 BRs +- Add -warning and -ocaml4 patches to fix the build * Mon Jul 30 2012 Richard W.M. Jones - 2.30-7 - Rebuild for OCaml 4.00.0 official. From b732eff318a5e5f302c30158966facb7d253fa82 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 23 Aug 2012 14:53:21 -0600 Subject: [PATCH 07/97] Add -coq84 patches to adapt to Coq 8.4. Cripple the Jessie plugin until problems with frama-c and hashtables are fixed. --- why-2.31-coq84.patch | 16 ++++++++++++++++ why.spec | 17 +++++++++++------ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 why-2.31-coq84.patch diff --git a/why-2.31-coq84.patch b/why-2.31-coq84.patch new file mode 100644 index 0000000..cff6767 --- /dev/null +++ b/why-2.31-coq84.patch @@ -0,0 +1,16 @@ +--- ./lib/coq/WhyTuples.v.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./lib/coq/WhyTuples.v 2012-08-23 11:58:18.246520358 -0600 +@@ -20,11 +20,9 @@ + + Definition tuple_1 (X:Set) := X. + +-Definition tuple_2 := prod. +-Definition Build_tuple_2 := pair. ++Record tuple_2 (T1 T2:Set) : Set := ++ {proj_2_1 : T1; proj_2_2 : T2}. + Implicit Arguments Build_tuple_2. +-Definition proj_2_1 := fst. +-Definition proj_2_2 := snd. + + Record tuple_3 (T1 T2 T3:Set) : Set := + {proj_3_1 : T1; proj_3_2 : T2; proj_3_3 : T3}. diff --git a/why.spec b/why.spec index e778737..c964198 100644 --- a/why.spec +++ b/why.spec @@ -60,11 +60,14 @@ Patch2: %{name}-2.31-warning.patch # Adapt to changes in OCaml 4.00.0. Patch3: %{name}-2.31-ocaml4.patch +# Adapt to changes in coq 8.4. +Patch4: %{name}-2.31-coq84.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils BuildRequires: emacs-nox xemacs xemacs-packages-extra -BuildRequires: frama-c-devel +#BuildRequires: frama-c-devel BuildRequires: gappalib-coq BuildRequires: gtk2-devel BuildRequires: ocaml @@ -221,6 +224,7 @@ based on Why, including various automated and interactive provers. %patch1 %patch2 %patch3 +%patch4 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ @@ -276,7 +280,7 @@ sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0 -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.35"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ - -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.3pl4"]/' \ + -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4"]/' \ -e 's/versions_ok = \["4\.1"\]/versions_ok = ["5.0"]/' \ -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ @@ -292,7 +296,7 @@ make %{opt_option} # Strip binaries (the Makefile misses some of them) strip bin/why-cpulimit -strip frama-c-plugin/Jessie.cmxs +#strip frama-c-plugin/Jessie.cmxs %if %opt strip bin/rv_merge.opt bin/simplify2why.opt bin/tool-stat.opt \ bin/why2html.opt bin/why-dp.opt bin/why-obfuscator.opt bin/why-stat.opt @@ -407,7 +411,7 @@ diff -u min.why min_why.why.result # Show differences from correct result. %files jessie %{_bindir}/jessie %{_libdir}/jessie/ -%{_libdir}/frama-c/plugins/Jessie.* +#%%{_libdir}/frama-c/plugins/Jessie.* %{_datadir}/applications/fedora-jessie.desktop %if %{has_coq} @@ -440,11 +444,12 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog -* Mon Jul 30 2012 Jerry James - 2.31-1 +* Thu Aug 23 2012 Jerry James - 2.31-1 - New upstream version - Drop upstreamed patches - Add ocaml-mlgmpidl-devel and why3 BRs -- Add -warning and -ocaml4 patches to fix the build +- Add -warning, -ocaml4, and -coq84 patches to fix the build +- Cripple the Jessie plugin until problems with frama-c and hashtables are fixed * Mon Jul 30 2012 Richard W.M. Jones - 2.30-7 - Rebuild for OCaml 4.00.0 official. From 6a0dc3090eb51d30728b8bd69c5caf49b36db9ee Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 27 Aug 2012 16:19:46 -0600 Subject: [PATCH 08/97] Frama-c is fixed; rebuild with the Jessie plugin enabled and functioning. --- why-2.31-coq84.patch | 13 ++++++++++++- why.spec | 11 +++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/why-2.31-coq84.patch b/why-2.31-coq84.patch index cff6767..31171cf 100644 --- a/why-2.31-coq84.patch +++ b/why-2.31-coq84.patch @@ -1,5 +1,16 @@ +--- ./configure.orig 2012-07-19 12:33:10.000000000 -0600 ++++ ./configure 2012-08-27 16:04:19.054123072 -0600 +@@ -2739,7 +2739,7 @@ $as_echo "$COQVERSION" >&6; } + WHYLIBCOQ=lib/coq + cp -f lib/coq-v7/WhyCoqDev.v lib/coq-v7/WhyCoqCompat.v + case $COQVERSION in +- 8.1*|8.2*|8.3*|trunk) ++ 8.1*|8.2*|8.3*|8.4*|trunk) + JESSIELIBCOQ=lib/coq/jessie_why.vo + cp -f lib/coq/WhyCoqDev.v lib/coq/WhyCoqCompat.v + # useful ??? [VP] Yes, the hack for making the output compliant with --- ./lib/coq/WhyTuples.v.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./lib/coq/WhyTuples.v 2012-08-23 11:58:18.246520358 -0600 ++++ ./lib/coq/WhyTuples.v 2012-08-27 16:03:58.726126152 -0600 @@ -20,11 +20,9 @@ Definition tuple_1 (X:Set) := X. diff --git a/why.spec b/why.spec index c964198..b9cc311 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -67,7 +67,7 @@ BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils BuildRequires: emacs-nox xemacs xemacs-packages-extra -#BuildRequires: frama-c-devel +BuildRequires: frama-c-devel BuildRequires: gappalib-coq BuildRequires: gtk2-devel BuildRequires: ocaml @@ -296,7 +296,7 @@ make %{opt_option} # Strip binaries (the Makefile misses some of them) strip bin/why-cpulimit -#strip frama-c-plugin/Jessie.cmxs +strip frama-c-plugin/Jessie.cmxs %if %opt strip bin/rv_merge.opt bin/simplify2why.opt bin/tool-stat.opt \ bin/why2html.opt bin/why-dp.opt bin/why-obfuscator.opt bin/why-stat.opt @@ -411,7 +411,7 @@ diff -u min.why min_why.why.result # Show differences from correct result. %files jessie %{_bindir}/jessie %{_libdir}/jessie/ -#%%{_libdir}/frama-c/plugins/Jessie.* +%{_libdir}/frama-c/plugins/Jessie.* %{_datadir}/applications/fedora-jessie.desktop %if %{has_coq} @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Aug 27 2012 Jerry James - 2.31-2 +- Frama-c is fixed; rebuild with the Jessie plugin enabled and functioning + * Thu Aug 23 2012 Jerry James - 2.31-1 - New upstream version - Drop upstreamed patches From b3d24733fe2cb80ad4354e4d707d240b44f8e749 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 11 Sep 2012 14:13:04 -0600 Subject: [PATCH 09/97] Rebuild for new frama-c build with altered API. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index b9cc311..60bce45 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Tue Sep 11 2012 Jerry James - 2.31-3 +- Rebuild for new frama-c build with altered API. + * Mon Aug 27 2012 Jerry James - 2.31-2 - Frama-c is fixed; rebuild with the Jessie plugin enabled and functioning From ec564f1d1f05afaae4eab645f0f58c213ea20c48 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 19 Oct 2012 16:09:04 -0600 Subject: [PATCH 10/97] Rebuild for OCaml 4.00.1 and frama-c Oxygen. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 60bce45..ae2c998 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -278,7 +278,7 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ # Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];/' \ -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ - -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.35"]/' \ + -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.36"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4"]/' \ -e 's/versions_ok = \["4\.1"\]/versions_ok = ["5.0"]/' \ @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Fri Oct 19 2012 Jerry James - 2.31-4 +- Rebuild for OCaml 4.00.1 and frama-c Oxygen + * Tue Sep 11 2012 Jerry James - 2.31-3 - Rebuild for new frama-c build with altered API. From d625b7596e5fba22ce4fae699d5d045e6f1e3b94 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 22 Oct 2012 13:46:43 -0600 Subject: [PATCH 11/97] Recripple the Jessie plugin until it works with frama-c Oxygen. --- why.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index ae2c998..66b1751 100644 --- a/why.spec +++ b/why.spec @@ -296,7 +296,7 @@ make %{opt_option} # Strip binaries (the Makefile misses some of them) strip bin/why-cpulimit -strip frama-c-plugin/Jessie.cmxs +#strip frama-c-plugin/Jessie.cmxs %if %opt strip bin/rv_merge.opt bin/simplify2why.opt bin/tool-stat.opt \ bin/why2html.opt bin/why-dp.opt bin/why-obfuscator.opt bin/why-stat.opt @@ -411,7 +411,7 @@ diff -u min.why min_why.why.result # Show differences from correct result. %files jessie %{_bindir}/jessie %{_libdir}/jessie/ -%{_libdir}/frama-c/plugins/Jessie.* +#%%{_libdir}/frama-c/plugins/Jessie.* %{_datadir}/applications/fedora-jessie.desktop %if %{has_coq} @@ -446,6 +446,7 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog * Fri Oct 19 2012 Jerry James - 2.31-4 - Rebuild for OCaml 4.00.1 and frama-c Oxygen +- Recripple the Jessie plugin until it works with frama-c Oxygen * Tue Sep 11 2012 Jerry James - 2.31-3 - Rebuild for new frama-c build with altered API. From 08b14c72a5a7df6410018d4dd24c5c7c5db1cb2e Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 7 Jan 2013 13:31:02 -0700 Subject: [PATCH 12/97] Rebuild for coq 8.4pl1. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 66b1751..854e72f 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -280,7 +280,7 @@ sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0 -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.36"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ - -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4"]/' \ + -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4pl1"]/' \ -e 's/versions_ok = \["4\.1"\]/versions_ok = ["5.0"]/' \ -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Jan 7 2013 Jerry James - 2.31-5 +- Rebuild for coq 8.4pl1 + * Fri Oct 19 2012 Jerry James - 2.31-4 - Rebuild for OCaml 4.00.1 and frama-c Oxygen - Recripple the Jessie plugin until it works with frama-c Oxygen From 8e6cc4625e6949b20947869329d9373726730afc Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 14 Jan 2013 16:21:29 -0700 Subject: [PATCH 13/97] Rebuild for alt-ergo 0.95. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 854e72f..5bddb95 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -277,7 +277,7 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ # Update the version numbers of external programs # Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];/' \ - -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.94"]/' \ + -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.95"]/' \ -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.36"]/' \ -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4pl1"]/' \ @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Jan 14 2013 Jerry James - 2.31-6 +- Rebuild for alt-ergo 0.95 + * Mon Jan 7 2013 Jerry James - 2.31-5 - Rebuild for coq 8.4pl1 From 9550670ad17e84d30de49406ce7be3827366f11d Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Sat, 9 Feb 2013 22:19:24 +0530 Subject: [PATCH 14/97] Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index 5bddb95..c5b2a0f 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.31 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -322,10 +322,10 @@ rm -fr %{buildroot}%{_libdir}/pvs mkdir -p %{buildroot}%{why_data_dir} cp -p %{SOURCE5} %{buildroot}%{why_data_dir} sed -e 's|ICON-LOCATION-BASE|%{why_data_dir}|' %{SOURCE4} > gwhy.desktop -desktop-file-install --vendor="fedora" \ +desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications gwhy.desktop sed -e 's|ICON-LOCATION-BASE|%{why_data_dir}|' %{SOURCE9} > jessie.desktop -desktop-file-install --vendor="fedora" \ +desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications jessie.desktop %if %{has_pvs} @@ -444,6 +444,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Sat Feb 09 2013 Parag Nemade - 2.31-7 +- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 + * Mon Jan 14 2013 Jerry James - 2.31-6 - Rebuild for alt-ergo 0.95 From a566fd4c88710310acfd6615b4141dc761ef5114 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Sat, 9 Feb 2013 22:44:30 +0530 Subject: [PATCH 15/97] Fix files list --- why.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index c5b2a0f..bea6607 100644 --- a/why.spec +++ b/why.spec @@ -406,13 +406,13 @@ diff -u min.why min_why.why.result # Show differences from correct result. %{_bindir}/gwhy %{_bindir}/gwhy-bin %{why_data_dir}/ -%{_datadir}/applications/fedora-gwhy.desktop +%{_datadir}/applications/gwhy.desktop %files jessie %{_bindir}/jessie %{_libdir}/jessie/ #%%{_libdir}/frama-c/plugins/Jessie.* -%{_datadir}/applications/fedora-jessie.desktop +%{_datadir}/applications/jessie.desktop %if %{has_coq} %files coq From 0769332a3245daaa3fc37f6763cbcd6b1ab62f12 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 14 May 2013 16:14:50 -0600 Subject: [PATCH 16/97] New upstream release. Drop upstreamed -warning, -coq84, and -ocaml4 patches. Add -hashtbl patch. Enable Jessie plugin again. --- .gitignore | 2 +- gwhy-2.31.patch => gwhy-2.33.patch | 20 ++--- sources | 4 +- why-2.31-coq84.patch | 27 ------ why-2.31-ocaml4.patch | 26 ------ why-2.31-warning.patch | 88 ------------------- ...ile.in.patch => why-2.33-Makefile.in.patch | 9 +- why-2.33-hashtbl.patch | 51 +++++++++++ why.spec | 57 ++++++------ 9 files changed, 95 insertions(+), 189 deletions(-) rename gwhy-2.31.patch => gwhy-2.33.patch (68%) delete mode 100644 why-2.31-coq84.patch delete mode 100644 why-2.31-ocaml4.patch delete mode 100644 why-2.31-warning.patch rename why-2.31-Makefile.in.patch => why-2.33-Makefile.in.patch (62%) create mode 100644 why-2.33-hashtbl.patch diff --git a/.gitignore b/.gitignore index 719a194..5ad01f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /krakatoa.pdf -/why-2.31.tar.gz +/why-2.33.tar.gz diff --git a/gwhy-2.31.patch b/gwhy-2.33.patch similarity index 68% rename from gwhy-2.31.patch rename to gwhy-2.33.patch index c131f48..d106a7e 100644 --- a/gwhy-2.31.patch +++ b/gwhy-2.33.patch @@ -1,13 +1,13 @@ ---- bin/gwhy.sh.orig 2012-07-19 12:33:10.000000000 -0600 -+++ bin/gwhy.sh 2012-07-30 20:23:41.708914796 -0600 +--- bin/gwhy.sh.orig 2013-04-20 00:34:04.000000000 -0600 ++++ bin/gwhy.sh 2013-05-10 09:12:22.968553542 -0600 @@ -1,11 +1,17 @@ #!/bin/sh -case $1 in +if ! test $1; then -+file=`zenity --file-selection --title="Select the file you want to open with gwhy"`; ++ file=`zenity --file-selection --title="Select the file you want to open with gwhy"`; +else -+file=$1 ++ file=$1 +fi + +case $file in @@ -22,15 +22,12 @@ echo "cd $d" cd $d jessie -locs $b.jloc -why-opt -split-user-conj $b.jc || exit 2 -@@ -13,20 +19,23 @@ +@@ -13,18 +19,20 @@ make -f $b.makefile gui ;; *.c) -- b=`basename $1 .c` -- caduceus -why-opt -split-user-conj $1 || exit 1 -+ b=`basename $file .c` -+ caduceus -why-opt -split-user-conj $file || exit 1 - make -f $b.makefile gui +- frama-c -jessie -jessie-atp=gui -jessie-why-opt="-split-user-conj" $1 || exit 1 ++ frama-c -jessie -jessie-atp=gui -jessie-why-opt="-split-user-conj" $file || exit 1 ;; *.jc) - b=`basename $1 .jc` @@ -41,10 +38,9 @@ *.mlw|*.why) - gwhy-bin -split-user-conj $1 + gwhy-bin -split-user-conj $file -+ ;; + ;; + ?*) + echo "$file does not have file type extension recognized by gwhy" - ;; *) - echo "don't know what to do with $1" + echo "gwhy needs the name of a file to inspect in order to run" diff --git a/sources b/sources index c472a51..17fa550 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -08f92283da47fdb190f516339472e575 krakatoa.pdf -d647f64049345be5654f8f3fdb077aa4 why-2.31.tar.gz +c32c15249cc4d4f8b41638f551d9cc3f krakatoa.pdf +25ad0493e0cd112f3fe5858aa605344a why-2.33.tar.gz diff --git a/why-2.31-coq84.patch b/why-2.31-coq84.patch deleted file mode 100644 index 31171cf..0000000 --- a/why-2.31-coq84.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- ./configure.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./configure 2012-08-27 16:04:19.054123072 -0600 -@@ -2739,7 +2739,7 @@ $as_echo "$COQVERSION" >&6; } - WHYLIBCOQ=lib/coq - cp -f lib/coq-v7/WhyCoqDev.v lib/coq-v7/WhyCoqCompat.v - case $COQVERSION in -- 8.1*|8.2*|8.3*|trunk) -+ 8.1*|8.2*|8.3*|8.4*|trunk) - JESSIELIBCOQ=lib/coq/jessie_why.vo - cp -f lib/coq/WhyCoqDev.v lib/coq/WhyCoqCompat.v - # useful ??? [VP] Yes, the hack for making the output compliant with ---- ./lib/coq/WhyTuples.v.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./lib/coq/WhyTuples.v 2012-08-27 16:03:58.726126152 -0600 -@@ -20,11 +20,9 @@ - - Definition tuple_1 (X:Set) := X. - --Definition tuple_2 := prod. --Definition Build_tuple_2 := pair. -+Record tuple_2 (T1 T2:Set) : Set := -+ {proj_2_1 : T1; proj_2_2 : T2}. - Implicit Arguments Build_tuple_2. --Definition proj_2_1 := fst. --Definition proj_2_2 := snd. - - Record tuple_3 (T1 T2 T3:Set) : Set := - {proj_3_1 : T1; proj_3_2 : T2; proj_3_3 : T3}. diff --git a/why-2.31-ocaml4.patch b/why-2.31-ocaml4.patch deleted file mode 100644 index 29e5e98..0000000 --- a/why-2.31-ocaml4.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- ./jc/jc_stdlib_ge312.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./jc/jc_stdlib_ge312.ml 2012-07-31 15:26:24.760859244 -0600 -@@ -198,8 +198,9 @@ module Hashtbl = struct - - module type Std = sig - type ('a, 'b) t -- val create : int -> ('a, 'b) t -+ val create : ?random:bool -> int -> ('a, 'b) t - val clear : ('a, 'b) t -> unit -+ val reset : ('a, 'b) t -> unit - val add : ('a, 'b) t -> 'a -> 'b -> unit - val copy : ('a, 'b) t -> ('a, 'b) t - val find : ('a, 'b) t -> 'a -> 'b -@@ -210,8 +211,12 @@ module Hashtbl = struct - val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit - val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c - val length : ('a, 'b) t -> int -+ val randomize : unit -> unit -+ val stats : ('a, 'b) t -> Hashtbl.statistics - val hash : 'a -> int -+ val seeded_hash : int -> 'a -> int - val hash_param : int -> int -> 'a -> int -+ val seeded_hash_param : int -> int -> int -> 'a -> int - end - - include (Hashtbl : Std) diff --git a/why-2.31-warning.patch b/why-2.31-warning.patch deleted file mode 100644 index 302748d..0000000 --- a/why-2.31-warning.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- ./src/encoding_pred.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./src/encoding_pred.ml 2012-07-31 15:35:10.506221997 -0600 -@@ -266,11 +266,6 @@ let rec push d = - | Pnamed (s, p) -> - Pnamed (s, translate_eq p) - | p -> p in -- let rec lifted l p = -- match l with [] -> p -- | (_,a)::q -> -- lifted q (Forall(false, Ident.create a, Ident.create a, ut, [], p)) -- in - Queue.add (Dgoal - (loc, is_lemma, expl, name, - Env.empty_scheme ---- ./src/encoding_rec.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./src/encoding_rec.ml 2012-07-31 15:35:10.506221997 -0600 -@@ -397,11 +397,6 @@ let rec push d = - | Tconst (ConstUnit) as t -> plunge fv t PTunit - | Tconst (ConstFloat _) as t -> plunge fv t PTreal - | _ as t -> t in -- let rec lifted l p = -- match l with [] -> p -- | (_,a)::q -> -- lifted q (Forall(false, Ident.create a, Ident.create a, ut, [], p)) -- in - Queue.add (Dgoal - (loc, is_lemma, expl, name, - Env.empty_scheme ---- ./src/theoryreducer.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./src/theoryreducer.ml 2012-07-31 15:35:10.507222001 -0600 -@@ -191,11 +191,6 @@ struct - (** symbols the result **) - let symbolsSet = ref StringSet.empty in - let rec collect formula = -- let rec collectIntoAList l = match l with -- [] -> () -- | p :: r -> -- collect p ; -- collectIntoAList r in - match formula with - | Papp (id, [a; b], _) when is_eq id || is_neq id || id == t_zwf_zero-> - symbolsSet := StringSet.union (functionalSymbolsCollect a) ---- ./src/vcg.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./src/vcg.ml 2012-07-31 15:35:10.507222001 -0600 -@@ -615,13 +615,6 @@ let occur_as_var id = function - | Spred _ -> false - - let clean_sequent hyps concl = -- (* if a variable appears twice, we remove the first and its dependencies *) -- let rec filter_up_to x = function -- | [] -> [] -- | Svar (y, _) :: _ as hl when x = y -> hl -- | Spred (_, p) :: hl when occur_predicate x p -> filter_up_to x hl -- | h :: hl -> h :: filter_up_to x hl -- in - (* we remove variables not occuring at all in hypotheses or conclusion *) - let rec clean = function - | [] -> ---- ./src/theory_filtering.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./src/theory_filtering.ml 2012-07-31 15:35:10.507222001 -0600 -@@ -180,11 +180,6 @@ let symbols f = - (** symbols the result **) - let symbolsSet = ref Int_set.empty in - let rec collect formula = -- let rec collectIntoAList l = match l with -- [] -> () -- | p :: r -> -- collect p ; -- collectIntoAList r in - match formula with - | Papp (id, [a; b], _) when is_eq id || is_neq id || id == t_zwf_zero-> - symbolsSet := Int_set.union (functional_symbols a) ---- ./jc/jc_iterators.ml.orig 2012-07-19 12:33:10.000000000 -0600 -+++ ./jc/jc_iterators.ml 2012-07-31 15:35:52.481285428 -0600 -@@ -1057,13 +1057,6 @@ let replace_sub_expr e el = - | None -> None,el - | Some _ -> let e1,r = pop el in Some e1,r - in -- let rec popn n el = -- if n > 0 then -- let e,r = pop el in -- let el1,el2 = popn (n-1) r in -- e :: el1, el2 -- else [],el -- in - let enode = match e#node with - | JCEconst _ | JCEvar _ | JCEassert _ | JCEreturn_void as enode -> enode - | JCEcontract(req,dec,vi_result,behs,_e) -> diff --git a/why-2.31-Makefile.in.patch b/why-2.33-Makefile.in.patch similarity index 62% rename from why-2.31-Makefile.in.patch rename to why-2.33-Makefile.in.patch index 9546b4b..2ea8cdb 100644 --- a/why-2.31-Makefile.in.patch +++ b/why-2.33-Makefile.in.patch @@ -1,10 +1,13 @@ ---- Makefile.in.orig 2012-07-19 12:33:10.000000000 -0600 -+++ Makefile.in 2012-07-30 20:28:33.062463838 -0600 -@@ -812,14 +812,9 @@ +--- Makefile.in.orig 2013-04-20 00:34:04.000000000 -0600 ++++ Makefile.in 2013-05-10 09:16:51.336053499 -0600 +@@ -804,17 +804,9 @@ mkdir -p $(LIBDIR)/why/coq7 cp -f $(VO7) $(LIBDIR)/why/coq7 install-coq-v8 install-coq-v8.1: - if test -w $(COQLIB) ; then \ +- rm -f $(COQLIB)/user-contrib/Why*.v* ; \ +- rm -f $(COQLIB)/user-contrib/caduceus*.v* $(COQLIB)/user-contrib/Caduceus*.v* ; \ +- rm -f $(COQLIB)/user-contrib/jessie*.v* $(COQLIB)/user-contrib/Jessie*.v* ; \ - mkdir -p $(COQLIB)/user-contrib/Why ; \ - cp -f $(VO8) $(COQLIB)/user-contrib/Why ; \ - else \ diff --git a/why-2.33-hashtbl.patch b/why-2.33-hashtbl.patch new file mode 100644 index 0000000..274c512 --- /dev/null +++ b/why-2.33-hashtbl.patch @@ -0,0 +1,51 @@ +--- ./jc/jc_annot_inference.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./jc/jc_annot_inference.ml 2013-05-14 12:29:30.199407024 -0600 +@@ -84,7 +84,7 @@ let forget_var_in_assertion v a = + let unfolding_of_app app = + let f = app.jc_app_fun in + let _, term_or_assertion = +- try Hashtbl.find Jc_typing.logic_functions_table f.jc_logic_info_tag ++ try IntHashtblIter.find Jc_typing.logic_functions_table f.jc_logic_info_tag + with Not_found -> assert false + in + match term_or_assertion with +@@ -2528,7 +2528,7 @@ let collect_expr_targets e = + in + let els = call.jc_call_args in + let _,_,fs,_ = +- Hashtbl.find Jc_typing.functions_table fi.jc_fun_info_tag ++ IntHashtblIter.find Jc_typing.functions_table fi.jc_fun_info_tag + in + (* Collect preconditions of functions called. *) + let reqa = fs.jc_fun_requires in +@@ -3543,7 +3543,7 @@ and ai_call iaio abs curinvs vio e = + (* Compute abstract value at function call *) + let curinvs = List.fold_left (ai_expr iaio abs) curinvs args in + let _f, _pos, spec, _body = +- Hashtbl.find Jc_typing.functions_table f.jc_fun_info_tag ++ IntHashtblIter.find Jc_typing.functions_table f.jc_fun_info_tag + in + (* begin match body with None -> () | Some body -> *) + (* if Jc_options.interprocedural then *) +@@ -3732,9 +3732,9 @@ and ai_function mgr iaio targets funpre + + (* Add global variables as abstract variables in [env]. *) + let globvars = +- Hashtbl.fold (fun _tag (vi,_e) acc -> +- Vai.all_variables (new term_var vi) @ acc +- ) Jc_typing.variables_table [] ++ IntHashtblIter.fold (fun _tag (vi,_e) acc -> ++ Vai.all_variables (new term_var vi) @ acc ++ ) Jc_typing.variables_table [] + in + let env = Environment.add env (Array.of_list globvars) [||] in + +@@ -4164,7 +4164,7 @@ let rec record_ai_inter_annotations mgr + (fun fi -> + let fi, _, fs, slo = + try +- Hashtbl.find Jc_typing.functions_table fi.jc_fun_info_tag ++ IntHashtblIter.find Jc_typing.functions_table fi.jc_fun_info_tag + with Not_found -> assert false (* should never happen *) + in + match slo with diff --git a/why.spec b/why.spec index bea6607..8a5794c 100644 --- a/why.spec +++ b/why.spec @@ -19,14 +19,14 @@ %global debug_package %{nil} Name: why -Version: 2.31 -Release: 7%{?dist} +Version: 2.33 +Release: 1%{?dist} Summary: Software verification platform Group: Applications/Engineering License: LPGLv2 with exceptions URL: http://why.lri.fr/ -Source0: http://why.lri.fr/download/why-%{version}.tar.gz +Source0: http://why.lri.fr/download/%{name}-%{version}.tar.gz Source1: README.why-gwhy.Fedora Source2: README.why-coq.Fedora Source3: README.why @@ -44,7 +44,7 @@ Source12: patch_jessie_pvs # about when bad parameters are passed to it - this patch fixes that. # Upstream has been informed about this issue and a better fix is on # their todo list -Patch0: gwhy-2.31.patch +Patch0: gwhy-2.33.patch # This patch makes a Fedora-specific fix to eliminate checking for the # location of Coq - since we're using the coq package, we know where @@ -52,16 +52,11 @@ Patch0: gwhy-2.31.patch # It also makes a fix necessary to correctly build the bytecode only # version of why by building the make_float_model tool correctly in # this case. -Patch1: %{name}-2.31-Makefile.in.patch +Patch1: %{name}-2.33-Makefile.in.patch -# The build system uses -warn-error, so we are forced to clean up warnings. -Patch2: %{name}-2.31-warning.patch - -# Adapt to changes in OCaml 4.00.0. -Patch3: %{name}-2.31-ocaml4.patch - -# Adapt to changes in coq 8.4. -Patch4: %{name}-2.31-coq84.patch +# Fix an incompletely converted hash table interface. +# Sent upstream 14 May 2013. +Patch2: %{name}-2.33-hashtbl.patch BuildRequires: auto-destdir BuildRequires: cvc3 @@ -89,8 +84,8 @@ BuildRequires: pvs ExclusiveArch: %{ocaml_arches} # Filter out names that should not be exposed externally -%global __requires_exclude ocaml\\\(((Ast)|(Cc)|(Env)|(Error)|(Loc)|(Logic)|(Logic_decl)|(Misc)|(Parser)|(Project)|(Ptree)|(Types))\\\) -%global __provides_exclude ocaml\\\(((Lexer)|(Lib)|(Loc)|(Output)|(Parser)|(Project)|(Report)|(Xml))\\\) +%global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Logic|Logic_decl|Misc|Ptree|Types)\\\) +%global __provides_exclude ocaml\\\((Lexer|Lib|Output|Report|Xml)\\\) %description Why is a software verification platform that applies formal proving @@ -223,14 +218,14 @@ based on Why, including various automated and interactive provers. %patch0 %patch1 %patch2 -%patch3 -%patch4 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ -# Fix missing DESTDIRs in the makefile +# Add missing DESTDIRs and harden the build for network-using binaries sed -e 's|$(COQLIB)/user-contrib/Why|$(DESTDIR)$(COQLIB)/user-contrib/Why|' \ -e 's|$(PVSLIB)/why|$(DESTDIR)$(PVSLIB)/why|' \ + -e '\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ + -e '/gtkThread\.cmx/s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ -i Makefile.in %define fix_encoding() \ @@ -251,9 +246,6 @@ for f in CHANGES COPYING examples/bresenham/bresenham.mlw \ %fix_encoding $f ISO-8859-1 UTF-8 done -# Fix a doubly utf8-encoded file -%fix_encoding examples/sqrt/sqrt_why.v UTF-8 ISO-8859-1 - # Fix line endings for f in examples-c/tutorial/average.c examples-c/tutorial/purse.c \ examples-c/ukkonen/main.c examples-c/ukkonen/ukkonen.c; do @@ -274,14 +266,13 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ %global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt %endif -# Update the version numbers of external programs +# Update acceptable version numbers of external programs # Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -e 's/\(versions_ok = \["0\.13\.0";"0\.14\.0";"0\.15\.1"\)\];/\1;"0.16.0";"0.16.1"];/' \ - -e 's/versions_ok = \["0\.93"\]/versions_ok = ["0.93";"0.95"]/' \ - -e 's/versions_ok = \["1\.0\.25";.*\]/versions_ok = ["1.0.36"]/' \ - -e 's/versions_ok = \["2.2"\]/versions_ok = ["2.4.1"]/' \ - -e 's/versions_ok = \["8\.0";.*\]/versions_ok = ["8.4pl1"]/' \ - -e 's/versions_ok = \["4\.1"\]/versions_ok = ["5.0"]/' \ +sed -e 's/"0\.16\.0"/&; "0.17.1"/' \ + -e 's/"0\.94"/&; "0.95.1"/' \ + -e 's/"1\.0\.24"/&; "1.0.38"/' \ + -e 's/"8\.4"/&; "8.4pl2"/' \ + -e 's/"4\.1"/&; "6.0"/' \ -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ -i tools/dpConfig.ml @@ -296,7 +287,7 @@ make %{opt_option} # Strip binaries (the Makefile misses some of them) strip bin/why-cpulimit -#strip frama-c-plugin/Jessie.cmxs +strip frama-c-plugin/Jessie.cmxs %if %opt strip bin/rv_merge.opt bin/simplify2why.opt bin/tool-stat.opt \ bin/why2html.opt bin/why-dp.opt bin/why-obfuscator.opt bin/why-stat.opt @@ -411,7 +402,7 @@ diff -u min.why min_why.why.result # Show differences from correct result. %files jessie %{_bindir}/jessie %{_libdir}/jessie/ -#%%{_libdir}/frama-c/plugins/Jessie.* +%{_libdir}/frama-c/plugins/Jessie.* %{_datadir}/applications/jessie.desktop %if %{has_coq} @@ -444,6 +435,12 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Tue May 14 2013 Jerry James - 2.33-1 +- New upstream release +- Drop upstreamed -warning, -coq84, and -ocaml4 patches +- Add -hashtbl patch +- Enable Jessie plugin again + * Sat Feb 09 2013 Parag Nemade - 2.31-7 - Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 From 5da367a9e39e9e3689142e62440c13199433d601 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 23 May 2013 11:55:25 -0600 Subject: [PATCH 17/97] Rebuild for new frama-c and why3 builds. --- why.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 8a5794c..6a47508 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.33 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -259,6 +259,9 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ -i configure +# Allow use of the fixed frama-c Fluorine release +sed -i 's/Fluorine-20130401/Fluorine-20130501/' configure + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -435,6 +438,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Thu May 23 2013 Jerry James - 2.33-2 +- Rebuild for new frama-c and why3 builds + * Tue May 14 2013 Jerry James - 2.33-1 - New upstream release - Drop upstreamed -warning, -coq84, and -ocaml4 patches From 190a227280f0c9c80480f5946fbdea0de3af4692 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 21 Jun 2013 13:55:54 -0600 Subject: [PATCH 18/97] Rebuild for frama-c Fluorine 20130601. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 6a47508..00d00fa 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.33 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -260,7 +260,7 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ -i configure # Allow use of the fixed frama-c Fluorine release -sed -i 's/Fluorine-20130401/Fluorine-20130501/' configure +sed -i 's/Fluorine-20130401/Fluorine-20130601/' configure %build %if ! %{opt} @@ -438,6 +438,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Fri Jun 21 2013 Jerry James - 2.33-3 +- Rebuild for frama-c Fluorine 20130601 + * Thu May 23 2013 Jerry James - 2.33-2 - Rebuild for new frama-c and why3 builds From abb71eaed61d37a4c4296ee2830c5494a83124a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 27 Jul 2013 19:23:56 +0300 Subject: [PATCH 19/97] Install docs to %{_pkgdocdir} where available. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 00d00fa..9f1df07 100644 --- a/why.spec +++ b/why.spec @@ -20,7 +20,7 @@ Name: why Version: 2.33 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -331,7 +331,7 @@ cp -p %{SOURCE10} %{SOURCE11} %{buildroot}%{_libdir}/pvs/lib/ints/ cp -p %{SOURCE12} %{buildroot}%{_bindir}/ %endif -%global why_doc_dir %{_defaultdocdir}/%{name}-%{version} +%global why_doc_dir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} %global why_examples_dir %{why_doc_dir}/examples/ # Fix up documentation and examples @@ -438,6 +438,9 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Sat Jul 27 2013 Ville Skyttä - 2.33-4 +- Install docs to %%{_pkgdocdir} where available. + * Fri Jun 21 2013 Jerry James - 2.33-3 - Rebuild for frama-c Fluorine 20130601 From 296ffe2562668de33882b86fed7f6f52838a6fff Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 20 Aug 2013 12:01:20 -0600 Subject: [PATCH 20/97] Add patch to adapt to flocq 2.2.0. --- why-2.33-flocq.patch | 136 +++++++++++++++++++++++++++++++++++++++++++ why.spec | 4 ++ 2 files changed, 140 insertions(+) create mode 100644 why-2.33-flocq.patch diff --git a/why-2.33-flocq.patch b/why-2.33-flocq.patch new file mode 100644 index 0000000..b2df5bb --- /dev/null +++ b/why-2.33-flocq.patch @@ -0,0 +1,136 @@ +--- ./lib/coq/WhyFloatsStrict.v.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./lib/coq/WhyFloatsStrict.v 2013-08-20 11:37:21.410590178 -0600 +@@ -155,121 +155,71 @@ repeat split. + exact H2. + Qed. + +-Axiom Bplus_correct : (* the statement from Flocq 1.4 is not strong enough; +- the axiom can be removed once the library is converted to Flocq 2.0 *) +- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) +- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), +- is_finite prec emax x = true -> +- is_finite prec emax y = true -> +- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) +- (B2R prec emax x + B2R prec emax y))) (bpow radix2 emax) +- then +- B2R prec emax (Bplus prec emax Hprec Hmax m x y) = +- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x + B2R prec emax y) /\ +- is_finite prec emax (Bplus prec emax Hprec Hmax m x y) = true +- else +- B2FF prec emax (Bplus prec emax Hprec Hmax m x y) = +- binary_overflow prec emax m (Bsign prec emax x) /\ +- Bsign prec emax x = Bsign prec emax y. +- + Lemma add_single_specification : + forall m (x y : single), + no_overflow_single m (single_value x + single_value y) -> + exists z, add_single_post m x y z. + Proof. + intros m x y Br. +-refine (_ (Bplus_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) ++refine (_ (Bplus_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y) + (single_finite x) (single_finite y))). + rewrite Rlt_bool_true. + 2: now apply no_overflow_single_bounded. + fold b32_plus. + intros (H1, H2). +-refine (ex_intro _ (mk_single (add_single m x y) H2) _). ++destruct H2. ++refine (ex_intro _ (mk_single (add_single m x y) H) _). + repeat split. + exact H1. + Qed. + +-Axiom Bmult_correct : (* the statement from Flocq 1.4 is not strong enough; +- the axiom can be removed once the library is converted to Flocq 2.0 *) +- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) +- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), +- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) +- (B2R prec emax x * B2R prec emax y))) (bpow radix2 emax) +- then +- B2R prec emax (Bmult prec emax Hprec Hmax m x y) = +- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x * B2R prec emax y) /\ +- is_finite prec emax (Bmult prec emax Hprec Hmax m x y) = andb (is_finite prec emax x) (is_finite prec emax y) +- else +- B2FF prec emax (Bmult prec emax Hprec Hmax m x y) = +- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). +- + Lemma mul_single_specification : + forall m (x y : single), + no_overflow_single m (single_value x * single_value y) -> + exists z, mul_single_post m x y z. + Proof. + intros m x y Br. +-refine (_ (Bmult_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y))). ++refine (_ (Bmult_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y))). + rewrite Rlt_bool_true. + 2: now apply no_overflow_single_bounded. + fold b32_mult. + intros (H1, H2). + rewrite (single_finite x), (single_finite y) in H2. +-refine (ex_intro _ (mk_single (mul_single m x y) H2) _). ++destruct H2. ++refine (ex_intro _ (mk_single (mul_single m x y) H) _). + repeat split. + exact H1. + Qed. + +-Axiom Bdiv_correct : (* the statement from Flocq 1.4 is not strong enough; +- the axiom can be removed once the library is converted to Flocq 2.0 *) +- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) +- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), +- B2R prec emax y <> 0%R -> +- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) +- (B2R prec emax x / B2R prec emax y))) (bpow radix2 emax) +- then +- B2R prec emax (Bdiv prec emax Hprec Hmax m x y) = +- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x / B2R prec emax y) /\ +- is_finite prec emax (Bdiv prec emax Hprec Hmax m x y) = is_finite prec emax x +- else +- B2FF prec emax (Bdiv prec emax Hprec Hmax m x y) = +- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). +- + Lemma div_single_specification : + forall m (x y : single), single_value y <> R0 -> + no_overflow_single m (single_value x / single_value y) -> + exists z, div_single_post m x y z. + Proof. + intros m x y Zy Br. +-refine (_ (Bdiv_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) Zy)). ++refine (_ (Bdiv_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y) Zy)). + rewrite Rlt_bool_true. + 2: now apply no_overflow_single_bounded. + fold b32_div. + intros (H1, H2). + rewrite (single_finite x) in H2. +-refine (ex_intro _ (mk_single (div_single m x y) H2) _). ++destruct H2. ++refine (ex_intro _ (mk_single (div_single m x y) H) _). + repeat split. + exact H1. + Qed. + +-Axiom Bsqrt_correct : (* the statement from Flocq 1.4 is not strong enough; +- the axiom can be removed once the library is converted to Flocq 2.0 *) +- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) +- (m : Fappli_IEEE.mode) (x : binary_float prec emax), +- B2R prec emax (Bsqrt prec emax Hprec Hmax m x) = +- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (sqrt (B2R prec emax x)) /\ +- is_finite prec emax (Bsqrt prec emax Hprec Hmax m x) = match x with B754_zero _ => true | B754_finite false _ _ _ => true | _ => false end. +- + Lemma sqrt_single_specification : + forall m (x : single), Rle 0 (single_value x) -> + exists z, sqrt_single_post m x z. + Proof. + intros m x Zx. +-refine (_ (Bsqrt_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x))). ++refine (_ (Bsqrt_correct 24 128 (refl_equal Lt) (refl_equal Lt) unop_nan_pl32 (rnd_of_mode m) (single_float x))). + fold b32_sqrt. + intros (H1, H2). + assert (is_finite 24 128 (b32_sqrt (rnd_of_mode m) (single_float x)) = true). +-rewrite H2. ++destruct H2. ++rewrite H. + revert Zx. + clear. + case x ; simpl. diff --git a/why.spec b/why.spec index 9f1df07..f5a3676 100644 --- a/why.spec +++ b/why.spec @@ -58,6 +58,9 @@ Patch1: %{name}-2.33-Makefile.in.patch # Sent upstream 14 May 2013. Patch2: %{name}-2.33-hashtbl.patch +# Adapt to flocq 2.2.0. Result of a conversation with upstream on 20 Aug 2013. +Patch3: %{name}-2.33-flocq.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils @@ -218,6 +221,7 @@ based on Why, including various automated and interactive provers. %patch0 %patch1 %patch2 +%patch3 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ From b6131f67e6123572e9ed13757336e2d62a59d58e Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 17 Sep 2013 22:09:23 -0600 Subject: [PATCH 21/97] Rebuild for OCaml 4.01.0. Enable debuginfo. Add -or patch to fix warnings, since warnings are errors. --- why-2.33-or.patch | 184 ++++++++++++++++++++++++++++++++++++++++++++++ why.spec | 26 ++++--- 2 files changed, 198 insertions(+), 12 deletions(-) create mode 100644 why-2.33-or.patch diff --git a/why-2.33-or.patch b/why-2.33-or.patch new file mode 100644 index 0000000..ae4afb4 --- /dev/null +++ b/why-2.33-or.patch @@ -0,0 +1,184 @@ +--- ./jc/jc_typing.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./jc/jc_typing.ml 2013-09-17 20:52:56.359746353 -0600 +@@ -2553,7 +2553,7 @@ let field st root ((rep,abs), t, id, bit + jc_field_info_type = ty; + jc_field_info_hroot = root; + jc_field_info_struct = st; +- jc_field_info_rep = rep or (not (is_pointer_type ty)); ++ jc_field_info_rep = rep || (not (is_pointer_type ty)); + jc_field_info_abstract = abs; + jc_field_info_bitsize = bitsize; + } in +--- ./jc/output.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./jc/output.ml 2013-09-17 20:48:00.511361646 -0600 +@@ -825,12 +825,12 @@ let rec fprintf_type ~need_colon anon fo + match t with + | Prod_type(id,t1,t2) -> + if !why3syntax then +- let id = if id="" or anon then "_anonymous" else id in ++ let id = if id="" || anon then "_anonymous" else id in + fprintf form "@[(%s:%a)@ %a@]" (why3ident id) + (fprintf_type ~need_colon:false anon) t1 + (fprintf_type ~need_colon anon) t2 + else +- if id="" or anon then ++ if id="" || anon then + fprintf form "@[%a ->@ %a@]" + (fprintf_type ~need_colon:false anon) t1 + (fprintf_type ~need_colon anon) t2 +--- ./intf/pprinter.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./intf/pprinter.ml 2013-09-17 20:55:39.024735111 -0600 +@@ -67,7 +67,7 @@ let print_loc = function + ("file \""^ff^"\", line "^l^", characters "^s^" - "^e) + + let is_cfile f = +- Filename.check_suffix f ".c" or Filename.check_suffix f ".h" ++ Filename.check_suffix f ".c" || Filename.check_suffix f ".h" + (* otherwise it's .why *) + + let read_file = function +--- ./intf/colors.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./intf/colors.ml 2013-09-17 20:54:20.591014499 -0600 +@@ -96,7 +96,7 @@ let get_bc_predicate () = + get_bc "lpredicate" + + let color_exists ty = +- (Hashtbl.mem fcolors ty) or (Hashtbl.mem bcolors ty) ++ (Hashtbl.mem fcolors ty) || (Hashtbl.mem bcolors ty) + + let get_all_colors () = + List.map +--- ./intf/stat.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./intf/stat.ml 2013-09-17 20:57:01.083164075 -0600 +@@ -379,8 +379,8 @@ let expand_row (view:GTree.view) path be + *) + let try_proof oblig = + (Cache.hard_proof ()) +- or not (Cache.is_enabled ()) +- or (Cache.is_enabled () && not (in_cache (Cache.clean oblig))) ++ || not (Cache.is_enabled ()) ++ || (Cache.is_enabled () && not (in_cache (Cache.clean oblig))) + + + (* +@@ -391,7 +391,7 @@ let run_prover_child p (_view:GTree.view + let column_p = p.Model.pr_icon in + let column_i = p.Model.pr_image in + let (_, _, _, oblig, seq) = o in +- if bench or (try_proof seq) then ++ if bench || (try_proof seq) then + try + let row = + try Hashtbl.find Model.orows oblig +@@ -439,7 +439,7 @@ let run_prover_child p (_view:GTree.view + model#set ~row ~column:p.Model.pr_result result; + model#set ~row ~column:Model.result + (max result (model#get ~row ~column:Model.result)); +- if alone or (Tools.live_update ())then begin ++ if alone || (Tools.live_update ())then begin + build_statistics model (model#get ~row ~column:Model.parent) + end; + result +@@ -558,7 +558,7 @@ let main () = + (let old_w = ref 0 + and old_h = ref 0 in + fun {Gtk.width=w;Gtk.height=h} -> +- if !old_w <> w or !old_h <> h then begin ++ if !old_w <> w || !old_h <> h then begin + old_h := h; + old_w := w; + Colors.window_height := h; +--- ./src/main.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./src/main.ml 2013-09-17 19:49:18.233726051 -0600 +@@ -726,7 +726,7 @@ let main () = + if Options.delete_old_vcs then delete_old_vcs files; + iter_with_last deal_file files; + if type_only then exit 0; +- if (pruning) or (Options.pruning_hyp_v != -1) then ++ if (pruning) || (Options.pruning_hyp_v != -1) then + begin + let q = declarationQueue in + encode q +--- ./src/hypotheses_filtering.ml.orig 2013-04-20 00:34:04.000000000 -0600 ++++ ./src/hypotheses_filtering.ml 2013-09-17 18:13:29.412330314 -0600 +@@ -862,7 +862,7 @@ PdlSet + module PdlSet = Set.Make(struct type t = vertexLabel + let compare = compare end) + let abstr_mem_of el pdl_set = +- PdlSet.mem { l = el.l; pol = Pos } pdl_set or ++ PdlSet.mem { l = el.l; pol = Pos } pdl_set || + PdlSet.mem { l = el.l; pol = Neg } pdl_set + + let is_positive el = +@@ -874,10 +874,10 @@ let mem_of el pdl_set = + (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) + + let mem_of_or_pos el pdl_set = +- (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) or el.pol == Pos ++ (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) || el.pol == Pos + + let mem_of_or_neg el pdl_set = +- (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) or el.pol == Neg ++ (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) || el.pol == Neg + + let abstr_subset_of_pdl set1 set2 = + if polarized_preds then +@@ -1099,11 +1099,11 @@ let get_suffixed_ident i1 i2 = + (* in (remove_percents s) *) + + let is_comparison id = +- (is_int_comparison id or is_real_comparison id or is_comparison id) ++ (is_int_comparison id || is_real_comparison id || is_comparison id) + + let comparison_to_consider id = + use_comparison_as_criteria_for_graph_construction && ( +- ((not comparison_eqOnly) && (is_int_comparison id or is_real_comparison id)) ++ ((not comparison_eqOnly) && (is_int_comparison id || is_real_comparison id)) + || (id == t_eq || id == t_neq || id == t_eq_int || id == t_neq_int || id == t_eq_real || id == t_neq_real ) + ) + +@@ -2121,7 +2121,7 @@ let filter_acc_variables l concl_rep sel + display_str "vars" vars; + display_str "concl_rep" concl_rep; + end; +- if (!variablesMaximumDepth< !vb) or condition then ++ if (!variablesMaximumDepth< !vb) || condition then + begin + if debug then + begin +@@ -2142,7 +2142,7 @@ let filter_acc_variables l concl_rep sel + display_symb_of_pdl_set pred_symb; + end; + +- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p pred_symb) then ++ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p pred_symb) then + begin + if debug then + begin +@@ -2182,7 +2182,7 @@ let managesContext relevantPreds decl = + let preds_of_p = get_preds_of p use_comparison_as_criteria_for_hypothesis_filtering in + + +- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p relevantPreds) then ++ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p relevantPreds) then + begin + if debug then + begin +@@ -2206,7 +2206,7 @@ let managesContext relevantPreds decl = + + | (p_cnf, Dpredicate_def (loc, ident, def)) :: l -> + let preds_of_p_cnf = get_preds_of p_cnf use_comparison_as_criteria_for_hypothesis_filtering in +- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then ++ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then + begin + (* On garde tout le predicat *) + if debug then +@@ -2240,7 +2240,7 @@ let managesContext relevantPreds decl = + + | (p_cnf, Daxiom (loc, ident, ps)) :: l -> + let preds_of_p_cnf = get_preds_of p_cnf use_comparison_as_criteria_for_hypothesis_filtering in +- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then ++ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then + begin + (* On garde tout l'axiome en forme originale *) + if debug then diff --git a/why.spec b/why.spec index f5a3676..9ba9c80 100644 --- a/why.spec +++ b/why.spec @@ -15,12 +15,9 @@ # What kind of ocaml build to do %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -# Don't create debuginfo; it's not particularly useful for OCaml programs. -%global debug_package %{nil} - Name: why Version: 2.33 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -61,6 +58,9 @@ Patch2: %{name}-2.33-hashtbl.patch # Adapt to flocq 2.2.0. Result of a conversation with upstream on 20 Aug 2013. Patch3: %{name}-2.33-flocq.patch +# Change from the obsolete form of the "or" operator to the new form (||). +Patch4: %{name}-2.33-or.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils @@ -222,6 +222,7 @@ based on Why, including various automated and interactive provers. %patch1 %patch2 %patch3 +%patch4 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ @@ -266,6 +267,10 @@ sed -e "s|-I +apron|-I +apron -I +gmp|" \ # Allow use of the fixed frama-c Fluorine release sed -i 's/Fluorine-20130401/Fluorine-20130601/' configure +# Enable debuginfo +sed -i 's|@STRIP@|/usr/bin/true|;s/-w Z/-g &/' Makefile.in +sed -i 's/ocamlopt/& -g/;s/ocamlc/& -g/' atp/Makefile + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -292,14 +297,6 @@ sed -e 's/pvs/pvs-sbcl/' -i configure %endif make %{opt_option} -# Strip binaries (the Makefile misses some of them) -strip bin/why-cpulimit -strip frama-c-plugin/Jessie.cmxs -%if %opt -strip bin/rv_merge.opt bin/simplify2why.opt bin/tool-stat.opt \ - bin/why2html.opt bin/why-dp.opt bin/why-obfuscator.opt bin/why-stat.opt -%endif - %install # Avoid a bug in PVS batch mode when using emacs make install DESTDIR=%{buildroot} %{opt_option} PVSLIB=%{_libdir}/pvs/lib \ @@ -442,6 +439,11 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Tue Sep 17 2013 Jerry James - 2.33-5 +- Rebuild for OCaml 4.01.0 +- Enable debuginfo +- Add -or patch to fix warnings, since warnings are errors + * Sat Jul 27 2013 Ville Skyttä - 2.33-4 - Install docs to %%{_pkgdocdir} where available. From 03ba744ac579e6c866fceedaa7f4842e0f9b8ca9 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 26 Feb 2014 10:47:08 -0700 Subject: [PATCH 22/97] Rebuild for ocamlgraph 1.8.4. Update desktop files. Add AppData files for gwhy and jessie. --- gwhy.appdata.xml | 20 ++++++++++++++++++++ gwhy.desktop | 3 +-- jessie.appdata.xml | 26 ++++++++++++++++++++++++++ jessie.desktop | 3 +-- why.spec | 15 ++++++++++++++- 5 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 gwhy.appdata.xml create mode 100644 jessie.appdata.xml diff --git a/gwhy.appdata.xml b/gwhy.appdata.xml new file mode 100644 index 0000000..f9126b8 --- /dev/null +++ b/gwhy.appdata.xml @@ -0,0 +1,20 @@ + + + gwhy.desktop + CC0 + +

+ Gwhy is a graphical user interface for the Why software coordination + platform. It assists in the coordination of dispatching assertions that + need to be proven to different theorem provers by providing an interface to + do this and also supports inspection of why input files. +

+
+ + http://why.lri.fr/manual/manual001.png + + http://why.lri.fr/ + +
diff --git a/gwhy.desktop b/gwhy.desktop index 27f853a..0271742 100644 --- a/gwhy.desktop +++ b/gwhy.desktop @@ -1,8 +1,7 @@ [Desktop Entry] -Encoding=UTF-8 Name=gwhy Comment=Examine and develop Why .why files Exec=gwhy Icon=ICON-LOCATION-BASE/gwhy-icon.png Type=Application -Categories=Development; \ No newline at end of file +Categories=Development; diff --git a/jessie.appdata.xml b/jessie.appdata.xml new file mode 100644 index 0000000..fc64aad --- /dev/null +++ b/jessie.appdata.xml @@ -0,0 +1,26 @@ + + + jessie.desktop + CC0 + +

+ Jessie is an interface between why and Frama-C. +

+

+ Why is a software verification platform that applies formal proving tools to + annotated programs. The Jessie plugin provide the ability to analyze C + programs by invoking Frama-C. +

+
+ + http://krakatoa.lri.fr/jessie/max_why3ide.png + http://krakatoa.lri.fr/jessie/max_ptr_why3ide.png + http://krakatoa.lri.fr/jessie/binary_search_raw.png + http://krakatoa.lri.fr/jessie/binary_search_ovfl.png + http://krakatoa.lri.fr/jessie/binary_search_behav.png + + http://krakatoa.lri.fr/ + +
diff --git a/jessie.desktop b/jessie.desktop index 239f37a..f01c1d9 100644 --- a/jessie.desktop +++ b/jessie.desktop @@ -1,8 +1,7 @@ [Desktop Entry] -Encoding=UTF-8 Name=jessie Comment=Verify C program using Jessie plug-in -Exec=frama-c -jessie %f +Exec=frama-c -jessie %F Icon=ICON-LOCATION-BASE/gwhy-icon.png Type=Application Categories=Development; diff --git a/why.spec b/why.spec index 9ba9c80..59b1814 100644 --- a/why.spec +++ b/why.spec @@ -17,7 +17,7 @@ Name: why Version: 2.33 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -36,6 +36,8 @@ Source9: jessie.desktop Source10: div.pvs Source11: rem.pvs Source12: patch_jessie_pvs +Source13: gwhy.appdata.xml +Source14: jessie.appdata.xml # The gwhy execution shell script is not particularly informative # about when bad parameters are passed to it - this patch fixes that. @@ -323,6 +325,10 @@ sed -e 's|ICON-LOCATION-BASE|%{why_data_dir}|' %{SOURCE9} > jessie.desktop desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications jessie.desktop +# Install AppData files +mkdir -p %{buildroot}%{_datadir}/appdata +install -pm 644 %{SOURCE13} %{SOURCE14} %{buildroot}%{_datadir}/appdata + %if %{has_pvs} # Get rid of a BUILDROOT reference in a log file (fails QA_CHECK_RPATHS) sed -i "s|%{buildroot}||" %{buildroot}%{_libdir}/pvs/lib/why/top.out @@ -401,12 +407,14 @@ diff -u min.why min_why.why.result # Show differences from correct result. %{_bindir}/gwhy %{_bindir}/gwhy-bin %{why_data_dir}/ +%{_datadir}/appdata/gwhy.appdata.xml %{_datadir}/applications/gwhy.desktop %files jessie %{_bindir}/jessie %{_libdir}/jessie/ %{_libdir}/frama-c/plugins/Jessie.* +%{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop %if %{has_coq} @@ -439,6 +447,11 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Wed Feb 26 2014 Jerry James - 2.33-6 +- Rebuild for ocamlgraph 1.8.4 +- Update desktop files +- Add AppData files for gwhy and jessie + * Tue Sep 17 2013 Jerry James - 2.33-5 - Rebuild for OCaml 4.01.0 - Enable debuginfo From 5665306fccb04900cd649e252d1704896a8e003d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 18 Mar 2014 13:21:31 -0600 Subject: [PATCH 23/97] New upstream release. Drop upstreamed -hashtbl, -flocq, and -or patches. Add ocaml-findlib BR. --- .gitignore | 2 +- sources | 4 +- ...ile.in.patch => why-2.34-Makefile.in.patch | 10 +-- why.spec | 74 ++++++------------- 4 files changed, 32 insertions(+), 58 deletions(-) rename why-2.33-Makefile.in.patch => why-2.34-Makefile.in.patch (76%) diff --git a/.gitignore b/.gitignore index 5ad01f7..1e341c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ /krakatoa.pdf -/why-2.33.tar.gz +/why-2.34.tar.gz diff --git a/sources b/sources index 17fa550..76c4750 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -c32c15249cc4d4f8b41638f551d9cc3f krakatoa.pdf -25ad0493e0cd112f3fe5858aa605344a why-2.33.tar.gz +cc7a2e360acf8569a2eb878f51bfc8ff krakatoa.pdf +e622157c9b5cfc4e454a2a98bcc5828c why-2.34.tar.gz diff --git a/why-2.33-Makefile.in.patch b/why-2.34-Makefile.in.patch similarity index 76% rename from why-2.33-Makefile.in.patch rename to why-2.34-Makefile.in.patch index 2ea8cdb..931bc76 100644 --- a/why-2.33-Makefile.in.patch +++ b/why-2.34-Makefile.in.patch @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2013-04-20 00:34:04.000000000 -0600 -+++ Makefile.in 2013-05-10 09:16:51.336053499 -0600 -@@ -804,17 +804,9 @@ +--- Makefile.in.orig 2014-03-17 16:01:46.000000000 -0600 ++++ Makefile.in 2014-03-17 20:00:00.000000000 -0600 +@@ -805,17 +805,9 @@ mkdir -p $(LIBDIR)/why/coq7 cp -f $(VO7) $(LIBDIR)/why/coq7 install-coq-v8 install-coq-v8.1: @@ -16,8 +16,8 @@ - mkdir -p $(LIBDIR)/why/coq - cp -f $(VO8) $(LIBDIR)/why/coq + mkdir -p $(COQLIB)/user-contrib/Why -+ cp -f $(V8FILES) $(COQLIB)/user-contrib/Why -+ cp -f $(VO8) $(COQLIB)/user-contrib/Why ++ cp -pf $(V8FILES) $(COQLIB)/user-contrib/Why ++ cp -pf $(VO8) $(COQLIB)/user-contrib/Why install-pvs-no: install-pvs-yes: $(PVSFILES) diff --git a/why.spec b/why.spec index 59b1814..71cb570 100644 --- a/why.spec +++ b/why.spec @@ -16,8 +16,8 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: why -Version: 2.33 -Release: 6%{?dist} +Version: 2.34 +Release: 1%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -51,17 +51,7 @@ Patch0: gwhy-2.33.patch # It also makes a fix necessary to correctly build the bytecode only # version of why by building the make_float_model tool correctly in # this case. -Patch1: %{name}-2.33-Makefile.in.patch - -# Fix an incompletely converted hash table interface. -# Sent upstream 14 May 2013. -Patch2: %{name}-2.33-hashtbl.patch - -# Adapt to flocq 2.2.0. Result of a conversation with upstream on 20 Aug 2013. -Patch3: %{name}-2.33-flocq.patch - -# Change from the obsolete form of the "or" operator to the new form (||). -Patch4: %{name}-2.33-or.patch +Patch1: %{name}-2.34-Makefile.in.patch BuildRequires: auto-destdir BuildRequires: cvc3 @@ -73,6 +63,7 @@ BuildRequires: gtk2-devel BuildRequires: ocaml BuildRequires: ocaml-apron-devel BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-findlib BuildRequires: ocaml-lablgtk-devel BuildRequires: ocaml-mlgmpidl-devel BuildRequires: ocaml-ocamldoc @@ -88,9 +79,8 @@ BuildRequires: pvs # Only build on arches that support ocaml ExclusiveArch: %{ocaml_arches} -# Filter out names that should not be exposed externally +# Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Logic|Logic_decl|Misc|Ptree|Types)\\\) -%global __provides_exclude ocaml\\\((Lexer|Lib|Output|Report|Xml)\\\) %description Why is a software verification platform that applies formal proving @@ -222,16 +212,11 @@ based on Why, including various automated and interactive provers. %setup -q %patch0 %patch1 -%patch2 -%patch3 -%patch4 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ -# Add missing DESTDIRs and harden the build for network-using binaries -sed -e 's|$(COQLIB)/user-contrib/Why|$(DESTDIR)$(COQLIB)/user-contrib/Why|' \ - -e 's|$(PVSLIB)/why|$(DESTDIR)$(PVSLIB)/why|' \ - -e '\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ +# Harden the build for network-using binaries +sed -e '\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ -e '/gtkThread\.cmx/s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ -i Makefile.in @@ -261,17 +246,18 @@ for f in examples-c/tutorial/average.c examples-c/tutorial/purse.c \ mv -f $f.new $f done -# APRON support: add a missing include and a missing rpath -sed -e "s|-I +apron|-I +apron -I +gmp|" \ - -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ - -i configure - -# Allow use of the fixed frama-c Fluorine release -sed -i 's/Fluorine-20130401/Fluorine-20130601/' configure +# APRON support: add a missing rpath +sed -i "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" configure # Enable debuginfo -sed -i 's|@STRIP@|/usr/bin/true|;s/-w Z/-g &/' Makefile.in -sed -i 's/ocamlopt/& -g/;s/ocamlc/& -g/' atp/Makefile +sed -i 's,@STRIP@,/usr/bin/true,;s,-dtypes [^-],-g &,' Makefile.in +sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile + +# Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: +sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ + -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ + -i tools/dpConfig.ml +sed -i 's/pvs/pvs-sbcl/' configure %build %if ! %{opt} @@ -280,18 +266,6 @@ sed -i 's/ocamlopt/& -g/;s/ocamlc/& -g/' atp/Makefile %global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt %endif -# Update acceptable version numbers of external programs -# Also, command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -e 's/"0\.16\.0"/&; "0.17.1"/' \ - -e 's/"0\.94"/&; "0.95.1"/' \ - -e 's/"1\.0\.24"/&; "1.0.38"/' \ - -e 's/"8\.4"/&; "8.4pl2"/' \ - -e 's/"4\.1"/&; "6.0"/' \ - -e 's/command = "pvs"/command = "pvs-sbcl"/' \ - -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ - -i tools/dpConfig.ml -sed -e 's/pvs/pvs-sbcl/' -i configure - %if %{has_coq} %configure --enable-apron --enable-verbosemake %else @@ -301,8 +275,8 @@ make %{opt_option} %install # Avoid a bug in PVS batch mode when using emacs -make install DESTDIR=%{buildroot} %{opt_option} PVSLIB=%{_libdir}/pvs/lib \ - PVSEMACS=xemacs +make install DESTDIR=%{buildroot} %{opt_option} \ + PVSLIB=%{buildroot}%{_libdir}/pvs/lib PVSEMACS=xemacs # Fix a small bug in their Makefile: if no Coq, NO .v files should be installed %if ! %{has_coq} @@ -447,6 +421,11 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Tue Mar 18 2014 Jerry James - 2.34-1 +- New upstream release +- Drop upstreamed -hashtbl, -flocq, and -or patches +- Add ocaml-findlib BR + * Wed Feb 26 2014 Jerry James - 2.33-6 - Rebuild for ocamlgraph 1.8.4 - Update desktop files @@ -615,8 +594,3 @@ diff -u min.why min_why.why.result # Show differences from correct result. of cpulimit -> why-cpulimit. * Wed Jul 23 2008 Alan Dunn 2.13-1 - Initial Fedora RPM version. - -# TODO: -# If file $HOME/.gwhyrc does not exist, autorun "why-config". -# Finish packaging/integrating "APRON" (for Inference of annotations) - From cc2ede52758f0d16e63d95336212955909ceb427 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 24 Mar 2014 18:47:16 -0600 Subject: [PATCH 24/97] Remove dropped patches. Add icons. Fix the desktop icon entries. --- .gitignore | 1 + gwhy.desktop | 2 +- jessie.desktop | 2 +- sources | 1 + why-2.33-flocq.patch | 136 ------------------------------ why-2.33-hashtbl.patch | 51 ------------ why-2.33-or.patch | 184 ----------------------------------------- why.spec | 45 ++++++++-- 8 files changed, 42 insertions(+), 380 deletions(-) delete mode 100644 why-2.33-flocq.patch delete mode 100644 why-2.33-hashtbl.patch delete mode 100644 why-2.33-or.patch diff --git a/.gitignore b/.gitignore index 1e341c4..fc049f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /krakatoa.pdf /why-2.34.tar.gz +/why-icons.tar.xz diff --git a/gwhy.desktop b/gwhy.desktop index 0271742..8940b49 100644 --- a/gwhy.desktop +++ b/gwhy.desktop @@ -2,6 +2,6 @@ Name=gwhy Comment=Examine and develop Why .why files Exec=gwhy -Icon=ICON-LOCATION-BASE/gwhy-icon.png +Icon=why Type=Application Categories=Development; diff --git a/jessie.desktop b/jessie.desktop index f01c1d9..099b3ad 100644 --- a/jessie.desktop +++ b/jessie.desktop @@ -2,6 +2,6 @@ Name=jessie Comment=Verify C program using Jessie plug-in Exec=frama-c -jessie %F -Icon=ICON-LOCATION-BASE/gwhy-icon.png +Icon=why Type=Application Categories=Development; diff --git a/sources b/sources index 76c4750..a95f254 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ cc7a2e360acf8569a2eb878f51bfc8ff krakatoa.pdf e622157c9b5cfc4e454a2a98bcc5828c why-2.34.tar.gz +ed5648bbfb5e74fdfb814cdd725b191e why-icons.tar.xz diff --git a/why-2.33-flocq.patch b/why-2.33-flocq.patch deleted file mode 100644 index b2df5bb..0000000 --- a/why-2.33-flocq.patch +++ /dev/null @@ -1,136 +0,0 @@ ---- ./lib/coq/WhyFloatsStrict.v.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./lib/coq/WhyFloatsStrict.v 2013-08-20 11:37:21.410590178 -0600 -@@ -155,121 +155,71 @@ repeat split. - exact H2. - Qed. - --Axiom Bplus_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- is_finite prec emax x = true -> -- is_finite prec emax y = true -> -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x + B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bplus prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x + B2R prec emax y) /\ -- is_finite prec emax (Bplus prec emax Hprec Hmax m x y) = true -- else -- B2FF prec emax (Bplus prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (Bsign prec emax x) /\ -- Bsign prec emax x = Bsign prec emax y. -- - Lemma add_single_specification : - forall m (x y : single), - no_overflow_single m (single_value x + single_value y) -> - exists z, add_single_post m x y z. - Proof. - intros m x y Br. --refine (_ (Bplus_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) -+refine (_ (Bplus_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y) - (single_finite x) (single_finite y))). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. - fold b32_plus. - intros (H1, H2). --refine (ex_intro _ (mk_single (add_single m x y) H2) _). -+destruct H2. -+refine (ex_intro _ (mk_single (add_single m x y) H) _). - repeat split. - exact H1. - Qed. - --Axiom Bmult_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x * B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bmult prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x * B2R prec emax y) /\ -- is_finite prec emax (Bmult prec emax Hprec Hmax m x y) = andb (is_finite prec emax x) (is_finite prec emax y) -- else -- B2FF prec emax (Bmult prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). -- - Lemma mul_single_specification : - forall m (x y : single), - no_overflow_single m (single_value x * single_value y) -> - exists z, mul_single_post m x y z. - Proof. - intros m x y Br. --refine (_ (Bmult_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y))). -+refine (_ (Bmult_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y))). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. - fold b32_mult. - intros (H1, H2). - rewrite (single_finite x), (single_finite y) in H2. --refine (ex_intro _ (mk_single (mul_single m x y) H2) _). -+destruct H2. -+refine (ex_intro _ (mk_single (mul_single m x y) H) _). - repeat split. - exact H1. - Qed. - --Axiom Bdiv_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x y : binary_float prec emax), -- B2R prec emax y <> 0%R -> -- if Rlt_bool (Rabs (round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) -- (B2R prec emax x / B2R prec emax y))) (bpow radix2 emax) -- then -- B2R prec emax (Bdiv prec emax Hprec Hmax m x y) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (B2R prec emax x / B2R prec emax y) /\ -- is_finite prec emax (Bdiv prec emax Hprec Hmax m x y) = is_finite prec emax x -- else -- B2FF prec emax (Bdiv prec emax Hprec Hmax m x y) = -- binary_overflow prec emax m (xorb (Bsign prec emax x) (Bsign prec emax y)). -- - Lemma div_single_specification : - forall m (x y : single), single_value y <> R0 -> - no_overflow_single m (single_value x / single_value y) -> - exists z, div_single_post m x y z. - Proof. - intros m x y Zy Br. --refine (_ (Bdiv_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x) (single_float y) Zy)). -+refine (_ (Bdiv_correct 24 128 (refl_equal Lt) (refl_equal Lt) binop_nan_pl32 (rnd_of_mode m) (single_float x) (single_float y) Zy)). - rewrite Rlt_bool_true. - 2: now apply no_overflow_single_bounded. - fold b32_div. - intros (H1, H2). - rewrite (single_finite x) in H2. --refine (ex_intro _ (mk_single (div_single m x y) H2) _). -+destruct H2. -+refine (ex_intro _ (mk_single (div_single m x y) H) _). - repeat split. - exact H1. - Qed. - --Axiom Bsqrt_correct : (* the statement from Flocq 1.4 is not strong enough; -- the axiom can be removed once the library is converted to Flocq 2.0 *) -- forall (prec emax : Z) (Hprec : (0 < prec)%Z) (Hmax : (prec < emax)%Z) -- (m : Fappli_IEEE.mode) (x : binary_float prec emax), -- B2R prec emax (Bsqrt prec emax Hprec Hmax m x) = -- round radix2 (FLT_exp (3 - emax - prec) prec) (round_mode m) (sqrt (B2R prec emax x)) /\ -- is_finite prec emax (Bsqrt prec emax Hprec Hmax m x) = match x with B754_zero _ => true | B754_finite false _ _ _ => true | _ => false end. -- - Lemma sqrt_single_specification : - forall m (x : single), Rle 0 (single_value x) -> - exists z, sqrt_single_post m x z. - Proof. - intros m x Zx. --refine (_ (Bsqrt_correct 24 128 (refl_equal Lt) (refl_equal Lt) (rnd_of_mode m) (single_float x))). -+refine (_ (Bsqrt_correct 24 128 (refl_equal Lt) (refl_equal Lt) unop_nan_pl32 (rnd_of_mode m) (single_float x))). - fold b32_sqrt. - intros (H1, H2). - assert (is_finite 24 128 (b32_sqrt (rnd_of_mode m) (single_float x)) = true). --rewrite H2. -+destruct H2. -+rewrite H. - revert Zx. - clear. - case x ; simpl. diff --git a/why-2.33-hashtbl.patch b/why-2.33-hashtbl.patch deleted file mode 100644 index 274c512..0000000 --- a/why-2.33-hashtbl.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- ./jc/jc_annot_inference.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./jc/jc_annot_inference.ml 2013-05-14 12:29:30.199407024 -0600 -@@ -84,7 +84,7 @@ let forget_var_in_assertion v a = - let unfolding_of_app app = - let f = app.jc_app_fun in - let _, term_or_assertion = -- try Hashtbl.find Jc_typing.logic_functions_table f.jc_logic_info_tag -+ try IntHashtblIter.find Jc_typing.logic_functions_table f.jc_logic_info_tag - with Not_found -> assert false - in - match term_or_assertion with -@@ -2528,7 +2528,7 @@ let collect_expr_targets e = - in - let els = call.jc_call_args in - let _,_,fs,_ = -- Hashtbl.find Jc_typing.functions_table fi.jc_fun_info_tag -+ IntHashtblIter.find Jc_typing.functions_table fi.jc_fun_info_tag - in - (* Collect preconditions of functions called. *) - let reqa = fs.jc_fun_requires in -@@ -3543,7 +3543,7 @@ and ai_call iaio abs curinvs vio e = - (* Compute abstract value at function call *) - let curinvs = List.fold_left (ai_expr iaio abs) curinvs args in - let _f, _pos, spec, _body = -- Hashtbl.find Jc_typing.functions_table f.jc_fun_info_tag -+ IntHashtblIter.find Jc_typing.functions_table f.jc_fun_info_tag - in - (* begin match body with None -> () | Some body -> *) - (* if Jc_options.interprocedural then *) -@@ -3732,9 +3732,9 @@ and ai_function mgr iaio targets funpre - - (* Add global variables as abstract variables in [env]. *) - let globvars = -- Hashtbl.fold (fun _tag (vi,_e) acc -> -- Vai.all_variables (new term_var vi) @ acc -- ) Jc_typing.variables_table [] -+ IntHashtblIter.fold (fun _tag (vi,_e) acc -> -+ Vai.all_variables (new term_var vi) @ acc -+ ) Jc_typing.variables_table [] - in - let env = Environment.add env (Array.of_list globvars) [||] in - -@@ -4164,7 +4164,7 @@ let rec record_ai_inter_annotations mgr - (fun fi -> - let fi, _, fs, slo = - try -- Hashtbl.find Jc_typing.functions_table fi.jc_fun_info_tag -+ IntHashtblIter.find Jc_typing.functions_table fi.jc_fun_info_tag - with Not_found -> assert false (* should never happen *) - in - match slo with diff --git a/why-2.33-or.patch b/why-2.33-or.patch deleted file mode 100644 index ae4afb4..0000000 --- a/why-2.33-or.patch +++ /dev/null @@ -1,184 +0,0 @@ ---- ./jc/jc_typing.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./jc/jc_typing.ml 2013-09-17 20:52:56.359746353 -0600 -@@ -2553,7 +2553,7 @@ let field st root ((rep,abs), t, id, bit - jc_field_info_type = ty; - jc_field_info_hroot = root; - jc_field_info_struct = st; -- jc_field_info_rep = rep or (not (is_pointer_type ty)); -+ jc_field_info_rep = rep || (not (is_pointer_type ty)); - jc_field_info_abstract = abs; - jc_field_info_bitsize = bitsize; - } in ---- ./jc/output.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./jc/output.ml 2013-09-17 20:48:00.511361646 -0600 -@@ -825,12 +825,12 @@ let rec fprintf_type ~need_colon anon fo - match t with - | Prod_type(id,t1,t2) -> - if !why3syntax then -- let id = if id="" or anon then "_anonymous" else id in -+ let id = if id="" || anon then "_anonymous" else id in - fprintf form "@[(%s:%a)@ %a@]" (why3ident id) - (fprintf_type ~need_colon:false anon) t1 - (fprintf_type ~need_colon anon) t2 - else -- if id="" or anon then -+ if id="" || anon then - fprintf form "@[%a ->@ %a@]" - (fprintf_type ~need_colon:false anon) t1 - (fprintf_type ~need_colon anon) t2 ---- ./intf/pprinter.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./intf/pprinter.ml 2013-09-17 20:55:39.024735111 -0600 -@@ -67,7 +67,7 @@ let print_loc = function - ("file \""^ff^"\", line "^l^", characters "^s^" - "^e) - - let is_cfile f = -- Filename.check_suffix f ".c" or Filename.check_suffix f ".h" -+ Filename.check_suffix f ".c" || Filename.check_suffix f ".h" - (* otherwise it's .why *) - - let read_file = function ---- ./intf/colors.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./intf/colors.ml 2013-09-17 20:54:20.591014499 -0600 -@@ -96,7 +96,7 @@ let get_bc_predicate () = - get_bc "lpredicate" - - let color_exists ty = -- (Hashtbl.mem fcolors ty) or (Hashtbl.mem bcolors ty) -+ (Hashtbl.mem fcolors ty) || (Hashtbl.mem bcolors ty) - - let get_all_colors () = - List.map ---- ./intf/stat.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./intf/stat.ml 2013-09-17 20:57:01.083164075 -0600 -@@ -379,8 +379,8 @@ let expand_row (view:GTree.view) path be - *) - let try_proof oblig = - (Cache.hard_proof ()) -- or not (Cache.is_enabled ()) -- or (Cache.is_enabled () && not (in_cache (Cache.clean oblig))) -+ || not (Cache.is_enabled ()) -+ || (Cache.is_enabled () && not (in_cache (Cache.clean oblig))) - - - (* -@@ -391,7 +391,7 @@ let run_prover_child p (_view:GTree.view - let column_p = p.Model.pr_icon in - let column_i = p.Model.pr_image in - let (_, _, _, oblig, seq) = o in -- if bench or (try_proof seq) then -+ if bench || (try_proof seq) then - try - let row = - try Hashtbl.find Model.orows oblig -@@ -439,7 +439,7 @@ let run_prover_child p (_view:GTree.view - model#set ~row ~column:p.Model.pr_result result; - model#set ~row ~column:Model.result - (max result (model#get ~row ~column:Model.result)); -- if alone or (Tools.live_update ())then begin -+ if alone || (Tools.live_update ())then begin - build_statistics model (model#get ~row ~column:Model.parent) - end; - result -@@ -558,7 +558,7 @@ let main () = - (let old_w = ref 0 - and old_h = ref 0 in - fun {Gtk.width=w;Gtk.height=h} -> -- if !old_w <> w or !old_h <> h then begin -+ if !old_w <> w || !old_h <> h then begin - old_h := h; - old_w := w; - Colors.window_height := h; ---- ./src/main.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./src/main.ml 2013-09-17 19:49:18.233726051 -0600 -@@ -726,7 +726,7 @@ let main () = - if Options.delete_old_vcs then delete_old_vcs files; - iter_with_last deal_file files; - if type_only then exit 0; -- if (pruning) or (Options.pruning_hyp_v != -1) then -+ if (pruning) || (Options.pruning_hyp_v != -1) then - begin - let q = declarationQueue in - encode q ---- ./src/hypotheses_filtering.ml.orig 2013-04-20 00:34:04.000000000 -0600 -+++ ./src/hypotheses_filtering.ml 2013-09-17 18:13:29.412330314 -0600 -@@ -862,7 +862,7 @@ PdlSet - module PdlSet = Set.Make(struct type t = vertexLabel - let compare = compare end) - let abstr_mem_of el pdl_set = -- PdlSet.mem { l = el.l; pol = Pos } pdl_set or -+ PdlSet.mem { l = el.l; pol = Pos } pdl_set || - PdlSet.mem { l = el.l; pol = Neg } pdl_set - - let is_positive el = -@@ -874,10 +874,10 @@ let mem_of el pdl_set = - (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) - - let mem_of_or_pos el pdl_set = -- (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) or el.pol == Pos -+ (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) || el.pol == Pos - - let mem_of_or_neg el pdl_set = -- (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) or el.pol == Neg -+ (PdlSet.mem { l = el.l; pol = el.pol } pdl_set ) || el.pol == Neg - - let abstr_subset_of_pdl set1 set2 = - if polarized_preds then -@@ -1099,11 +1099,11 @@ let get_suffixed_ident i1 i2 = - (* in (remove_percents s) *) - - let is_comparison id = -- (is_int_comparison id or is_real_comparison id or is_comparison id) -+ (is_int_comparison id || is_real_comparison id || is_comparison id) - - let comparison_to_consider id = - use_comparison_as_criteria_for_graph_construction && ( -- ((not comparison_eqOnly) && (is_int_comparison id or is_real_comparison id)) -+ ((not comparison_eqOnly) && (is_int_comparison id || is_real_comparison id)) - || (id == t_eq || id == t_neq || id == t_eq_int || id == t_neq_int || id == t_eq_real || id == t_neq_real ) - ) - -@@ -2121,7 +2121,7 @@ let filter_acc_variables l concl_rep sel - display_str "vars" vars; - display_str "concl_rep" concl_rep; - end; -- if (!variablesMaximumDepth< !vb) or condition then -+ if (!variablesMaximumDepth< !vb) || condition then - begin - if debug then - begin -@@ -2142,7 +2142,7 @@ let filter_acc_variables l concl_rep sel - display_symb_of_pdl_set pred_symb; - end; - -- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p pred_symb) then -+ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p pred_symb) then - begin - if debug then - begin -@@ -2182,7 +2182,7 @@ let managesContext relevantPreds decl = - let preds_of_p = get_preds_of p use_comparison_as_criteria_for_hypothesis_filtering in - - -- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p relevantPreds) then -+ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p relevantPreds) then - begin - if debug then - begin -@@ -2206,7 +2206,7 @@ let managesContext relevantPreds decl = - - | (p_cnf, Dpredicate_def (loc, ident, def)) :: l -> - let preds_of_p_cnf = get_preds_of p_cnf use_comparison_as_criteria_for_hypothesis_filtering in -- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then -+ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then - begin - (* On garde tout le predicat *) - if debug then -@@ -2240,7 +2240,7 @@ let managesContext relevantPreds decl = - - | (p_cnf, Daxiom (loc, ident, ps)) :: l -> - let preds_of_p_cnf = get_preds_of p_cnf use_comparison_as_criteria_for_hypothesis_filtering in -- if (!predicateMaximumDepth< !pb) or (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then -+ if (!predicateMaximumDepth< !pb) || (abstr_subset_of_pdl preds_of_p_cnf relevantPreds) then - begin - (* On garde tout l'axiome en forme originale *) - if debug then diff --git a/why.spec b/why.spec index 71cb570..e0d4822 100644 --- a/why.spec +++ b/why.spec @@ -17,7 +17,7 @@ Name: why Version: 2.34 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -38,6 +38,8 @@ Source11: rem.pvs Source12: patch_jessie_pvs Source13: gwhy.appdata.xml Source14: jessie.appdata.xml +# Created with gimp from official upstream icon +Source15: %{name}-icons.tar.xz # The gwhy execution shell script is not particularly informative # about when bad parameters are passed to it - this patch fixes that. @@ -76,6 +78,8 @@ BuildRequires: coq BuildRequires: pvs %endif +Requires: hicolor-icon-theme + # Only build on arches that support ocaml ExclusiveArch: %{ocaml_arches} @@ -210,6 +214,7 @@ based on Why, including various automated and interactive provers. %prep %setup -q +%setup -q -T -D -a 15 %patch0 %patch1 @@ -292,17 +297,17 @@ rm -fr %{buildroot}%{_libdir}/pvs %global why_data_dir %{_datadir}/why mkdir -p %{buildroot}%{why_data_dir} cp -p %{SOURCE5} %{buildroot}%{why_data_dir} -sed -e 's|ICON-LOCATION-BASE|%{why_data_dir}|' %{SOURCE4} > gwhy.desktop -desktop-file-install \ - --dir=%{buildroot}%{_datadir}/applications gwhy.desktop -sed -e 's|ICON-LOCATION-BASE|%{why_data_dir}|' %{SOURCE9} > jessie.desktop -desktop-file-install \ - --dir=%{buildroot}%{_datadir}/applications jessie.desktop +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE9} # Install AppData files mkdir -p %{buildroot}%{_datadir}/appdata install -pm 644 %{SOURCE13} %{SOURCE14} %{buildroot}%{_datadir}/appdata +# Install the icons +mkdir -p %{buildroot}%{_datadir}/icons +cp -a icons %{buildroot}%{_datadir}/icons/hicolor + %if %{has_pvs} # Get rid of a BUILDROOT reference in a log file (fails QA_CHECK_RPATHS) sed -i "s|%{buildroot}||" %{buildroot}%{_libdir}/pvs/lib/why/top.out @@ -362,10 +367,31 @@ rm -fr %{buildroot}%{_libdir}/why/emacs WHYLIB=lib %why --why --output min.why min.mlw diff -u min.why min_why.why.result # Show differences from correct result. +%post gwhy +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%post jessie +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%postun gwhy +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%postun jessie +update-desktop-database &> /dev/null || : +touch --no-create %{_datadir}/icons/hicolor &>/dev/null +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files %{_bindir}/* %{_libdir}/why/ %{_mandir}/man1/why.1* +%{_datadir}/icons/hicolor/*/apps/%{name}.png %{why_doc_dir}/ # This last example is really an example only for Coq - only .v files %exclude %{why_examples_dir}mlw/string-matching/ @@ -421,6 +447,11 @@ diff -u min.why min_why.why.result # Show differences from correct result. %changelog +* Mon Mar 24 2014 Jerry James - 2.34-2 +- Remove dropped patches +- Add icons +- Fix the desktop icon entries + * Tue Mar 18 2014 Jerry James - 2.34-1 - New upstream release - Drop upstreamed -hashtbl, -flocq, and -or patches From f8475527b40a5389f5babf62fc789f568168546c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 15 Apr 2014 12:57:30 +0100 Subject: [PATCH 25/97] Remove ocaml_arches macro (RHBZ#1087794). --- why.spec | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/why.spec b/why.spec index e0d4822..503e212 100644 --- a/why.spec +++ b/why.spec @@ -1,9 +1,5 @@ # Whether coq is available -%ifarch %{ocaml_arches} %global has_coq 1 -%else -%global has_coq 0 -%endif # Whether PVS is available %ifarch %{ix86} x86_64 ppc sparcv9 @@ -17,7 +13,7 @@ Name: why Version: 2.34 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -80,9 +76,6 @@ BuildRequires: pvs Requires: hicolor-icon-theme -# Only build on arches that support ocaml -ExclusiveArch: %{ocaml_arches} - # Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Logic|Logic_decl|Misc|Ptree|Types)\\\) @@ -447,6 +440,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Apr 15 2014 Richard W.M. Jones - 2.34-3 +- Remove ocaml_arches macro (RHBZ#1087794). + * Mon Mar 24 2014 Jerry James - 2.34-2 - Remove dropped patches - Add icons From eda916af251ae819e409becca3fc6f6f5da806d7 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 21 Apr 2014 16:35:40 -0600 Subject: [PATCH 26/97] Rebuild for ocamlgraph 1.8.5 and flocq 2.3.0. Drop has_coq macro, since coq is now universally available. Add -flocq23 patch to adapt to flocq 2.3.0. --- why-flocq23.patch | 11 +++++++++++ why.spec | 31 ++++++++++--------------------- 2 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 why-flocq23.patch diff --git a/why-flocq23.patch b/why-flocq23.patch new file mode 100644 index 0000000..b54d85a --- /dev/null +++ b/why-flocq23.patch @@ -0,0 +1,11 @@ +--- lib/coq/WhyFloats.v.orig 2014-03-17 16:01:46.000000000 -0600 ++++ lib/coq/WhyFloats.v 2014-04-21 15:39:55.680771647 -0600 +@@ -108,7 +108,7 @@ + generalize (Zeq_bool_eq _ _ H1). clear. + rewrite Fcalc_digits.Z_of_nat_S_digits2_Pnat. + intros H. +-apply (Fcalc_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). ++apply (Fcore_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). + revert H. + unfold FLT_exp. + generalize (Fcore_digits.Zdigits radix2 (Zpos m)). diff --git a/why.spec b/why.spec index 503e212..db10505 100644 --- a/why.spec +++ b/why.spec @@ -1,6 +1,3 @@ -# Whether coq is available -%global has_coq 1 - # Whether PVS is available %ifarch %{ix86} x86_64 ppc sparcv9 %global has_pvs 1 @@ -13,7 +10,7 @@ Name: why Version: 2.34 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform Group: Applications/Engineering @@ -51,6 +48,9 @@ Patch0: gwhy-2.33.patch # this case. Patch1: %{name}-2.34-Makefile.in.patch +# Adapt to flocq 2.3.0 +Patch2: %{name}-flocq23.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils @@ -67,9 +67,7 @@ BuildRequires: ocaml-mlgmpidl-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel BuildRequires: why3 -%if %{has_coq} BuildRequires: coq -%endif %if %{has_pvs} BuildRequires: pvs %endif @@ -121,7 +119,6 @@ Requires: frama-c The Jessie plugin, an interface between why and frama-c. Invoke it with: frama-c -jessie FILE.c -%if %{has_coq} %package coq Group: Applications/Engineering Summary: Libraries for interfacing Coq with Why @@ -131,7 +128,6 @@ Requires: gappalib-coq %description coq This package contains a set of routines that assist in the manipulation of why Coq-formatted output within Coq. -%endif %if %{has_pvs} # Why's integration with PVS depends on the NASA Langley PVS Libraries, @@ -193,9 +189,7 @@ Summary: Complete Why software verification platform suite Requires: why%{?_isa} = %{version}-%{release} Requires: why-gwhy%{?_isa} = %{version}-%{release} Requires: why-jessie%{?_isa} = %{version}-%{release} -%if %{has_coq} Requires: why-coq%{?_isa} = %{version}-%{release} -%endif %if %{has_pvs} Requires: why-pvs-support%{?_isa} = %{version}-%{release} %endif @@ -210,6 +204,7 @@ based on Why, including various automated and interactive provers. %setup -q -T -D -a 15 %patch0 %patch1 +%patch2 cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ @@ -264,11 +259,7 @@ sed -i 's/pvs/pvs-sbcl/' configure %global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt %endif -%if %{has_coq} %configure --enable-apron --enable-verbosemake -%else -%configure --enable-apron --enable-verbosemake COQC=no -%endif make %{opt_option} %install @@ -276,11 +267,6 @@ make %{opt_option} make install DESTDIR=%{buildroot} %{opt_option} \ PVSLIB=%{buildroot}%{_libdir}/pvs/lib PVSEMACS=xemacs -# Fix a small bug in their Makefile: if no Coq, NO .v files should be installed -%if ! %{has_coq} -rm -f `find %{buildroot}%{_datadir}/coq -name '*.v'` -%endif - # If no PVS, no .pvs files should be installed %if ! %{has_pvs} rm -fr %{buildroot}%{_libdir}/pvs @@ -410,11 +396,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop -%if %{has_coq} %files coq %doc README.why-coq.Fedora %{_libdir}/coq/user-contrib/Why/ -%endif %if %{has_pvs} %files pvs-support @@ -440,6 +424,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Apr 21 2014 Jerry James - 2.34-4 +- Rebuild for ocamlgraph 1.8.5 and flocq 2.3.0 +- Drop has_coq macro, since coq is now universally available +- Add -flocq23 patch to adapt to flocq 2.3.0 + * Tue Apr 15 2014 Richard W.M. Jones - 2.34-3 - Remove ocaml_arches macro (RHBZ#1087794). From a5e0dc99c4684a219d5bc30978251da86a5620d0 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 2 May 2014 12:41:05 +0100 Subject: [PATCH 27/97] Fix the License tag --- why.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/why.spec b/why.spec index db10505..1a5092e 100644 --- a/why.spec +++ b/why.spec @@ -14,7 +14,7 @@ Release: 4%{?dist} Summary: Software verification platform Group: Applications/Engineering -License: LPGLv2 with exceptions +License: LGPLv2 with exceptions URL: http://why.lri.fr/ Source0: http://why.lri.fr/download/%{name}-%{version}.tar.gz Source1: README.why-gwhy.Fedora From ef3b4659b84313d34d9d08f9acab295985dcc827 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 13 May 2014 16:34:18 -0600 Subject: [PATCH 28/97] Rebuild for coq 8.4pl4. --- why.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 1a5092e..a57b534 100644 --- a/why.spec +++ b/why.spec @@ -10,10 +10,9 @@ Name: why Version: 2.34 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform -Group: Applications/Engineering License: LGPLv2 with exceptions URL: http://why.lri.fr/ Source0: http://why.lri.fr/download/%{name}-%{version}.tar.gz @@ -424,6 +423,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue May 13 2014 Jerry James - 2.34-5 +- Rebuild for coq 8.4pl4 + * Mon Apr 21 2014 Jerry James - 2.34-4 - Rebuild for ocamlgraph 1.8.5 and flocq 2.3.0 - Drop has_coq macro, since coq is now universally available From 7f0ff8ba20272c0bda3553e7730d96672f1b9eb6 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 23:30:38 -0500 Subject: [PATCH 29/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index a57b534..2c1b8bc 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -423,6 +423,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 2.34-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Tue May 13 2014 Jerry James - 2.34-5 - Rebuild for coq 8.4pl4 From 8ce80ce993f190eedee3088fd54a4318d68e5ac0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 26 Jun 2014 15:44:21 -0600 Subject: [PATCH 30/97] Omit "-z now" when building with relro (bz 1105265). Resolve a conflict between Frama-C and why modules both named "Project". --- why-project.patch | 124 ++++++++++++++++++++++++++++++++++++++++++++++ why.spec | 21 ++++++-- 2 files changed, 141 insertions(+), 4 deletions(-) create mode 100644 why-project.patch diff --git a/why-project.patch b/why-project.patch new file mode 100644 index 0000000..a280c81 --- /dev/null +++ b/why-project.patch @@ -0,0 +1,124 @@ +--- ./Makefile.in.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./Makefile.in 2014-06-26 12:30:00.000000000 -0600 +@@ -222,7 +222,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src + src/effect.cmo src/pp.cmo src/option_misc.cmo \ + src/parser.cmo src/lexer.cmo src/report.cmo \ + src/explain.cmo \ +- src/xml.cmo src/project.cmo ++ src/xml.cmo src/whyproject.cmo + + CMO = src/lib.cmo src/rc.cmo tools/dpConfig.cmo \ + src/version.cmo src/options.cmo src/linenum.cmo src/loc.cmo \ +@@ -239,7 +239,7 @@ CMO = src/lib.cmo src/rc.cmo tools/dpCon + src/holl.cmo src/harvey.cmo src/simplify.cmo \ + src/regen.cmo src/mizar.cmo src/smtlib.cmo src/coq.cmo \ + src/zenon.cmo src/z3.cmo src/cvcl.cmo tools/calldp.cmo \ +- src/xml.cmo src/project.cmo \ ++ src/xml.cmo src/whyproject.cmo \ + src/why3_kw.cmo src/why3.cmo src/pretty.cmo \ + src/unionfind.cmo src/theoryreducer.cmo \ + src/theory_filtering.cmo src/hypotheses_filtering.cmo \ +--- ./src/options.mli.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./src/options.mli 2014-06-26 12:30:00.000000000 -0600 +@@ -185,7 +185,7 @@ val files : string list + (*s GUI? *) + + val gui : bool ref +-val gui_project : Project.t option ref ++val gui_project : Whyproject.t option ref + val lib_files_to_load : string list + + (* +--- ./src/pretty.ml.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./src/pretty.ml 2014-06-26 12:30:00.000000000 -0600 +@@ -415,12 +415,12 @@ let output_project f = + with Not_found -> + functions := SMap.add fn SMap.empty !functions) + Util.program_locs ; +- let p = Project.create (Filename.basename f) in +- Project.set_project_context_file p (f ^ "_ctx.why"); ++ let p = Whyproject.create (Filename.basename f) in ++ Whyproject.set_project_context_file p (f ^ "_ctx.why"); + List.iter + (fun (expl,fpo) -> + let n = expl.lemma_or_fun_name in +- let _ = Project.add_lemma p n expl fpo in ()) ++ let _ = Whyproject.add_lemma p n expl fpo in ()) + !lemmas; + SMap.iter + (fun fname behs -> +@@ -430,15 +430,15 @@ let output_project f = + floc + with Not_found -> Loc.dummy_floc + in +- let f = Project.add_function p fname floc in ++ let f = Whyproject.add_function p fname floc in + SMap.iter + (fun beh vcs -> +- let be = Project.add_behavior f beh floc in ++ let be = Whyproject.add_behavior f beh floc in + List.iter + (fun (expl,fpo) -> +- let _ = Project.add_goal be expl fpo in ()) ++ let _ = Whyproject.add_goal be expl fpo in ()) + vcs) + behs) + !functions; +- Project.save p f; ++ Whyproject.save p f; + p +--- ./src/pretty.mli.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./src/pretty.mli 2014-06-26 12:30:00.000000000 -0600 +@@ -51,4 +51,4 @@ val output_files : string -> unit + (* [output_project f] produces a whole project description, in a file + [f.wpr], together with other needed files [f_ctx.why], [f_lemmas.why], + and each goal in a separate file [f_po.why] for i=1,2,... *) +-val output_project : string -> Project.t ++val output_project : string -> Whyproject.t +--- ./src/whyweb.ml.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./src/whyweb.ml 2014-06-26 12:30:00.000000000 -0600 +@@ -30,7 +30,7 @@ + (**************************************************************************) + + open Format +-open Project ++open Whyproject + + (*prover*) + let provers = [Ergo ; Simplify ; Z3 ; Yices ; Cvc3] +@@ -169,7 +169,7 @@ let file = match !file with + | None -> () + | Some f -> Arg.usage spec usage; exit 1 + +-let proj = ref (Project.create "") ++let proj = ref (Whyproject.create "") + + let proj_file = ref "" + +@@ -261,7 +261,7 @@ let interp_com c = + let _ = Thread.create (launch_behavior Cvc3) b in () + | `LaunchCvc3Function f -> + let _ = Thread.create (launch_function Cvc3) f in () +- | `Save -> Project.save !proj !proj.project_name ++ | `Save -> Whyroject.save !proj !proj.project_name + end; + loc + with Not_found -> ("",0,0,0) +@@ -344,7 +344,7 @@ let main_page msg = + let load_prj file = + eprintf "Reading file %s@." file; + try +- proj := Project.load file; ++ proj := Whyproject.load file; + proj_file := file; + with + Sys_error _ -> +@@ -527,7 +527,7 @@ wprint "
Save Proj + " ns; + wprint ""; + List.iter (fun prover -> +- wprint "" (Project.provers_name prover)) ++ wprint "" (Whyproject.provers_name prover)) + provers; + wprint " + "; diff --git a/why.spec b/why.spec index 2c1b8bc..8ca5b82 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -50,6 +50,10 @@ Patch1: %{name}-2.34-Makefile.in.patch # Adapt to flocq 2.3.0 Patch2: %{name}-flocq23.patch +# Avoid a clash between Frama-C and why modules both named "Project". +# Sent upstream 26 Jun 2014. +Patch3: %{name}-project.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils @@ -204,12 +208,17 @@ based on Why, including various automated and interactive provers. %patch0 %patch1 %patch2 +%patch3 + +# The other part of avoiding the "Project" module name clash +mv src/project.ml src/whyproject.ml +mv src/project.mli src/whyproject.mli cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ -# Harden the build for network-using binaries -sed -e '\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ - -e '/gtkThread\.cmx/s/-o/-ccopt -Wl,-z,relro,-z,now &/' \ +# Link with Fedora LDFLAGS +sed -e "\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt $RPM_LD_FLAGS &/" \ + -e "/gtkThread\.cmx/s/-o/-ccopt $RPM_LD_FLAGS &/" \ -i Makefile.in %define fix_encoding() \ @@ -423,6 +432,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Jun 24 2014 Jerry James - 2.34-7 +- Omit "-z now" when building with relro (bz 1105265) +- Resolve a conflict between Frama-C and why modules both named "Project" + * Sun Jun 08 2014 Fedora Release Engineering - 2.34-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 4e4054223f170b82369e236cd9c5007fc0746868 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 4 Aug 2014 22:04:47 -0600 Subject: [PATCH 31/97] OCaml 4.02.0 beta rebuild. BR emacs instead of emacs-nox, which no longer exists. --- why.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 8ca5b82..a4533e3 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -57,7 +57,7 @@ Patch3: %{name}-project.patch BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils -BuildRequires: emacs-nox xemacs xemacs-packages-extra +BuildRequires: emacs xemacs xemacs-packages-extra BuildRequires: frama-c-devel BuildRequires: gappalib-coq BuildRequires: gtk2-devel @@ -260,6 +260,9 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure +# Don't fail the build because of use of deprecated features +sed -i 's/ -warn-error A//' Makefile.in + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -432,6 +435,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Aug 4 2014 Jerry James - 2.34-8 +- OCaml 4.02.0 beta rebuild +- BR emacs instead of emacs-nox, which no longer exists + * Tue Jun 24 2014 Jerry James - 2.34-7 - Omit "-z now" when building with relro (bz 1105265) - Resolve a conflict between Frama-C and why modules both named "Project" From 00fe48cd16cc9f30652eccb7159a4054267e2133 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 08:34:44 +0000 Subject: [PATCH 32/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index a4533e3..0a218f0 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -435,6 +435,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 2.34-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Mon Aug 4 2014 Jerry James - 2.34-8 - OCaml 4.02.0 beta rebuild - BR emacs instead of emacs-nox, which no longer exists From 2e20d721c785dba63416ea68c7e979c60446ff6c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 25 Aug 2014 17:18:14 -0600 Subject: [PATCH 33/97] ocaml-4.02.0+rc1 rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 0a218f0..c1e3bca 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -435,6 +435,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Aug 25 2014 Jerry James - 2.34-10 +- ocaml-4.02.0+rc1 rebuild. + * Mon Aug 18 2014 Fedora Release Engineering - 2.34-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 12489c73c5e6db93a310b897de95a1d3cb19670b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 2 Sep 2014 20:19:24 -0600 Subject: [PATCH 34/97] Rebuild for the final ocaml 4.02.0 release. --- why-flocq23.patch | 11 ----------- why-flocq24.patch | 14 ++++++++++++++ why.spec | 12 +++++++++--- 3 files changed, 23 insertions(+), 14 deletions(-) delete mode 100644 why-flocq23.patch create mode 100644 why-flocq24.patch diff --git a/why-flocq23.patch b/why-flocq23.patch deleted file mode 100644 index b54d85a..0000000 --- a/why-flocq23.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/coq/WhyFloats.v.orig 2014-03-17 16:01:46.000000000 -0600 -+++ lib/coq/WhyFloats.v 2014-04-21 15:39:55.680771647 -0600 -@@ -108,7 +108,7 @@ - generalize (Zeq_bool_eq _ _ H1). clear. - rewrite Fcalc_digits.Z_of_nat_S_digits2_Pnat. - intros H. --apply (Fcalc_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). -+apply (Fcore_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). - revert H. - unfold FLT_exp. - generalize (Fcore_digits.Zdigits radix2 (Zpos m)). diff --git a/why-flocq24.patch b/why-flocq24.patch new file mode 100644 index 0000000..e4f10a4 --- /dev/null +++ b/why-flocq24.patch @@ -0,0 +1,14 @@ +--- ./lib/coq/WhyFloats.v.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./lib/coq/WhyFloats.v 2014-09-02 17:40:03.356028320 -0600 +@@ -106,9 +106,9 @@ apply Zlt_succ_le. + change (Zpos m < Zsucc (Zpred (Zpower_pos 2 prec)))%Z. + rewrite <- Zsucc_pred. + generalize (Zeq_bool_eq _ _ H1). clear. +-rewrite Fcalc_digits.Z_of_nat_S_digits2_Pnat. ++rewrite Fcore_digits.Zpos_digits2_pos. + intros H. +-apply (Fcalc_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). ++apply (Fcore_digits.Zpower_gt_Zdigits Fcore_Zaux.radix2 (Zpos prec) (Zpos m)). + revert H. + unfold FLT_exp. + generalize (Fcore_digits.Zdigits radix2 (Zpos m)). diff --git a/why.spec b/why.spec index c1e3bca..673c047 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -47,8 +47,8 @@ Patch0: gwhy-2.33.patch # this case. Patch1: %{name}-2.34-Makefile.in.patch -# Adapt to flocq 2.3.0 -Patch2: %{name}-flocq23.patch +# Adapt to flocq 2.4.0 +Patch2: %{name}-flocq24.patch # Avoid a clash between Frama-C and why modules both named "Project". # Sent upstream 26 Jun 2014. @@ -263,6 +263,9 @@ sed -i 's/pvs/pvs-sbcl/' configure # Don't fail the build because of use of deprecated features sed -i 's/ -warn-error A//' Makefile.in +# Build with why3 0.84 +sed -i 's/0\.83/0.84/' configure + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -435,6 +438,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Sep 2 2014 Jerry James - 2.34-11 +- Rebuild for the final ocaml 4.02.0 release + * Mon Aug 25 2014 Jerry James - 2.34-10 - ocaml-4.02.0+rc1 rebuild. From bee9f47474b0ff61f2909573bbadcf5054e837e6 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 8 Sep 2014 13:31:21 -0600 Subject: [PATCH 35/97] Rebuild for fixed frama-c. Fix license handling. --- why.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 673c047..8d6a312 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -317,7 +317,7 @@ cp -p %{SOURCE12} %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{why_examples_dir}mlw/ mkdir -p %{buildroot}%{why_examples_dir}c/ cp -p doc/manual.ps %{buildroot}%{why_doc_dir}/why-manual.ps -cp -p %{SOURCE8} %{SOURCE3} CHANGES COPYING LICENSE README Version %{buildroot}%{why_doc_dir} +cp -p %{SOURCE8} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} # Copy in the example files, leaving behind all generated files cd examples @@ -381,6 +381,7 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files +%license COPYING LICENSE %{_bindir}/* %{_libdir}/why/ %{_mandir}/man1/why.1* @@ -438,6 +439,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Sep 8 2014 Jerry James - 2.34-12 +- Rebuild for fixed frama-c +- Fix license handling + * Tue Sep 2 2014 Jerry James - 2.34-11 - Rebuild for the final ocaml 4.02.0 release From 19dba4ac310d10de8891d930269902440bd82ba1 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 18 Sep 2014 13:13:44 -0600 Subject: [PATCH 36/97] Rebuild for why3 0.85. --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index 8d6a312..8100f26 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -263,8 +263,8 @@ sed -i 's/pvs/pvs-sbcl/' configure # Don't fail the build because of use of deprecated features sed -i 's/ -warn-error A//' Makefile.in -# Build with why3 0.84 -sed -i 's/0\.83/0.84/' configure +# Build with why3 0.85 +sed -i 's/0\.83/0.85/' configure %build %if ! %{opt} @@ -439,6 +439,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Sep 18 2014 Jerry James - 2.34-13 +- Rebuild for why3 0.85 + * Mon Sep 8 2014 Jerry James - 2.34-12 - Rebuild for fixed frama-c - Fix license handling From 7aa2f40ac08e27625a03454626abaf0ff4845b69 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 30 Oct 2014 19:47:58 -0600 Subject: [PATCH 37/97] Rebuild for coq 8.4pl5. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 8100f26..0b59fe5 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -439,6 +439,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Oct 30 2014 Jerry James - 2.34-14 +- Rebuild for coq 8.4pl5 + * Thu Sep 18 2014 Jerry James - 2.34-13 - Rebuild for why3 0.85 From 8329d966f92a9bbfbcafbe4cbb177a5cddfc44cd Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 13 Nov 2014 13:34:46 +0000 Subject: [PATCH 38/97] Bump and rebuild for broken dependencies. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 0b59fe5..b9156bb 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -439,6 +439,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Nov 13 2014 Richard W.M. Jones - 2.34-15 +- Bump and rebuild for broken dependencies. + * Thu Oct 30 2014 Jerry James - 2.34-14 - Rebuild for coq 8.4pl5 From 405e2e843b21c6fe6176bc27a4ca8d1f8121b518 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 15 Nov 2014 14:19:02 -0700 Subject: [PATCH 39/97] Fix gwhy-2.33.patch (bz 1164470). --- gwhy-2.33.patch | 6 ++++-- why.spec | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gwhy-2.33.patch b/gwhy-2.33.patch index d106a7e..d55b90f 100644 --- a/gwhy-2.33.patch +++ b/gwhy-2.33.patch @@ -22,7 +22,7 @@ echo "cd $d" cd $d jessie -locs $b.jloc -why-opt -split-user-conj $b.jc || exit 2 -@@ -13,18 +19,20 @@ +@@ -13,18 +19,22 @@ make -f $b.makefile gui ;; *.c) @@ -38,12 +38,14 @@ *.mlw|*.why) - gwhy-bin -split-user-conj $1 + gwhy-bin -split-user-conj $file - ;; ++ ;; + ?*) + echo "$file does not have file type extension recognized by gwhy" + ;; *) - echo "don't know what to do with $1" + echo "gwhy needs the name of a file to inspect in order to run" ++ ;; esac diff --git a/why.spec b/why.spec index b9156bb..da91a4a 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -439,6 +439,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Nov 15 2014 Jerry James - 2.34-16 +- Fix gwhy-2.33.patch (bz 1164470) + * Thu Nov 13 2014 Richard W.M. Jones - 2.34-15 - Bump and rebuild for broken dependencies. From 9dc6ba6d394cedf5a1327ec735b5160917419ff1 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 19 Feb 2015 08:35:20 +0000 Subject: [PATCH 40/97] ocaml-4.02.1 rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index da91a4a..aeb5e78 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -439,6 +439,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Feb 19 2015 Richard W.M. Jones - 2.34-17 +- ocaml-4.02.1 rebuild. + * Sat Nov 15 2014 Jerry James - 2.34-16 - Fix gwhy-2.33.patch (bz 1164470) From f6eab8a269c2b300f5eb746c6380838da0e0e0ef Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 19 Mar 2015 12:01:44 -0600 Subject: [PATCH 41/97] Rebuild for Frama-C Sodium. Also: - Add -ocamlgraph186 patch to adapt to ocamlgraph 1.8.6. - Add -frama-c-sodium patch to adapt to Frama-C Sodium. --- why-frama-c-sodium.patch | 100 +++++++++++++++++++++++++++++++++++++++ why-ocamlgraph186.patch | 14 ++++++ why.spec | 27 ++++++++--- 3 files changed, 135 insertions(+), 6 deletions(-) create mode 100644 why-frama-c-sodium.patch create mode 100644 why-ocamlgraph186.patch diff --git a/why-frama-c-sodium.patch b/why-frama-c-sodium.patch new file mode 100644 index 0000000..6f79ce2 --- /dev/null +++ b/why-frama-c-sodium.patch @@ -0,0 +1,100 @@ +--- ./configure.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./configure 2015-03-18 20:00:00.000000000 -0600 +@@ -2660,16 +2660,16 @@ $as_echo_n "checking Frama-c version... + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FRAMACVERSION" >&5 + $as_echo "$FRAMACVERSION" >&6; } + case $FRAMACVERSION in +- Neon-rc1|Neon-rc2|Neon-rc3|Neon-rc4|Neon-20140301) ++ Sodium-rc1|Sodium-rc2|Sodium-rc3|Sodium-rc4|Sodium-20150201) + FRAMACPLUGIN=yes + ;; +- Neon-*) +- FRAMACMSG="Found unknown variant of Frama-C Neon (hope this works)" ++ Sodium-*) ++ FRAMACMSG="Found unknown variant of Frama-C Sodium (hope this works)" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FRAMACMSG" >&5 + $as_echo "$as_me: WARNING: $FRAMACMSG" >&2;} + FRAMACPLUGIN=yes + ;; +- *) FRAMACMSG="you need Frama-C version Neon" ++ *) FRAMACMSG="you need Frama-C version Sodium" + FRAMACPLUGIN=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FRAMACMSG" >&5 + $as_echo "$as_me: WARNING: $FRAMACMSG" >&2;} +--- ./frama-c-plugin/jessie_options.ml.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./frama-c-plugin/jessie_options.ml 2015-03-18 20:00:00.000000000 -0600 +@@ -38,7 +38,7 @@ include + end) + + module ProjectName = +- EmptyString ++ Empty_string + (struct + let option_name = "-jessie-project-name" + let arg_name = "" +@@ -46,7 +46,7 @@ module ProjectName = + end) + + module Behavior = +- EmptyString ++ Empty_string + (struct + let option_name = "-jessie-behavior" + let arg_name = "" +@@ -98,14 +98,14 @@ let () = + ~from:Analysis.self [ ForceAdHocNormalization.self ] + + module JcOpt = +- StringSet(struct ++ String_set(struct + let option_name = "-jessie-jc-opt" + let arg_name = "" + let help = "give an option to Jc (e.g., -jessie-jc-opt=\"-trust-ai\")" + end) + + module WhyOpt = +- StringSet ++ String_set + (struct + let option_name = "-jessie-why-opt" + let arg_name = "" +@@ -113,7 +113,7 @@ module WhyOpt = + end) + + module Why3Opt = +- StringSet ++ String_set + (struct + let option_name = "-jessie-why3-opt" + let arg_name = "" +@@ -127,7 +127,7 @@ module GenOnly = + end) + + module InferAnnot = +- EmptyString ++ Empty_string + (struct + let option_name = "-jessie-infer-annot" + let arg_name = "" +--- ./frama-c-plugin/register.ml.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./frama-c-plugin/register.ml 2015-03-18 20:00:00.000000000 -0600 +@@ -244,7 +244,7 @@ let run () = + s); + !res + in +- let jc_opt = Jessie_options.JcOpt.get_set ~sep:" " () in ++ let jc_opt = Jessie_options.JcOpt.As_string.get () in + let debug_opt = if Jessie_options.debug_atleast 1 then " -d " else " " in + let behav_opt = + if Jessie_options.Behavior.get () <> "" then +--- ./tests/c/oracle/sparse_array.res.oracle.orig 2014-03-17 16:01:46.000000000 -0600 ++++ ./tests/c/oracle/sparse_array.res.oracle 2015-03-18 20:00:00.000000000 -0600 +@@ -119,7 +119,7 @@ tests/c/sparse_array.c:72:[kernel] warni + + Unexpected error (File "src/kernel/ast_info.ml", line 391, characters 11-17: Assertion failed). + Please report as 'crash' at http://bts.frama-c.com/. +- Your Frama-C version is Neon-20140301. ++ Your Frama-C version is Sodium-20150201. + Note that a version and a backtrace alone often do not contain enough + information to understand the bug. Guidelines for reporting bugs are at: + http://bts.frama-c.com/dokuwiki/doku.php?id=mantis:frama-c:bug_reporting_guidelines diff --git a/why-ocamlgraph186.patch b/why-ocamlgraph186.patch new file mode 100644 index 0000000..7e86801 --- /dev/null +++ b/why-ocamlgraph186.patch @@ -0,0 +1,14 @@ +--- src/hypotheses_filtering.ml.orig 2014-03-17 16:01:46.000000000 -0600 ++++ src/hypotheses_filtering.ml 2015-03-18 12:30:00.000000000 -0600 +@@ -1686,9 +1686,9 @@ + *******************) + + module W = struct +- type label = PdlGraph.E.label ++ type edge = PdlGraph.E.t + type t = int +- let weight x = x ++ let weight e = PdlGraph.E.label e + let zero = 0 + let add = (+) + let compare = compare diff --git a/why.spec b/why.spec index aeb5e78..faf814a 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.34 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -31,7 +31,7 @@ Source12: patch_jessie_pvs Source13: gwhy.appdata.xml Source14: jessie.appdata.xml # Created with gimp from official upstream icon -Source15: %{name}-icons.tar.xz +Source15: %{name}-icons.tar.xz # The gwhy execution shell script is not particularly informative # about when bad parameters are passed to it - this patch fixes that. @@ -54,11 +54,17 @@ Patch2: %{name}-flocq24.patch # Sent upstream 26 Jun 2014. Patch3: %{name}-project.patch +# Adapt to ocamlgraph 1.8.6 +Patch4: %{name}-ocamlgraph186.patch + +# Adapt to Frama-C Sodium +Patch5: %{name}-frama-c-sodium.patch + BuildRequires: auto-destdir BuildRequires: cvc3 BuildRequires: desktop-file-utils BuildRequires: emacs xemacs xemacs-packages-extra -BuildRequires: frama-c-devel +BuildRequires: frama-c BuildRequires: gappalib-coq BuildRequires: gtk2-devel BuildRequires: ocaml @@ -209,6 +215,8 @@ based on Why, including various automated and interactive provers. %patch1 %patch2 %patch3 +%patch4 +%patch5 # The other part of avoiding the "Project" module name clash mv src/project.ml src/whyproject.ml @@ -217,9 +225,11 @@ mv src/project.mli src/whyproject.mli cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ # Link with Fedora LDFLAGS -sed -e "\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s/-o/-ccopt $RPM_LD_FLAGS &/" \ - -e "/gtkThread\.cmx/s/-o/-ccopt $RPM_LD_FLAGS &/" \ - -i Makefile.in +for flag in $RPM_LD_FLAGS; do + sed -e "\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s|-o|-ccopt $flag &|" \ + -e "/gtkThread\.cmx/s|-o|-ccopt $flag &|" \ + -i Makefile.in +done %define fix_encoding() \ iconv -f %2 -t %3 %1 > %1.utf8; \ @@ -439,6 +449,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Mar 19 2015 Jerry James - 2.34-18 +- Rebuild for Frama-C Sodium +- Add -ocamlgraph186 patch to adapt to ocamlgraph 1.8.6 +- Add -frama-c-sodium patch to adapt to Frama-C Sodium + * Thu Feb 19 2015 Richard W.M. Jones - 2.34-17 - ocaml-4.02.1 rebuild. From e031c5b41e25324d0e18dbcec1b2b74fdfde58d0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 31 Mar 2015 15:58:10 -0600 Subject: [PATCH 42/97] New upstream release. Drop upstreamed -flocq24 and -frama-c-sodium patches. Drop all gwhy-related sources, as gwhy has been retired. Merge (X)Emacs files into the main package due to change in policy. --- .gitignore | 2 +- README.why-gwhy.Fedora | 6 - gwhy-2.33.patch | 51 ----- gwhy-icon.png | Bin 972 -> 0 bytes gwhy.appdata.xml | 20 -- gwhy.desktop | 7 - min.mlw | 4 - min_why.why.result | 41 ---- sources | 2 +- ...ile.in.patch => why-2.35-Makefile.in.patch | 6 +- why-flocq24.patch | 14 -- why-frama-c-sodium.patch | 100 --------- why-ocamlgraph186.patch | 6 +- why-project.patch | 124 ----------- why.spec | 197 ++++-------------- 15 files changed, 50 insertions(+), 530 deletions(-) delete mode 100644 README.why-gwhy.Fedora delete mode 100644 gwhy-2.33.patch delete mode 100644 gwhy-icon.png delete mode 100644 gwhy.appdata.xml delete mode 100644 gwhy.desktop delete mode 100644 min.mlw delete mode 100644 min_why.why.result rename why-2.34-Makefile.in.patch => why-2.35-Makefile.in.patch (85%) delete mode 100644 why-flocq24.patch delete mode 100644 why-frama-c-sodium.patch delete mode 100644 why-project.patch diff --git a/.gitignore b/.gitignore index fc049f3..ed00d3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ /krakatoa.pdf -/why-2.34.tar.gz +/why-2.35.tar.gz /why-icons.tar.xz diff --git a/README.why-gwhy.Fedora b/README.why-gwhy.Fedora deleted file mode 100644 index 3cc41b4..0000000 --- a/README.why-gwhy.Fedora +++ /dev/null @@ -1,6 +0,0 @@ -Fedora why-gwhy package: - -Contains the gwhy GUI for Why. - -Run gwhy with "gwhy ". (If you forget and run without a -filename you'll be prompted for it.) \ No newline at end of file diff --git a/gwhy-2.33.patch b/gwhy-2.33.patch deleted file mode 100644 index d55b90f..0000000 --- a/gwhy-2.33.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- bin/gwhy.sh.orig 2013-04-20 00:34:04.000000000 -0600 -+++ bin/gwhy.sh 2013-05-10 09:12:22.968553542 -0600 -@@ -1,11 +1,17 @@ - #!/bin/sh - --case $1 in -+if ! test $1; then -+ file=`zenity --file-selection --title="Select the file you want to open with gwhy"`; -+else -+ file=$1 -+fi -+ -+case $file in - *.java) -- b=`basename $1 .java` -- krakatoa -gen-only $1 || exit 1 -+ b=`basename $file .java` -+ krakatoa -gen-only $file || exit 1 - echo "krakatoa on $b.java done" -- d=`dirname $1` -+ d=`dirname $file` - echo "cd $d" - cd $d - jessie -locs $b.jloc -why-opt -split-user-conj $b.jc || exit 2 -@@ -13,18 +19,22 @@ - make -f $b.makefile gui - ;; - *.c) -- frama-c -jessie -jessie-atp=gui -jessie-why-opt="-split-user-conj" $1 || exit 1 -+ frama-c -jessie -jessie-atp=gui -jessie-why-opt="-split-user-conj" $file || exit 1 - ;; - *.jc) -- b=`basename $1 .jc` -+ b=`basename $file .jc` - jessie -why-opt -split-user-conj $b.jc || exit 1 - make -f $b.makefile gui - ;; - *.mlw|*.why) -- gwhy-bin -split-user-conj $1 -+ gwhy-bin -split-user-conj $file -+ ;; -+ ?*) -+ echo "$file does not have file type extension recognized by gwhy" - ;; - *) -- echo "don't know what to do with $1" -+ echo "gwhy needs the name of a file to inspect in order to run" -+ ;; - esac - - diff --git a/gwhy-icon.png b/gwhy-icon.png deleted file mode 100644 index 9a1b76cb487ebb10862a10166b9aaf1fd3812743..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 972 zcmV;-12g=IP)Px#32;bRa{vGf6951U69E94oEQKA00(qQO+^RT1{V@L6iNN!KL7v&UP(kjR5;6h zluvI`O%%p|cYuquv`9!A!PeHaklu=v_$TV3MvSeoAH%2%zlCw-+La3z?p>%6wN|UE zCdQ;_3Z(?A(9n{bi$Mb9yq-9A#r-QDuzmJqS*6Ao9CEYGQAGXc^nr(CB2<^6V z_x5nP&~-W;1l1~rL8-*gpK5(+iCzz&(O`9zOPBgfprIWms8%_Dp8NNed+#2>AcjG; zilAO65}{nCR03!=dG?H7zW{c2SX*Oaf=1(@R*zndT9s;pe(?8iVliI6q|>3@CY@$z zh)9Hb9f1(oHm1p!F96%yJbzBH2$0LMvjd>@PitPwHi`VDv?T2sQ~QmGCr+4*->JS{`m;*d`dh~!) zN(mkqV0f6ZF@ylf=ec|t!S(CpascDwWV87FxLkz8WU~Z=xZMC>zp}94)E#8-V4MU3 zxOPpoOw$MkNhZ}etgkaak021B)lv#yzh-Jm4MaMvFwpJd_5SS{3(@}sdOa>&P`KG- zco>1(t%e{L$z&A4%nX@K zU%`J>m&gOxQSk5~?KUGLD#1CqAP}HZq1oi*Ns>t>CjrLBICDnLXt|8f=j`#~b>VWb zj_$_oV85RqKZrzFSis{^-&mzWAb^{2n2ilAi{r<+b&JtafKZ4#cNE#DPimH6kUtdTycO5ThB0000 - - gwhy.desktop - CC0 - -

- Gwhy is a graphical user interface for the Why software coordination - platform. It assists in the coordination of dispatching assertions that - need to be proven to different theorem provers by providing an interface to - do this and also supports inspection of why input files. -

-
- - http://why.lri.fr/manual/manual001.png - - http://why.lri.fr/ - -
diff --git a/gwhy.desktop b/gwhy.desktop deleted file mode 100644 index 8940b49..0000000 --- a/gwhy.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=gwhy -Comment=Examine and develop Why .why files -Exec=gwhy -Icon=why -Type=Application -Categories=Development; diff --git a/min.mlw b/min.mlw deleted file mode 100644 index ae72dea..0000000 --- a/min.mlw +++ /dev/null @@ -1,4 +0,0 @@ -logic min: int, int -> int -axiom min_ax: forall x,y:int. min(x,y) <= x -parameter r: int ref -let f (n:int) = {} r := min !r n { r <= r@ } \ No newline at end of file diff --git a/min_why.why.result b/min_why.why.result deleted file mode 100644 index 04848f9..0000000 --- a/min_why.why.result +++ /dev/null @@ -1,41 +0,0 @@ -logic eq_unit : unit, unit -> prop - -logic neq_unit : unit, unit -> prop - -logic eq_bool : bool, bool -> prop - -logic neq_bool : bool, bool -> prop - -logic lt_int : int, int -> prop - -logic le_int : int, int -> prop - -logic gt_int : int, int -> prop - -logic ge_int : int, int -> prop - -logic eq_int : int, int -> prop - -logic neq_int : int, int -> prop - -logic add_int : int, int -> int - -logic sub_int : int, int -> int - -logic mul_int : int, int -> int - -logic neg_int : int -> int - -predicate zwf_zero(a: int, b: int) = ((0 <= b) and (a < b)) - -logic min : int, int -> int - -axiom min_ax: (forall x:int. (forall y:int. (min(x, y) <= x))) - -goal f_po_1: - forall n:int. - forall r0:int. - forall r:int. - (r = min(r0, n)) -> - (r <= r0) - diff --git a/sources b/sources index a95f254..e3fda8e 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ cc7a2e360acf8569a2eb878f51bfc8ff krakatoa.pdf -e622157c9b5cfc4e454a2a98bcc5828c why-2.34.tar.gz +10bde72f95de8bc34135a8207cfcc9ec why-2.35.tar.gz ed5648bbfb5e74fdfb814cdd725b191e why-icons.tar.xz diff --git a/why-2.34-Makefile.in.patch b/why-2.35-Makefile.in.patch similarity index 85% rename from why-2.34-Makefile.in.patch rename to why-2.35-Makefile.in.patch index 931bc76..5b490d5 100644 --- a/why-2.34-Makefile.in.patch +++ b/why-2.35-Makefile.in.patch @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2014-03-17 16:01:46.000000000 -0600 -+++ Makefile.in 2014-03-17 20:00:00.000000000 -0600 -@@ -805,17 +805,9 @@ +--- Makefile.in.orig 2015-03-25 08:32:17.000000000 -0600 ++++ Makefile.in 2015-03-30 20:00:00.000000000 -0600 +@@ -815,17 +815,9 @@ mkdir -p $(LIBDIR)/why/coq7 cp -f $(VO7) $(LIBDIR)/why/coq7 install-coq-v8 install-coq-v8.1: diff --git a/why-flocq24.patch b/why-flocq24.patch deleted file mode 100644 index e4f10a4..0000000 --- a/why-flocq24.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ./lib/coq/WhyFloats.v.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./lib/coq/WhyFloats.v 2014-09-02 17:40:03.356028320 -0600 -@@ -106,9 +106,9 @@ apply Zlt_succ_le. - change (Zpos m < Zsucc (Zpred (Zpower_pos 2 prec)))%Z. - rewrite <- Zsucc_pred. - generalize (Zeq_bool_eq _ _ H1). clear. --rewrite Fcalc_digits.Z_of_nat_S_digits2_Pnat. -+rewrite Fcore_digits.Zpos_digits2_pos. - intros H. --apply (Fcalc_digits.Zpower_gt_Zdigits Fcalc_digits.radix2 (Zpos prec) (Zpos m)). -+apply (Fcore_digits.Zpower_gt_Zdigits Fcore_Zaux.radix2 (Zpos prec) (Zpos m)). - revert H. - unfold FLT_exp. - generalize (Fcore_digits.Zdigits radix2 (Zpos m)). diff --git a/why-frama-c-sodium.patch b/why-frama-c-sodium.patch deleted file mode 100644 index 6f79ce2..0000000 --- a/why-frama-c-sodium.patch +++ /dev/null @@ -1,100 +0,0 @@ ---- ./configure.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./configure 2015-03-18 20:00:00.000000000 -0600 -@@ -2660,16 +2660,16 @@ $as_echo_n "checking Frama-c version... - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FRAMACVERSION" >&5 - $as_echo "$FRAMACVERSION" >&6; } - case $FRAMACVERSION in -- Neon-rc1|Neon-rc2|Neon-rc3|Neon-rc4|Neon-20140301) -+ Sodium-rc1|Sodium-rc2|Sodium-rc3|Sodium-rc4|Sodium-20150201) - FRAMACPLUGIN=yes - ;; -- Neon-*) -- FRAMACMSG="Found unknown variant of Frama-C Neon (hope this works)" -+ Sodium-*) -+ FRAMACMSG="Found unknown variant of Frama-C Sodium (hope this works)" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FRAMACMSG" >&5 - $as_echo "$as_me: WARNING: $FRAMACMSG" >&2;} - FRAMACPLUGIN=yes - ;; -- *) FRAMACMSG="you need Frama-C version Neon" -+ *) FRAMACMSG="you need Frama-C version Sodium" - FRAMACPLUGIN=no - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FRAMACMSG" >&5 - $as_echo "$as_me: WARNING: $FRAMACMSG" >&2;} ---- ./frama-c-plugin/jessie_options.ml.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./frama-c-plugin/jessie_options.ml 2015-03-18 20:00:00.000000000 -0600 -@@ -38,7 +38,7 @@ include - end) - - module ProjectName = -- EmptyString -+ Empty_string - (struct - let option_name = "-jessie-project-name" - let arg_name = "" -@@ -46,7 +46,7 @@ module ProjectName = - end) - - module Behavior = -- EmptyString -+ Empty_string - (struct - let option_name = "-jessie-behavior" - let arg_name = "" -@@ -98,14 +98,14 @@ let () = - ~from:Analysis.self [ ForceAdHocNormalization.self ] - - module JcOpt = -- StringSet(struct -+ String_set(struct - let option_name = "-jessie-jc-opt" - let arg_name = "" - let help = "give an option to Jc (e.g., -jessie-jc-opt=\"-trust-ai\")" - end) - - module WhyOpt = -- StringSet -+ String_set - (struct - let option_name = "-jessie-why-opt" - let arg_name = "" -@@ -113,7 +113,7 @@ module WhyOpt = - end) - - module Why3Opt = -- StringSet -+ String_set - (struct - let option_name = "-jessie-why3-opt" - let arg_name = "" -@@ -127,7 +127,7 @@ module GenOnly = - end) - - module InferAnnot = -- EmptyString -+ Empty_string - (struct - let option_name = "-jessie-infer-annot" - let arg_name = "" ---- ./frama-c-plugin/register.ml.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./frama-c-plugin/register.ml 2015-03-18 20:00:00.000000000 -0600 -@@ -244,7 +244,7 @@ let run () = - s); - !res - in -- let jc_opt = Jessie_options.JcOpt.get_set ~sep:" " () in -+ let jc_opt = Jessie_options.JcOpt.As_string.get () in - let debug_opt = if Jessie_options.debug_atleast 1 then " -d " else " " in - let behav_opt = - if Jessie_options.Behavior.get () <> "" then ---- ./tests/c/oracle/sparse_array.res.oracle.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./tests/c/oracle/sparse_array.res.oracle 2015-03-18 20:00:00.000000000 -0600 -@@ -119,7 +119,7 @@ tests/c/sparse_array.c:72:[kernel] warni - - Unexpected error (File "src/kernel/ast_info.ml", line 391, characters 11-17: Assertion failed). - Please report as 'crash' at http://bts.frama-c.com/. -- Your Frama-C version is Neon-20140301. -+ Your Frama-C version is Sodium-20150201. - Note that a version and a backtrace alone often do not contain enough - information to understand the bug. Guidelines for reporting bugs are at: - http://bts.frama-c.com/dokuwiki/doku.php?id=mantis:frama-c:bug_reporting_guidelines diff --git a/why-ocamlgraph186.patch b/why-ocamlgraph186.patch index 7e86801..fd15ef4 100644 --- a/why-ocamlgraph186.patch +++ b/why-ocamlgraph186.patch @@ -1,6 +1,6 @@ ---- src/hypotheses_filtering.ml.orig 2014-03-17 16:01:46.000000000 -0600 -+++ src/hypotheses_filtering.ml 2015-03-18 12:30:00.000000000 -0600 -@@ -1686,9 +1686,9 @@ +--- src/hypotheses_filtering.ml.orig 2015-03-25 08:32:17.000000000 -0600 ++++ src/hypotheses_filtering.ml 2015-03-30 20:00:00.000000000 -0600 +@@ -1680,9 +1680,9 @@ *******************) module W = struct diff --git a/why-project.patch b/why-project.patch deleted file mode 100644 index a280c81..0000000 --- a/why-project.patch +++ /dev/null @@ -1,124 +0,0 @@ ---- ./Makefile.in.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./Makefile.in 2014-06-26 12:30:00.000000000 -0600 -@@ -222,7 +222,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src - src/effect.cmo src/pp.cmo src/option_misc.cmo \ - src/parser.cmo src/lexer.cmo src/report.cmo \ - src/explain.cmo \ -- src/xml.cmo src/project.cmo -+ src/xml.cmo src/whyproject.cmo - - CMO = src/lib.cmo src/rc.cmo tools/dpConfig.cmo \ - src/version.cmo src/options.cmo src/linenum.cmo src/loc.cmo \ -@@ -239,7 +239,7 @@ CMO = src/lib.cmo src/rc.cmo tools/dpCon - src/holl.cmo src/harvey.cmo src/simplify.cmo \ - src/regen.cmo src/mizar.cmo src/smtlib.cmo src/coq.cmo \ - src/zenon.cmo src/z3.cmo src/cvcl.cmo tools/calldp.cmo \ -- src/xml.cmo src/project.cmo \ -+ src/xml.cmo src/whyproject.cmo \ - src/why3_kw.cmo src/why3.cmo src/pretty.cmo \ - src/unionfind.cmo src/theoryreducer.cmo \ - src/theory_filtering.cmo src/hypotheses_filtering.cmo \ ---- ./src/options.mli.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./src/options.mli 2014-06-26 12:30:00.000000000 -0600 -@@ -185,7 +185,7 @@ val files : string list - (*s GUI? *) - - val gui : bool ref --val gui_project : Project.t option ref -+val gui_project : Whyproject.t option ref - val lib_files_to_load : string list - - (* ---- ./src/pretty.ml.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./src/pretty.ml 2014-06-26 12:30:00.000000000 -0600 -@@ -415,12 +415,12 @@ let output_project f = - with Not_found -> - functions := SMap.add fn SMap.empty !functions) - Util.program_locs ; -- let p = Project.create (Filename.basename f) in -- Project.set_project_context_file p (f ^ "_ctx.why"); -+ let p = Whyproject.create (Filename.basename f) in -+ Whyproject.set_project_context_file p (f ^ "_ctx.why"); - List.iter - (fun (expl,fpo) -> - let n = expl.lemma_or_fun_name in -- let _ = Project.add_lemma p n expl fpo in ()) -+ let _ = Whyproject.add_lemma p n expl fpo in ()) - !lemmas; - SMap.iter - (fun fname behs -> -@@ -430,15 +430,15 @@ let output_project f = - floc - with Not_found -> Loc.dummy_floc - in -- let f = Project.add_function p fname floc in -+ let f = Whyproject.add_function p fname floc in - SMap.iter - (fun beh vcs -> -- let be = Project.add_behavior f beh floc in -+ let be = Whyproject.add_behavior f beh floc in - List.iter - (fun (expl,fpo) -> -- let _ = Project.add_goal be expl fpo in ()) -+ let _ = Whyproject.add_goal be expl fpo in ()) - vcs) - behs) - !functions; -- Project.save p f; -+ Whyproject.save p f; - p ---- ./src/pretty.mli.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./src/pretty.mli 2014-06-26 12:30:00.000000000 -0600 -@@ -51,4 +51,4 @@ val output_files : string -> unit - (* [output_project f] produces a whole project description, in a file - [f.wpr], together with other needed files [f_ctx.why], [f_lemmas.why], - and each goal in a separate file [f_po.why] for i=1,2,... *) --val output_project : string -> Project.t -+val output_project : string -> Whyproject.t ---- ./src/whyweb.ml.orig 2014-03-17 16:01:46.000000000 -0600 -+++ ./src/whyweb.ml 2014-06-26 12:30:00.000000000 -0600 -@@ -30,7 +30,7 @@ - (**************************************************************************) - - open Format --open Project -+open Whyproject - - (*prover*) - let provers = [Ergo ; Simplify ; Z3 ; Yices ; Cvc3] -@@ -169,7 +169,7 @@ let file = match !file with - | None -> () - | Some f -> Arg.usage spec usage; exit 1 - --let proj = ref (Project.create "") -+let proj = ref (Whyproject.create "") - - let proj_file = ref "" - -@@ -261,7 +261,7 @@ let interp_com c = - let _ = Thread.create (launch_behavior Cvc3) b in () - | `LaunchCvc3Function f -> - let _ = Thread.create (launch_function Cvc3) f in () -- | `Save -> Project.save !proj !proj.project_name -+ | `Save -> Whyroject.save !proj !proj.project_name - end; - loc - with Not_found -> ("",0,0,0) -@@ -344,7 +344,7 @@ let main_page msg = - let load_prj file = - eprintf "Reading file %s@." file; - try -- proj := Project.load file; -+ proj := Whyproject.load file; - proj_file := file; - with - Sys_error _ -> -@@ -527,7 +527,7 @@ wprint "
Save Proj -
%s%s
" ns; - wprint ""; - List.iter (fun prover -> -- wprint "" (Project.provers_name prover)) -+ wprint "" (Whyproject.provers_name prover)) - provers; - wprint " - "; diff --git a/why.spec b/why.spec index faf814a..1e54602 100644 --- a/why.spec +++ b/why.spec @@ -9,35 +9,23 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: why -Version: 2.34 -Release: 18%{?dist} +Version: 2.35 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions URL: http://why.lri.fr/ Source0: http://why.lri.fr/download/%{name}-%{version}.tar.gz -Source1: README.why-gwhy.Fedora +Source1: http://krakatoa.lri.fr/manual/krakatoa.pdf Source2: README.why-coq.Fedora Source3: README.why -Source4: gwhy.desktop -Source5: gwhy-icon.png -Source6: min.mlw -Source7: min_why.why.result -Source8: http://krakatoa.lri.fr/manual/krakatoa.pdf -Source9: jessie.desktop -Source10: div.pvs -Source11: rem.pvs -Source12: patch_jessie_pvs -Source13: gwhy.appdata.xml -Source14: jessie.appdata.xml +Source4: jessie.desktop +Source5: jessie.appdata.xml +Source6: div.pvs +Source7: rem.pvs +Source8: patch_jessie_pvs # Created with gimp from official upstream icon -Source15: %{name}-icons.tar.xz - -# The gwhy execution shell script is not particularly informative -# about when bad parameters are passed to it - this patch fixes that. -# Upstream has been informed about this issue and a better fix is on -# their todo list -Patch0: gwhy-2.33.patch +Source9: %{name}-icons.tar.xz # This patch makes a Fedora-specific fix to eliminate checking for the # location of Coq - since we're using the coq package, we know where @@ -45,20 +33,10 @@ Patch0: gwhy-2.33.patch # It also makes a fix necessary to correctly build the bytecode only # version of why by building the make_float_model tool correctly in # this case. -Patch1: %{name}-2.34-Makefile.in.patch - -# Adapt to flocq 2.4.0 -Patch2: %{name}-flocq24.patch - -# Avoid a clash between Frama-C and why modules both named "Project". -# Sent upstream 26 Jun 2014. -Patch3: %{name}-project.patch +Patch0: %{name}-2.35-Makefile.in.patch # Adapt to ocamlgraph 1.8.6 -Patch4: %{name}-ocamlgraph186.patch - -# Adapt to Frama-C Sodium -Patch5: %{name}-frama-c-sodium.patch +Patch1: %{name}-ocamlgraph186.patch BuildRequires: auto-destdir BuildRequires: cvc3 @@ -66,12 +44,10 @@ BuildRequires: desktop-file-utils BuildRequires: emacs xemacs xemacs-packages-extra BuildRequires: frama-c BuildRequires: gappalib-coq -BuildRequires: gtk2-devel BuildRequires: ocaml BuildRequires: ocaml-apron-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib -BuildRequires: ocaml-lablgtk-devel BuildRequires: ocaml-mlgmpidl-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel @@ -82,6 +58,20 @@ BuildRequires: pvs %endif Requires: hicolor-icon-theme +Requires: emacs-filesystem +Requires: xemacs-filesystem + +# This can be removed once Fedora 22 reaches EOL +Obsoletes: %{name}-gwhy < 2.35-1%{?dist} +Provides: %{name}-gwhy = %{version}-%{release} +Obsoletes: %{name}-emacs < 2.35-1%{?dist} +Provides: %{name}-emacs = %{version}-%{release} +Obsoletes: %{name}-emacs-el < 2.35-1%{?dist} +Provides: %{name}-emacs-el = %{version}-%{release} +Obsoletes: %{name}-xemacs < 2.35-1%{?dist} +Provides: %{name}-xemacs = %{version}-%{release} +Obsoletes: %{name}-xemacs-el < 2.35-1%{?dist} +Provides: %{name}-xemacs-el = %{version}-%{release} # Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Logic|Logic_decl|Misc|Ptree|Types)\\\) @@ -106,18 +96,6 @@ a proof of program correctness. Note: Each user account must be set up by running "why-config" at the command line (to set up a configuration file). -%package gwhy -Group: Applications/Engineering -Summary: IDE for Why software verification platform -Requires: %{name}%{?_isa} = %{version}-%{release}, zenity - -%description gwhy -Gwhy is an optional graphical user interface for the Why software -coordination platform. It assists in the coordination of dispatching -assertions that need to be proven to different theorem provers by -providing an interface to do this and also supports inspection of why -input files. - %package jessie Group: Applications/Engineering Summary: Interface between why and frama-c @@ -152,51 +130,10 @@ This package provides support definitions so that the Why software verification platform suite can invoke PVS without licensing issues. %endif -%package emacs -Summary: Emacs support file for why files -Group: Development/Languages -Requires: %{name} = %{version}-%{release} -Requires: emacs(bin) -BuildArch: noarch - -%description emacs -This package contains an Emacs support file for working with why files. - -%package emacs-el -Summary: Emacs source file for why support -Group: Development/Languages -Requires: %{name}-emacs = %{version}-%{release} -BuildArch: noarch - -%description emacs-el -This package contains the Emacs source file for the Emacs why support. -This package is not needed to use the Emacs support. - -%package xemacs -Summary: XEmacs support file for why files -Group: Development/Languages -Requires: %{name} = %{version}-%{release} -Requires: xemacs(bin) -BuildArch: noarch - -%description xemacs -This package contains an XEmacs support file for working with why files. - -%package xemacs-el -Summary: XEmacs source file for why support -Group: Development/Languages -Requires: %{name}-xemacs = %{version}-%{release} -BuildArch: noarch - -%description xemacs-el -This package contains the XEmacs source file for the XEmacs why support. -This package is not needed to use the Emacs support. - %package all Group: Applications/Engineering Summary: Complete Why software verification platform suite Requires: why%{?_isa} = %{version}-%{release} -Requires: why-gwhy%{?_isa} = %{version}-%{release} Requires: why-jessie%{?_isa} = %{version}-%{release} Requires: why-coq%{?_isa} = %{version}-%{release} %if %{has_pvs} @@ -210,19 +147,11 @@ based on Why, including various automated and interactive provers. %prep %setup -q -%setup -q -T -D -a 15 +%setup -q -T -D -a 9 %patch0 %patch1 -%patch2 -%patch3 -%patch4 -%patch5 -# The other part of avoiding the "Project" module name clash -mv src/project.ml src/whyproject.ml -mv src/project.mli src/whyproject.mli - -cp -p %SOURCE1 %SOURCE2 %SOURCE6 %SOURCE7 ./ +cp -p %SOURCE2 ./ # Link with Fedora LDFLAGS for flag in $RPM_LD_FLAGS; do @@ -270,12 +199,6 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Don't fail the build because of use of deprecated features -sed -i 's/ -warn-error A//' Makefile.in - -# Build with why3 0.85 -sed -i 's/0\.83/0.85/' configure - %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -296,16 +219,12 @@ make install DESTDIR=%{buildroot} %{opt_option} \ rm -fr %{buildroot}%{_libdir}/pvs %endif -# Install desktop icon and menu entry -%global why_data_dir %{_datadir}/why -mkdir -p %{buildroot}%{why_data_dir} -cp -p %{SOURCE5} %{buildroot}%{why_data_dir} +# Install desktop file desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE9} # Install AppData files mkdir -p %{buildroot}%{_datadir}/appdata -install -pm 644 %{SOURCE13} %{SOURCE14} %{buildroot}%{_datadir}/appdata +install -pm 644 %{SOURCE5} %{buildroot}%{_datadir}/appdata # Install the icons mkdir -p %{buildroot}%{_datadir}/icons @@ -315,9 +234,9 @@ cp -a icons %{buildroot}%{_datadir}/icons/hicolor # Get rid of a BUILDROOT reference in a log file (fails QA_CHECK_RPATHS) sed -i "s|%{buildroot}||" %{buildroot}%{_libdir}/pvs/lib/why/top.out -mkdir -p %{buildroot}%{_libdir}/pvs/lib/ints/ -cp -p %{SOURCE10} %{SOURCE11} %{buildroot}%{_libdir}/pvs/lib/ints/ -cp -p %{SOURCE12} %{buildroot}%{_bindir}/ +mkdir -p %{buildroot}%{_libdir}/pvs/lib/ints/ +cp -p %{SOURCE6} %{SOURCE7} %{buildroot}%{_libdir}/pvs/lib/ints/ +cp -p %{SOURCE8} %{buildroot}%{_bindir}/ %endif %global why_doc_dir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -327,7 +246,7 @@ cp -p %{SOURCE12} %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{why_examples_dir}mlw/ mkdir -p %{buildroot}%{why_examples_dir}c/ cp -p doc/manual.ps %{buildroot}%{why_doc_dir}/why-manual.ps -cp -p %{SOURCE8} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} +cp -p %{SOURCE1} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} # Copy in the example files, leaving behind all generated files cd examples @@ -362,29 +281,13 @@ cd %{buildroot}%{_xemacs_sitelispdir} rm -fr %{buildroot}%{_libdir}/why/emacs %check -%if %opt -%global why bin/why.opt -%else -%global why bin/why.byte -%endif -WHYLIB=lib %why --why --output min.why min.mlw -diff -u min.why min_why.why.result # Show differences from correct result. - -%post gwhy -update-desktop-database &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor &>/dev/null -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +make check %post jessie update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%postun gwhy -update-desktop-database &> /dev/null || : -touch --no-create %{_datadir}/icons/hicolor &>/dev/null -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %postun jessie update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null @@ -394,29 +297,19 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %license COPYING LICENSE %{_bindir}/* %{_libdir}/why/ -%{_mandir}/man1/why.1* %{_datadir}/icons/hicolor/*/apps/%{name}.png +%{_emacs_sitelispdir}/why.el* +%{_xemacs_sitelispdir}/why.el* %{why_doc_dir}/ # This last example is really an example only for Coq - only .v files %exclude %{why_examples_dir}mlw/string-matching/ -# why-gwhy: -%exclude %{_bindir}/gwhy* # why-jessie %exclude %{_bindir}/jessie # why-pvs-support: %exclude %{_bindir}/patch_jessie_pvs -%files gwhy -%doc README.why-gwhy.Fedora -%{_bindir}/gwhy -%{_bindir}/gwhy-bin -%{why_data_dir}/ -%{_datadir}/appdata/gwhy.appdata.xml -%{_datadir}/applications/gwhy.desktop - %files jessie %{_bindir}/jessie -%{_libdir}/jessie/ %{_libdir}/frama-c/plugins/Jessie.* %{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop @@ -431,24 +324,18 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_bindir}/patch_jessie_pvs %endif -%files emacs -%{_emacs_sitelispdir}/why.elc - -%files emacs-el -%{_emacs_sitelispdir}/why.el - -%files xemacs -%{_xemacs_sitelispdir}/why.elc - -%files xemacs-el -%{_xemacs_sitelispdir}/why.el - # "why-all" is a meta-package; it just depends on other packages, so that # it's easier to install a useful suite of tools. Thus, it has no files: %files all %changelog +* Tue Mar 31 2015 Jerry James - 2.35-1 +- New upstream release +- Drop upstreamed -flocq24 and -frama-c-sodium patches +- Drop all gwhy-related sources, as gwhy has been retired +- Merge (X)Emacs files into the main package due to change in policy + * Thu Mar 19 2015 Jerry James - 2.34-18 - Rebuild for Frama-C Sodium - Add -ocamlgraph186 patch to adapt to ocamlgraph 1.8.6 From 932f9267c1ea3dfd76f5e41d211c5c14728cc3c6 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 1 Apr 2015 12:18:42 -0600 Subject: [PATCH 43/97] Adjust requires filter. --- why.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 1e54602..a9b18f9 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -74,7 +74,7 @@ Obsoletes: %{name}-xemacs-el < 2.35-1%{?dist} Provides: %{name}-xemacs-el = %{version}-%{release} # Filter out bogus requires -%global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Logic|Logic_decl|Misc|Ptree|Types)\\\) +%global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Jc_ast|Jc_env|Loc|Logic|Logic_decl|Misc|Ptree|Types)\\\) %description Why is a software verification platform that applies formal proving @@ -330,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Apr 1 2015 Jerry James - 2.35-2 +- Adjust requires filter + * Tue Mar 31 2015 Jerry James - 2.35-1 - New upstream release - Drop upstreamed -flocq24 and -frama-c-sodium patches From d5f50e91bfdab3ced7a8f7757a8d1fe0aacb7986 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 13 Apr 2015 09:59:58 -0600 Subject: [PATCH 44/97] Rebuild for coq 8.4pl6. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index a9b18f9..9711f43 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -330,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Apr 13 2015 Jerry James - 2.35-3 +- Rebuild for coq 8.4pl6 + * Wed Apr 1 2015 Jerry James - 2.35-2 - Adjust requires filter From f945eb8f646c6297427e3a4237862318de0de4e0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 16 May 2015 17:31:14 -0600 Subject: [PATCH 45/97] Rebuild for why3 0.86. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 9711f43..54f1335 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -330,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat May 16 2015 Jerry James - 2.35-4 +- Rebuild for why3 0.86 + * Mon Apr 13 2015 Jerry James - 2.35-3 - Rebuild for coq 8.4pl6 From 060306ffb37bf483cefba637120727b7c4a09ee1 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 02:24:19 +0000 Subject: [PATCH 46/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 54f1335..ac87af4 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -330,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 2.35-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat May 16 2015 Jerry James - 2.35-4 - Rebuild for why3 0.86 From c7d6158f028dec61bea983dc1303fa714470baae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 19 Jun 2015 13:16:31 +0100 Subject: [PATCH 47/97] Rebuild for ocaml-4.02.2. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index ac87af4..ba31b9e 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -330,6 +330,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jun 19 2015 Richard W.M. Jones - 2.35-6 +- Rebuild for ocaml-4.02.2. + * Fri Jun 19 2015 Fedora Release Engineering - 2.35-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 6d652c56f44288719b155a71f6ec1b12193f0f98 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 22 Jun 2015 14:21:26 -0600 Subject: [PATCH 48/97] Rebuild for why3 0.86.1. --- why.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index ba31b9e..713265d 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -199,6 +199,9 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure +# Allow building with why3 0.86.1 +sed -i 's/0\.85|0\.86/&|0.86.1/' configure + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -330,6 +333,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Jun 22 2015 Jerry James - 2.35-7 +- Rebuild for why3 0.86.1 + * Fri Jun 19 2015 Richard W.M. Jones - 2.35-6 - Rebuild for ocaml-4.02.2. From b98809b6b945c78d3adeb749acbbc31b52b8b388 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 30 Jul 2015 13:30:11 +0100 Subject: [PATCH 49/97] OCaml 4.02.3 rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 713265d..61a37ff 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -333,6 +333,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jul 30 2015 Richard W.M. Jones - 2.35-8 +- OCaml 4.02.3 rebuild. + * Mon Jun 22 2015 Jerry James - 2.35-7 - Rebuild for why3 0.86.1 From 469e45c6aa9b89441df840b13448c2e49d388dcd Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 14 Oct 2015 21:20:46 -0600 Subject: [PATCH 50/97] Rebuild for flocq 2.5.0, gappalib-coq 1.2.0, and why3 0.86.2. --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index 61a37ff..bec3df1 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -199,8 +199,8 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.86.1 -sed -i 's/0\.85|0\.86/&|0.86.1/' configure +# Allow building with why3 0.86.2 +sed -i 's/0\.85|0\.86/&|0.86.2/' configure %build %if ! %{opt} @@ -333,6 +333,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Oct 14 2015 Jerry James - 2.35-9 +- Rebuild for flocq 2.5.0, gappalib-coq 1.2.0, and why3 0.86.2 + * Thu Jul 30 2015 Richard W.M. Jones - 2.35-8 - OCaml 4.02.3 rebuild. From ad116a2ac0ee30a42eede9b9b517cb1e051603ee Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:01:15 +0000 Subject: [PATCH 51/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index bec3df1..e9aaa7f 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -333,6 +333,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 2.35-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Oct 14 2015 Jerry James - 2.35-9 - Rebuild for flocq 2.5.0, gappalib-coq 1.2.0, and why3 0.86.2 From 0ccec25e66c5d48b26f0f014280400b53f5e67c4 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 12 Feb 2016 09:03:09 -0700 Subject: [PATCH 52/97] Rebuild for coq 8.5, flocq 2.5.1, gappalib-coq 1.2.1, why3 0.86.3, and Frama-C Magnesium. Also: - Use camlp4 in preference to camlp5. - Drop cvc3 support. - Update appdata for latest specification. --- jessie.appdata.xml | 41 +++++--- why-frama-c-magnesium.patch | 184 ++++++++++++++++++++++++++++++++++++ why.spec | 32 +++++-- 3 files changed, 238 insertions(+), 19 deletions(-) create mode 100644 why-frama-c-magnesium.patch diff --git a/jessie.appdata.xml b/jessie.appdata.xml index fc64aad..3cbd299 100644 --- a/jessie.appdata.xml +++ b/jessie.appdata.xml @@ -1,7 +1,10 @@ - - jessie.desktop - CC0 + + jessie.desktop + CC0-1.0 + LGPL-2.1 + jessie + Interface between why and Frama-C

Jessie is an interface between why and Frama-C. @@ -13,14 +16,28 @@

- http://krakatoa.lri.fr/jessie/max_why3ide.png - http://krakatoa.lri.fr/jessie/max_ptr_why3ide.png - http://krakatoa.lri.fr/jessie/binary_search_raw.png - http://krakatoa.lri.fr/jessie/binary_search_ovfl.png - http://krakatoa.lri.fr/jessie/binary_search_behav.png + + http://krakatoa.lri.fr/jessie/max_why3ide.png +
+ + + http://krakatoa.lri.fr/jessie/max_ptr_why3ide.png + + + + http://krakatoa.lri.fr/jessie/binary_search_raw.png + + + + http://krakatoa.lri.fr/jessie/binary_search_ovfl.png + + + + http://krakatoa.lri.fr/jessie/binary_search_behav.png + + + loganjerry@gmail.com http://krakatoa.lri.fr/ - - + https://gforge.inria.fr/tracker/?atid=4012&group_id=999&func=browse + diff --git a/why-frama-c-magnesium.patch b/why-frama-c-magnesium.patch new file mode 100644 index 0000000..74dbbbc --- /dev/null +++ b/why-frama-c-magnesium.patch @@ -0,0 +1,184 @@ +--- frama-c-plugin/interp.ml.orig 2015-03-25 08:32:17.000000000 -0600 ++++ frama-c-plugin/interp.ml 2016-02-11 22:03:07.043502130 -0700 +@@ -2092,7 +2092,7 @@ let rec statement s = + effects of the statements... *) + JCPEblock(statement_list (List.map (fun (x,_,_,_,_) -> x) seq)) + +- | TryFinally _ | TryExcept _ -> assert false ++ | TryFinally _ | TryExcept _ | Throw _ | TryCatch _ -> assert false + in + (* Prefix statement by all non-case labels *) + let labels = filter_out is_case_label s.labels in +@@ -2522,15 +2522,31 @@ let global vardefs g = + + | GEnumTagDecl _ -> [] (* No enumeration declaration in Jessie *) + +- | GVarDecl(_,v,pos) -> ++ | GVarDecl(v,_) -> + (* Keep only declarations for which there is no definition *) + if List.mem v vardefs +- || (isFunctionType v.vtype && +- (v.vname = name_of_assert +- || v.vname = name_of_free +- || v.vname = name_of_malloc)) + then [] +- else if isFunctionType v.vtype then ++ else ++ [JCDvar(ctype v.vtype,v.vname,None)] ++ ++ | GVar(v,{init=None},_pos) -> ++ [JCDvar(ctype v.vtype,v.vname,None)] ++ ++ | GVar(_v,_iinfo,_pos) -> ++ (* Initialization should have been rewritten as code in an ++ * initialization function, that is called by the main function in ++ * global analyses and ignored otherwise. ++ *) ++ assert false ++ ++ | GFunDecl(_,v,pos) -> ++ (* Keep only declarations for which there is no definition *) ++ if List.mem v vardefs ++ || v.vname = name_of_assert ++ || v.vname = name_of_free ++ || v.vname = name_of_malloc ++ then [] ++ else + let rtyp = match unrollType v.vtype with + | TFun(rt,_,_,_) -> rt + | _ -> assert false +@@ -2546,18 +2562,6 @@ let global vardefs g = + let formals = List.map formal params in + let s,_cba,_dba = spec v.vname funspec in + [JCDfun(ctype rtyp,id,formals,s,None)] +- else +- [JCDvar(ctype v.vtype,v.vname,None)] +- +- | GVar(v,{init=None},_pos) -> +- [JCDvar(ctype v.vtype,v.vname,None)] +- +- | GVar(_v,_iinfo,_pos) -> +- (* Initialization should have been rewritten as code in an +- * initialization function, that is called by the main function in +- * global analyses and ignored otherwise. +- *) +- assert false + + | GFun(f,pos) -> + set_curFundec f; +@@ -2692,7 +2696,9 @@ let file f = + in + let is_needed = + function +- | GVarDecl(_,v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> ++ | GVarDecl(v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> ++ v.vreferenced ++ | GFunDecl(_,v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> + v.vreferenced + | _ -> true + in +--- frama-c-plugin/norm.ml.orig 2015-03-25 08:32:17.000000000 -0600 ++++ frama-c-plugin/norm.ml 2016-02-11 21:54:42.247135884 -0700 +@@ -290,7 +290,7 @@ object(self) + attach_globaction (fun () -> Logic_utils.add_logic_function globinv); + ChangeTo [g;GAnnot(Dinvariant (globinv,v.vdecl),v.vdecl)] + else DoChildren +- | GVarDecl _ | GFun _ | GAnnot _ -> DoChildren ++ | GVarDecl _ | GFun _ | GFunDecl _ | GAnnot _ -> DoChildren + | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ + | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren + +@@ -684,13 +684,13 @@ object(self) + fvi.vtype <- TFun(rt,params,isva,a) + in + function +- | GVarDecl(_spec,v,_attr) -> +- if isFunctionType v.vtype && not v.vdefined then retype_func v; ++ | GFunDecl(_spec,v,_attr) -> ++ if not v.vdefined then retype_func v; + DoChildren + | GFun _ + | GAnnot _ -> DoChildren + | GVar _ | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ +- | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren ++ | GVarDecl _ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren + + method! vfunc f = + let var v = +@@ -1015,7 +1015,7 @@ object(self) + | _ -> assert false + in + ChangeDoChildrenPost ([g], postaction) +- | GVarDecl _ | GFun _ | GAnnot _ -> DoChildren ++ | GVarDecl _ | GFun _ | GFunDecl _ | GAnnot _ -> DoChildren + | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ + | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren + +@@ -1239,12 +1239,12 @@ object + *) + end; + SkipChildren +- | GVarDecl (_,v,_) -> ++ | GVarDecl (v,_) -> + (* No problem with calling [retype_var] more than once, since + subsequent calls do nothing on reference type. *) +- if not (isFunctionType v.vtype || v.vdefined) then retype_var v; ++ if not v.vdefined then retype_var v; + SkipChildren +- | GFun _ -> DoChildren ++ | GFun _ | GFunDecl _ -> DoChildren + | GAnnot _ -> DoChildren + | GCompTag(compinfo,_loc) -> + List.iter retype_field compinfo.cfields; +@@ -1454,7 +1454,7 @@ object + in + List.iter field compinfo.cfields; + SkipChildren +- | GFun _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren ++ | GFun _ | GFunDecl _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren + | GType _ | GCompTagDecl _ | GEnumTagDecl _ + | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren + +@@ -1674,10 +1674,10 @@ object(self) + | GFun (f, _) -> + retype_return f.svar; + DoChildren +- | GVarDecl (_, v, _) -> +- if isFunctionType v.vtype && not v.vdefined then +- retype_return v; ++ | GFunDecl (_, v, _) -> ++ if not v.vdefined then retype_return v; + DoChildren ++ | GVarDecl _ + | GVar _ + | GAnnot _ -> DoChildren + | GCompTagDecl _ | GEnumTag _ | GEnumTagDecl _ +@@ -1801,7 +1801,7 @@ object + let field fi = new_field_type fi in + let fty = List.map field fields in + ChangeTo (g::fty) +- | GFun _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren ++ | GFun _ | GFunDecl _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren + | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ + | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren + +--- frama-c-plugin/rewrite.ml.orig 2015-03-25 08:32:17.000000000 -0600 ++++ frama-c-plugin/rewrite.ml 2016-02-11 21:45:56.470458036 -0700 +@@ -109,7 +109,7 @@ object + | GCompTagDecl(compinfo,_loc) -> + add_type (TComp(compinfo,empty_size_cache (),[])); + SkipChildren +- | GVarDecl _ | GVar _ | GFun _ | GAnnot _ | GType _ ++ | GVarDecl _ | GVar _ | GFunDecl _ | GFun _ | GAnnot _ | GType _ + | GEnumTagDecl _ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> + DoChildren + +@@ -598,7 +598,7 @@ object + in + Cil.unsafeSetFormalsDecl f formals; + my_globals <- +- GVarDecl(Cil.empty_funspec(),f,loc) :: my_globals; ++ GFunDecl(Cil.empty_funspec(),f,loc) :: my_globals; + Globals.Functions.replace_by_declaration spec f loc; + let kf = Globals.Functions.get f in + Annotations.register_funspec ~emitter:Common.jessie_emitter kf; diff --git a/why.spec b/why.spec index e9aaa7f..49bccad 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -38,8 +38,10 @@ Patch0: %{name}-2.35-Makefile.in.patch # Adapt to ocamlgraph 1.8.6 Patch1: %{name}-ocamlgraph186.patch +# Adapt to Frama-C Magnesium +Patch2: %{name}-frama-c-magnesium.patch + BuildRequires: auto-destdir -BuildRequires: cvc3 BuildRequires: desktop-file-utils BuildRequires: emacs xemacs xemacs-packages-extra BuildRequires: frama-c @@ -57,7 +59,7 @@ BuildRequires: coq BuildRequires: pvs %endif -Requires: hicolor-icon-theme +Requires: hicolor-icon-theme Requires: emacs-filesystem Requires: xemacs-filesystem @@ -89,7 +91,7 @@ into formats that can be used by external proof assistants (without any extra work Coq, PVS, HOL Light, and Mizar are supported - having one is recommended and both Coq and PVS are packaged for Fedora) and automated theorem provers (without any extra work Simplify, Alt-Ergo, Yices, Z3, -CVC3, and Zenon are supported and Alt-Ergo, CVC3, and Zenon are packaged +CVC3, and Zenon are supported and Alt-Ergo, Z3, and Zenon are packaged for Fedora) so that these results can be externally proven, resulting in a proof of program correctness. @@ -139,7 +141,7 @@ Requires: why-coq%{?_isa} = %{version}-%{release} %if %{has_pvs} Requires: why-pvs-support%{?_isa} = %{version}-%{release} %endif -Requires: alt-ergo cvc3 gappalib-coq zenon +Requires: alt-ergo gappalib-coq z3 zenon %description all This package provides a complete software verification platform suite @@ -150,6 +152,7 @@ based on Why, including various automated and interactive provers. %setup -q -T -D -a 9 %patch0 %patch1 +%patch2 cp -p %SOURCE2 ./ @@ -199,8 +202,12 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.86.2 -sed -i 's/0\.85|0\.86/&|0.86.2/' configure +# Allow building with why3 0.86.3, Frama-C Magnesium, and flocq 2.5.1 +sed -e 's/0\.85|0\.86/&|0.86.3/' \ + -e 's/Sodium-20150201/Magnesium-20151002/;s/Sodium/Magnesium/' \ + -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ + -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ + -i configure %build %if ! %{opt} @@ -217,6 +224,9 @@ make %{opt_option} make install DESTDIR=%{buildroot} %{opt_option} \ PVSLIB=%{buildroot}%{_libdir}/pvs/lib PVSEMACS=xemacs +# Fix permissions +chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/META.frama-c-jessie + # If no PVS, no .pvs files should be installed %if ! %{has_pvs} rm -fr %{buildroot}%{_libdir}/pvs @@ -314,6 +324,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files jessie %{_bindir}/jessie %{_libdir}/frama-c/plugins/Jessie.* +%{_libdir}/frama-c/plugins/META.frama-c-jessie %{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop @@ -333,6 +344,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Feb 12 2016 Jerry James - 2.35-11 +- Rebuild for coq 8.5, flocq 2.5.1, gappalib-coq 1.2.1, why3 0.86.3, and + Frama-C Magnesium +- Use camlp4 in preference to camlp5 +- Drop cvc3 support +- Update appdata for latest specification + * Fri Feb 05 2016 Fedora Release Engineering - 2.35-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From c8058b5d9f68227266c020cd45d08ab0d04164fd Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 12 Feb 2016 15:46:48 -0700 Subject: [PATCH 53/97] Adapt to recent versions of apron. --- why.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 49bccad..8c60796 100644 --- a/why.spec +++ b/why.spec @@ -189,8 +189,10 @@ for f in examples-c/tutorial/average.c examples-c/tutorial/purse.c \ mv -f $f.new $f done -# APRON support: add a missing rpath -sed -i "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" configure +# APRON support: add a missing rpath and adapt to newer versions of apron +sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ + -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa|" \ + -i configure # Enable debuginfo sed -i 's,@STRIP@,/usr/bin/true,;s,-dtypes [^-],-g &,' Makefile.in From 585077e27501d939a1745667f3c05a73bfc0d51f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 18 Mar 2016 14:54:43 -0600 Subject: [PATCH 54/97] Rebuild for why3 0.87.0. --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index 8c60796..aed153c 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -204,8 +204,8 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.86.3, Frama-C Magnesium, and flocq 2.5.1 -sed -e 's/0\.85|0\.86/&|0.86.3/' \ +# Allow building with why3 0.87.0, Frama-C Magnesium, and flocq 2.5.1 +sed -e 's/0\.85|0\.86/&|0.87.0/' \ -e 's/Sodium-20150201/Magnesium-20151002/;s/Sodium/Magnesium/' \ -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ @@ -346,6 +346,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Mar 18 2016 Jerry James - 2.35-12 +- Rebuild for why3 0.87.0 + * Fri Feb 12 2016 Jerry James - 2.35-11 - Rebuild for coq 8.5, flocq 2.5.1, gappalib-coq 1.2.1, why3 0.86.3, and Frama-C Magnesium From 6700fb2b95df5e2b875b66b7b633ab7739c83858 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 16 Apr 2016 22:11:50 -0600 Subject: [PATCH 55/97] Rebuild for ocaml-ocamlgraph 1.8.7. --- why.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/why.spec b/why.spec index aed153c..50877fa 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -99,7 +99,6 @@ Note: Each user account must be set up by running "why-config" at the command line (to set up a configuration file). %package jessie -Group: Applications/Engineering Summary: Interface between why and frama-c Requires: %{name}%{?_isa} = %{version}-%{release} Requires: frama-c @@ -109,7 +108,6 @@ The Jessie plugin, an interface between why and frama-c. Invoke it with: frama-c -jessie FILE.c %package coq -Group: Applications/Engineering Summary: Libraries for interfacing Coq with Why Requires: %{name}%{?_isa} = %{version}-%{release} Requires: gappalib-coq @@ -122,7 +120,6 @@ of why Coq-formatted output within Coq. # Why's integration with PVS depends on the NASA Langley PVS Libraries, # which have no license information. This provides an alternative: %package pvs-support -Group: Applications/Engineering Summary: Complete Why software verification platform suite Requires: %{name}%{?_isa} = %{version}-%{release} Requires: pvs @@ -133,7 +130,6 @@ verification platform suite can invoke PVS without licensing issues. %endif %package all -Group: Applications/Engineering Summary: Complete Why software verification platform suite Requires: why%{?_isa} = %{version}-%{release} Requires: why-jessie%{?_isa} = %{version}-%{release} @@ -346,6 +342,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Apr 16 2016 Jerry James - 2.35-13 +- Rebuild for ocaml-ocamlgraph 1.8.7 + * Fri Mar 18 2016 Jerry James - 2.35-12 - Rebuild for why3 0.87.0 From 0d9d208aa73b6855ff645dd10d1fc0cbc32a7b2b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 22 Apr 2016 09:46:02 -0600 Subject: [PATCH 56/97] Rebuild for coq 8.5pl1. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 50877fa..f58ade8 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -342,6 +342,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Apr 22 2016 Jerry James - 2.35-14 +- Rebuild for coq 8.5pl1 + * Sat Apr 16 2016 Jerry James - 2.35-13 - Rebuild for ocaml-ocamlgraph 1.8.7 From 7e3866afcc737edc8d2e2a7fc47d4a639cb6ce5c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 1 Jun 2016 19:54:34 -0600 Subject: [PATCH 57/97] Rebuild for why3 0.87.1 and Frama-C Aluminium. --- ...esium.patch => why-frama-c-aluminium.patch | 27 ++++++++++++++++--- why.spec | 20 +++++++++----- 2 files changed, 36 insertions(+), 11 deletions(-) rename why-frama-c-magnesium.patch => why-frama-c-aluminium.patch (87%) diff --git a/why-frama-c-magnesium.patch b/why-frama-c-aluminium.patch similarity index 87% rename from why-frama-c-magnesium.patch rename to why-frama-c-aluminium.patch index 74dbbbc..8d1f9c6 100644 --- a/why-frama-c-magnesium.patch +++ b/why-frama-c-aluminium.patch @@ -78,7 +78,7 @@ | _ -> true in --- frama-c-plugin/norm.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ frama-c-plugin/norm.ml 2016-02-11 21:54:42.247135884 -0700 ++++ frama-c-plugin/norm.ml 2016-06-01 17:46:29.597267704 -0600 @@ -290,7 +290,7 @@ object(self) attach_globaction (fun () -> Logic_utils.add_logic_function globinv); ChangeTo [g;GAnnot(Dinvariant (globinv,v.vdecl),v.vdecl)] @@ -139,7 +139,17 @@ | GType _ | GCompTagDecl _ | GEnumTagDecl _ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren -@@ -1674,10 +1674,10 @@ object(self) +@@ -1543,9 +1543,7 @@ object(self) + auto_type_wrappers := + Cil_datatype.Typ.Set.add wrapper_type !auto_type_wrappers; + (* Treat newly constructed type *) +- let store_current_global = !currentGlobal in + ignore (Cil.visitCilGlobal (self:>Cil.cilVisitor) wrapper_def); +- currentGlobal := store_current_global; + (* Return the wrapper type *) + wrapper_type + +@@ -1674,10 +1672,10 @@ object(self) | GFun (f, _) -> retype_return f.svar; DoChildren @@ -153,7 +163,7 @@ | GVar _ | GAnnot _ -> DoChildren | GCompTagDecl _ | GEnumTag _ | GEnumTagDecl _ -@@ -1801,7 +1801,7 @@ object +@@ -1801,7 +1799,7 @@ object let field fi = new_field_type fi in let fty = List.map field fields in ChangeTo (g::fty) @@ -163,7 +173,16 @@ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren --- frama-c-plugin/rewrite.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ frama-c-plugin/rewrite.ml 2016-02-11 21:45:56.470458036 -0700 ++++ frama-c-plugin/rewrite.ml 2016-06-01 17:18:58.738619756 -0600 +@@ -56,7 +56,7 @@ class add_default_behavior = + then begin + let bhv = Cil.mk_behavior ~name:Cil.default_behavior_name () in + let kf = Extlib.the self#current_kf in +- let props = Property.ip_all_of_behavior kf Kglobal bhv in ++ let props = Property.ip_all_of_behavior kf Kglobal [] bhv in + List.iter Property_status.register props; + s.spec_behavior <- bhv :: s.spec_behavior + end; @@ -109,7 +109,7 @@ object | GCompTagDecl(compinfo,_loc) -> add_type (TComp(compinfo,empty_size_cache (),[])); diff --git a/why.spec b/why.spec index f58ade8..06fd06b 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -38,8 +38,8 @@ Patch0: %{name}-2.35-Makefile.in.patch # Adapt to ocamlgraph 1.8.6 Patch1: %{name}-ocamlgraph186.patch -# Adapt to Frama-C Magnesium -Patch2: %{name}-frama-c-magnesium.patch +# Adapt to Frama-C Aluminium +Patch2: %{name}-frama-c-aluminium.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils @@ -200,9 +200,9 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.87.0, Frama-C Magnesium, and flocq 2.5.1 -sed -e 's/0\.85|0\.86/&|0.87.0/' \ - -e 's/Sodium-20150201/Magnesium-20151002/;s/Sodium/Magnesium/' \ +# Allow building with why3 0.87.1, Frama-C Aluminium, and flocq 2.5.1 +sed -e 's/0\.85|0\.86/&|0.87.1/' \ + -e 's/Sodium-20150201/Aluminium-20160501/;s/Sodium/Aluminium/' \ -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ -i configure @@ -224,6 +224,8 @@ make install DESTDIR=%{buildroot} %{opt_option} \ # Fix permissions chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/META.frama-c-jessie +chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/Jessie.cmi +chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/top/Jessie.cm{a,o,x} # If no PVS, no .pvs files should be installed %if ! %{has_pvs} @@ -321,8 +323,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files jessie %{_bindir}/jessie -%{_libdir}/frama-c/plugins/Jessie.* +%{_libdir}/frama-c/plugins/Jessie.cmi %{_libdir}/frama-c/plugins/META.frama-c-jessie +%{_libdir}/frama-c/plugins/top/Jessie.* %{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop @@ -342,6 +345,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Jun 1 2016 Jerry James - 2.35-15 +- Rebuild for why3 0.87.1 and Frama-C Aluminium + * Fri Apr 22 2016 Jerry James - 2.35-14 - Rebuild for coq 8.5pl1 From 6f1ec75cbd674a8419204f0d6c590acba8940497 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 13 Jul 2016 17:26:19 -0600 Subject: [PATCH 58/97] Rebuild for coq 8.5pl2. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 06fd06b..b6525a2 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -345,6 +345,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Jul 13 2016 Jerry James - 2.35-16 +- Rebuild for coq 8.5pl2 + * Wed Jun 1 2016 Jerry James - 2.35-15 - Rebuild for why3 0.87.1 and Frama-C Aluminium From 11ea9a20363a85ad52c9591a034dcde07d61b697 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 22 Jul 2016 09:43:14 -0600 Subject: [PATCH 59/97] Rebuild for apron 0.9.11 and gappalib-coq 1.3.0. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index b6525a2..5d6fae7 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -345,6 +345,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jul 22 2016 Jerry James - 2.35-17 +- Rebuild for apron 0.9.11 and gappalib-coq 1.3.0 + * Wed Jul 13 2016 Jerry James - 2.35-16 - Rebuild for coq 8.5pl2 From 5e6572ac933a8c37c073617379e73b99a5765aa7 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 2 Sep 2016 09:20:42 -0600 Subject: [PATCH 60/97] Rebuild for why3 0.87.2. --- why.spec | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/why.spec b/why.spec index 5d6fae7..d024ba5 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -63,18 +63,6 @@ Requires: hicolor-icon-theme Requires: emacs-filesystem Requires: xemacs-filesystem -# This can be removed once Fedora 22 reaches EOL -Obsoletes: %{name}-gwhy < 2.35-1%{?dist} -Provides: %{name}-gwhy = %{version}-%{release} -Obsoletes: %{name}-emacs < 2.35-1%{?dist} -Provides: %{name}-emacs = %{version}-%{release} -Obsoletes: %{name}-emacs-el < 2.35-1%{?dist} -Provides: %{name}-emacs-el = %{version}-%{release} -Obsoletes: %{name}-xemacs < 2.35-1%{?dist} -Provides: %{name}-xemacs = %{version}-%{release} -Obsoletes: %{name}-xemacs-el < 2.35-1%{?dist} -Provides: %{name}-xemacs-el = %{version}-%{release} - # Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Jc_ast|Jc_env|Loc|Logic|Logic_decl|Misc|Ptree|Types)\\\) @@ -200,13 +188,16 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.87.1, Frama-C Aluminium, and flocq 2.5.1 -sed -e 's/0\.85|0\.86/&|0.87.1/' \ +# Allow building with why3 0.87.2, Frama-C Aluminium, and flocq 2.5.1 +sed -e 's/0\.85|0\.86/&|0.87.2/' \ -e 's/Sodium-20150201/Aluminium-20160501/;s/Sodium/Aluminium/' \ -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ -i configure +# Fix detection of why3 +sed -i '/WHY3/s/\\+\\) \.\*/*\\).*/' configure + %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -345,6 +336,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Sep 2 2016 Jerry James - 2.35-18 +- Rebuild for why3 0.87.2 + * Fri Jul 22 2016 Jerry James - 2.35-17 - Rebuild for apron 0.9.11 and gappalib-coq 1.3.0 From 8af8c0018b80d73f8ebabe4a187cca16940ebf64 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 29 Sep 2016 19:37:45 -0600 Subject: [PATCH 61/97] Rebuild for flocq 2.5.2 and gappalib-coq 1.3.1. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index d024ba5..ae7dee5 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -336,6 +336,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Sep 29 2016 Jerry James - 2.35-19 +- Rebuild for flocq 2.5.2 and gappalib-coq 1.3.1 + * Fri Sep 2 2016 Jerry James - 2.35-18 - Rebuild for why3 0.87.2 From c2bec65c9cc026d76667798687a43dfee871e9bc Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 28 Oct 2016 10:39:58 -0600 Subject: [PATCH 62/97] Rebuild for coq 8.5pl3. Remove obsolete scriptlets. --- why.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index ae7dee5..adfda4e 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -288,12 +288,10 @@ rm -fr %{buildroot}%{_libdir}/why/emacs make check %post jessie -update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %postun jessie -update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : @@ -336,6 +334,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Oct 28 2016 Jerry James - 2.35-20 +- Rebuild for coq 8.5pl3 +- Remove obsolete scriptlets + * Thu Sep 29 2016 Jerry James - 2.35-19 - Rebuild for flocq 2.5.2 and gappalib-coq 1.3.1 From fd1a59230a37bf543ca7239ae65d182d229625a7 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 6 Nov 2016 20:59:27 +0000 Subject: [PATCH 63/97] Rebuild for OCaml 4.04.0. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index adfda4e..fead0e3 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 20%{?dist} +Release: 21%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -334,6 +334,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Nov 06 2016 Richard W.M. Jones - 2.35-21 +- Rebuild for OCaml 4.04.0. + * Fri Oct 28 2016 Jerry James - 2.35-20 - Rebuild for coq 8.5pl3 - Remove obsolete scriptlets From d0e6b47f16df5745f2bd8cb22fea65e673db06f8 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 8 Nov 2016 15:35:14 +0000 Subject: [PATCH 64/97] - Modify configure script to allow building with OCaml 4.04. - Modify configure script to use octMPQ library (part of Apron). --- why.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index fead0e3..7d11b49 100644 --- a/why.spec +++ b/why.spec @@ -176,6 +176,7 @@ done # APRON support: add a missing rpath and adapt to newer versions of apron sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa|" \ + -e 's|APRONLIBS="\(.*\)"|APRONLIBS="\1 octMPQ.cmxa"|' \ -i configure # Enable debuginfo @@ -188,8 +189,9 @@ sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 0.87.2, Frama-C Aluminium, and flocq 2.5.1 -sed -e 's/0\.85|0\.86/&|0.87.2/' \ +# Allow building with OCaml 4.04, why3 0.87.2, Frama-C Aluminium, and flocq 2.5.1 +sed -e 's/4\.02\.\*/4.02.*|4.03.*|4.04.*/' \ + -e 's/0\.85|0\.86/&|0.87.2/' \ -e 's/Sodium-20150201/Aluminium-20160501/;s/Sodium/Aluminium/' \ -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ @@ -336,6 +338,8 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog * Sun Nov 06 2016 Richard W.M. Jones - 2.35-21 - Rebuild for OCaml 4.04.0. +- Modify configure script to allow building with OCaml 4.04. +- Modify configure script to use octMPQ library (part of Apron). * Fri Oct 28 2016 Jerry James - 2.35-20 - Rebuild for coq 8.5pl3 From 789026e7d9c6bfa3a80f12a3803e40cad829d9ab Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 1 Dec 2016 12:02:46 -0700 Subject: [PATCH 65/97] Rebuild for gappalib-coq 1.3.2. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 7d11b49..cccfafa 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.35 -Release: 21%{?dist} +Release: 23%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -336,6 +336,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Nov 30 2016 Jerry James - 2.35-23 +- Rebuild for gappalib-coq 1.3.2 + * Sun Nov 06 2016 Richard W.M. Jones - 2.35-21 - Rebuild for OCaml 4.04.0. - Modify configure script to allow building with OCaml 4.04. From 9e92a04c754863fb6a1cbced4e65156f7af31b3c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 12 Jan 2017 22:02:20 -0700 Subject: [PATCH 66/97] New upstream release. --- .gitignore | 1 + sources | 6 +- why-2.35-Makefile.in.patch | 23 ----- why-frama-c-aluminium.patch | 190 +----------------------------------- why-ocamlgraph186.patch | 14 --- why.spec | 122 ++++------------------- 6 files changed, 30 insertions(+), 326 deletions(-) delete mode 100644 why-2.35-Makefile.in.patch delete mode 100644 why-ocamlgraph186.patch diff --git a/.gitignore b/.gitignore index ed00d3a..fcd170d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /krakatoa.pdf /why-2.35.tar.gz /why-icons.tar.xz +/why-2.36.tar.gz diff --git a/sources b/sources index e3fda8e..84cbc45 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -cc7a2e360acf8569a2eb878f51bfc8ff krakatoa.pdf -10bde72f95de8bc34135a8207cfcc9ec why-2.35.tar.gz -ed5648bbfb5e74fdfb814cdd725b191e why-icons.tar.xz +SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 +SHA512 (why-2.36.tar.gz) = 17cf968d1143fdc585267e7ce0c2673493bf4a8725ff88ce4c5fb3da2ab4bd10d338c7d602b16520d283f0839a0ab1f59bdc6db65548dbf133cef49b0af2ce21 +SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why-2.35-Makefile.in.patch b/why-2.35-Makefile.in.patch deleted file mode 100644 index 5b490d5..0000000 --- a/why-2.35-Makefile.in.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- Makefile.in.orig 2015-03-25 08:32:17.000000000 -0600 -+++ Makefile.in 2015-03-30 20:00:00.000000000 -0600 -@@ -815,17 +815,9 @@ - mkdir -p $(LIBDIR)/why/coq7 - cp -f $(VO7) $(LIBDIR)/why/coq7 - install-coq-v8 install-coq-v8.1: -- if test -w $(COQLIB) ; then \ -- rm -f $(COQLIB)/user-contrib/Why*.v* ; \ -- rm -f $(COQLIB)/user-contrib/caduceus*.v* $(COQLIB)/user-contrib/Caduceus*.v* ; \ -- rm -f $(COQLIB)/user-contrib/jessie*.v* $(COQLIB)/user-contrib/Jessie*.v* ; \ -- mkdir -p $(COQLIB)/user-contrib/Why ; \ -- cp -f $(VO8) $(COQLIB)/user-contrib/Why ; \ -- else \ -- echo "Cannot copy to Coq standard library. Add \"-R $(LIBDIR)/why/coq Why\" to Coq options." ;\ -- fi -- mkdir -p $(LIBDIR)/why/coq -- cp -f $(VO8) $(LIBDIR)/why/coq -+ mkdir -p $(COQLIB)/user-contrib/Why -+ cp -pf $(V8FILES) $(COQLIB)/user-contrib/Why -+ cp -pf $(VO8) $(COQLIB)/user-contrib/Why - - install-pvs-no: - install-pvs-yes: $(PVSFILES) diff --git a/why-frama-c-aluminium.patch b/why-frama-c-aluminium.patch index 8d1f9c6..1cfc8af 100644 --- a/why-frama-c-aluminium.patch +++ b/why-frama-c-aluminium.patch @@ -1,145 +1,6 @@ ---- frama-c-plugin/interp.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ frama-c-plugin/interp.ml 2016-02-11 22:03:07.043502130 -0700 -@@ -2092,7 +2092,7 @@ let rec statement s = - effects of the statements... *) - JCPEblock(statement_list (List.map (fun (x,_,_,_,_) -> x) seq)) - -- | TryFinally _ | TryExcept _ -> assert false -+ | TryFinally _ | TryExcept _ | Throw _ | TryCatch _ -> assert false - in - (* Prefix statement by all non-case labels *) - let labels = filter_out is_case_label s.labels in -@@ -2522,15 +2522,31 @@ let global vardefs g = - - | GEnumTagDecl _ -> [] (* No enumeration declaration in Jessie *) - -- | GVarDecl(_,v,pos) -> -+ | GVarDecl(v,_) -> - (* Keep only declarations for which there is no definition *) - if List.mem v vardefs -- || (isFunctionType v.vtype && -- (v.vname = name_of_assert -- || v.vname = name_of_free -- || v.vname = name_of_malloc)) - then [] -- else if isFunctionType v.vtype then -+ else -+ [JCDvar(ctype v.vtype,v.vname,None)] -+ -+ | GVar(v,{init=None},_pos) -> -+ [JCDvar(ctype v.vtype,v.vname,None)] -+ -+ | GVar(_v,_iinfo,_pos) -> -+ (* Initialization should have been rewritten as code in an -+ * initialization function, that is called by the main function in -+ * global analyses and ignored otherwise. -+ *) -+ assert false -+ -+ | GFunDecl(_,v,pos) -> -+ (* Keep only declarations for which there is no definition *) -+ if List.mem v vardefs -+ || v.vname = name_of_assert -+ || v.vname = name_of_free -+ || v.vname = name_of_malloc -+ then [] -+ else - let rtyp = match unrollType v.vtype with - | TFun(rt,_,_,_) -> rt - | _ -> assert false -@@ -2546,18 +2562,6 @@ let global vardefs g = - let formals = List.map formal params in - let s,_cba,_dba = spec v.vname funspec in - [JCDfun(ctype rtyp,id,formals,s,None)] -- else -- [JCDvar(ctype v.vtype,v.vname,None)] -- -- | GVar(v,{init=None},_pos) -> -- [JCDvar(ctype v.vtype,v.vname,None)] -- -- | GVar(_v,_iinfo,_pos) -> -- (* Initialization should have been rewritten as code in an -- * initialization function, that is called by the main function in -- * global analyses and ignored otherwise. -- *) -- assert false - - | GFun(f,pos) -> - set_curFundec f; -@@ -2692,7 +2696,9 @@ let file f = - in - let is_needed = - function -- | GVarDecl(_,v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> -+ | GVarDecl(v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> -+ v.vreferenced -+ | GFunDecl(_,v,_) when Cil.hasAttribute "FC_BUILTIN" v.vattr -> - v.vreferenced - | _ -> true - in ---- frama-c-plugin/norm.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ frama-c-plugin/norm.ml 2016-06-01 17:46:29.597267704 -0600 -@@ -290,7 +290,7 @@ object(self) - attach_globaction (fun () -> Logic_utils.add_logic_function globinv); - ChangeTo [g;GAnnot(Dinvariant (globinv,v.vdecl),v.vdecl)] - else DoChildren -- | GVarDecl _ | GFun _ | GAnnot _ -> DoChildren -+ | GVarDecl _ | GFun _ | GFunDecl _ | GAnnot _ -> DoChildren - | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ - | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren - -@@ -684,13 +684,13 @@ object(self) - fvi.vtype <- TFun(rt,params,isva,a) - in - function -- | GVarDecl(_spec,v,_attr) -> -- if isFunctionType v.vtype && not v.vdefined then retype_func v; -+ | GFunDecl(_spec,v,_attr) -> -+ if not v.vdefined then retype_func v; - DoChildren - | GFun _ - | GAnnot _ -> DoChildren - | GVar _ | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ -- | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren -+ | GVarDecl _ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren - - method! vfunc f = - let var v = -@@ -1015,7 +1015,7 @@ object(self) - | _ -> assert false - in - ChangeDoChildrenPost ([g], postaction) -- | GVarDecl _ | GFun _ | GAnnot _ -> DoChildren -+ | GVarDecl _ | GFun _ | GFunDecl _ | GAnnot _ -> DoChildren - | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ - | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren - -@@ -1239,12 +1239,12 @@ object - *) - end; - SkipChildren -- | GVarDecl (_,v,_) -> -+ | GVarDecl (v,_) -> - (* No problem with calling [retype_var] more than once, since - subsequent calls do nothing on reference type. *) -- if not (isFunctionType v.vtype || v.vdefined) then retype_var v; -+ if not v.vdefined then retype_var v; - SkipChildren -- | GFun _ -> DoChildren -+ | GFun _ | GFunDecl _ -> DoChildren - | GAnnot _ -> DoChildren - | GCompTag(compinfo,_loc) -> - List.iter retype_field compinfo.cfields; -@@ -1454,7 +1454,7 @@ object - in - List.iter field compinfo.cfields; - SkipChildren -- | GFun _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren -+ | GFun _ | GFunDecl _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren - | GType _ | GCompTagDecl _ | GEnumTagDecl _ - | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren - -@@ -1543,9 +1543,7 @@ object(self) +--- frama-c-plugin/norm.ml.orig 2016-07-22 02:03:57.000000000 -0600 ++++ frama-c-plugin/norm.ml 2017-01-12 17:47:03.338698526 -0700 +@@ -1545,9 +1545,7 @@ object(self) auto_type_wrappers := Cil_datatype.Typ.Set.add wrapper_type !auto_type_wrappers; (* Treat newly constructed type *) @@ -149,31 +10,8 @@ (* Return the wrapper type *) wrapper_type -@@ -1674,10 +1672,10 @@ object(self) - | GFun (f, _) -> - retype_return f.svar; - DoChildren -- | GVarDecl (_, v, _) -> -- if isFunctionType v.vtype && not v.vdefined then -- retype_return v; -+ | GFunDecl (_, v, _) -> -+ if not v.vdefined then retype_return v; - DoChildren -+ | GVarDecl _ - | GVar _ - | GAnnot _ -> DoChildren - | GCompTagDecl _ | GEnumTag _ | GEnumTagDecl _ -@@ -1801,7 +1799,7 @@ object - let field fi = new_field_type fi in - let fty = List.map field fields in - ChangeTo (g::fty) -- | GFun _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren -+ | GFun _ | GFunDecl _ | GAnnot _ | GVar _ | GVarDecl _ -> DoChildren - | GCompTag _ | GType _ | GCompTagDecl _ | GEnumTagDecl _ - | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> SkipChildren - ---- frama-c-plugin/rewrite.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ frama-c-plugin/rewrite.ml 2016-06-01 17:18:58.738619756 -0600 +--- frama-c-plugin/rewrite.ml.orig 2016-07-22 02:03:57.000000000 -0600 ++++ frama-c-plugin/rewrite.ml 2017-01-12 17:34:59.808134419 -0700 @@ -56,7 +56,7 @@ class add_default_behavior = then begin let bhv = Cil.mk_behavior ~name:Cil.default_behavior_name () in @@ -183,21 +21,3 @@ List.iter Property_status.register props; s.spec_behavior <- bhv :: s.spec_behavior end; -@@ -109,7 +109,7 @@ object - | GCompTagDecl(compinfo,_loc) -> - add_type (TComp(compinfo,empty_size_cache (),[])); - SkipChildren -- | GVarDecl _ | GVar _ | GFun _ | GAnnot _ | GType _ -+ | GVarDecl _ | GVar _ | GFunDecl _ | GFun _ | GAnnot _ | GType _ - | GEnumTagDecl _ | GEnumTag _ | GAsm _ | GPragma _ | GText _ -> - DoChildren - -@@ -598,7 +598,7 @@ object - in - Cil.unsafeSetFormalsDecl f formals; - my_globals <- -- GVarDecl(Cil.empty_funspec(),f,loc) :: my_globals; -+ GFunDecl(Cil.empty_funspec(),f,loc) :: my_globals; - Globals.Functions.replace_by_declaration spec f loc; - let kf = Globals.Functions.get f in - Annotations.register_funspec ~emitter:Common.jessie_emitter kf; diff --git a/why-ocamlgraph186.patch b/why-ocamlgraph186.patch deleted file mode 100644 index fd15ef4..0000000 --- a/why-ocamlgraph186.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- src/hypotheses_filtering.ml.orig 2015-03-25 08:32:17.000000000 -0600 -+++ src/hypotheses_filtering.ml 2015-03-30 20:00:00.000000000 -0600 -@@ -1680,9 +1680,9 @@ - *******************) - - module W = struct -- type label = PdlGraph.E.label -+ type edge = PdlGraph.E.t - type t = int -- let weight x = x -+ let weight e = PdlGraph.E.label e - let zero = 0 - let add = (+) - let compare = compare diff --git a/why.spec b/why.spec index cccfafa..934d8bc 100644 --- a/why.spec +++ b/why.spec @@ -9,8 +9,8 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: why -Version: 2.35 -Release: 23%{?dist} +Version: 2.36 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -27,23 +27,12 @@ Source8: patch_jessie_pvs # Created with gimp from official upstream icon Source9: %{name}-icons.tar.xz -# This patch makes a Fedora-specific fix to eliminate checking for the -# location of Coq - since we're using the coq package, we know where -# it is and their checking causes the rpm building to fail. -# It also makes a fix necessary to correctly build the bytecode only -# version of why by building the make_float_model tool correctly in -# this case. -Patch0: %{name}-2.35-Makefile.in.patch - -# Adapt to ocamlgraph 1.8.6 -Patch1: %{name}-ocamlgraph186.patch - # Adapt to Frama-C Aluminium -Patch2: %{name}-frama-c-aluminium.patch +Patch0: %{name}-frama-c-aluminium.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils -BuildRequires: emacs xemacs xemacs-packages-extra +BuildRequires: xemacs xemacs-packages-extra BuildRequires: frama-c BuildRequires: gappalib-coq BuildRequires: ocaml @@ -53,15 +42,20 @@ BuildRequires: ocaml-findlib BuildRequires: ocaml-mlgmpidl-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel +BuildRequires: ocaml-zarith-devel BuildRequires: why3 BuildRequires: coq %if %{has_pvs} BuildRequires: pvs %endif +Requires: gappalib-coq Requires: hicolor-icon-theme Requires: emacs-filesystem -Requires: xemacs-filesystem + +# This can be removed once Fedora 25 reaches EOL +Obsoletes: %{name}-coq < 2.36-1 +Provides: %{name}-coq = %{version}-%{release} # Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Jc_ast|Jc_env|Loc|Logic|Logic_decl|Misc|Ptree|Types)\\\) @@ -95,15 +89,6 @@ Requires: frama-c The Jessie plugin, an interface between why and frama-c. Invoke it with: frama-c -jessie FILE.c -%package coq -Summary: Libraries for interfacing Coq with Why -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: gappalib-coq - -%description coq -This package contains a set of routines that assist in the manipulation -of why Coq-formatted output within Coq. - %if %{has_pvs} # Why's integration with PVS depends on the NASA Langley PVS Libraries, # which have no license information. This provides an alternative: @@ -121,11 +106,10 @@ verification platform suite can invoke PVS without licensing issues. Summary: Complete Why software verification platform suite Requires: why%{?_isa} = %{version}-%{release} Requires: why-jessie%{?_isa} = %{version}-%{release} -Requires: why-coq%{?_isa} = %{version}-%{release} %if %{has_pvs} Requires: why-pvs-support%{?_isa} = %{version}-%{release} %endif -Requires: alt-ergo gappalib-coq z3 zenon +Requires: alt-ergo z3 zenon %description all This package provides a complete software verification platform suite @@ -135,8 +119,6 @@ based on Why, including various automated and interactive provers. %setup -q %setup -q -T -D -a 9 %patch0 -%patch1 -%patch2 cp -p %SOURCE2 ./ @@ -153,30 +135,13 @@ done mv -f %1.utf8 %1; # Fix encodings -for f in CHANGES COPYING examples/bresenham/bresenham.mlw \ - examples/bresenham/bresenham_coq.mlw examples/bresenham/bresenham_inv.mlw \ - examples/edit-distance/distance.mlw examples/heapsort/downheap.mlw \ - examples/heapsort/heapsort.mlw examples/heapsort/Inftree.v \ - examples/kmp/kmp.mlw examples/kmp/Lex.v examples/kmp/Match.v \ - examples/kmp/Next.v examples/misc/matrix.why examples/misc/matrix_why.v \ - examples/quicksort/partition.mlw examples/quicksort/Partition.v \ - examples/quicksort/quicksort.mlw examples/quicksort/Quicksort.v \ - examples/sqrt/sqrt.mlw examples/string-matching/Match.v; do +for f in CHANGES COPYING; do %fix_encoding $f ISO-8859-1 UTF-8 done -# Fix line endings -for f in examples-c/tutorial/average.c examples-c/tutorial/purse.c \ - examples-c/ukkonen/main.c examples-c/ukkonen/ukkonen.c; do - sed "s/\r//" $f > $f.new - touch -r $f $f.new - mv -f $f.new $f -done - # APRON support: add a missing rpath and adapt to newer versions of apron sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ - -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa|" \ - -e 's|APRONLIBS="\(.*\)"|APRONLIBS="\1 octMPQ.cmxa"|' \ + -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa octMPQ.cmxa|" \ -i configure # Enable debuginfo @@ -184,17 +149,11 @@ sed -i 's,@STRIP@,/usr/bin/true,;s,-dtypes [^-],-g &,' Makefile.in sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -e 's/command = "pvs"/command = "pvs-sbcl"/' \ - -e 's/PVS, (pvs, \["pvs"\]);/PVS, (pvs, ["pvs-sbcl" ; "pvs"]);/' \ - -i tools/dpConfig.ml sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with OCaml 4.04, why3 0.87.2, Frama-C Aluminium, and flocq 2.5.1 -sed -e 's/4\.02\.\*/4.02.*|4.03.*|4.04.*/' \ - -e 's/0\.85|0\.86/&|0.87.2/' \ - -e 's/Sodium-20150201/Aluminium-20160501/;s/Sodium/Aluminium/' \ - -e 's/FRAMAC -version.*`/FRAMAC -version`/' \ - -e 's/Import Flocq_version/Import Flocq.Flocq_version/' \ +# Allow building with OCaml 4.04 and Frama-C Aluminium +sed -e 's/4\.03\.\*/4.03.*|4.04.*/' \ + -e 's/Magnesium-20151002/Aluminium-20160501/;s/Magnesium/Aluminium/' \ -i configure # Fix detection of why3 @@ -246,46 +205,11 @@ cp -p %{SOURCE8} %{buildroot}%{_bindir}/ %endif %global why_doc_dir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} -%global why_examples_dir %{why_doc_dir}/examples/ # Fix up documentation and examples -mkdir -p %{buildroot}%{why_examples_dir}mlw/ -mkdir -p %{buildroot}%{why_examples_dir}c/ -cp -p doc/manual.ps %{buildroot}%{why_doc_dir}/why-manual.ps +mkdir -p %{buildroot}%{why_doc_dir} cp -p %{SOURCE1} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} -# Copy in the example files, leaving behind all generated files -cd examples -for d in `find -mindepth 1 -maxdepth 1 -type d`; do - mkdir -p %{buildroot}%{why_examples_dir}mlw/$d -done -for f in `find -regex '.*\(\.mlw\|\.why\)' | grep -E -v '_inv|_coq|_why'`; do - cp -p $f %{buildroot}%{why_examples_dir}mlw/$f -done - -cd ../examples-c -for d in `find -mindepth 1 -maxdepth 1 -type d`; do - mkdir -p %{buildroot}%{why_examples_dir}c/$d -done -for f in `find -regex '.*\.c'`; do - cp -p $f %{buildroot}%{why_examples_dir}c/$f -done - -# Remove a stray coq file (already installed in the right place) -rm -f %{buildroot}%{_libdir}/coq/jessie_why.v - -# Move the Emacs support file to the right places and byte compile it -cd .. -mkdir -p %{buildroot}%{_emacs_sitelispdir} -cp -p lib/emacs/why.el %{buildroot}%{_emacs_sitelispdir} -mkdir -p %{buildroot}%{_xemacs_sitelispdir} -cp -p lib/emacs/why.el %{buildroot}%{_xemacs_sitelispdir} -cd %{buildroot}%{_emacs_sitelispdir} -%{_emacs_bytecompile} why.el -cd %{buildroot}%{_xemacs_sitelispdir} -%{_xemacs_bytecompile} why.el -rm -fr %{buildroot}%{_libdir}/why/emacs - %check make check @@ -298,15 +222,12 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files +%doc README.why-coq.Fedora %license COPYING LICENSE %{_bindir}/* %{_libdir}/why/ %{_datadir}/icons/hicolor/*/apps/%{name}.png -%{_emacs_sitelispdir}/why.el* -%{_xemacs_sitelispdir}/why.el* %{why_doc_dir}/ -# This last example is really an example only for Coq - only .v files -%exclude %{why_examples_dir}mlw/string-matching/ # why-jessie %exclude %{_bindir}/jessie # why-pvs-support: @@ -320,10 +241,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/appdata/jessie.appdata.xml %{_datadir}/applications/jessie.desktop -%files coq -%doc README.why-coq.Fedora -%{_libdir}/coq/user-contrib/Why/ - %if %{has_pvs} %files pvs-support %{_libdir}/pvs/lib/* @@ -336,6 +253,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jan 12 2017 Jerry James - 2.36-1 +- New upstream release + * Wed Nov 30 2016 Jerry James - 2.35-23 - Rebuild for gappalib-coq 1.3.2 From 6ca41f2515db3bc28f80f5f6d4a20bc11db8ec0c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:22:09 +0000 Subject: [PATCH 67/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 934d8bc..3118958 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.36 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -253,6 +253,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 2.36-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Thu Jan 12 2017 Jerry James - 2.36-1 - New upstream release From 8bf5f8b711d24e7a04e553bd703c9efef4d31f2d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 24 Mar 2017 14:48:48 -0600 Subject: [PATCH 68/97] New upstream release. --- .gitignore | 2 +- sources | 2 +- why-frama-c-aluminium.patch | 23 ----------------------- why.spec | 21 +++++++++------------ 4 files changed, 11 insertions(+), 37 deletions(-) delete mode 100644 why-frama-c-aluminium.patch diff --git a/.gitignore b/.gitignore index fcd170d..71c4898 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /krakatoa.pdf -/why-2.35.tar.gz /why-icons.tar.xz /why-2.36.tar.gz +/why-2.38.tar.gz diff --git a/sources b/sources index 84cbc45..d04e7bd 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 -SHA512 (why-2.36.tar.gz) = 17cf968d1143fdc585267e7ce0c2673493bf4a8725ff88ce4c5fb3da2ab4bd10d338c7d602b16520d283f0839a0ab1f59bdc6db65548dbf133cef49b0af2ce21 +SHA512 (why-2.38.tar.gz) = 304cda3aa2f0ca2e114cf3bc6f2bb89327ec97b0f2217d605dbcda3b7601550992bb757724af43ba4ee7ca8eb7ca8bcacb218265acbe7b7b275de9cca86f88a9 SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why-frama-c-aluminium.patch b/why-frama-c-aluminium.patch deleted file mode 100644 index 1cfc8af..0000000 --- a/why-frama-c-aluminium.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- frama-c-plugin/norm.ml.orig 2016-07-22 02:03:57.000000000 -0600 -+++ frama-c-plugin/norm.ml 2017-01-12 17:47:03.338698526 -0700 -@@ -1545,9 +1545,7 @@ object(self) - auto_type_wrappers := - Cil_datatype.Typ.Set.add wrapper_type !auto_type_wrappers; - (* Treat newly constructed type *) -- let store_current_global = !currentGlobal in - ignore (Cil.visitCilGlobal (self:>Cil.cilVisitor) wrapper_def); -- currentGlobal := store_current_global; - (* Return the wrapper type *) - wrapper_type - ---- frama-c-plugin/rewrite.ml.orig 2016-07-22 02:03:57.000000000 -0600 -+++ frama-c-plugin/rewrite.ml 2017-01-12 17:34:59.808134419 -0700 -@@ -56,7 +56,7 @@ class add_default_behavior = - then begin - let bhv = Cil.mk_behavior ~name:Cil.default_behavior_name () in - let kf = Extlib.the self#current_kf in -- let props = Property.ip_all_of_behavior kf Kglobal bhv in -+ let props = Property.ip_all_of_behavior kf Kglobal [] bhv in - List.iter Property_status.register props; - s.spec_behavior <- bhv :: s.spec_behavior - end; diff --git a/why.spec b/why.spec index 3118958..a180553 100644 --- a/why.spec +++ b/why.spec @@ -9,8 +9,8 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: why -Version: 2.36 -Release: 2%{?dist} +Version: 2.38 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -27,9 +27,6 @@ Source8: patch_jessie_pvs # Created with gimp from official upstream icon Source9: %{name}-icons.tar.xz -# Adapt to Frama-C Aluminium -Patch0: %{name}-frama-c-aluminium.patch - BuildRequires: auto-destdir BuildRequires: desktop-file-utils BuildRequires: xemacs xemacs-packages-extra @@ -118,7 +115,6 @@ based on Why, including various automated and interactive provers. %prep %setup -q %setup -q -T -D -a 9 -%patch0 cp -p %SOURCE2 ./ @@ -151,19 +147,17 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with OCaml 4.04 and Frama-C Aluminium -sed -e 's/4\.03\.\*/4.03.*|4.04.*/' \ - -e 's/Magnesium-20151002/Aluminium-20160501/;s/Magnesium/Aluminium/' \ - -i configure +# Allow building with OCaml 4.04 +sed -i 's/4\.03\.\*/4.03.*|4.04.*/' configure # Fix detection of why3 sed -i '/WHY3/s/\\+\\) \.\*/*\\).*/' configure %build %if ! %{opt} -%global opt_option OCAMLBEST=byte OCAMLC=ocamlc OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex +%global opt_option OCAMLBEST=byte OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex %else -%global opt_option OCAMLBEST=opt OCAMLOPT=ocamlopt.opt +%global opt_option OCAMLBEST=opt %endif %configure --enable-apron --enable-verbosemake @@ -253,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Mar 24 2017 Jerry James - 2.38-1 +- New upstream release + * Sat Feb 11 2017 Fedora Release Engineering - 2.36-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From e4380d336bb329fd196eed3f15be0ae5170d3f0b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 15 May 2017 12:31:56 +0100 Subject: [PATCH 69/97] Rebuild for OCaml 4.04.1. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index a180553..2bfe59e 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.38 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -247,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon May 15 2017 Richard W.M. Jones - 2.38-2 +- Rebuild for OCaml 4.04.1. + * Fri Mar 24 2017 Jerry James - 2.38-1 - New upstream release From b38be9d05d34c8cfece01e2ba1be7c40fa19434f Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 1 Jul 2017 22:55:03 +0100 Subject: [PATCH 70/97] Rebuild for OCaml 4.04.2. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 2bfe59e..3dc82bd 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.38 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -247,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Jul 01 2017 Richard W.M. Jones - 2.38-3 +- Rebuild for OCaml 4.04.2. + * Mon May 15 2017 Richard W.M. Jones - 2.38-2 - Rebuild for OCaml 4.04.1. From 6d7c5cec991464b5c256bd79c3d211ceb5a8e430 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 21:35:53 +0000 Subject: [PATCH 71/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 3dc82bd..4344c5d 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.38 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -247,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.38-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Jul 01 2017 Richard W.M. Jones - 2.38-3 - Rebuild for OCaml 4.04.2. From 62b51ec56f015ad58bf07d78c8a521d3bee7e312 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 10:16:01 +0000 Subject: [PATCH 72/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 4344c5d..a83b9fd 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.38 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -247,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 2.38-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 2.38-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 502e32209c8b6828dfc51e4c7268a4f436a885ae Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Sep 2017 19:30:58 +0100 Subject: [PATCH 73/97] OCaml 4.05.0 rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index a83b9fd..bf21dc4 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.38 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -247,6 +247,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Sep 06 2017 Richard W.M. Jones - 2.38-6 +- OCaml 4.05.0 rebuild. + * Thu Aug 03 2017 Fedora Release Engineering - 2.38-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 19cbe099eaf255d17caf0809b978950bfaff947c Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 20 Sep 2017 18:23:26 -0600 Subject: [PATCH 74/97] New upstream release. --- .gitignore | 1 + sources | 2 +- why.spec | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 71c4898..ba8b107 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /why-icons.tar.xz /why-2.36.tar.gz /why-2.38.tar.gz +/why-2.39.tar.gz diff --git a/sources b/sources index d04e7bd..77125d9 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 -SHA512 (why-2.38.tar.gz) = 304cda3aa2f0ca2e114cf3bc6f2bb89327ec97b0f2217d605dbcda3b7601550992bb757724af43ba4ee7ca8eb7ca8bcacb218265acbe7b7b275de9cca86f88a9 +SHA512 (why-2.39.tar.gz) = b36e9423ff82fa2f51fea40a33021ed0def3719d9421b2f7f1e2aa1d6113faacf932984ac293b6d0ac92f800fd48efbdd8cc3ec6a929003a57da20efab682bad SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why.spec b/why.spec index bf21dc4..1644191 100644 --- a/why.spec +++ b/why.spec @@ -9,8 +9,8 @@ %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) Name: why -Version: 2.38 -Release: 6%{?dist} +Version: 2.39 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -147,11 +147,8 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with OCaml 4.04 -sed -i 's/4\.03\.\*/4.03.*|4.04.*/' configure - -# Fix detection of why3 -sed -i '/WHY3/s/\\+\\) \.\*/*\\).*/' configure +# Allow building with OCaml 4.05 +sed -i 's/4\.04\.\*/4.04.*|4.05.*/' configure %build %if ! %{opt} @@ -247,6 +244,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Sep 7 2017 Jerry James - 2.39-1 +- New upstream release + * Wed Sep 06 2017 Richard W.M. Jones - 2.38-6 - OCaml 4.05.0 rebuild. From 84ade9ed5995754b97856f33d5c35c62a4330454 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 7 Oct 2017 20:01:20 -0600 Subject: [PATCH 75/97] Rebuild for why3 0.88.0. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 1644191..270051a 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.39 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -244,6 +244,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Oct 7 2017 Jerry James - 2.39-2 +- Rebuild for why3 0.88.0 + * Thu Sep 7 2017 Jerry James - 2.39-1 - New upstream release From 9a8305d6c02bcfcf94fba491cdbde63d612a2aa6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 2 Dec 2017 11:22:50 +0000 Subject: [PATCH 76/97] OCaml 4.06.0 rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 270051a..1449532 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.39 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -244,6 +244,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Dec 02 2017 Richard W.M. Jones - 2.39-3 +- OCaml 4.06.0 rebuild. + * Sat Oct 7 2017 Jerry James - 2.39-2 - Rebuild for why3 0.88.0 From bfd7fd56a1eb65c26f914095d957dfa86bbbe195 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 9 Dec 2017 16:07:42 -0700 Subject: [PATCH 77/97] Bring back the -project patch, still needed (bz 1520483). Add the -safe-string patch for building with ocaml 4.06.0. Build the Jessie plugin with -runtime-variant _pic. --- why-ocaml-4.06.patch | 22 ++++++++ why-project.patch | 115 ++++++++++++++++++++++++++++++++++++++++++ why-safe-string.patch | 67 ++++++++++++++++++++++++ why.spec | 23 +++++++-- 4 files changed, 224 insertions(+), 3 deletions(-) create mode 100644 why-ocaml-4.06.patch create mode 100644 why-project.patch create mode 100644 why-safe-string.patch diff --git a/why-ocaml-4.06.patch b/why-ocaml-4.06.patch new file mode 100644 index 0000000..32f133c --- /dev/null +++ b/why-ocaml-4.06.patch @@ -0,0 +1,22 @@ +--- configure.orig 2017-08-23 02:08:38.000000000 -0600 ++++ configure 2017-12-09 13:10:09.950794648 -0700 +@@ -1823,7 +1823,7 @@ case $OCAMLVERSION in + OCAMLWARN=Aer-6-41-44-45 ;; + 4.02.*) + OCAMLWARN=Aer-3-6-41-44-45-48-50 ;; +- 4.03.*|4.04.*) ++ 4.03.*|4.04.*|4.05.*|4.06.*) + OCAMLWARN=Aer-3-6-41-44-45-48-50-52-57 ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown Objective Caml version" >&5 +--- Makefile.in.orig 2017-12-04 21:00:24.549232019 -0700 ++++ Makefile.in 2017-12-09 13:10:39.550655718 -0700 +@@ -213,7 +213,7 @@ jc/jc.cmx jc/jc.o: $(JCCMX_EXPORT) + # ppc: jc/jc.cmi jc/jc.cmo jc/jc.cmx + + bin/jessie.opt: $(JCCMX) +- $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ ++ $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) -runtime-variant _pic $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ + unix.cmxa str.cmxa nums.cmxa graph.cmxa $^ + $(STRIP) $@ + diff --git a/why-project.patch b/why-project.patch new file mode 100644 index 0000000..e50186a --- /dev/null +++ b/why-project.patch @@ -0,0 +1,115 @@ +--- Makefile.in.orig 2017-08-23 02:08:38.000000000 -0600 ++++ Makefile.in 2017-12-04 21:00:24.549232019 -0700 +@@ -154,7 +154,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src + src/effect.cmo src/pp.cmo src/option_misc.cmo \ + src/report.cmo \ + src/explain.cmo \ +- src/xml.cmo src/project.cmo ++ src/xml.cmo src/whyproject.cmo + + # jessie + JCCML_EXPORT = src/why3_kw.ml jc/output.ml \ +--- src/options.mli.orig 2017-08-23 02:08:38.000000000 -0600 ++++ src/options.mli 2017-12-04 21:01:17.268996320 -0700 +@@ -184,7 +184,7 @@ val files : string list + (*s GUI? *) + + val gui : bool ref +-val gui_project : Project.t option ref ++val gui_project : Whyproject.t option ref + val lib_files_to_load : string list + + (* +--- src/pretty.ml.orig 2017-08-23 02:08:38.000000000 -0600 ++++ src/pretty.ml 2017-12-04 21:02:42.540615229 -0700 +@@ -416,12 +416,12 @@ let output_project f = + with Not_found -> + functions := SMap.add fn SMap.empty !functions) + Util.program_locs ; +- let p = Project.create (Filename.basename f) in +- Project.set_project_context_file p (f ^ "_ctx.why"); ++ let p = Whyproject.create (Filename.basename f) in ++ Whyproject.set_project_context_file p (f ^ "_ctx.why"); + List.iter + (fun (expl,fpo) -> + let n = expl.lemma_or_fun_name in +- let _ = Project.add_lemma p n expl fpo in ()) ++ let _ = Whyproject.add_lemma p n expl fpo in ()) + !lemmas; + SMap.iter + (fun fname behs -> +@@ -431,15 +431,15 @@ let output_project f = + floc + with Not_found -> Loc.dummy_floc + in +- let f = Project.add_function p fname floc in ++ let f = Whyproject.add_function p fname floc in + SMap.iter + (fun beh vcs -> +- let be = Project.add_behavior f beh floc in ++ let be = Whyproject.add_behavior f beh floc in + List.iter + (fun (expl,fpo) -> +- let _ = Project.add_goal be expl fpo in ()) ++ let _ = Whyproject.add_goal be expl fpo in ()) + vcs) + behs) + !functions; +- Project.save p f; ++ Whyproject.save p f; + p +--- src/pretty.mli.orig 2017-08-23 02:08:38.000000000 -0600 ++++ src/pretty.mli 2017-12-04 21:03:05.635512035 -0700 +@@ -50,4 +50,4 @@ val output_files : string -> unit + (* [output_project f] produces a whole project description, in a file + [f.wpr], together with other needed files [f_ctx.why], [f_lemmas.why], + and each goal in a separate file [f_po.why] for i=1,2,... *) +-val output_project : string -> Project.t ++val output_project : string -> Whyproject.t +--- src/whyweb.ml.orig 2017-08-23 02:08:38.000000000 -0600 ++++ src/whyweb.ml 2017-12-04 21:04:16.932193463 -0700 +@@ -29,7 +29,7 @@ + (**************************************************************************) + + open Format +-open Project ++open Whyproject + + (*prover*) + let provers = [Ergo ; Simplify ; Z3 ; Yices ; Cvc3] +@@ -168,7 +168,7 @@ let file = match !file with + | None -> () + | Some f -> Arg.usage spec usage; exit 1 + +-let proj = ref (Project.create "") ++let proj = ref (Whyproject.create "") + + let proj_file = ref "" + +@@ -260,7 +260,7 @@ let interp_com c = + let _ = Thread.create (launch_behavior Cvc3) b in () + | `LaunchCvc3Function f -> + let _ = Thread.create (launch_function Cvc3) f in () +- | `Save -> Project.save !proj !proj.project_name ++ | `Save -> Whyproject.save !proj !proj.project_name + end; + loc + with Not_found -> ("",0,0,0) +@@ -343,7 +343,7 @@ let main_page msg = + let load_prj file = + eprintf "Reading file %s@." file; + try +- proj := Project.load file; ++ proj := Whyproject.load file; + proj_file := file; + with + Sys_error _ -> +@@ -526,7 +526,7 @@ wprint "
Save Proj +
%s%s
Interactive proof sessionMax function proofBinary search function proofBinary search arithmetic overflowBinar search function behavior
" ns; + wprint ""; + List.iter (fun prover -> +- wprint "" (Project.provers_name prover)) ++ wprint "" (Whyproject.provers_name prover)) + provers; + wprint " + "; diff --git a/why-safe-string.patch b/why-safe-string.patch new file mode 100644 index 0000000..20c3406 --- /dev/null +++ b/why-safe-string.patch @@ -0,0 +1,67 @@ +--- jc/jc_annot_inference.ml.orig 2017-08-23 02:08:38.000000000 -0600 ++++ jc/jc_annot_inference.ml 2017-12-05 21:03:16.549749880 -0700 +@@ -212,14 +212,14 @@ let name_of_term t = + Format.fprintf str_formatter "%a" Jc_output.term t; + let s = Format.flush_str_formatter () in + let s = filter_alphanumeric s in +- "T" ^ unique_term_name t s ++ "T" ^ unique_term_name t (Bytes.to_string s) + + let name_of_assertion a = + ignore (Format.flush_str_formatter ()); + Format.fprintf str_formatter "%a" Jc_output.assertion a; + let s = Format.flush_str_formatter () in + let s = filter_alphanumeric s in +- "A" ^ unique_assertion_name a s ++ "A" ^ unique_assertion_name a (Bytes.to_string s) + + (* support of (Nicolas) *) + let rec destruct_alloc t = +--- jc/jc_region.ml.orig 2017-08-23 02:08:38.000000000 -0600 ++++ jc/jc_region.ml 2017-12-05 21:01:36.269076188 -0700 +@@ -244,8 +244,8 @@ struct + jc_reg_variable = false; + jc_reg_bitwise = false; + jc_reg_id = id; +- jc_reg_name = name; +- jc_reg_final_name = name ^ "_" ^ (string_of_int id); ++ jc_reg_name = (Bytes.to_string name); ++ jc_reg_final_name = (Bytes.to_string name) ^ "_" ^ (string_of_int id); + jc_reg_type = ty; + } + +@@ -258,8 +258,8 @@ struct + jc_reg_variable = true; + jc_reg_bitwise = false; + jc_reg_id = id; +- jc_reg_name = name; +- jc_reg_final_name = name ^ "_" ^ (string_of_int id); ++ jc_reg_name = (Bytes.to_string name); ++ jc_reg_final_name = (Bytes.to_string name) ^ "_" ^ (string_of_int id); + jc_reg_type = ty; + } + +--- src/lib.ml.orig 2017-08-23 02:08:38.000000000 -0600 ++++ src/lib.ml 2017-12-05 20:43:07.384255238 -0700 +@@ -54,7 +54,7 @@ let file_subdir ~dir ~file = + let file_copy src dest = + let cin = open_in src + and cout = open_out dest +- and buff = String.make 1024 ' ' ++ and buff = Bytes.make 1024 ' ' + and n = ref 0 + in + while n := input cin buff 0 1024; !n <> 0 do +@@ -68,10 +68,10 @@ let file_copy_if_different src dst = + + let channel_contents_buf cin = + let buf = Buffer.create 1024 +- and buff = String.make 1024 ' ' in ++ and buff = Bytes.make 1024 ' ' in + let n = ref 0 in + while n := input cin buff 0 1024; !n <> 0 do +- Buffer.add_substring buf buff 0 !n ++ Buffer.add_subbytes buf buff 0 !n + done; + buf + diff --git a/why.spec b/why.spec index 1449532..c2fc8ec 100644 --- a/why.spec +++ b/why.spec @@ -26,6 +26,13 @@ Source7: rem.pvs Source8: patch_jessie_pvs # Created with gimp from official upstream icon Source9: %{name}-icons.tar.xz +# Avoid a clash between Frama-C and why modules both named "Project". +# Sent upstream 26 Jun 2014. +Patch0: %{name}-project.patch +# Adapt to the safe string feature of ocaml 4.06 +Patch1: %{name}-safe-string.patch +# Adapt to ocaml 4.06 in general +Patch2: %{name}-ocaml-4.06.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils @@ -37,6 +44,7 @@ BuildRequires: ocaml-apron-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-mlgmpidl-devel +BuildRequires: ocaml-num-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel BuildRequires: ocaml-zarith-devel @@ -115,6 +123,13 @@ based on Why, including various automated and interactive provers. %prep %setup -q %setup -q -T -D -a 9 +%patch0 +%patch1 +%patch2 + +# The other part of avoiding the "Project" module name clash +mv src/project.ml src/whyproject.ml +mv src/project.mli src/whyproject.mli cp -p %SOURCE2 ./ @@ -147,9 +162,6 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with OCaml 4.05 -sed -i 's/4\.04\.\*/4.04.*|4.05.*/' configure - %build %if ! %{opt} %global opt_option OCAMLBEST=byte OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex @@ -244,6 +256,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Dec 9 2017 Jerry James - 2.39-3 +- Bring back the -project patch, still needed (bz 1520483) +- Add the -safe-string patch for building with ocaml 4.06.0 +- Build the Jessie plugin with -runtime-variant _pic + * Sat Dec 02 2017 Richard W.M. Jones - 2.39-3 - OCaml 4.06.0 rebuild. From d328121299f44fbb864b2b87a6161040c08b36ea Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 18 Jan 2018 22:48:54 +0100 Subject: [PATCH 78/97] Remove obsolete scriptlets Signed-off-by: Igor Gnatenko --- why.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/why.spec b/why.spec index c2fc8ec..1e925f2 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.39 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -216,14 +216,6 @@ cp -p %{SOURCE1} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} %check make check -%post jessie -touch --no-create %{_datadir}/icons/hicolor &>/dev/null -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%postun jessie -touch --no-create %{_datadir}/icons/hicolor &>/dev/null -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - %files %doc README.why-coq.Fedora %license COPYING LICENSE @@ -256,6 +248,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jan 18 2018 Igor Gnatenko - 2.39-4 +- Remove obsolete scriptlets + * Sat Dec 9 2017 Jerry James - 2.39-3 - Bring back the -project patch, still needed (bz 1520483) - Add the -safe-string patch for building with ocaml 4.06.0 From 88eb8b7a51249bdd3aecea35174efeff8ec09af0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 20:55:21 +0000 Subject: [PATCH 79/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 1e925f2..9c84a8c 100644 --- a/why.spec +++ b/why.spec @@ -10,7 +10,7 @@ Name: why Version: 2.39 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -248,6 +248,9 @@ make check %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 2.39-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Jan 18 2018 Igor Gnatenko - 2.39-4 - Remove obsolete scriptlets From 88002a4073e641acc683fe58e5369d776c683fb8 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 12 Feb 2018 20:20:06 -0700 Subject: [PATCH 80/97] New upstream release. Add -num patch to fix incomplete num to zarith conversion. --- .gitignore | 1 + sources | 2 +- why-num.patch | 596 ++++++++++++++++++++++++++++++++++++++++++ why-ocaml-4.06.patch | 19 +- why-project.patch | 22 +- why-safe-string.patch | 52 +--- why.spec | 29 +- 7 files changed, 629 insertions(+), 92 deletions(-) create mode 100644 why-num.patch diff --git a/.gitignore b/.gitignore index ba8b107..31ca9a5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /why-2.36.tar.gz /why-2.38.tar.gz /why-2.39.tar.gz +/why-2.40.tar.gz diff --git a/sources b/sources index 77125d9..2db9799 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 -SHA512 (why-2.39.tar.gz) = b36e9423ff82fa2f51fea40a33021ed0def3719d9421b2f7f1e2aa1d6113faacf932984ac293b6d0ac92f800fd48efbdd8cc3ec6a929003a57da20efab682bad +SHA512 (why-2.40.tar.gz) = e99f528ab2a3030c5ed8509ec45e75dc2f3dc2ed92fe1213c2b92a2dc700e2d9c32bc765751b2660cc1f3a6e110b4687a4262779fdae52faaaf144c411712972 SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why-num.patch b/why-num.patch new file mode 100644 index 0000000..10b0164 --- /dev/null +++ b/why-num.patch @@ -0,0 +1,596 @@ +--- atp/cooper.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/cooper.ml 2018-02-11 20:48:48.754907226 -0700 +@@ -38,10 +38,10 @@ + (* Lift operations up to numerals. *) + (* ------------------------------------------------------------------------- *) + +-let mk_numeral n = Fn(string_of_num n,[]);; ++let mk_numeral n = Fn(Z.to_string n,[]);; + + let dest_numeral = +- function (Fn(ns,[])) -> num_of_string ns ++ function (Fn(ns,[])) -> Z.of_string ns + | _ -> failwith "dest_numeral";; + + let is_numeral = can dest_numeral;; +@@ -59,12 +59,12 @@ let numeral2 fn m n = mk_numeral(fn (des + (* ------------------------------------------------------------------------- *) + + let rec linear_cmul n tm = +- if n =/ Int 0 then Fn("0",[]) else ++ if Z.equal n Z.zero then Fn("0",[]) else + match tm with + Fn("+",[Fn("*",[c1; x1]); rest]) -> +- Fn("+",[Fn("*",[numeral1 (( */ ) n) c1; x1]); ++ Fn("+",[Fn("*",[numeral1 (Z.mul n) c1; x1]); + linear_cmul n rest]) +- | k -> numeral1 (( */ ) n) k;; ++ | k -> numeral1 (Z.mul n) k;; + + let earlierv vars (Var x) (Var y) = earlier vars x y;; + +@@ -73,7 +73,7 @@ let rec linear_add vars tm1 tm2 = + (Fn("+",[Fn("*",[c1; x1]); rest1]), + Fn("+",[Fn("*",[c2; x2]); rest2])) -> + if x1 = x2 then +- let c = numeral2 (+/) c1 c2 in ++ let c = numeral2 Z.add c1 c2 in + if c = Fn("0",[]) then linear_add vars rest1 rest2 + else Fn("+",[Fn("*",[c; x1]); linear_add vars rest1 rest2]) + else if earlierv vars x1 x2 then +@@ -84,9 +84,9 @@ let rec linear_add vars tm1 tm2 = + Fn("+",[Fn("*",[c1; x1]); linear_add vars rest1 tm2]) + | (_,Fn("+",[Fn("*",[c2; x2]); rest2])) -> + Fn("+",[Fn("*",[c2; x2]); linear_add vars tm1 rest2]) +- | _ -> numeral2 (+/) tm1 tm2;; ++ | _ -> numeral2 Z.add tm1 tm2;; + +-let linear_neg tm = linear_cmul (Int(-1)) tm;; ++let linear_neg tm = linear_cmul Z.minus_one tm;; + + let linear_sub vars tm1 tm2 = linear_add vars tm1 (linear_neg tm2);; + +@@ -116,7 +116,7 @@ let mkatom vars p t = Atom(R(p,[Fn("0",[ + let linform vars fm = + match fm with + Atom(R("divides",[c;t])) -> +- let c' = mk_numeral(abs_num(dest_numeral c)) in ++ let c' = mk_numeral(Z.abs(dest_numeral c)) in + Atom(R("divides",[c';lint vars t])) + | Atom(R("=",[s;t])) -> mkatom vars "=" (Fn("-",[t;s])) + | Atom(R("<",[s;t])) -> mkatom vars "<" (Fn("-",[t;s])) +@@ -144,11 +144,11 @@ let rec posineq fm = + let rec formlcm x fm = + match fm with + Atom(R(p,[_;Fn("+",[Fn("*",[c;y]);z])])) when y = x -> +- abs_num(dest_numeral c) ++ Z.abs(dest_numeral c) + | Not(p) -> formlcm x p + | And(p,q) -> lcm_num (formlcm x p) (formlcm x q) + | Or(p,q) -> lcm_num (formlcm x p) (formlcm x q) +- | _ -> Int 1;; ++ | _ -> Z.one;; + + (* ------------------------------------------------------------------------- *) + (* Adjust all coefficients of x in formula; fold in reduction to +/- 1. *) +@@ -157,10 +157,10 @@ let rec formlcm x fm = + let rec adjustcoeff x l fm = + match fm with + Atom(R(p,[d; Fn("+",[Fn("*",[c;y]);z])])) when y = x -> +- let m = l // dest_numeral c in +- let n = if p = "<" then abs_num(m) else m in +- let xtm = Fn("*",[mk_numeral(m // n); x]) in +- Atom(R(p,[linear_cmul (abs_num m) d; ++ let m = Z.div l (dest_numeral c) in ++ let n = if p = "<" then Z.abs(m) else m in ++ let xtm = Fn("*",[mk_numeral(Z.div m n); x]) in ++ Atom(R(p,[linear_cmul (Z.abs m) d; + Fn("+",[xtm; linear_cmul n z])])) + | Not(p) -> Not(adjustcoeff x l p) + | And(p,q) -> And(adjustcoeff x l p,adjustcoeff x l q) +@@ -174,7 +174,7 @@ let rec adjustcoeff x l fm = + let unitycoeff x fm = + let l = formlcm x fm in + let fm' = adjustcoeff x l fm in +- if l =/ Int 1 then fm' else ++ if Z.equal l Z.one then fm' else + let xp = Fn("+",[Fn("*",[Fn("1",[]);x]); Fn("0",[])]) in + And(Atom(R("divides",[mk_numeral l; xp])),adjustcoeff x l fm);; + +@@ -204,7 +204,7 @@ let rec divlcm x fm = + | Not(p) -> divlcm x p + | And(p,q) -> lcm_num (divlcm x p) (divlcm x q) + | Or(p,q) -> lcm_num (divlcm x p) (divlcm x q) +- | _ -> Int 1;; ++ | _ -> Z.one;; + + (* ------------------------------------------------------------------------- *) + (* Construct the B-set. *) +@@ -242,8 +242,8 @@ let rec linrep vars x t fm = + (* ------------------------------------------------------------------------- *) + + let operations = +- ["=",(=/); "<",(",(>/); "<=",(<=/); ">=",(>=/); +- "divides",(fun x y -> mod_num y x =/ Int 0)];; ++ ["=",(Z.equal); "<",(Z.lt); ">",(Z.gt); "<=",(Z.leq); ">=",(Z.geq); ++ "divides",(fun x y -> Z.equal (Z.rem y x) Z.zero)];; + + let evalc_atom at = + match at with +@@ -265,7 +265,7 @@ let cooper vars fm = + let x = Var x0 in + let p = unitycoeff x p0 in + let p_inf = simplify(minusinf x p) and bs = bset x p +- and js = Int 1 --- divlcm x p in ++ and js = Z.one --- divlcm x p in + let p_element j b = + linrep vars x (linear_add vars b (mk_numeral j)) p in + let stage j = list_disj +--- atp/defcnf.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/defcnf.ml 2018-02-11 14:00:03.159892859 -0700 +@@ -55,7 +55,7 @@ let rec nenf fm = + (* Make a stylized variable and update the index. *) + (* ------------------------------------------------------------------------- *) + +-let mkprop n = Atom(P("p_"^(string_of_num n))),n +/ Int 1;; ++let mkprop n = Atom(P("p_"^(Z.to_string n))),Z.succ n;; + + (* ------------------------------------------------------------------------- *) + (* Make n large enough that "v_m" won't clash with s for any m >= n *) +@@ -67,7 +67,7 @@ let max_varindex pfx = + let l = String.length s in + if l <= m or String.sub s 0 m <> pfx then n else + let s' = String.sub s m (l - m) in +- if forall numeric (explode s') then max_num n (num_of_string s') ++ if forall numeric (explode s') then Z.max n (Z.of_string s') + else n;; + + (* ------------------------------------------------------------------------- *) +@@ -90,7 +90,7 @@ and defstep op (p,q) (fm,defs,n) = + + let defcnf fm = + let fm' = nenf(psimplify fm) in +- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in ++ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in + let (fm'',defs,_) = maincnf (fm',undefined,n) in + let deflist = map (snd ** snd) (funset defs) in + let subcnfs = itlist ((@) ** simpcnf) deflist (simpcnf fm'') in +@@ -130,7 +130,7 @@ let rec andcnf (fm,defs,n as trip) = + + let defcnfs fm = + let fm' = nenf(psimplify fm) in +- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in ++ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in + let (fm'',defs,_) = andcnf (fm',undefined,n) in + let deflist = map (snd ** snd) (funset defs) in + setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; +@@ -181,7 +181,7 @@ let rec andcnf pos (fm,defs,n as trip) = + + let defcnfs imps fm = + let fm' = nenf(psimplify fm) in +- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in ++ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in + let (fm'',defs,_) = andcnf imps (fm',undefined,n) in + let deflist = map (snd ** snd) (funset defs) in + setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; +@@ -209,7 +209,7 @@ let rec andcnf3 pos (fm,defs,n as trip) + + let defcnf3s imps fm = + let fm' = nenf(psimplify fm) in +- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in ++ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in + let (fm'',defs,_) = andcnf3 imps (fm',undefined,n) in + let deflist = map (snd ** snd) (funset defs) in + setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; +--- atp/fourier_motzkin.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/fourier_motzkin.ml 2018-02-11 20:34:13.822886848 -0700 +@@ -71,10 +71,10 @@ let rec posineq fm = + let rec adjustcoeff x l fm = + match fm with + Atom(R(p,[d; Fn("+",[Fn("*",[c;y]);z])])) when y = x -> +- let m = l // dest_numeral c in +- let n = if p = "<=" then abs_num(m) else m in +- let xtm = Fn("*",[mk_numeral(m // n); x]) in +- Atom(R(p,[linear_cmul (abs_num m) d; ++ let m = Z.div l (dest_numeral c) in ++ let n = if p = "<=" then Z.abs(m) else m in ++ let xtm = Fn("*",[mk_numeral(Z.div m n); x]) in ++ Atom(R(p,[linear_cmul (Z.abs m) d; + Fn("+",[xtm; linear_cmul n z])])) + | Not(p) -> Not(adjustcoeff x l p) + | And(p,q) -> And(adjustcoeff x l p,adjustcoeff x l q) +@@ -88,7 +88,7 @@ let rec adjustcoeff x l fm = + let unitycoeff x fm = + let l = formlcm x fm in + let fm' = adjustcoeff x l fm in +- if l =/ Int 1 then fm' else ++ if Z.equal l Z.one then fm' else + adjustcoeff x l fm;; + + (* ------------------------------------------------------------------------- *) +@@ -98,10 +98,10 @@ let unitycoeff x fm = + let isolate x fm = + match fm with + Atom(R(p,[_;Fn("+",[Fn("*",[c;y]);z])])) when y = x -> +- let c = mk_numeral (Int 0 -/ dest_numeral c) in ++ let c = mk_numeral (Z.sub Z.zero (dest_numeral c)) in + Atom(R(p,[Fn("*",[c;y]);z])) + | Atom(R(p,[zero;Fn("*",[c;y])])) when y = x -> +- let c = mk_numeral (Int 0 -/ dest_numeral c) in ++ let c = mk_numeral (Z.sub Z.zero (dest_numeral c)) in + Atom(R(p,[Fn("*",[c;y]);zero])) + | _ -> + printer fm; +@@ -110,7 +110,7 @@ let isolate x fm = + let replace vars x t fm = + match fm with + Atom(R(p,[Fn("*",[c;y]);z])) when y = x -> +- let t = if dest_numeral c >/ Int 0 then t else linear_neg t in ++ let t = if Z.gt (dest_numeral c) Z.zero then t else linear_neg t in + linform vars (Atom(R(p,[t;z]))) + | _ -> assert false + +@@ -128,13 +128,13 @@ let fourier vars fm = + (function (Atom(R("=",_))) -> true | _ -> false) cjs in + let (Atom(R("=",[s;t]))) = eqn in + let (Fn("*",[c;_])) = s in +- let y = if dest_numeral c =/ Int 1 then t else linear_neg t in ++ let y = if Z.equal (dest_numeral c) Z.one then t else linear_neg t in + list_conj(map (replace vars x y) (subtract cjs [eqn])) + with Failure _ -> + let l,r = + partition + (fun (Atom(R("<=",[Fn("*",[c;_]);t]))) -> +- dest_numeral c =/ Int (-1)) cjs ++ Z.equal (dest_numeral c) Z.minus_one) cjs + in + let lefts = map (fun (Atom(R("<=",[_;l]))) -> linear_neg l) l + and rights = map (fun (Atom(R("<=",[_;r]))) -> r) r in +--- atp/lib.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/lib.ml 2018-02-11 13:26:57.020559495 -0700 +@@ -46,11 +46,9 @@ let ( ** ) = fun f g x -> f(g x);; + (* GCD and LCM on arbitrary-precision numbers. *) + (* ------------------------------------------------------------------------- *) + +-let gcd_num n1 n2 = +- abs_num(num_of_big_int +- (Big_int.gcd_big_int (big_int_of_num n1) (big_int_of_num n2)));; ++let gcd_num n1 n2 = Z.gcd n1 n2;; + +-let lcm_num n1 n2 = abs_num(n1 */ n2) // gcd_num n1 n2;; ++let lcm_num n1 n2 = Z.lcm n1 n2;; + + (* ------------------------------------------------------------------------- *) + (* A useful idiom for "non contradictory" etc. *) +@@ -73,7 +71,7 @@ let can f x = try f x; true with Failure + + let rec (--) = fun m n -> if m > n then [] else m::((m + 1) -- n);; + +-let rec (---) = fun m n -> if m >/ n then [] else m::((m +/ Int 1) --- n);; ++let rec (---) = fun m n -> if Z.gt m n then [] else m::((Z.succ m) --- n);; + + let rec map2 f l1 l2 = + match (l1,l2) with +@@ -596,4 +594,4 @@ let equated (Partition f) = dom f;; + (* First number starting at n for which p succeeds. *) + (* ------------------------------------------------------------------------- *) + +-let rec first n p = if p(n) then n else first (n +/ Int 1) p;; ++let rec first n p = if p(n) then n else first (Z.succ n) p;; +--- atp/Makefile.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/Makefile 2018-02-11 13:14:15.311777144 -0700 +@@ -8,6 +8,8 @@ + # many.ml (Example relevant to many-sorted logic) + # hol.ml (Simple higher order logic setup) + ++ZARITHLIB=$(shell ocamlfind query zarith) ++ + #MLFILES = lib.ml intro.ml formulas.ml prop.ml propexamples.ml \ + defcnf.ml dp.ml stal.ml bdd.ml fol.ml skolem.ml \ + herbrand.ml unif.ml tableaux.ml resolution.ml prolog.ml \ +@@ -33,9 +35,9 @@ compiled: example.ml atp.cmx; ocamlopt - + + # Make the appropriate object for the main body of code + +-atp.cmx: atp.ml; ocamlopt -w ax -c atp.ml ++atp.cmx: atp.ml; ocamlopt -I $(ZARITHLIB) -w ax -c atp.ml + +-atp.cmo: atp.ml; ocamlc -w ax -c atp.ml ++atp.cmo: atp.ml; ocamlc -I $(ZARITHLIB) -w ax -c atp.ml + + # Make the camlp4 quotation expander + +--- atp/make.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/make.ml 2018-02-11 14:37:48.178019612 -0700 +@@ -44,10 +44,9 @@ + Gc.set { (Gc.get()) with Gc.stack_limit = 16777216 };; (* Up the stack size *) + Format.set_margin 72;; (* Reduce margins *) + open Format;; (* Open formatting *) +-open Num;; (* Open bignums *) + let imperative_assign = (:=);; (* Preserve this *) + +-let print_num n = print_string(string_of_num n);; (* Avoid range limit *) ++let print_num n = print_string(Z.to_string n);; (* Avoid range limit *) + #install_printer print_num;; (* when printing nums *) + + (* ------------------------------------------------------------------------- *) +--- atp/Mk_ml_file.orig 2018-01-23 03:07:35.000000000 -0700 ++++ atp/Mk_ml_file 2018-02-10 22:01:01.925304810 -0700 +@@ -1,4 +1,3 @@ +-echo "open Num;;" + echo "open Format;;" + + cat $@ | sed 's/START_INTERACTIVE;;/(\*/' | sed 's/END_INTERACTIVE;;/\*)/' +--- jc/jc_annot_inference.ml.orig 2018-02-10 16:03:04.338379961 -0700 ++++ jc/jc_annot_inference.ml 2018-02-11 13:13:48.313855743 -0700 +@@ -49,7 +49,6 @@ open Apron + open Coeff + open Interval + open Lincons1 +-open Num + + + (*****************************************************************************) +@@ -1120,7 +1119,7 @@ let linearize t = + try match t#node with + | JCTconst c -> + begin match c with +- | JCCinteger s -> (TermMap.empty, num_of_string s) ++ | JCCinteger s -> (TermMap.empty, Z.of_string s) + | JCCboolean _ | JCCvoid | JCCnull | JCCreal _ | JCCstring _ -> + err () + end +@@ -1133,7 +1132,7 @@ let linearize t = + (fun vt1 c1 acc -> + try + let c2 = TermMap.find vt1 coeffs2 in +- TermMap.add vt1 (c1 +/ c2) acc ++ TermMap.add vt1 (Z.add c1 c2) acc + with Not_found -> TermMap.add vt1 c1 acc + ) coeffs1 TermMap.empty + in +@@ -1143,55 +1142,55 @@ let linearize t = + else TermMap.add vt2 c2 acc + ) coeffs2 coeffs + in +- (coeffs, cst1 +/ cst2) ++ (coeffs, (Z.add cst1 cst2)) + | `Bsub -> + let coeffs = TermMap.fold + (fun vt1 c1 acc -> + try + let c2 = TermMap.find vt1 coeffs2 in +- TermMap.add vt1 (c1 -/ c2) acc ++ TermMap.add vt1 (Z.sub c1 c2) acc + with Not_found -> TermMap.add vt1 c1 acc + ) coeffs1 TermMap.empty + in + let coeffs = TermMap.fold + (fun vt2 c2 acc -> + if TermMap.mem vt2 coeffs then acc +- else TermMap.add vt2 (minus_num c2) acc ++ else TermMap.add vt2 (Z.neg c2) acc + ) coeffs2 coeffs + in +- (coeffs, cst1 -/ cst2) ++ (coeffs, (Z.sub cst1 cst2)) + | `Bmul when TermMap.is_empty coeffs1 || TermMap.is_empty coeffs2 -> + let coeffs = + if TermMap.is_empty coeffs1 then +- TermMap.map (fun c -> c */ cst1) coeffs2 ++ TermMap.map (fun c -> Z.mul c cst1) coeffs2 + else +- TermMap.map (fun c -> c */ cst2) coeffs1 ++ TermMap.map (fun c -> Z.mul c cst2) coeffs1 + in +- (coeffs, cst1 */ cst2) ++ (coeffs, (Z.mul cst1 cst2)) + | `Bmul + | `Bdiv + | `Bmod -> err () + end + | JCTbinary(t1,(#bitwise_op as bop,`Integer),t2) -> + let coeffs1, cst1 = aux t1 in +- if coeffs1 = TermMap.empty && cst1 =/ Int 0 then ++ if coeffs1 = TermMap.empty && Z.equal cst1 Z.zero then + match bop with + | `Bbw_and + | `Bshift_left + | `Blogical_shift_right +- | `Barith_shift_right -> TermMap.empty, Int 0 ++ | `Barith_shift_right -> TermMap.empty, Z.zero + | `Bbw_or + | `Bbw_xor -> aux t2 + | _ -> err () + else + (* Consider non-linear term as abstract variable. *) +- (TermMap.add t (Int 1) TermMap.empty, Int 0) ++ (TermMap.add t Z.one TermMap.empty, Z.zero) + | JCTunary((uop,`Integer),t1) -> + let coeffs1,cst1 = aux t1 in + begin match uop with + | `Uminus -> +- let coeffs = TermMap.map (fun c -> minus_num c) coeffs1 in +- (coeffs, minus_num cst1) ++ let coeffs = TermMap.map (fun c -> Z.neg c) coeffs1 in ++ (coeffs, Z.neg cst1) + | _ -> err () + end + | JCTvar _ | JCTderef _ | JCToffset _ | JCTapp _ | JCTbinary _ +@@ -1201,13 +1200,16 @@ let linearize t = + | JCTrange _ | JCTif _ | JCTlet _ -> + err () + with Failure "linearize" -> +- (TermMap.add t (Int 1) TermMap.empty, Int 0) ++ (TermMap.add t Z.one TermMap.empty, Z.zero) + in aux t + + let linstr_of_term env t = ++(* + let mkmulstr = function +- | (_va, Int 0) -> "" +- | (va, c) -> string_of_num c ^ " * " ^ va ++ | (_va, Z.zero) -> "" ++ | (va, c) -> (Z.to_string c) ^ " * " ^ va ++*) ++ let mkmulstr = (fun (va,c) -> if Z.equal Z.zero c then "" else (Z.to_string c) ^ " * " ^ va) + in + let rec mkaddstr = function + | [] -> "" +@@ -1286,33 +1288,33 @@ let rec linstr_of_assertion env a = + in + let env,str,cst = linstr_of_term env subt in + if str = "" then +- let ncst = minus_num cst in ++ let ncst = Z.neg cst in + let is_true = match bop with +- | `Blt -> Int 0 Int 0 >/ ncst +- | `Ble -> Int 0 <=/ ncst +- | `Bge -> Int 0 >=/ ncst +- | `Beq -> Int 0 =/ ncst +- | `Bneq -> Int 0 <>/ ncst ++ | `Blt -> Z.lt Z.zero ncst ++ | `Bgt -> Z.gt Z.zero ncst ++ | `Ble -> Z.leq Z.zero ncst ++ | `Bge -> Z.geq Z.zero ncst ++ | `Beq -> Z.equal Z.zero ncst ++ | `Bneq -> not (Z.equal Z.zero ncst) + in + env, if is_true then Dnf.true_ else Dnf.false_ + else +- let cstr = string_of_num (minus_num cst) in ++ let cstr = Z.to_string (Z.neg cst) in + (* Do not use < and > with APRON, due to bugs in some versions. + Convert to equivalent non-strict. *) + let str = match bop with + | `Blt -> [[str ^ " <= " ^ +- (string_of_num (pred_num (minus_num cst)))]] ++ (Z.to_string (Z.pred (Z.neg cst)))]] + | `Bgt -> [[str ^ " >= " ^ +- (string_of_num (succ_num (minus_num cst)))]] ++ (Z.to_string (Z.succ (Z.neg cst)))]] + | `Ble -> [[str ^ " <= " ^ cstr]] + | `Bge -> [[str ^ " >= " ^ cstr]] + | `Beq -> [[str ^ " = " ^ cstr]] + | `Bneq -> + [[str ^ " <= " ^ +- (string_of_num (pred_num (minus_num cst)))]; ++ (Z.to_string (Z.pred (Z.neg cst)))]; + [str ^ " >= " ^ +- (string_of_num (succ_num (minus_num cst)))]] ++ (Z.to_string (Z.succ (Z.neg cst)))]] + in + env, str + | JCAnot a -> +@@ -1330,8 +1332,8 @@ let rec linstr_of_assertion env a = + let linstr_of_expr env e = + match Jc_effect.term_of_expr e with None -> None | Some t -> + let env,str,cst = linstr_of_term env t in +- if str = "" then Some (env, string_of_num cst) +- else Some (env, str ^ " + " ^ (string_of_num cst)) ++ if str = "" then Some (env, Z.to_string cst) ++ else Some (env, str ^ " + " ^ (Z.to_string cst)) + + let offset_linstr_of_expr env ok e = + match e#node with +@@ -1340,15 +1342,15 @@ let offset_linstr_of_expr env ok e = + else + begin match Jc_effect.term_of_expr e with None -> None | Some t -> + let env,str,cst = linstr_of_term env t in +- if str = "" then Some (env,string_of_num cst) +- else Some (env,str ^ " + " ^ (string_of_num cst)) ++ if str = "" then Some (env,Z.to_string cst) ++ else Some (env,str ^ " + " ^ (Z.to_string cst)) + end + | _ -> + if is_nonnull_pointer_type e#typ then + match Jc_effect.term_of_expr e with None -> None | Some t -> + let env,str,cst = offset_linstr_of_term env ok t in +- if str = "" then Some (env,string_of_num cst) +- else Some (env,str ^ " + " ^ (string_of_num cst)) ++ if str = "" then Some (env,Z.to_string cst) ++ else Some (env,str ^ " + " ^ (Z.to_string cst)) + else None + + +@@ -1419,13 +1421,13 @@ let mkassertion lincons = + + let rec linterms_of_term t = + let mkmulterm (t,c) = +- if c =/ Int 0 then None +- else if c =/ Int 1 then Some t +- else if c =/ Int (-1) then ++ if Z.equal c Z.zero then None ++ else if Z.equal c Z.one then Some t ++ else if Z.equal c Z.minus_one then + Some(new term ~typ:integer_type (JCTunary((`Uminus,`Integer),t))) + else + let c = +- new term ~typ:integer_type (JCTconst(JCCinteger(string_of_num c))) ++ new term ~typ:integer_type (JCTconst(JCCinteger(Z.to_string c))) + in + Some(new term ~typ:integer_type (JCTbinary(c,(`Bmul,`Integer),t))) + in +@@ -1443,30 +1445,30 @@ let rec linterms_of_term t = + let coeffs,cst = linearize t in + let posl,negl = + TermMap.fold (fun t c (pl,nl) -> +- if c >/ Int 0 then (t,c) :: pl, nl +- else if c +- if cst >/ Int 0 then cstt ++ if Z.gt cst Z.zero then cstt + else new term ~typ:integer_type (JCTconst(JCCinteger "0")) + | Some t -> +- if cst >/ Int 0 then ++ if Z.gt cst Z.zero then + new term ~typ:integer_type (JCTbinary(t,(`Badd,`Integer),cstt)) + else t + in + let negt = match mkaddterm negl with + | None -> +- if cst +- if cst +- if c >/ Int 0 then t :: pl, nl +- else if c [] | Some t1 -> + let mint = new term ~typ:integer_type +- (JCTconst (JCCinteger (Num.string_of_num ei.jc_enum_info_min))) ++ (JCTconst (JCCinteger (Z.to_string ei.jc_enum_info_min))) + in + let maxt = new term ~typ:integer_type +- (JCTconst(JCCinteger (Num.string_of_num ei.jc_enum_info_max))) ++ (JCTconst(JCCinteger (Z.to_string ei.jc_enum_info_max))) + in + let mina = new assertion (JCArelation (mint, (`Ble,`Integer), t1)) in + let maxa = new assertion (JCArelation (t1, (`Ble,`Integer), maxt)) in diff --git a/why-ocaml-4.06.patch b/why-ocaml-4.06.patch index 32f133c..872f38a 100644 --- a/why-ocaml-4.06.patch +++ b/why-ocaml-4.06.patch @@ -1,22 +1,11 @@ ---- configure.orig 2017-08-23 02:08:38.000000000 -0600 -+++ configure 2017-12-09 13:10:09.950794648 -0700 -@@ -1823,7 +1823,7 @@ case $OCAMLVERSION in - OCAMLWARN=Aer-6-41-44-45 ;; - 4.02.*) - OCAMLWARN=Aer-3-6-41-44-45-48-50 ;; -- 4.03.*|4.04.*) -+ 4.03.*|4.04.*|4.05.*|4.06.*) - OCAMLWARN=Aer-3-6-41-44-45-48-50-52-57 ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown Objective Caml version" >&5 ---- Makefile.in.orig 2017-12-04 21:00:24.549232019 -0700 -+++ Makefile.in 2017-12-09 13:10:39.550655718 -0700 -@@ -213,7 +213,7 @@ jc/jc.cmx jc/jc.o: $(JCCMX_EXPORT) +--- Makefile.in.orig 2018-02-10 15:44:26.226883183 -0700 ++++ Makefile.in 2018-02-12 19:34:20.930490137 -0700 +@@ -214,7 +214,7 @@ jc/jc.cmx jc/jc.o: $(JCCMX_EXPORT) # ppc: jc/jc.cmi jc/jc.cmo jc/jc.cmx bin/jessie.opt: $(JCCMX) - $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ + $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) -runtime-variant _pic $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ - unix.cmxa str.cmxa nums.cmxa graph.cmxa $^ + unix.cmxa str.cmxa zarith.cmxa graph.cmxa $^ $(STRIP) $@ diff --git a/why-project.patch b/why-project.patch index e50186a..b4536a8 100644 --- a/why-project.patch +++ b/why-project.patch @@ -1,6 +1,6 @@ ---- Makefile.in.orig 2017-08-23 02:08:38.000000000 -0600 -+++ Makefile.in 2017-12-04 21:00:24.549232019 -0700 -@@ -154,7 +154,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src +--- Makefile.in.orig 2018-01-23 03:07:35.000000000 -0700 ++++ Makefile.in 2018-02-10 15:44:26.226883183 -0700 +@@ -155,7 +155,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src src/effect.cmo src/pp.cmo src/option_misc.cmo \ src/report.cmo \ src/explain.cmo \ @@ -9,8 +9,8 @@ # jessie JCCML_EXPORT = src/why3_kw.ml jc/output.ml \ ---- src/options.mli.orig 2017-08-23 02:08:38.000000000 -0600 -+++ src/options.mli 2017-12-04 21:01:17.268996320 -0700 +--- src/options.mli.orig 2018-01-23 03:07:35.000000000 -0700 ++++ src/options.mli 2018-02-10 15:44:26.258883112 -0700 @@ -184,7 +184,7 @@ val files : string list (*s GUI? *) @@ -20,8 +20,8 @@ val lib_files_to_load : string list (* ---- src/pretty.ml.orig 2017-08-23 02:08:38.000000000 -0600 -+++ src/pretty.ml 2017-12-04 21:02:42.540615229 -0700 +--- src/pretty.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ src/pretty.ml 2018-02-10 15:44:26.259883110 -0700 @@ -416,12 +416,12 @@ let output_project f = with Not_found -> functions := SMap.add fn SMap.empty !functions) @@ -58,16 +58,16 @@ - Project.save p f; + Whyproject.save p f; p ---- src/pretty.mli.orig 2017-08-23 02:08:38.000000000 -0600 -+++ src/pretty.mli 2017-12-04 21:03:05.635512035 -0700 +--- src/pretty.mli.orig 2018-01-23 03:07:35.000000000 -0700 ++++ src/pretty.mli 2018-02-10 15:44:26.259883110 -0700 @@ -50,4 +50,4 @@ val output_files : string -> unit (* [output_project f] produces a whole project description, in a file [f.wpr], together with other needed files [f_ctx.why], [f_lemmas.why], and each goal in a separate file [f_po.why] for i=1,2,... *) -val output_project : string -> Project.t +val output_project : string -> Whyproject.t ---- src/whyweb.ml.orig 2017-08-23 02:08:38.000000000 -0600 -+++ src/whyweb.ml 2017-12-04 21:04:16.932193463 -0700 +--- src/whyweb.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ src/whyweb.ml 2018-02-10 15:44:26.259883110 -0700 @@ -29,7 +29,7 @@ (**************************************************************************) diff --git a/why-safe-string.patch b/why-safe-string.patch index 20c3406..23968d2 100644 --- a/why-safe-string.patch +++ b/why-safe-string.patch @@ -1,5 +1,5 @@ ---- jc/jc_annot_inference.ml.orig 2017-08-23 02:08:38.000000000 -0600 -+++ jc/jc_annot_inference.ml 2017-12-05 21:03:16.549749880 -0700 +--- jc/jc_annot_inference.ml.orig 2018-01-23 03:07:35.000000000 -0700 ++++ jc/jc_annot_inference.ml 2018-02-10 16:03:04.338379961 -0700 @@ -212,14 +212,14 @@ let name_of_term t = Format.fprintf str_formatter "%a" Jc_output.term t; let s = Format.flush_str_formatter () in @@ -17,51 +17,3 @@ (* support of (Nicolas) *) let rec destruct_alloc t = ---- jc/jc_region.ml.orig 2017-08-23 02:08:38.000000000 -0600 -+++ jc/jc_region.ml 2017-12-05 21:01:36.269076188 -0700 -@@ -244,8 +244,8 @@ struct - jc_reg_variable = false; - jc_reg_bitwise = false; - jc_reg_id = id; -- jc_reg_name = name; -- jc_reg_final_name = name ^ "_" ^ (string_of_int id); -+ jc_reg_name = (Bytes.to_string name); -+ jc_reg_final_name = (Bytes.to_string name) ^ "_" ^ (string_of_int id); - jc_reg_type = ty; - } - -@@ -258,8 +258,8 @@ struct - jc_reg_variable = true; - jc_reg_bitwise = false; - jc_reg_id = id; -- jc_reg_name = name; -- jc_reg_final_name = name ^ "_" ^ (string_of_int id); -+ jc_reg_name = (Bytes.to_string name); -+ jc_reg_final_name = (Bytes.to_string name) ^ "_" ^ (string_of_int id); - jc_reg_type = ty; - } - ---- src/lib.ml.orig 2017-08-23 02:08:38.000000000 -0600 -+++ src/lib.ml 2017-12-05 20:43:07.384255238 -0700 -@@ -54,7 +54,7 @@ let file_subdir ~dir ~file = - let file_copy src dest = - let cin = open_in src - and cout = open_out dest -- and buff = String.make 1024 ' ' -+ and buff = Bytes.make 1024 ' ' - and n = ref 0 - in - while n := input cin buff 0 1024; !n <> 0 do -@@ -68,10 +68,10 @@ let file_copy_if_different src dst = - - let channel_contents_buf cin = - let buf = Buffer.create 1024 -- and buff = String.make 1024 ' ' in -+ and buff = Bytes.make 1024 ' ' in - let n = ref 0 in - while n := input cin buff 0 1024; !n <> 0 do -- Buffer.add_substring buf buff 0 !n -+ Buffer.add_subbytes buf buff 0 !n - done; - buf - diff --git a/why.spec b/why.spec index 9c84a8c..51bcff0 100644 --- a/why.spec +++ b/why.spec @@ -5,12 +5,9 @@ %global has_pvs 0 %endif -# What kind of ocaml build to do -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) - Name: why -Version: 2.39 -Release: 5%{?dist} +Version: 2.40 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -33,6 +30,8 @@ Patch0: %{name}-project.patch Patch1: %{name}-safe-string.patch # Adapt to ocaml 4.06 in general Patch2: %{name}-ocaml-4.06.patch +# Finish an incomplete Num to zarith conversion +Patch3: %{name}-num.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils @@ -41,10 +40,9 @@ BuildRequires: frama-c BuildRequires: gappalib-coq BuildRequires: ocaml BuildRequires: ocaml-apron-devel -BuildRequires: ocaml-camlp4-devel +BuildRequires: ocaml-camlp5-devel BuildRequires: ocaml-findlib BuildRequires: ocaml-mlgmpidl-devel -BuildRequires: ocaml-num-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamlgraph-devel BuildRequires: ocaml-zarith-devel @@ -58,10 +56,6 @@ Requires: gappalib-coq Requires: hicolor-icon-theme Requires: emacs-filesystem -# This can be removed once Fedora 25 reaches EOL -Obsoletes: %{name}-coq < 2.36-1 -Provides: %{name}-coq = %{version}-%{release} - # Filter out bogus requires %global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Jc_ast|Jc_env|Loc|Logic|Logic_decl|Misc|Ptree|Types)\\\) @@ -114,7 +108,7 @@ Requires: why-jessie%{?_isa} = %{version}-%{release} %if %{has_pvs} Requires: why-pvs-support%{?_isa} = %{version}-%{release} %endif -Requires: alt-ergo z3 zenon +Requires: alt-ergo yices z3 zenon %description all This package provides a complete software verification platform suite @@ -126,6 +120,7 @@ based on Why, including various automated and interactive provers. %patch0 %patch1 %patch2 +%patch3 # The other part of avoiding the "Project" module name clash mv src/project.ml src/whyproject.ml @@ -163,10 +158,10 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile sed -i 's/pvs/pvs-sbcl/' configure %build -%if ! %{opt} -%global opt_option OCAMLBEST=byte OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex -%else +%ifarch %{ocaml_native_compiler} %global opt_option OCAMLBEST=opt +%else +%global opt_option OCAMLBEST=byte OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex %endif %configure --enable-apron --enable-verbosemake @@ -248,6 +243,10 @@ make check %changelog +* Mon Feb 12 2018 Jerry James - 2.40-1 +- New upstream release +- Add -num patch to fix incomplete num to zarith conversion + * Fri Feb 09 2018 Fedora Release Engineering - 2.39-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 818c9b944e6e345ca9f9250ba57ffd4c9184cd74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:49:51 +0000 Subject: [PATCH 81/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 51bcff0..3ac8549 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.40 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -243,6 +243,9 @@ make check %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 2.40-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Feb 12 2018 Jerry James - 2.40-1 - New upstream release - Add -num patch to fix incomplete num to zarith conversion From e3863b543fd1b1f96d5b5b3a27a2b2db3dce698f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 26 Jan 2019 08:19:32 -0700 Subject: [PATCH 82/97] New upstream release. All patches have been upstreamed; drop them all. --- .gitignore | 5 +- sources | 2 +- why-num.patch | 596 ------------------------------------------ why-ocaml-4.06.patch | 11 - why-project.patch | 115 -------- why-safe-string.patch | 19 -- why.spec | 38 +-- 7 files changed, 14 insertions(+), 772 deletions(-) delete mode 100644 why-num.patch delete mode 100644 why-ocaml-4.06.patch delete mode 100644 why-project.patch delete mode 100644 why-safe-string.patch diff --git a/.gitignore b/.gitignore index 31ca9a5..81c4283 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ /krakatoa.pdf /why-icons.tar.xz -/why-2.36.tar.gz -/why-2.38.tar.gz -/why-2.39.tar.gz -/why-2.40.tar.gz +/why-*.tar.gz diff --git a/sources b/sources index 2db9799..aeca842 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 -SHA512 (why-2.40.tar.gz) = e99f528ab2a3030c5ed8509ec45e75dc2f3dc2ed92fe1213c2b92a2dc700e2d9c32bc765751b2660cc1f3a6e110b4687a4262779fdae52faaaf144c411712972 +SHA512 (why-2.41.tar.gz) = 2e31ed2642a29ecbbc05954f2aa5c841befa68959f571bcde134a56639cec49a51351e5c7781a1a50fc531f2111b5649c710fa3e60c0f71f222b192d8c41cc86 SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why-num.patch b/why-num.patch deleted file mode 100644 index 10b0164..0000000 --- a/why-num.patch +++ /dev/null @@ -1,596 +0,0 @@ ---- atp/cooper.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/cooper.ml 2018-02-11 20:48:48.754907226 -0700 -@@ -38,10 +38,10 @@ - (* Lift operations up to numerals. *) - (* ------------------------------------------------------------------------- *) - --let mk_numeral n = Fn(string_of_num n,[]);; -+let mk_numeral n = Fn(Z.to_string n,[]);; - - let dest_numeral = -- function (Fn(ns,[])) -> num_of_string ns -+ function (Fn(ns,[])) -> Z.of_string ns - | _ -> failwith "dest_numeral";; - - let is_numeral = can dest_numeral;; -@@ -59,12 +59,12 @@ let numeral2 fn m n = mk_numeral(fn (des - (* ------------------------------------------------------------------------- *) - - let rec linear_cmul n tm = -- if n =/ Int 0 then Fn("0",[]) else -+ if Z.equal n Z.zero then Fn("0",[]) else - match tm with - Fn("+",[Fn("*",[c1; x1]); rest]) -> -- Fn("+",[Fn("*",[numeral1 (( */ ) n) c1; x1]); -+ Fn("+",[Fn("*",[numeral1 (Z.mul n) c1; x1]); - linear_cmul n rest]) -- | k -> numeral1 (( */ ) n) k;; -+ | k -> numeral1 (Z.mul n) k;; - - let earlierv vars (Var x) (Var y) = earlier vars x y;; - -@@ -73,7 +73,7 @@ let rec linear_add vars tm1 tm2 = - (Fn("+",[Fn("*",[c1; x1]); rest1]), - Fn("+",[Fn("*",[c2; x2]); rest2])) -> - if x1 = x2 then -- let c = numeral2 (+/) c1 c2 in -+ let c = numeral2 Z.add c1 c2 in - if c = Fn("0",[]) then linear_add vars rest1 rest2 - else Fn("+",[Fn("*",[c; x1]); linear_add vars rest1 rest2]) - else if earlierv vars x1 x2 then -@@ -84,9 +84,9 @@ let rec linear_add vars tm1 tm2 = - Fn("+",[Fn("*",[c1; x1]); linear_add vars rest1 tm2]) - | (_,Fn("+",[Fn("*",[c2; x2]); rest2])) -> - Fn("+",[Fn("*",[c2; x2]); linear_add vars tm1 rest2]) -- | _ -> numeral2 (+/) tm1 tm2;; -+ | _ -> numeral2 Z.add tm1 tm2;; - --let linear_neg tm = linear_cmul (Int(-1)) tm;; -+let linear_neg tm = linear_cmul Z.minus_one tm;; - - let linear_sub vars tm1 tm2 = linear_add vars tm1 (linear_neg tm2);; - -@@ -116,7 +116,7 @@ let mkatom vars p t = Atom(R(p,[Fn("0",[ - let linform vars fm = - match fm with - Atom(R("divides",[c;t])) -> -- let c' = mk_numeral(abs_num(dest_numeral c)) in -+ let c' = mk_numeral(Z.abs(dest_numeral c)) in - Atom(R("divides",[c';lint vars t])) - | Atom(R("=",[s;t])) -> mkatom vars "=" (Fn("-",[t;s])) - | Atom(R("<",[s;t])) -> mkatom vars "<" (Fn("-",[t;s])) -@@ -144,11 +144,11 @@ let rec posineq fm = - let rec formlcm x fm = - match fm with - Atom(R(p,[_;Fn("+",[Fn("*",[c;y]);z])])) when y = x -> -- abs_num(dest_numeral c) -+ Z.abs(dest_numeral c) - | Not(p) -> formlcm x p - | And(p,q) -> lcm_num (formlcm x p) (formlcm x q) - | Or(p,q) -> lcm_num (formlcm x p) (formlcm x q) -- | _ -> Int 1;; -+ | _ -> Z.one;; - - (* ------------------------------------------------------------------------- *) - (* Adjust all coefficients of x in formula; fold in reduction to +/- 1. *) -@@ -157,10 +157,10 @@ let rec formlcm x fm = - let rec adjustcoeff x l fm = - match fm with - Atom(R(p,[d; Fn("+",[Fn("*",[c;y]);z])])) when y = x -> -- let m = l // dest_numeral c in -- let n = if p = "<" then abs_num(m) else m in -- let xtm = Fn("*",[mk_numeral(m // n); x]) in -- Atom(R(p,[linear_cmul (abs_num m) d; -+ let m = Z.div l (dest_numeral c) in -+ let n = if p = "<" then Z.abs(m) else m in -+ let xtm = Fn("*",[mk_numeral(Z.div m n); x]) in -+ Atom(R(p,[linear_cmul (Z.abs m) d; - Fn("+",[xtm; linear_cmul n z])])) - | Not(p) -> Not(adjustcoeff x l p) - | And(p,q) -> And(adjustcoeff x l p,adjustcoeff x l q) -@@ -174,7 +174,7 @@ let rec adjustcoeff x l fm = - let unitycoeff x fm = - let l = formlcm x fm in - let fm' = adjustcoeff x l fm in -- if l =/ Int 1 then fm' else -+ if Z.equal l Z.one then fm' else - let xp = Fn("+",[Fn("*",[Fn("1",[]);x]); Fn("0",[])]) in - And(Atom(R("divides",[mk_numeral l; xp])),adjustcoeff x l fm);; - -@@ -204,7 +204,7 @@ let rec divlcm x fm = - | Not(p) -> divlcm x p - | And(p,q) -> lcm_num (divlcm x p) (divlcm x q) - | Or(p,q) -> lcm_num (divlcm x p) (divlcm x q) -- | _ -> Int 1;; -+ | _ -> Z.one;; - - (* ------------------------------------------------------------------------- *) - (* Construct the B-set. *) -@@ -242,8 +242,8 @@ let rec linrep vars x t fm = - (* ------------------------------------------------------------------------- *) - - let operations = -- ["=",(=/); "<",(",(>/); "<=",(<=/); ">=",(>=/); -- "divides",(fun x y -> mod_num y x =/ Int 0)];; -+ ["=",(Z.equal); "<",(Z.lt); ">",(Z.gt); "<=",(Z.leq); ">=",(Z.geq); -+ "divides",(fun x y -> Z.equal (Z.rem y x) Z.zero)];; - - let evalc_atom at = - match at with -@@ -265,7 +265,7 @@ let cooper vars fm = - let x = Var x0 in - let p = unitycoeff x p0 in - let p_inf = simplify(minusinf x p) and bs = bset x p -- and js = Int 1 --- divlcm x p in -+ and js = Z.one --- divlcm x p in - let p_element j b = - linrep vars x (linear_add vars b (mk_numeral j)) p in - let stage j = list_disj ---- atp/defcnf.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/defcnf.ml 2018-02-11 14:00:03.159892859 -0700 -@@ -55,7 +55,7 @@ let rec nenf fm = - (* Make a stylized variable and update the index. *) - (* ------------------------------------------------------------------------- *) - --let mkprop n = Atom(P("p_"^(string_of_num n))),n +/ Int 1;; -+let mkprop n = Atom(P("p_"^(Z.to_string n))),Z.succ n;; - - (* ------------------------------------------------------------------------- *) - (* Make n large enough that "v_m" won't clash with s for any m >= n *) -@@ -67,7 +67,7 @@ let max_varindex pfx = - let l = String.length s in - if l <= m or String.sub s 0 m <> pfx then n else - let s' = String.sub s m (l - m) in -- if forall numeric (explode s') then max_num n (num_of_string s') -+ if forall numeric (explode s') then Z.max n (Z.of_string s') - else n;; - - (* ------------------------------------------------------------------------- *) -@@ -90,7 +90,7 @@ and defstep op (p,q) (fm,defs,n) = - - let defcnf fm = - let fm' = nenf(psimplify fm) in -- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in -+ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in - let (fm'',defs,_) = maincnf (fm',undefined,n) in - let deflist = map (snd ** snd) (funset defs) in - let subcnfs = itlist ((@) ** simpcnf) deflist (simpcnf fm'') in -@@ -130,7 +130,7 @@ let rec andcnf (fm,defs,n as trip) = - - let defcnfs fm = - let fm' = nenf(psimplify fm) in -- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in -+ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in - let (fm'',defs,_) = andcnf (fm',undefined,n) in - let deflist = map (snd ** snd) (funset defs) in - setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; -@@ -181,7 +181,7 @@ let rec andcnf pos (fm,defs,n as trip) = - - let defcnfs imps fm = - let fm' = nenf(psimplify fm) in -- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in -+ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in - let (fm'',defs,_) = andcnf imps (fm',undefined,n) in - let deflist = map (snd ** snd) (funset defs) in - setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; -@@ -209,7 +209,7 @@ let rec andcnf3 pos (fm,defs,n as trip) - - let defcnf3s imps fm = - let fm' = nenf(psimplify fm) in -- let n = Int 1 +/ overatoms (max_varindex "p_" ** pname) fm' (Int 0) in -+ let n = Z.succ (overatoms (max_varindex "p_" ** pname) fm' Z.zero) in - let (fm'',defs,_) = andcnf3 imps (fm',undefined,n) in - let deflist = map (snd ** snd) (funset defs) in - setify(itlist ((@) ** simpcnf) deflist (simpcnf fm''));; ---- atp/fourier_motzkin.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/fourier_motzkin.ml 2018-02-11 20:34:13.822886848 -0700 -@@ -71,10 +71,10 @@ let rec posineq fm = - let rec adjustcoeff x l fm = - match fm with - Atom(R(p,[d; Fn("+",[Fn("*",[c;y]);z])])) when y = x -> -- let m = l // dest_numeral c in -- let n = if p = "<=" then abs_num(m) else m in -- let xtm = Fn("*",[mk_numeral(m // n); x]) in -- Atom(R(p,[linear_cmul (abs_num m) d; -+ let m = Z.div l (dest_numeral c) in -+ let n = if p = "<=" then Z.abs(m) else m in -+ let xtm = Fn("*",[mk_numeral(Z.div m n); x]) in -+ Atom(R(p,[linear_cmul (Z.abs m) d; - Fn("+",[xtm; linear_cmul n z])])) - | Not(p) -> Not(adjustcoeff x l p) - | And(p,q) -> And(adjustcoeff x l p,adjustcoeff x l q) -@@ -88,7 +88,7 @@ let rec adjustcoeff x l fm = - let unitycoeff x fm = - let l = formlcm x fm in - let fm' = adjustcoeff x l fm in -- if l =/ Int 1 then fm' else -+ if Z.equal l Z.one then fm' else - adjustcoeff x l fm;; - - (* ------------------------------------------------------------------------- *) -@@ -98,10 +98,10 @@ let unitycoeff x fm = - let isolate x fm = - match fm with - Atom(R(p,[_;Fn("+",[Fn("*",[c;y]);z])])) when y = x -> -- let c = mk_numeral (Int 0 -/ dest_numeral c) in -+ let c = mk_numeral (Z.sub Z.zero (dest_numeral c)) in - Atom(R(p,[Fn("*",[c;y]);z])) - | Atom(R(p,[zero;Fn("*",[c;y])])) when y = x -> -- let c = mk_numeral (Int 0 -/ dest_numeral c) in -+ let c = mk_numeral (Z.sub Z.zero (dest_numeral c)) in - Atom(R(p,[Fn("*",[c;y]);zero])) - | _ -> - printer fm; -@@ -110,7 +110,7 @@ let isolate x fm = - let replace vars x t fm = - match fm with - Atom(R(p,[Fn("*",[c;y]);z])) when y = x -> -- let t = if dest_numeral c >/ Int 0 then t else linear_neg t in -+ let t = if Z.gt (dest_numeral c) Z.zero then t else linear_neg t in - linform vars (Atom(R(p,[t;z]))) - | _ -> assert false - -@@ -128,13 +128,13 @@ let fourier vars fm = - (function (Atom(R("=",_))) -> true | _ -> false) cjs in - let (Atom(R("=",[s;t]))) = eqn in - let (Fn("*",[c;_])) = s in -- let y = if dest_numeral c =/ Int 1 then t else linear_neg t in -+ let y = if Z.equal (dest_numeral c) Z.one then t else linear_neg t in - list_conj(map (replace vars x y) (subtract cjs [eqn])) - with Failure _ -> - let l,r = - partition - (fun (Atom(R("<=",[Fn("*",[c;_]);t]))) -> -- dest_numeral c =/ Int (-1)) cjs -+ Z.equal (dest_numeral c) Z.minus_one) cjs - in - let lefts = map (fun (Atom(R("<=",[_;l]))) -> linear_neg l) l - and rights = map (fun (Atom(R("<=",[_;r]))) -> r) r in ---- atp/lib.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/lib.ml 2018-02-11 13:26:57.020559495 -0700 -@@ -46,11 +46,9 @@ let ( ** ) = fun f g x -> f(g x);; - (* GCD and LCM on arbitrary-precision numbers. *) - (* ------------------------------------------------------------------------- *) - --let gcd_num n1 n2 = -- abs_num(num_of_big_int -- (Big_int.gcd_big_int (big_int_of_num n1) (big_int_of_num n2)));; -+let gcd_num n1 n2 = Z.gcd n1 n2;; - --let lcm_num n1 n2 = abs_num(n1 */ n2) // gcd_num n1 n2;; -+let lcm_num n1 n2 = Z.lcm n1 n2;; - - (* ------------------------------------------------------------------------- *) - (* A useful idiom for "non contradictory" etc. *) -@@ -73,7 +71,7 @@ let can f x = try f x; true with Failure - - let rec (--) = fun m n -> if m > n then [] else m::((m + 1) -- n);; - --let rec (---) = fun m n -> if m >/ n then [] else m::((m +/ Int 1) --- n);; -+let rec (---) = fun m n -> if Z.gt m n then [] else m::((Z.succ m) --- n);; - - let rec map2 f l1 l2 = - match (l1,l2) with -@@ -596,4 +594,4 @@ let equated (Partition f) = dom f;; - (* First number starting at n for which p succeeds. *) - (* ------------------------------------------------------------------------- *) - --let rec first n p = if p(n) then n else first (n +/ Int 1) p;; -+let rec first n p = if p(n) then n else first (Z.succ n) p;; ---- atp/Makefile.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/Makefile 2018-02-11 13:14:15.311777144 -0700 -@@ -8,6 +8,8 @@ - # many.ml (Example relevant to many-sorted logic) - # hol.ml (Simple higher order logic setup) - -+ZARITHLIB=$(shell ocamlfind query zarith) -+ - #MLFILES = lib.ml intro.ml formulas.ml prop.ml propexamples.ml \ - defcnf.ml dp.ml stal.ml bdd.ml fol.ml skolem.ml \ - herbrand.ml unif.ml tableaux.ml resolution.ml prolog.ml \ -@@ -33,9 +35,9 @@ compiled: example.ml atp.cmx; ocamlopt - - - # Make the appropriate object for the main body of code - --atp.cmx: atp.ml; ocamlopt -w ax -c atp.ml -+atp.cmx: atp.ml; ocamlopt -I $(ZARITHLIB) -w ax -c atp.ml - --atp.cmo: atp.ml; ocamlc -w ax -c atp.ml -+atp.cmo: atp.ml; ocamlc -I $(ZARITHLIB) -w ax -c atp.ml - - # Make the camlp4 quotation expander - ---- atp/make.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/make.ml 2018-02-11 14:37:48.178019612 -0700 -@@ -44,10 +44,9 @@ - Gc.set { (Gc.get()) with Gc.stack_limit = 16777216 };; (* Up the stack size *) - Format.set_margin 72;; (* Reduce margins *) - open Format;; (* Open formatting *) --open Num;; (* Open bignums *) - let imperative_assign = (:=);; (* Preserve this *) - --let print_num n = print_string(string_of_num n);; (* Avoid range limit *) -+let print_num n = print_string(Z.to_string n);; (* Avoid range limit *) - #install_printer print_num;; (* when printing nums *) - - (* ------------------------------------------------------------------------- *) ---- atp/Mk_ml_file.orig 2018-01-23 03:07:35.000000000 -0700 -+++ atp/Mk_ml_file 2018-02-10 22:01:01.925304810 -0700 -@@ -1,4 +1,3 @@ --echo "open Num;;" - echo "open Format;;" - - cat $@ | sed 's/START_INTERACTIVE;;/(\*/' | sed 's/END_INTERACTIVE;;/\*)/' ---- jc/jc_annot_inference.ml.orig 2018-02-10 16:03:04.338379961 -0700 -+++ jc/jc_annot_inference.ml 2018-02-11 13:13:48.313855743 -0700 -@@ -49,7 +49,6 @@ open Apron - open Coeff - open Interval - open Lincons1 --open Num - - - (*****************************************************************************) -@@ -1120,7 +1119,7 @@ let linearize t = - try match t#node with - | JCTconst c -> - begin match c with -- | JCCinteger s -> (TermMap.empty, num_of_string s) -+ | JCCinteger s -> (TermMap.empty, Z.of_string s) - | JCCboolean _ | JCCvoid | JCCnull | JCCreal _ | JCCstring _ -> - err () - end -@@ -1133,7 +1132,7 @@ let linearize t = - (fun vt1 c1 acc -> - try - let c2 = TermMap.find vt1 coeffs2 in -- TermMap.add vt1 (c1 +/ c2) acc -+ TermMap.add vt1 (Z.add c1 c2) acc - with Not_found -> TermMap.add vt1 c1 acc - ) coeffs1 TermMap.empty - in -@@ -1143,55 +1142,55 @@ let linearize t = - else TermMap.add vt2 c2 acc - ) coeffs2 coeffs - in -- (coeffs, cst1 +/ cst2) -+ (coeffs, (Z.add cst1 cst2)) - | `Bsub -> - let coeffs = TermMap.fold - (fun vt1 c1 acc -> - try - let c2 = TermMap.find vt1 coeffs2 in -- TermMap.add vt1 (c1 -/ c2) acc -+ TermMap.add vt1 (Z.sub c1 c2) acc - with Not_found -> TermMap.add vt1 c1 acc - ) coeffs1 TermMap.empty - in - let coeffs = TermMap.fold - (fun vt2 c2 acc -> - if TermMap.mem vt2 coeffs then acc -- else TermMap.add vt2 (minus_num c2) acc -+ else TermMap.add vt2 (Z.neg c2) acc - ) coeffs2 coeffs - in -- (coeffs, cst1 -/ cst2) -+ (coeffs, (Z.sub cst1 cst2)) - | `Bmul when TermMap.is_empty coeffs1 || TermMap.is_empty coeffs2 -> - let coeffs = - if TermMap.is_empty coeffs1 then -- TermMap.map (fun c -> c */ cst1) coeffs2 -+ TermMap.map (fun c -> Z.mul c cst1) coeffs2 - else -- TermMap.map (fun c -> c */ cst2) coeffs1 -+ TermMap.map (fun c -> Z.mul c cst2) coeffs1 - in -- (coeffs, cst1 */ cst2) -+ (coeffs, (Z.mul cst1 cst2)) - | `Bmul - | `Bdiv - | `Bmod -> err () - end - | JCTbinary(t1,(#bitwise_op as bop,`Integer),t2) -> - let coeffs1, cst1 = aux t1 in -- if coeffs1 = TermMap.empty && cst1 =/ Int 0 then -+ if coeffs1 = TermMap.empty && Z.equal cst1 Z.zero then - match bop with - | `Bbw_and - | `Bshift_left - | `Blogical_shift_right -- | `Barith_shift_right -> TermMap.empty, Int 0 -+ | `Barith_shift_right -> TermMap.empty, Z.zero - | `Bbw_or - | `Bbw_xor -> aux t2 - | _ -> err () - else - (* Consider non-linear term as abstract variable. *) -- (TermMap.add t (Int 1) TermMap.empty, Int 0) -+ (TermMap.add t Z.one TermMap.empty, Z.zero) - | JCTunary((uop,`Integer),t1) -> - let coeffs1,cst1 = aux t1 in - begin match uop with - | `Uminus -> -- let coeffs = TermMap.map (fun c -> minus_num c) coeffs1 in -- (coeffs, minus_num cst1) -+ let coeffs = TermMap.map (fun c -> Z.neg c) coeffs1 in -+ (coeffs, Z.neg cst1) - | _ -> err () - end - | JCTvar _ | JCTderef _ | JCToffset _ | JCTapp _ | JCTbinary _ -@@ -1201,13 +1200,16 @@ let linearize t = - | JCTrange _ | JCTif _ | JCTlet _ -> - err () - with Failure "linearize" -> -- (TermMap.add t (Int 1) TermMap.empty, Int 0) -+ (TermMap.add t Z.one TermMap.empty, Z.zero) - in aux t - - let linstr_of_term env t = -+(* - let mkmulstr = function -- | (_va, Int 0) -> "" -- | (va, c) -> string_of_num c ^ " * " ^ va -+ | (_va, Z.zero) -> "" -+ | (va, c) -> (Z.to_string c) ^ " * " ^ va -+*) -+ let mkmulstr = (fun (va,c) -> if Z.equal Z.zero c then "" else (Z.to_string c) ^ " * " ^ va) - in - let rec mkaddstr = function - | [] -> "" -@@ -1286,33 +1288,33 @@ let rec linstr_of_assertion env a = - in - let env,str,cst = linstr_of_term env subt in - if str = "" then -- let ncst = minus_num cst in -+ let ncst = Z.neg cst in - let is_true = match bop with -- | `Blt -> Int 0 Int 0 >/ ncst -- | `Ble -> Int 0 <=/ ncst -- | `Bge -> Int 0 >=/ ncst -- | `Beq -> Int 0 =/ ncst -- | `Bneq -> Int 0 <>/ ncst -+ | `Blt -> Z.lt Z.zero ncst -+ | `Bgt -> Z.gt Z.zero ncst -+ | `Ble -> Z.leq Z.zero ncst -+ | `Bge -> Z.geq Z.zero ncst -+ | `Beq -> Z.equal Z.zero ncst -+ | `Bneq -> not (Z.equal Z.zero ncst) - in - env, if is_true then Dnf.true_ else Dnf.false_ - else -- let cstr = string_of_num (minus_num cst) in -+ let cstr = Z.to_string (Z.neg cst) in - (* Do not use < and > with APRON, due to bugs in some versions. - Convert to equivalent non-strict. *) - let str = match bop with - | `Blt -> [[str ^ " <= " ^ -- (string_of_num (pred_num (minus_num cst)))]] -+ (Z.to_string (Z.pred (Z.neg cst)))]] - | `Bgt -> [[str ^ " >= " ^ -- (string_of_num (succ_num (minus_num cst)))]] -+ (Z.to_string (Z.succ (Z.neg cst)))]] - | `Ble -> [[str ^ " <= " ^ cstr]] - | `Bge -> [[str ^ " >= " ^ cstr]] - | `Beq -> [[str ^ " = " ^ cstr]] - | `Bneq -> - [[str ^ " <= " ^ -- (string_of_num (pred_num (minus_num cst)))]; -+ (Z.to_string (Z.pred (Z.neg cst)))]; - [str ^ " >= " ^ -- (string_of_num (succ_num (minus_num cst)))]] -+ (Z.to_string (Z.succ (Z.neg cst)))]] - in - env, str - | JCAnot a -> -@@ -1330,8 +1332,8 @@ let rec linstr_of_assertion env a = - let linstr_of_expr env e = - match Jc_effect.term_of_expr e with None -> None | Some t -> - let env,str,cst = linstr_of_term env t in -- if str = "" then Some (env, string_of_num cst) -- else Some (env, str ^ " + " ^ (string_of_num cst)) -+ if str = "" then Some (env, Z.to_string cst) -+ else Some (env, str ^ " + " ^ (Z.to_string cst)) - - let offset_linstr_of_expr env ok e = - match e#node with -@@ -1340,15 +1342,15 @@ let offset_linstr_of_expr env ok e = - else - begin match Jc_effect.term_of_expr e with None -> None | Some t -> - let env,str,cst = linstr_of_term env t in -- if str = "" then Some (env,string_of_num cst) -- else Some (env,str ^ " + " ^ (string_of_num cst)) -+ if str = "" then Some (env,Z.to_string cst) -+ else Some (env,str ^ " + " ^ (Z.to_string cst)) - end - | _ -> - if is_nonnull_pointer_type e#typ then - match Jc_effect.term_of_expr e with None -> None | Some t -> - let env,str,cst = offset_linstr_of_term env ok t in -- if str = "" then Some (env,string_of_num cst) -- else Some (env,str ^ " + " ^ (string_of_num cst)) -+ if str = "" then Some (env,Z.to_string cst) -+ else Some (env,str ^ " + " ^ (Z.to_string cst)) - else None - - -@@ -1419,13 +1421,13 @@ let mkassertion lincons = - - let rec linterms_of_term t = - let mkmulterm (t,c) = -- if c =/ Int 0 then None -- else if c =/ Int 1 then Some t -- else if c =/ Int (-1) then -+ if Z.equal c Z.zero then None -+ else if Z.equal c Z.one then Some t -+ else if Z.equal c Z.minus_one then - Some(new term ~typ:integer_type (JCTunary((`Uminus,`Integer),t))) - else - let c = -- new term ~typ:integer_type (JCTconst(JCCinteger(string_of_num c))) -+ new term ~typ:integer_type (JCTconst(JCCinteger(Z.to_string c))) - in - Some(new term ~typ:integer_type (JCTbinary(c,(`Bmul,`Integer),t))) - in -@@ -1443,30 +1445,30 @@ let rec linterms_of_term t = - let coeffs,cst = linearize t in - let posl,negl = - TermMap.fold (fun t c (pl,nl) -> -- if c >/ Int 0 then (t,c) :: pl, nl -- else if c -- if cst >/ Int 0 then cstt -+ if Z.gt cst Z.zero then cstt - else new term ~typ:integer_type (JCTconst(JCCinteger "0")) - | Some t -> -- if cst >/ Int 0 then -+ if Z.gt cst Z.zero then - new term ~typ:integer_type (JCTbinary(t,(`Badd,`Integer),cstt)) - else t - in - let negt = match mkaddterm negl with - | None -> -- if cst -- if cst -- if c >/ Int 0 then t :: pl, nl -- else if c [] | Some t1 -> - let mint = new term ~typ:integer_type -- (JCTconst (JCCinteger (Num.string_of_num ei.jc_enum_info_min))) -+ (JCTconst (JCCinteger (Z.to_string ei.jc_enum_info_min))) - in - let maxt = new term ~typ:integer_type -- (JCTconst(JCCinteger (Num.string_of_num ei.jc_enum_info_max))) -+ (JCTconst(JCCinteger (Z.to_string ei.jc_enum_info_max))) - in - let mina = new assertion (JCArelation (mint, (`Ble,`Integer), t1)) in - let maxa = new assertion (JCArelation (t1, (`Ble,`Integer), maxt)) in diff --git a/why-ocaml-4.06.patch b/why-ocaml-4.06.patch deleted file mode 100644 index 872f38a..0000000 --- a/why-ocaml-4.06.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2018-02-10 15:44:26.226883183 -0700 -+++ Makefile.in 2018-02-12 19:34:20.930490137 -0700 -@@ -214,7 +214,7 @@ jc/jc.cmx jc/jc.o: $(JCCMX_EXPORT) - # ppc: jc/jc.cmi jc/jc.cmo jc/jc.cmx - - bin/jessie.opt: $(JCCMX) -- $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ -+ $(if $(QUIET),@echo 'Linking $@' &&) $(OCAMLOPT) -runtime-variant _pic $(OFLAGS) $(APRONLIB) $(APRONLIBS) $(ATPLIB) -o $@ \ - unix.cmxa str.cmxa zarith.cmxa graph.cmxa $^ - $(STRIP) $@ - diff --git a/why-project.patch b/why-project.patch deleted file mode 100644 index b4536a8..0000000 --- a/why-project.patch +++ /dev/null @@ -1,115 +0,0 @@ ---- Makefile.in.orig 2018-01-23 03:07:35.000000000 -0700 -+++ Makefile.in 2018-02-10 15:44:26.226883183 -0700 -@@ -155,7 +155,7 @@ CMO_EXPORT = src/lib.cmo src/rc.cmo src - src/effect.cmo src/pp.cmo src/option_misc.cmo \ - src/report.cmo \ - src/explain.cmo \ -- src/xml.cmo src/project.cmo -+ src/xml.cmo src/whyproject.cmo - - # jessie - JCCML_EXPORT = src/why3_kw.ml jc/output.ml \ ---- src/options.mli.orig 2018-01-23 03:07:35.000000000 -0700 -+++ src/options.mli 2018-02-10 15:44:26.258883112 -0700 -@@ -184,7 +184,7 @@ val files : string list - (*s GUI? *) - - val gui : bool ref --val gui_project : Project.t option ref -+val gui_project : Whyproject.t option ref - val lib_files_to_load : string list - - (* ---- src/pretty.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ src/pretty.ml 2018-02-10 15:44:26.259883110 -0700 -@@ -416,12 +416,12 @@ let output_project f = - with Not_found -> - functions := SMap.add fn SMap.empty !functions) - Util.program_locs ; -- let p = Project.create (Filename.basename f) in -- Project.set_project_context_file p (f ^ "_ctx.why"); -+ let p = Whyproject.create (Filename.basename f) in -+ Whyproject.set_project_context_file p (f ^ "_ctx.why"); - List.iter - (fun (expl,fpo) -> - let n = expl.lemma_or_fun_name in -- let _ = Project.add_lemma p n expl fpo in ()) -+ let _ = Whyproject.add_lemma p n expl fpo in ()) - !lemmas; - SMap.iter - (fun fname behs -> -@@ -431,15 +431,15 @@ let output_project f = - floc - with Not_found -> Loc.dummy_floc - in -- let f = Project.add_function p fname floc in -+ let f = Whyproject.add_function p fname floc in - SMap.iter - (fun beh vcs -> -- let be = Project.add_behavior f beh floc in -+ let be = Whyproject.add_behavior f beh floc in - List.iter - (fun (expl,fpo) -> -- let _ = Project.add_goal be expl fpo in ()) -+ let _ = Whyproject.add_goal be expl fpo in ()) - vcs) - behs) - !functions; -- Project.save p f; -+ Whyproject.save p f; - p ---- src/pretty.mli.orig 2018-01-23 03:07:35.000000000 -0700 -+++ src/pretty.mli 2018-02-10 15:44:26.259883110 -0700 -@@ -50,4 +50,4 @@ val output_files : string -> unit - (* [output_project f] produces a whole project description, in a file - [f.wpr], together with other needed files [f_ctx.why], [f_lemmas.why], - and each goal in a separate file [f_po.why] for i=1,2,... *) --val output_project : string -> Project.t -+val output_project : string -> Whyproject.t ---- src/whyweb.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ src/whyweb.ml 2018-02-10 15:44:26.259883110 -0700 -@@ -29,7 +29,7 @@ - (**************************************************************************) - - open Format --open Project -+open Whyproject - - (*prover*) - let provers = [Ergo ; Simplify ; Z3 ; Yices ; Cvc3] -@@ -168,7 +168,7 @@ let file = match !file with - | None -> () - | Some f -> Arg.usage spec usage; exit 1 - --let proj = ref (Project.create "") -+let proj = ref (Whyproject.create "") - - let proj_file = ref "" - -@@ -260,7 +260,7 @@ let interp_com c = - let _ = Thread.create (launch_behavior Cvc3) b in () - | `LaunchCvc3Function f -> - let _ = Thread.create (launch_function Cvc3) f in () -- | `Save -> Project.save !proj !proj.project_name -+ | `Save -> Whyproject.save !proj !proj.project_name - end; - loc - with Not_found -> ("",0,0,0) -@@ -343,7 +343,7 @@ let main_page msg = - let load_prj file = - eprintf "Reading file %s@." file; - try -- proj := Project.load file; -+ proj := Whyproject.load file; - proj_file := file; - with - Sys_error _ -> -@@ -526,7 +526,7 @@ wprint "
Save Proj -
%s%s
" ns; - wprint ""; - List.iter (fun prover -> -- wprint "" (Project.provers_name prover)) -+ wprint "" (Whyproject.provers_name prover)) - provers; - wprint " - "; diff --git a/why-safe-string.patch b/why-safe-string.patch deleted file mode 100644 index 23968d2..0000000 --- a/why-safe-string.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- jc/jc_annot_inference.ml.orig 2018-01-23 03:07:35.000000000 -0700 -+++ jc/jc_annot_inference.ml 2018-02-10 16:03:04.338379961 -0700 -@@ -212,14 +212,14 @@ let name_of_term t = - Format.fprintf str_formatter "%a" Jc_output.term t; - let s = Format.flush_str_formatter () in - let s = filter_alphanumeric s in -- "T" ^ unique_term_name t s -+ "T" ^ unique_term_name t (Bytes.to_string s) - - let name_of_assertion a = - ignore (Format.flush_str_formatter ()); - Format.fprintf str_formatter "%a" Jc_output.assertion a; - let s = Format.flush_str_formatter () in - let s = filter_alphanumeric s in -- "A" ^ unique_assertion_name a s -+ "A" ^ unique_assertion_name a (Bytes.to_string s) - - (* support of (Nicolas) *) - let rec destruct_alloc t = diff --git a/why.spec b/why.spec index 3ac8549..9bead76 100644 --- a/why.spec +++ b/why.spec @@ -6,8 +6,8 @@ %endif Name: why -Version: 2.40 -Release: 2%{?dist} +Version: 2.41 +Release: 1%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -23,15 +23,6 @@ Source7: rem.pvs Source8: patch_jessie_pvs # Created with gimp from official upstream icon Source9: %{name}-icons.tar.xz -# Avoid a clash between Frama-C and why modules both named "Project". -# Sent upstream 26 Jun 2014. -Patch0: %{name}-project.patch -# Adapt to the safe string feature of ocaml 4.06 -Patch1: %{name}-safe-string.patch -# Adapt to ocaml 4.06 in general -Patch2: %{name}-ocaml-4.06.patch -# Finish an incomplete Num to zarith conversion -Patch3: %{name}-num.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils @@ -117,14 +108,6 @@ based on Why, including various automated and interactive provers. %prep %setup -q %setup -q -T -D -a 9 -%patch0 -%patch1 -%patch2 -%patch3 - -# The other part of avoiding the "Project" module name clash -mv src/project.ml src/whyproject.ml -mv src/project.mli src/whyproject.mli cp -p %SOURCE2 ./ @@ -157,6 +140,9 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure +# Allow building with why3 1.1.1 +sed -i 's,0\.88\.\*,&|1.1.1,' configure + %build %ifarch %{ocaml_native_compiler} %global opt_option OCAMLBEST=opt @@ -206,22 +192,18 @@ cp -p %{SOURCE8} %{buildroot}%{_bindir}/ # Fix up documentation and examples mkdir -p %{buildroot}%{why_doc_dir} -cp -p %{SOURCE1} %{SOURCE3} CHANGES README Version %{buildroot}%{why_doc_dir} +cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} CHANGES README Version \ + %{buildroot}%{why_doc_dir} %check make check %files -%doc README.why-coq.Fedora %license COPYING LICENSE -%{_bindir}/* +%{_bindir}/krakatoa %{_libdir}/why/ %{_datadir}/icons/hicolor/*/apps/%{name}.png %{why_doc_dir}/ -# why-jessie -%exclude %{_bindir}/jessie -# why-pvs-support: -%exclude %{_bindir}/patch_jessie_pvs %files jessie %{_bindir}/jessie @@ -243,6 +225,10 @@ make check %changelog +* Sat Jan 26 2018 Jerry James - 2.41-1 +- New upstream release +- All patches have been upstreamed; drop them all + * Sat Jul 14 2018 Fedora Release Engineering - 2.40-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 6472c2a08f7f2d882531d3535056abd184e1dbf5 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Sat, 26 Jan 2019 08:20:53 -0700 Subject: [PATCH 83/97] Welcome to 2019, Jerry. --- why.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 9bead76..e68251e 100644 --- a/why.spec +++ b/why.spec @@ -225,7 +225,7 @@ make check %changelog -* Sat Jan 26 2018 Jerry James - 2.41-1 +* Sat Jan 26 2019 Jerry James - 2.41-1 - New upstream release - All patches have been upstreamed; drop them all From 1341b9c9efe30f35da0c93d09ecdbb5f1c44df1d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 11:41:51 +0000 Subject: [PATCH 84/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index e68251e..6113f5d 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -225,6 +225,9 @@ make check %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 2.41-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jan 26 2019 Jerry James - 2.41-1 - New upstream release - All patches have been upstreamed; drop them all From 26b175fd3299d48bbbb3e0e10d82426d8c409162 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Wed, 5 Jun 2019 20:08:47 -0600 Subject: [PATCH 85/97] Rebuild for coq 8.9.1, why3 1.2.0, and frama-c 18.0. --- why-frama-c.patch | 757 ++++++++++++++++++++++++++++++++++++++++++++++ why.spec | 18 +- 2 files changed, 772 insertions(+), 3 deletions(-) create mode 100644 why-frama-c.patch diff --git a/why-frama-c.patch b/why-frama-c.patch new file mode 100644 index 0000000..eab0a6b --- /dev/null +++ b/why-frama-c.patch @@ -0,0 +1,757 @@ +--- frama-c-plugin/common.ml.orig 2018-06-28 16:43:25.000000000 -0600 ++++ frama-c-plugin/common.ml 2019-06-03 09:39:40.876316289 -0600 +@@ -56,8 +56,9 @@ let fatal fmt = Jessie_options.fatal ~cu + + let unsupported fmt = + Jessie_options.with_failure +- (fun evt -> +- raise (Unsupported evt.Log.evt_message) ++ (function ++ | (Some evt) -> raise (Unsupported evt.Log.evt_message) ++ | None -> raise (Unsupported "No message") + ) ~current:true fmt + + let warning fmt = Jessie_options.warning ~current:true fmt +--- frama-c-plugin/common.mli.orig 2018-06-28 16:43:25.000000000 -0600 ++++ frama-c-plugin/common.mli 2019-06-03 09:38:56.727035437 -0600 +@@ -102,7 +102,7 @@ val term_of_var : Cil_types.varinfo -> C + val mkterm : + Cil_types.term_node -> + Cil_types.logic_type -> +- Lexing.position * Lexing.position -> Cil_types.term ++ Filepath.position * Filepath.position -> Cil_types.term + + val mkInfo : Cil_types.exp -> Cil_types.exp + +--- frama-c-plugin/interp.ml.orig 2018-06-28 16:43:25.000000000 -0600 ++++ frama-c-plugin/interp.ml 2019-06-03 11:55:36.722081449 -0600 +@@ -702,14 +702,14 @@ let rec coerce_floats t = + if isLogicFloatType t.term_type then + List.map + (fun e -> +- mkexpr (JCPEcast(e, mktype (JCPTnative Treal))) t.term_loc) ++ mkexpr (JCPEcast(e, mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc)) + (terms t) + else terms t + + and terms t = + CurrentLoc.set t.term_loc; + let enode = match constFoldTermNodeAtTop t.term_node with +- | TConst c -> [logic_const t.term_loc c] ++ | TConst c -> [logic_const (Location.to_lexing_loc t.term_loc) c] + + | TDataCons({ctor_type = {lt_name = name} } as d,_args) + when name = Utf8_logic.boolean -> +@@ -727,7 +727,7 @@ and terms t = + | Toffset _ -> Common.unsupported "logic offset" + + | TLval lv -> +- List.map (fun x -> x#node) (terms_lval t.term_loc lv) ++ List.map (fun x -> x#node) (terms_lval (Location.to_lexing_loc t.term_loc) lv) + + | TSizeOf _ | TSizeOfE _ | TSizeOfStr _ | TAlignOf _ | TAlignOfE _ -> + assert false (* Should be removed by constant folding *) +@@ -741,7 +741,7 @@ and terms t = + let t1 = terms t1 in + let t2 = terms t2 in + let expr x y = +- let sube = mkexpr (JCPEbinary(x,`Bsub,y)) t.term_loc in ++ let sube = mkexpr (JCPEbinary(x,`Bsub,y)) (Location.to_lexing_loc t.term_loc) in + JCPEbinary(sube,binop op,zero_expr) + in product expr t1 t2 + +@@ -867,7 +867,7 @@ and terms t = + | TAddrOf _tlv -> assert false (* Should have been rewritten *) + + | TStartOf tlv -> +- List.map (fun x -> x#node) (terms_lval t.term_loc tlv) ++ List.map (fun x -> x#node) (terms_lval (Location.to_lexing_loc t.term_loc) tlv) + + | Tapp(linfo,labels,tlist) -> + begin +@@ -887,7 +887,7 @@ and terms t = + then + List.map + (fun t' -> +- mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) t.term_loc) ++ mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc)) + t' + else t') + prof +@@ -950,17 +950,17 @@ and terms t = + | TLogic_coerce(_,t) -> List.map (fun x -> x#node) (terms t) + + in +- List.map (swap mkexpr t.term_loc) enode ++ List.map (swap mkexpr (Location.to_lexing_loc t.term_loc)) enode + + and tag t = + let tag_node = match t.term_node with + | Ttypeof t -> JCPTtypeof (term t) + | Ttype ty -> +- let id = mkidentifier (get_struct_name (pointed_type ty)) t.term_loc in ++ let id = mkidentifier (get_struct_name (pointed_type ty)) (Location.to_lexing_loc t.term_loc) in + JCPTtag id + | _ -> assert false (* Not a tag *) + in +- mktag tag_node t.term_loc ++ mktag tag_node (Location.to_lexing_loc t.term_loc) + + and terms_lval pos lv = + match lv with +@@ -1042,6 +1042,7 @@ and term t = + *) + and pred p = + CurrentLoc.set p.pred_loc; ++ let ploc = Location.to_lexing_loc p.pred_loc in + let enode = match p.pred_content with + | Pfalse -> JCPEconst(JCCboolean false) + +@@ -1060,7 +1061,7 @@ and pred p = + let t' = term t in + if isLogicFloatType t.term_type && isLogicRealType lv.lv_type + then +- mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) t.term_loc ++ mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc) + else t') + pinfo.l_profile + tl +@@ -1072,7 +1073,7 @@ and pred p = + | Prel((Rlt | Rgt | Rle | Rge as rel),t1,t2) + when app_term_type isPointerType false t1.term_type -> + (* Pointer comparison is translated as subtraction *) +- let sube = mkexpr (JCPEbinary(term t1,`Bsub,term t2)) p.pred_loc in ++ let sube = mkexpr (JCPEbinary(term t1,`Bsub,term t2)) ploc in + JCPEbinary(sube,relation rel,zero_expr) + + (* | Prel((Req | Rneq as rel),t1,t2) *) +@@ -1087,14 +1088,14 @@ and pred p = + JCPEeqtype(tag t1,tag t2) + + | Prel(Rneq,t1,t2) when isTypeTagType t1.term_type -> +- let eq = mkexpr (JCPEeqtype(tag t1,tag t2)) p.pred_loc in ++ let eq = mkexpr (JCPEeqtype(tag t1,tag t2)) ploc in + JCPEunary(`Unot,eq) + + | Prel(rel,t1,t2) -> + let res = +- product (fun t1 t2 -> mkexpr (JCPEbinary(t1,relation rel,t2)) p.pred_loc) ++ product (fun t1 t2 -> mkexpr (JCPEbinary(t1,relation rel,t2)) ploc) + (coerce_floats t1) (coerce_floats t2) +- in (mkconjunct res p.pred_loc)#node ++ in (mkconjunct res ploc)#node + | Pand(p1,p2) -> + JCPEbinary(pred p1,`Bland,pred p2) + +@@ -1170,21 +1171,21 @@ and pred p = + | None,None -> true_expr + | Some t2,None -> + let e2 = term t2 in +- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in +- mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc ++ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in ++ mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc + | None, Some t3 -> + let e3 = term t3 in +- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in +- mkexpr (JCPEbinary(eoffmax,`Bge,e3)) p.pred_loc ++ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in ++ mkexpr (JCPEbinary(eoffmax,`Bge,e3)) ploc + | Some t2,Some t3 -> + let e2 = term t2 in + let e3 = term t3 in +- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in +- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc in +- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in +- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e3)) p.pred_loc in +- mkconjunct [emin; emax] p.pred_loc +- in (mkconjunct (List.map mk_one_pred e1) p.pred_loc)#node ++ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in ++ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc in ++ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in ++ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e3)) ploc in ++ mkconjunct [emin; emax] ploc ++ in (mkconjunct (List.map mk_one_pred e1) ploc)#node + + | Pvalid(_lab,{ term_node = TBinOp(PlusPI,t1,t2)}) -> + let e1 = terms t1 in +@@ -1193,23 +1194,23 @@ and pred p = + (List.flatten + (List.map + (fun e1 -> +- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in +- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc in +- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in +- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e2)) p.pred_loc in ++ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in ++ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc in ++ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in ++ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e2)) ploc in + [emin; emax]) +- e1)) p.pred_loc)#node ++ e1)) ploc)#node + | Pvalid (_lab,t) -> + let elist = + List.flatten (List.map (fun e -> +- let eoffmin = mkexpr (JCPEoffset(Offset_min,e)) p.pred_loc in +- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,zero_expr)) p.pred_loc in +- let eoffmax = mkexpr (JCPEoffset(Offset_max,e)) p.pred_loc in +- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,zero_expr)) p.pred_loc in ++ let eoffmin = mkexpr (JCPEoffset(Offset_min,e)) ploc in ++ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,zero_expr)) ploc in ++ let eoffmax = mkexpr (JCPEoffset(Offset_max,e)) ploc in ++ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,zero_expr)) ploc in + [emin; emax] + ) (terms t)) + in +- (mkconjunct elist p.pred_loc)#node ++ (mkconjunct elist ploc)#node + + | Pvalid_read _ -> Common.unsupported "\\valid_read operator" + +@@ -1236,7 +1237,7 @@ and pred p = + | Pvalid_function _ -> Common.unsupported "\\valid_function" + + in +- mkexpr enode p.pred_loc ++ mkexpr enode ploc + + (* Keep names associated to predicate *) + let named_pred p = +@@ -1492,14 +1493,15 @@ let set_curFundec, get_curFundec = + + let rec expr e = + ++ let eloc = Location.to_lexing_loc e.eloc in + let enode = + let e = stripInfo e in + match e.enode with + | Info _ -> assert false + +- | Const c -> const e.eloc c ++ | Const c -> const eloc c + +- | Lval lv -> (lval e.eloc lv)#node ++ | Lval lv -> (lval eloc lv)#node + + | SizeOf _ | SizeOfE _ | SizeOfStr _ | AlignOf _ | AlignOfE _ -> + assert false (* Should be removed by constant folding *) +@@ -1509,7 +1511,7 @@ let rec expr e = + + | UnOp(op,e,_ty) -> + let e = +- locate (mkexpr (JCPEunary(unop op,expr e)) e.eloc) ++ locate (mkexpr (JCPEunary(unop op,expr e)) eloc) + in + e#node + +@@ -1518,24 +1520,24 @@ let rec expr e = + + | BinOp(op,e1,e2,_ty) -> + let e = +- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) + in + e#node + + | CastE(ty,e') + when isIntegralType ty && isFloatingType (typeOf e') -> + let e1 = +- locate (mkexpr (JCPEcast(expr e',mktype (JCPTnative Treal))) e.eloc) ++ locate (mkexpr (JCPEcast(expr e',mktype (JCPTnative Treal))) eloc) + in + let e = +- locate (mkexpr (JCPEapp("\\truncate_real_to_int",[],[e1])) e.eloc) ++ locate (mkexpr (JCPEapp("\\truncate_real_to_int",[],[e1])) eloc) + in e#node + + | CastE(ty,e') when isIntegralType ty && isArithmeticType (typeOf e') -> + (integral_expr e)#node + + | CastE(ty,e') when isFloatingType ty && isArithmeticType (typeOf e') -> +- let e = locate (mkexpr (JCPEcast(expr e',ctype ty)) e.eloc) in ++ let e = locate (mkexpr (JCPEcast(expr e',ctype ty)) eloc) in + e#node + + | CastE(ty,e') when isIntegralType ty && isPointerType (typeOf e') -> +@@ -1572,7 +1574,7 @@ let rec expr e = + (* else *) + (* bitwise cast *) + let enode = JCPEcast(expr e,ctype ptrty) in +- let e = locate (mkexpr enode e.eloc) in ++ let e = locate (mkexpr enode eloc) in + e#node + (* let _,ptr_to_ptr = type_conversion ptrty ety in *) + (* JCPEapp(ptr_to_ptr,[],[expr e]) *) +@@ -1600,9 +1602,9 @@ let rec expr e = + + | AddrOf _lv -> assert false (* Should have been rewritten *) + +- | StartOf lv -> (lval e.eloc lv)#node ++ | StartOf lv -> (lval eloc lv)#node + in +- mkexpr enode e.eloc ++ mkexpr enode eloc + + (* Function called when expecting a boolean in Jessie, i.e. when translating + a test or a sub-expression of an "or" or "and". +@@ -1614,6 +1616,7 @@ and boolean_expr e = + else assert false + in + ++ let eloc = Location.to_lexing_loc e.eloc in + let enode = match (stripInfo e).enode with + | Info _ -> assert false + +@@ -1633,43 +1636,44 @@ and boolean_expr e = + JCPEbinary(expr e1,binop op,expr e2) + else + (* Pointer comparison is translated as subtraction *) +- let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) e.eloc in ++ let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) eloc in + JCPEbinary(sube,binop op,zero_expr) + + | _ -> boolean_node_from_expr (typeOf e) (expr e) + in +- mkexpr enode e.eloc ++ mkexpr enode eloc + + (* Function called instead of plain [expr] when the evaluation result should + * fit in a C integral type. + *) + and integral_expr e = + ++ let eloc = (Location.to_lexing_loc e.eloc) in + let rec int_expr e = + let node_from_boolean_expr e = JCPEif(e,one_expr,zero_expr) in + + let enode = match e.enode with + | UnOp(LNot,e',_ty) -> +- let e = mkexpr (JCPEunary(unop LNot,boolean_expr e')) e.eloc in ++ let e = mkexpr (JCPEunary(unop LNot,boolean_expr e')) eloc in + node_from_boolean_expr e + + | UnOp(op,e',_ty) -> + let e = +- locate (mkexpr (JCPEunary(unop op,expr e')) e.eloc) ++ locate (mkexpr (JCPEunary(unop op,expr e')) eloc) + in + e#node + + | BinOp((LAnd | LOr) as op,e1,e2,_ty) -> + let e = +- mkexpr (JCPEbinary(boolean_expr e1,binop op,boolean_expr e2)) e.eloc ++ mkexpr (JCPEbinary(boolean_expr e1,binop op,boolean_expr e2)) eloc + in + node_from_boolean_expr e + + | BinOp((Lt | Gt | Le | Ge as op),e1,e2,_ty) + when isPointerType (typeOf e1) -> + (* Pointer comparison is translated as subtraction *) +- let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) e.eloc in +- let e = mkexpr (JCPEbinary(sube,binop op,zero_expr)) e.eloc in ++ let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) eloc in ++ let e = mkexpr (JCPEbinary(sube,binop op,zero_expr)) eloc in + node_from_boolean_expr e + + (* | BinOp((Eq | Ne as op),e1,e2,_ty) *) +@@ -1681,11 +1685,11 @@ and integral_expr e = + (* node_from_boolean_expr e *) + + | BinOp((Eq | Ne) as op,e1,e2,_ty) -> +- let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc in ++ let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc in + node_from_boolean_expr e + + | BinOp((Lt | Gt | Le | Ge) as op,e1,e2,_ty) -> +- let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc in ++ let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc in + node_from_boolean_expr e + + | BinOp(Shiftrt,e1,e2,_ty) -> +@@ -1694,13 +1698,13 @@ and integral_expr e = + Integer.lt i (Integer.of_int 63) -> + (* Right shift by constant is division by constant *) + let pow = constant_expr (Integer.two_power i) in +- locate (mkexpr (JCPEbinary(expr e1,`Bdiv,expr pow)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,`Bdiv,expr pow)) eloc) + | _ -> + let op = + if isSignedInteger (typeOf e1) then `Barith_shift_right + else `Blogical_shift_right + in +- locate (mkexpr (JCPEbinary(expr e1,op,expr e2)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,op,expr e2)) eloc) + in + e#node + +@@ -1710,36 +1714,36 @@ and integral_expr e = + Integer.lt i (Integer.of_int 63) -> + (* Left shift by constant is multiplication by constant *) + let pow = constant_expr (Integer.two_power i) in +- locate (mkexpr (JCPEbinary(expr e1,`Bmul,expr pow)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,`Bmul,expr pow)) eloc) + | _ -> +- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) + in + e#node + + | BinOp(op,e1,e2,_ty) -> + let e = +- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) ++ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) + in + e#node + + | CastE(ty,e1) when isFloatingType (typeOf e1) -> +- let e1' = locate (mkexpr (JCPEcast(expr e1,ltype Linteger)) e.eloc) in ++ let e1' = locate (mkexpr (JCPEcast(expr e1,ltype Linteger)) eloc) in + if !int_model = IMexact then + e1'#node + else +- let e2' = locate (mkexpr (JCPEcast(e1',ctype ty)) e.eloc) in ++ let e2' = locate (mkexpr (JCPEcast(e1',ctype ty)) eloc) in + e2'#node + + | CastE(ty,e1) when isIntegralType (typeOf e1) -> + if !int_model = IMexact then + (int_expr e1)#node + else +- let e = locate (mkexpr (JCPEcast(int_expr e1,ctype ty)) e.eloc) in ++ let e = locate (mkexpr (JCPEcast(int_expr e1,ctype ty)) eloc) in + e#node + + | _ -> (expr e)#node + in +- mkexpr enode e.eloc ++ mkexpr enode eloc + in + + match e.enode with +@@ -1814,8 +1818,9 @@ let keep_only_declared_nb_of_arguments v + + let instruction = function + | Set(lv,e,pos) -> +- let enode = JCPEassign(lval pos lv,expr e) in +- (locate (mkexpr enode pos))#node ++ let lpos = Location.to_lexing_loc pos in ++ let enode = JCPEassign(lval lpos lv,expr e) in ++ (locate (mkexpr enode lpos))#node + + | Call(None,{enode = Lval(Var v,NoOffset)},eargs,pos) -> + if is_assert_function v then +@@ -1834,9 +1839,10 @@ let instruction = function + v + (List.map expr eargs)) + in +- (locate (mkexpr enode pos))#node ++ (locate (mkexpr enode (Location.to_lexing_loc pos)))#node + + | Call(Some lv,{enode = Lval(Var v,NoOffset)},eargs,pos) -> ++ let lpos = Location.to_lexing_loc pos in + let enode = + if is_malloc_function v || is_realloc_function v then + let lvtyp = pointed_type (typeOfLval lv) in +@@ -1867,7 +1873,7 @@ let instruction = function + let siznode = + JCPEconst(JCCinteger(Integer.to_string allocsiz)) + in +- lvtyp, mkexpr siznode pos ++ lvtyp, mkexpr siznode lpos + | BinOp(Mult,({enode = Const c} as arg),nelem,_ty) + when is_integral_const c -> aux arg nelem + | BinOp(Mult,nelem,({enode = Const c} as arg),_ty) +@@ -1928,24 +1934,24 @@ let instruction = function + (List.map expr eargs)) + in + let lvty = typeOfLval lv in +- let call = locate (mkexpr enode pos) in ++ let call = locate (mkexpr enode lpos) in + let enode = + if Typ.equal lvty (getReturnType v.vtype) + || is_malloc_function v + || is_realloc_function v + || is_calloc_function v + then +- JCPEassign(lval pos lv,call) ++ JCPEassign(lval lpos lv,call) + else + let tmpv = makeTempVar (get_curFundec()) (getReturnType v.vtype) in + let tmplv = Var tmpv, NoOffset in + let cast = + new_exp ~loc:pos (CastE(lvty,new_exp ~loc:pos (Lval tmplv))) + in +- let tmpassign = JCPEassign(lval pos lv,expr cast) in +- JCPElet(None,tmpv.vname,Some call,locate (mkexpr tmpassign pos)) ++ let tmpassign = JCPEassign(lval lpos lv,expr cast) in ++ JCPElet(None,tmpv.vname,Some call,locate (mkexpr tmpassign lpos)) + in +- (locate (mkexpr enode pos))#node ++ (locate (mkexpr enode lpos))#node + + | Call _ -> Common.unsupported ~current:true "function pointers" + +@@ -1976,9 +1982,10 @@ let rec statement s = + in + *) + ++ let lpos = Location.to_lexing_loc pos in + let assert_before, contract = + Annotations.fold_code_annot +- (fun _ ca acc -> code_annot pos acc ca) s ([],None) ++ (fun _ ca acc -> code_annot lpos acc ca) s ([],None) + in + let snode = match s.skind with + | Instr i -> instruction i +@@ -1986,7 +1993,7 @@ let rec statement s = + | Return(Some e,_) -> JCPEreturn(expr e) + + | Return(None,_pos) -> +- JCPEreturn(mkexpr (JCPEconst JCCvoid) pos) ++ JCPEreturn(mkexpr (JCPEconst JCCvoid) lpos) + + | Goto(sref,_pos) -> + (* Pick the first non-case label in the list of labels associated to +@@ -2050,7 +2057,7 @@ let rec statement s = + | case_stmt :: _ as slist -> + let switch_labels = List.filter is_case_label case_stmt.labels in + let labs = List.map switch_label switch_labels in +- let slist = mkexpr (JCPEblock(statement_list slist)) pos in ++ let slist = mkexpr (JCPEblock(statement_list slist)) (Location.to_lexing_loc pos) in + labs, slist + in + let case_list = List.map case (case_blocks bl.bstmts slist) in +@@ -2098,7 +2105,7 @@ let rec statement s = + let inv = + match invs with + | [] -> None +- | _ -> Some (mkconjunct invs pos) ++ | _ -> Some (mkconjunct invs lpos) + in + let ass = assigns ass in + (beh_names,inv,ass)) +@@ -2119,7 +2126,7 @@ let rec statement s = + in + (* Prefix statement by all non-case labels *) + let labels = filter_out is_case_label s.labels in +- let s = mkexpr snode pos in ++ let s = mkexpr snode lpos in + let s = + match contract with + | None -> s +@@ -2145,13 +2152,13 @@ let rec statement s = + in + mkexpr + (JCPEcontract(requires, decreases, behaviors, s)) +- pos ++ lpos + in + let s = match assert_before @ [s] with + | [s] -> s +- | slist -> mkexpr (JCPEblock slist) pos ++ | slist -> mkexpr (JCPEblock slist) lpos + in +- List.fold_left (fun s lab -> mkexpr (JCPElabel(label lab,s)) pos) s labels ++ List.fold_left (fun s lab -> mkexpr (JCPElabel(label lab,s)) lpos) s labels + + and statement_list slist = List.rev (List.rev_map statement slist) + +@@ -2228,7 +2235,7 @@ let rec annotation is_axiomatic annot = + if _attr <> [] then warning "ignoring attributes of axiom %s" name; + ignore + (reg_position ~id:name +- ~name:("Lemma " ^ name) pos); ++ ~name:("Lemma " ^ name) (Location.to_lexing_loc pos)); + begin try + [JCDlemma(name,is_axiom,[],logic_labels labels,pred property)] + with (Unsupported _ | Log.FeatureRequest _) +@@ -2263,6 +2270,7 @@ let rec annotation is_axiomatic annot = + + | Dtype (info,pos) when info.lt_params=[] -> + CurrentLoc.set pos; ++ let lpos = Location.to_lexing_loc pos in + let myself = mktype (JCPTidentifier (info.lt_name,[])) in + let mydecl = JCDlogic_type (info.lt_name,[]) in + let axiomatic ctors = +@@ -2295,8 +2303,8 @@ let rec annotation is_axiomatic annot = + (* TODO: give unique name *) + (fun x -> + mkexpr (JCPEquantifier(Forall,ltype t, +- [new identifier prms_name], [],x)) pos), +- mkexpr (JCPEvar prms_name) pos ++ [new identifier prms_name], [],x)) lpos), ++ mkexpr (JCPEvar prms_name) lpos + in + let (quant,args) = + List.fold_right +@@ -2314,17 +2322,17 @@ let rec annotation is_axiomatic annot = + (mkexpr + (JCPEbinary + (mkexpr (JCPEapp (info.lt_name ^ "_tag",[], +- [mkexpr expr pos])) pos, ++ [mkexpr expr lpos])) lpos, + `Beq, +- mkexpr(JCPEconst(JCCinteger (Int64.to_string i))) pos)) +- pos) ++ mkexpr(JCPEconst(JCCinteger (Int64.to_string i))) lpos)) ++ lpos) + in + (i+one, + JCDlemma(cons.ctor_name ^ "_tag_val",true,[],[], pred) + ::axioms) + in + let (_,axioms) = List.fold_right tag_axiom ctors (zero,[]) in +- let xvar = mkexpr (JCPEvar "x") pos in (* TODO: give unique name *) ++ let xvar = mkexpr (JCPEvar "x") lpos in (* TODO: give unique name *) + let one_case cons = + let prms = ref(-1) in + let param t = +@@ -2333,8 +2341,8 @@ let rec annotation is_axiomatic annot = + (* TODO: give unique name *) + ((fun x -> + mkexpr (JCPEquantifier(Exists,ltype t, +- [new identifier prms_name], [],x)) pos), +- mkexpr (JCPEvar prms_name) pos) ++ [new identifier prms_name], [],x)) lpos), ++ mkexpr (JCPEvar prms_name) lpos) + in let (quant,args) = + List.fold_right + (fun arg (quants,args) -> +@@ -2345,7 +2353,7 @@ let rec annotation is_axiomatic annot = + quant + (mkexpr + (JCPEbinary(xvar,`Beq, +- mkexpr (JCPEapp(cons.ctor_name,[],args)) pos)) pos) ++ mkexpr (JCPEapp(cons.ctor_name,[],args)) lpos)) lpos) + in + match ctors with + [] -> cons +@@ -2354,7 +2362,7 @@ let rec annotation is_axiomatic annot = + [JCDlemma(info.lt_name ^ "_inductive", true, [], [], + (mkexpr (JCPEquantifier + (Forall,myself, +- [new identifier "x"], [],one_case x)) pos))] ++ [new identifier "x"], [],one_case x)) lpos))] + | x::l -> + tag_fun :: cons @ axioms @ + [JCDlemma(info.lt_name ^ "_inductive", true, [], [], +@@ -2365,8 +2373,8 @@ let rec annotation is_axiomatic annot = + List.fold_right + (fun cons case -> + mkexpr (JCPEbinary(case,`Blor, +- one_case cons)) pos) +- l (one_case x))) pos)] ++ one_case cons)) lpos) ++ l (one_case x))) lpos)] + in + (*NB: axioms stating that two values beginning with different + symbols are different are not generated. *) +@@ -2380,7 +2388,7 @@ let rec annotation is_axiomatic annot = + | _ when is_axiomatic -> axiomatic + | _ -> + [JCDaxiomatic (info.lt_name ^ "_axiomatic", +- List.map (fun x -> mkdecl x pos) axiomatic)]) ++ List.map (fun x -> mkdecl x lpos) axiomatic)]) + + | Dtype _ -> unsupported "type definitions" + | Dvolatile _ -> Common.unsupported "volatile variables" +@@ -2395,8 +2403,9 @@ let rec annotation is_axiomatic annot = + Format.eprintf "Translating axiomatic %s into jessie code@." id; + *) + let l = List.fold_left (fun acc d -> (annotation true d)@acc) [] l in +- [JCDaxiomatic(id,List.map (fun d -> mkdecl d pos) ++ [JCDaxiomatic(id,List.map (fun d -> mkdecl d (Location.to_lexing_loc pos)) + (List.rev l))] ++ | Dextended _ -> unsupported "extended global annotation" + + let default_field_modifiers = (false,false) + +@@ -2457,7 +2466,7 @@ let global vardefs g = + ignore(Typ.Hashtbl.find Norm.generated_union_types ty); + [JCDtag(compinfo.cname,[],None,fields,[])] + with Not_found -> +- let id = mkidentifier compinfo.cname pos in ++ let id = mkidentifier compinfo.cname (Location.to_lexing_loc pos) in + [ + JCDtag(compinfo.cname,[],None,fields,[]); + JCDvariant_type(compinfo.cname,[id]) +@@ -2466,9 +2475,10 @@ let global vardefs g = + + | GCompTag(compinfo,pos) -> (* union type *) + assert (not compinfo.cstruct); ++ let lpos = Location.to_lexing_loc pos in + let field fi = + let ty = pointed_type fi.ftype in +- mkidentifier (get_struct_name ty) pos ++ mkidentifier (get_struct_name ty) lpos + in + (* match pointed_type fi.ftype with *) + (* | TComp(compinfo,_) -> *) +@@ -2483,7 +2493,7 @@ let global vardefs g = + (* | _ -> *) + (* assert false *) + (* in *) +- let union_id = mkidentifier compinfo.cname pos in ++ let union_id = mkidentifier compinfo.cname lpos in + let union_size = match compinfo.cfields with + | [] -> 0 + | fi::_ -> +@@ -2558,7 +2568,7 @@ let global vardefs g = + | TFun(rt,_,_,_) -> rt + | _ -> assert false + in +- let id = mkidentifier v.vname pos in ++ let id = mkidentifier v.vname (Location.to_lexing_loc pos) in + let kf = Globals.Functions.get v in + Jessie_options.debug + "Getting spec of %s" (Kernel_function.get_name kf); +@@ -2587,22 +2597,23 @@ let global vardefs g = + if f.svar.vname = name_of_assert + || f.svar.vname = name_of_free then [] + else ++ let lpos = Location.to_lexing_loc pos in + let rty = match unrollType f.svar.vtype with + | TFun(ty,_,_,_) -> ty + | _ -> assert false + in + let formal v = true, ctype v.vtype, v.vname in + let formals = List.map formal f.sformals in +- let id = mkidentifier f.svar.vname f.svar.vdecl in ++ let id = mkidentifier f.svar.vname (Location.to_lexing_loc f.svar.vdecl) in + let funspec = + Annotations.funspec (Globals.Functions.get f.svar) + in + begin try + let local v = +- mkexpr (JCPEdecl(ctype v.vtype,v.vname,None)) v.vdecl ++ mkexpr (JCPEdecl(ctype v.vtype,v.vname,None)) (Location.to_lexing_loc v.vdecl) + in + let locals = List.rev (List.rev_map local f.slocals) in +- let body = mkexpr (JCPEblock(statement_list f.sbody.bstmts)) pos in ++ let body = mkexpr (JCPEblock(statement_list f.sbody.bstmts)) lpos in + let s,cba,dba = spec f.svar.vname funspec in + let body = + List.fold_left +@@ -2630,10 +2641,10 @@ let global vardefs g = + :: acc) + body dba + in +- let body = mkexpr (JCPEblock body) pos in ++ let body = mkexpr (JCPEblock body) lpos in + ignore + (reg_position ~id:f.svar.vname +- ~name:("Function " ^ f.svar.vname) f.svar.vdecl); ++ ~name:("Function " ^ f.svar.vname) (Location.to_lexing_loc f.svar.vdecl)); + [JCDfun(ctype rty,id,formals,s,Some body)] + with (Unsupported _ | Log.FeatureRequest _) + when drop_on_unsupported_feature -> +@@ -2652,7 +2663,7 @@ let global vardefs g = + | GAnnot(la,_) -> annotation false la + + in +- List.map (fun dnode -> mkdecl dnode pos) dnodes ++ List.map (fun dnode -> mkdecl dnode (Location.to_lexing_loc pos)) dnodes + + let integral_type name ty bitsize = + let min = min_value_of_integral_type ~bitsize ty in diff --git a/why.spec b/why.spec index 6113f5d..f546127 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -23,6 +23,8 @@ Source7: rem.pvs Source8: patch_jessie_pvs # Created with gimp from official upstream icon Source9: %{name}-icons.tar.xz +# Adapt to Frama-C 18.0 +Patch0: %{name}-frama-c.patch BuildRequires: auto-destdir BuildRequires: desktop-file-utils @@ -108,6 +110,7 @@ based on Why, including various automated and interactive provers. %prep %setup -q %setup -q -T -D -a 9 +%patch0 cp -p %SOURCE2 ./ @@ -140,8 +143,14 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with why3 1.1.1 -sed -i 's,0\.88\.\*,&|1.1.1,' configure +# Allow building with ocaml 4.07 and 4.08 +sed -i 's,4\.06\.\*,&|4.07.*|4.08.*,' configure + +# Allow building with why3 1.2.0 +sed -i 's,0\.88\.\*,&|1.2.0,' configure + +# Allow building with Frama-C 18.0 +sed -i 's,Chlorine-20180501,18.0*,' configure %build %ifarch %{ocaml_native_compiler} @@ -225,6 +234,9 @@ make check %changelog +* Wed Jun 5 2019 Jerry James - 2.41-3 +- Rebuild for coq 8.9.1, why3 1.2.0, and frama-c 18.0 + * Sun Feb 03 2019 Fedora Release Engineering - 2.41-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 01dc32708faa4eb24bf34eca192cbfd4a735cdfe Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 03:27:05 +0000 Subject: [PATCH 86/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index f546127..77408c6 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -234,6 +234,9 @@ make check %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 2.41-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Wed Jun 5 2019 Jerry James - 2.41-3 - Rebuild for coq 8.9.1, why3 1.2.0, and frama-c 18.0 From 6aa1f91c4be3c8350926df5ab873c3984143499b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 2 Aug 2019 13:18:07 -0600 Subject: [PATCH 87/97] Rebuild for frama-c 19.0. --- why-frama-c.patch | 58 ++++++++++++++++++++++++++++++++++++++++++++--- why.spec | 9 +++++--- 2 files changed, 61 insertions(+), 6 deletions(-) diff --git a/why-frama-c.patch b/why-frama-c.patch index eab0a6b..a439b78 100644 --- a/why-frama-c.patch +++ b/why-frama-c.patch @@ -1,5 +1,5 @@ --- frama-c-plugin/common.ml.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/common.ml 2019-06-03 09:39:40.876316289 -0600 ++++ frama-c-plugin/common.ml 2019-08-02 12:09:33.202030622 -0600 @@ -56,8 +56,9 @@ let fatal fmt = Jessie_options.fatal ~cu let unsupported fmt = @@ -12,6 +12,15 @@ ) ~current:true fmt let warning fmt = Jessie_options.warning ~current:true fmt +@@ -1173,7 +1174,7 @@ let rec force_exp_to_predicate e = + { pred_name = []; pred_loc = e.eloc; pred_content = pnode; } + + let force_exp_to_assertion e = +- Logic_const.new_code_annotation (AAssert([], force_exp_to_predicate e)) ++ Logic_const.new_code_annotation (AAssert([], Assert, force_exp_to_predicate e)) + + + (* Visitor methods for sharing preaction/postaction between exp/term/tsets *) --- frama-c-plugin/common.mli.orig 2018-06-28 16:43:25.000000000 -0600 +++ frama-c-plugin/common.mli 2019-06-03 09:38:56.727035437 -0600 @@ -102,7 +102,7 @@ val term_of_var : Cil_types.varinfo -> C @@ -24,7 +33,7 @@ val mkInfo : Cil_types.exp -> Cil_types.exp --- frama-c-plugin/interp.ml.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/interp.ml 2019-06-03 11:55:36.722081449 -0600 ++++ frama-c-plugin/interp.ml 2019-08-02 12:44:32.970899836 -0600 @@ -702,14 +702,14 @@ let rec coerce_floats t = if isLogicFloatType t.term_type then List.map @@ -218,6 +227,15 @@ (* Keep names associated to predicate *) let named_pred p = +@@ -1447,7 +1448,7 @@ let built_behavior_ids = function + let code_annot pos ((acc_assert_before,contract) as acc) a = + let push s = s::acc_assert_before,contract in + match a.annot_content with +- | AAssert (behav,p) -> ++ | AAssert (behav,_,p) -> + let behav = built_behavior_ids behav in + let asrt = Aassert in (* [VP] Needs to retrieve exact status *) + push @@ -1492,14 +1493,15 @@ let set_curFundec, get_curFundec = let rec expr e = @@ -453,7 +471,22 @@ let enode = if is_malloc_function v || is_realloc_function v then let lvtyp = pointed_type (typeOfLval lv) in -@@ -1867,7 +1873,7 @@ let instruction = function +@@ -1849,7 +1855,7 @@ let instruction = function + let arg = stripInfo arg in + let loc = arg.eloc in + let aux arg nelem = +- let factor = Integer.div (value_of_integral_expr arg) lvsiz in ++ let factor = Integer.e_div (value_of_integral_expr arg) lvsiz in + let siz = + if Integer.equal factor Integer.one then expr nelem + else +@@ -1862,12 +1868,12 @@ let instruction = function + let ty,arg = match arg.enode with + | Info _ -> assert false + | Const c when is_integral_const c -> +- let allocsiz = Integer.div (value_of_integral_expr arg) lvsiz ++ let allocsiz = Integer.e_div (value_of_integral_expr arg) lvsiz + in let siznode = JCPEconst(JCCinteger(Integer.to_string allocsiz)) in @@ -462,6 +495,15 @@ | BinOp(Mult,({enode = Const c} as arg),nelem,_ty) when is_integral_const c -> aux arg nelem | BinOp(Mult,nelem,({enode = Const c} as arg),_ty) +@@ -1895,7 +1901,7 @@ let instruction = function + | Const c when is_integral_const c -> + let lvtyp = pointed_type (typeOfLval lv) in + let lvsiz = Integer.of_int64 ((bits_sizeof lvtyp) lsr 3) in +- let factor = Integer.div (value_of_integral_expr arg) lvsiz in ++ let factor = Integer.e_div (value_of_integral_expr arg) lvsiz in + let siz = + if Integer.equal factor Integer.one then + expr nelem @@ -1928,24 +1934,24 @@ let instruction = function (List.map expr eargs)) in @@ -755,3 +797,13 @@ let integral_type name ty bitsize = let min = min_value_of_integral_type ~bitsize ty in +--- frama-c-plugin/norm.ml.orig 2018-06-28 16:43:25.000000000 -0600 ++++ frama-c-plugin/norm.ml 2019-08-02 12:24:56.510573782 -0600 +@@ -471,6 +471,7 @@ object + end; + DoChildren (* FIXME: correct ? *) + | Dcustom_annot _ -> DoChildren (* FIXME: correct ? *) ++ | Dextended _ -> DoChildren (* FIXME: correct ? *) + in annot + + method! vterm_lval tlv = diff --git a/why.spec b/why.spec index 77408c6..4578228 100644 --- a/why.spec +++ b/why.spec @@ -132,7 +132,7 @@ for f in CHANGES COPYING; do done # APRON support: add a missing rpath and adapt to newer versions of apron -sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|" \ +sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|;s| -lbigarray||" \ -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa octMPQ.cmxa|" \ -i configure @@ -149,8 +149,8 @@ sed -i 's,4\.06\.\*,&|4.07.*|4.08.*,' configure # Allow building with why3 1.2.0 sed -i 's,0\.88\.\*,&|1.2.0,' configure -# Allow building with Frama-C 18.0 -sed -i 's,Chlorine-20180501,18.0*,' configure +# Allow building with Frama-C 19.0 +sed -i 's,Chlorine-20180501,19.0*,' configure %build %ifarch %{ocaml_native_compiler} @@ -234,6 +234,9 @@ make check %changelog +* Fri Aug 2 2109 Jerry James - 2.41-4 +- Rebuild for frama-c 19.0 + * Sat Jul 27 2019 Fedora Release Engineering - 2.41-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From d4041358df010b9a2aa5316a63e7bd98f6398dfc Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 6 Sep 2019 12:02:05 -0600 Subject: [PATCH 88/97] Rebuild for ocaml-zarith 1.9. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 4578228..0828ad4 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -234,6 +234,9 @@ make check %changelog +* Fri Sep 6 2019 Jerry James - 2.41-5 +- Rebuild for ocaml-zarith 1.9 + * Fri Aug 2 2109 Jerry James - 2.41-4 - Rebuild for frama-c 19.0 From d626ea58982d4b8f28202e0402f9a2ac92b73d4f Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 6 Sep 2019 12:04:30 -0600 Subject: [PATCH 89/97] Fix egregious date typo in the changelog. --- why.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 0828ad4..c68a858 100644 --- a/why.spec +++ b/why.spec @@ -237,7 +237,7 @@ make check * Fri Sep 6 2019 Jerry James - 2.41-5 - Rebuild for ocaml-zarith 1.9 -* Fri Aug 2 2109 Jerry James - 2.41-4 +* Fri Aug 2 2019 Jerry James - 2.41-4 - Rebuild for frama-c 19.0 * Sat Jul 27 2019 Fedora Release Engineering - 2.41-4 From 2ff5e9754d2cb45331b413d1842054607e4f65c4 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 23 Sep 2019 09:16:09 -0600 Subject: [PATCH 90/97] Rebuild for frama-c 19.1. --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index c68a858..93076ad 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -149,8 +149,8 @@ sed -i 's,4\.06\.\*,&|4.07.*|4.08.*,' configure # Allow building with why3 1.2.0 sed -i 's,0\.88\.\*,&|1.2.0,' configure -# Allow building with Frama-C 19.0 -sed -i 's,Chlorine-20180501,19.0*,' configure +# Allow building with Frama-C 19.1 +sed -i 's,Chlorine-20180501,19.1*,' configure %build %ifarch %{ocaml_native_compiler} @@ -234,6 +234,9 @@ make check %changelog +* Mon Sep 23 2019 Jerry James - 2.41-6 +- Rebuild for frama-c 19.1 + * Fri Sep 6 2019 Jerry James - 2.41-5 - Rebuild for ocaml-zarith 1.9 From 81014a5a53d856d492a68bbc01bf9fd7463e3ce0 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Fri, 11 Oct 2019 09:02:30 -0600 Subject: [PATCH 91/97] Rebuild for ocaml-mlgmpidl 1.2.11. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 93076ad..1f62530 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -234,6 +234,9 @@ make check %changelog +* Fri Oct 11 2019 Jerry James - 2.41-7 +- Rebuild for ocaml-mlgmpidl 1.2.11 + * Mon Sep 23 2019 Jerry James - 2.41-6 - Rebuild for frama-c 19.1 From ee09cbc0858f858f6a3524d400e161d6a0be5cbc Mon Sep 17 00:00:00 2001 From: Jerry James Date: Tue, 29 Oct 2019 08:25:14 -0600 Subject: [PATCH 92/97] Rebuild for why3 1.2.1. --- why.rpmlintrc | 27 +++++++++++++++++++++++++++ why.spec | 11 +++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 why.rpmlintrc diff --git a/why.rpmlintrc b/why.rpmlintrc new file mode 100644 index 0000000..d790618 --- /dev/null +++ b/why.rpmlintrc @@ -0,0 +1,27 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# The dictionary lacks some technical words +addFilter(r'W: spelling-error .* (frama|provers)') + +# Caused by ocaml; this package cannot fix it +addFilter(r'why[^:]+: E: missing-call-to-chdir-with-chroot') + +# Oh yes, we have no manual page +addFilter(r'W: no-manual-page-for-binary (jessie|krakatoa|patch_jessie_pvs)') + +# Indeed there is no documentation +addFilter(r'why.[^:]+: W: no-documentation') +addFilter(r'why-(jessie|pvs-support).[^:]*: W: no-documentation') + +# This is a devel package +addFilter(r'why-jessie\.[^:]+: W: devel-file-in-non-devel-package') + +# PVS creates, and requires, hidden files +addFilter(r'why-pvs-support\.[^:]+: W: hidden-file-or-dir .*\.pvscontext') + +# This package has no binary bits +addFilter(r'why-pvs-support\.[^:]+: W: only-non-binary-in-usr-lib') + +# The icons were created by the Fedora packager; there is no URL +addFilter(r'why\.spec: W: invalid-url Source[^:]+: why-icons\.tar\.xz') diff --git a/why.spec b/why.spec index 1f62530..8909b82 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -146,8 +146,8 @@ sed -i 's/pvs/pvs-sbcl/' configure # Allow building with ocaml 4.07 and 4.08 sed -i 's,4\.06\.\*,&|4.07.*|4.08.*,' configure -# Allow building with why3 1.2.0 -sed -i 's,0\.88\.\*,&|1.2.0,' configure +# Allow building with why3 1.2.1 +sed -i 's,0\.88\.\*,&|1.2.1,' configure # Allow building with Frama-C 19.1 sed -i 's,Chlorine-20180501,19.1*,' configure @@ -194,7 +194,7 @@ sed -i "s|%{buildroot}||" %{buildroot}%{_libdir}/pvs/lib/why/top.out mkdir -p %{buildroot}%{_libdir}/pvs/lib/ints/ cp -p %{SOURCE6} %{SOURCE7} %{buildroot}%{_libdir}/pvs/lib/ints/ -cp -p %{SOURCE8} %{buildroot}%{_bindir}/ +install -m755 -p %{SOURCE8} %{buildroot}%{_bindir}/ %endif %global why_doc_dir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -234,6 +234,9 @@ make check %changelog +* Tue Oct 29 2019 Jerry James - 2.41-8 +- Rebuild for why3 1.2.1 + * Fri Oct 11 2019 Jerry James - 2.41-7 - Rebuild for ocaml-mlgmpidl 1.2.11 From 219f4f021bd7a32e95f794164f3bdca257a5ac7d Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 9 Dec 2019 14:20:20 -0700 Subject: [PATCH 93/97] OCaml 4.09.0 (final) rebuild. --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 8909b82..078efce 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -234,6 +234,9 @@ make check %changelog +* Mon Dec 9 2019 Jerry James - 2.41-9 +- OCaml 4.09.0 (final) rebuild. + * Tue Oct 29 2019 Jerry James - 2.41-8 - Rebuild for why3 1.2.1 From a55ef6338d7be2c5ccdab44cfa5b83e9f488a77b Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 23 Jan 2020 16:07:50 -0700 Subject: [PATCH 94/97] Rebuild for apron 0.9.12. --- why.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/why.spec b/why.spec index 078efce..7061f56 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -143,8 +143,8 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with ocaml 4.07 and 4.08 -sed -i 's,4\.06\.\*,&|4.07.*|4.08.*,' configure +# Allow building with ocaml 4.07 through 4.10 +sed -i 's,4\.06\.\*,&|4.07.*|4.08.*|4.09.*|4.10.*,' configure # Allow building with why3 1.2.1 sed -i 's,0\.88\.\*,&|1.2.1,' configure @@ -234,6 +234,9 @@ make check %changelog +* Thu Jan 23 2020 Jerry James - 2.41-10 +- Rebuild for apron 0.9.12 + * Mon Dec 9 2019 Jerry James - 2.41-9 - OCaml 4.09.0 (final) rebuild. From 4d6840f78218dcfa5f5a721984cfee7746b611c3 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Thu, 23 Jan 2020 21:25:20 -0700 Subject: [PATCH 95/97] Fix building with OCaml 4.10. --- why.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/why.spec b/why.spec index 7061f56..4110d51 100644 --- a/why.spec +++ b/why.spec @@ -143,8 +143,9 @@ sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile # Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: sed -i 's/pvs/pvs-sbcl/' configure -# Allow building with ocaml 4.07 through 4.10 -sed -i 's,4\.06\.\*,&|4.07.*|4.08.*|4.09.*|4.10.*,' configure +# Allow building with ocaml 4.07 and up +sed -i 's,4\.06\.\*,&|4.07.*|4.08.*|4.09.*|4.1*,' configure +sed -i 's,4\.0\*,4.*,' Makefile.in # Allow building with why3 1.2.1 sed -i 's,0\.88\.\*,&|1.2.1,' configure From 4ea920bebe1b2b1a1b50a8c499579350f4c47bd1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 03:41:17 +0000 Subject: [PATCH 96/97] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- why.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/why.spec b/why.spec index 4110d51..5aa375a 100644 --- a/why.spec +++ b/why.spec @@ -7,7 +7,7 @@ Name: why Version: 2.41 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Software verification platform License: LGPLv2 with exceptions @@ -235,6 +235,9 @@ make check %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 2.41-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Thu Jan 23 2020 Jerry James - 2.41-10 - Rebuild for apron 0.9.12 From a8d84c45d49b59c72c1e0161fbb63397ffb01629 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 30 Mar 2020 08:51:13 -0600 Subject: [PATCH 97/97] Abandoned by upstream and fails to build from source --- .gitignore | 3 - README.why | 8 - README.why-coq.Fedora | 6 - dead.package | 1 + div.pvs | 35 -- jessie.appdata.xml | 43 --- jessie.desktop | 7 - patch_jessie_pvs | 59 --- rem.pvs | 35 -- sources | 3 - why-frama-c.patch | 809 ------------------------------------------ why.rpmlintrc | 27 -- why.spec | 634 --------------------------------- 13 files changed, 1 insertion(+), 1669 deletions(-) delete mode 100644 .gitignore delete mode 100644 README.why delete mode 100644 README.why-coq.Fedora create mode 100644 dead.package delete mode 100644 div.pvs delete mode 100644 jessie.appdata.xml delete mode 100644 jessie.desktop delete mode 100755 patch_jessie_pvs delete mode 100644 rem.pvs delete mode 100644 sources delete mode 100644 why-frama-c.patch delete mode 100644 why.rpmlintrc delete mode 100644 why.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 81c4283..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/krakatoa.pdf -/why-icons.tar.xz -/why-*.tar.gz diff --git a/README.why b/README.why deleted file mode 100644 index ba95dfa..0000000 --- a/README.why +++ /dev/null @@ -1,8 +0,0 @@ -Fedora why package: - -Contains the main why executable and supporting tools. - -Consider visiting the main Why site - http://why.lri.fr - for more -documentation. Also, there is more information about the tools -Caduceus and Krakatoa at http://caduceus.lri.fr and -http://krakatoa.lri.fr respectively. \ No newline at end of file diff --git a/README.why-coq.Fedora b/README.why-coq.Fedora deleted file mode 100644 index 406a7a9..0000000 --- a/README.why-coq.Fedora +++ /dev/null @@ -1,6 +0,0 @@ -Fedora why-coq package: - -Contains libraries for interfacing why with Coq. - -You shouldn't have to do anything extra - you should now just be able -to use the Coq-related capabilities of Why. \ No newline at end of file diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..497866a --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Abandoned by upstream and fails to build from source diff --git a/div.pvs b/div.pvs deleted file mode 100644 index 4005fe3..0000000 --- a/div.pvs +++ /dev/null @@ -1,35 +0,0 @@ -% Copyright (c) 2010 Jerry James. -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the "Software"), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be included in -% all copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -% THE SOFTWARE. - -div: THEORY -BEGIN - - x : VAR int - nzy : VAR nzint - - div(x, nzy): int = - IF (x >= 0 AND nzy > 0) THEN ndiv(x, nzy) - ELSIF (x >= 0 AND nzy < 0) THEN -ndiv(x, -nzy) - ELSIF (x < 0 AND nzy > 0) THEN -ndiv(-x, nzy) - ELSE ndiv(-x, -nzy) - ENDIF - -END div - diff --git a/jessie.appdata.xml b/jessie.appdata.xml deleted file mode 100644 index 3cbd299..0000000 --- a/jessie.appdata.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - jessie.desktop - CC0-1.0 - LGPL-2.1 - jessie - Interface between why and Frama-C - -

- Jessie is an interface between why and Frama-C. -

-

- Why is a software verification platform that applies formal proving tools to - annotated programs. The Jessie plugin provide the ability to analyze C - programs by invoking Frama-C. -

-
- - - http://krakatoa.lri.fr/jessie/max_why3ide.png -
- - - http://krakatoa.lri.fr/jessie/max_ptr_why3ide.png - - - - http://krakatoa.lri.fr/jessie/binary_search_raw.png - - - - http://krakatoa.lri.fr/jessie/binary_search_ovfl.png - - - - http://krakatoa.lri.fr/jessie/binary_search_behav.png - - - - loganjerry@gmail.com - http://krakatoa.lri.fr/ - https://gforge.inria.fr/tracker/?atid=4012&group_id=999&func=browse - diff --git a/jessie.desktop b/jessie.desktop deleted file mode 100644 index 099b3ad..0000000 --- a/jessie.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name=jessie -Comment=Verify C program using Jessie plug-in -Exec=frama-c -jessie %F -Icon=why -Type=Application -Categories=Development; diff --git a/patch_jessie_pvs b/patch_jessie_pvs deleted file mode 100755 index 3e4abca..0000000 --- a/patch_jessie_pvs +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -# To use PVS with frama-c without the NASA Langley PVS library: -# frama-c -jessie -jessie-atp pvs FILE.c # Generates PVS files -# cd FILE.jessie/pvs -# patch_jessie_pvs # Patch jessie_why.pvs to not need NASA Langley library. -# You can then run PVS to prove the generated theorems with: -# pvs-sbcl FILE_why.pvs -# -# Copyright (c) 2010 David A. Wheeler -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. - - -if [ ! -f jessie_why.pvs ] ; then - echo "Did not find file jessie_why.pvs in current directory" - exit 1 -fi - -patch -p0 -N << END_OF_PATCH ---- jessie_why.pvs.ORIGINAL 2010-10-05 14:41:58.965970651 -0400 -+++ jessie_why.pvs 2010-10-06 14:28:39.250971269 -0400 -@@ -169,14 +169,14 @@ - (FORALL (x: real): (FORALL (y: real): min(x, y) = x OR min(x, y) = y)) - - %% Why axiom sqrt_pos -- sqrt_pos: AXIOM (FORALL (x: real): (x >= 0.0 IMPLIES sqrt(x) >= 0.0)) -+ % sqrt_pos: AXIOM (FORALL (x: real): (x >= 0.0 IMPLIES sqrt(x) >= 0.0)) - - %% Why axiom sqrt_sqr -- sqrt_sqr: AXIOM -- (FORALL (x: real): (x >= 0.0 IMPLIES sqr_real(sqrt(x)) = x)) -+ % sqrt_sqr: AXIOM -+ % (FORALL (x: real): (x >= 0.0 IMPLIES sqr_real(sqrt(x)) = x)) - - %% Why axiom sqr_sqrt -- sqr_sqrt: AXIOM (FORALL (x: real): (x >= 0.0 IMPLIES sqrt(x * x) = x)) -+ % sqr_sqrt: AXIOM (FORALL (x: real): (x >= 0.0 IMPLIES sqrt(x * x) = x)) - - %% Why axiom abs_real_pos - abs_real_pos: AXIOM (FORALL (x: real): (x >= 0.0 IMPLIES abs(x) = x)) -END_OF_PATCH - diff --git a/rem.pvs b/rem.pvs deleted file mode 100644 index 4f126a6..0000000 --- a/rem.pvs +++ /dev/null @@ -1,35 +0,0 @@ -% Copyright (c) 2010 Jerry James. -% -% Permission is hereby granted, free of charge, to any person obtaining a copy -% of this software and associated documentation files (the "Software"), to deal -% in the Software without restriction, including without limitation the rights -% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -% copies of the Software, and to permit persons to whom the Software is -% furnished to do so, subject to the following conditions: -% -% The above copyright notice and this permission notice shall be included in -% all copies or substantial portions of the Software. -% -% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -% THE SOFTWARE. - -rem: THEORY -BEGIN - - x : VAR int - nzy : VAR nzint - - rem(x, nzy): int = - IF (x >= 0 AND nzy > 0) THEN rem(nzy)(x) - ELSIF (x >= 0 AND nzy < 0) THEN rem(-nzy)(x) - ELSIF (x < 0 AND nzy > 0) THEN -rem(nzy)(-x) - ELSE -rem(-nzy)(-x) - ENDIF - -END rem - diff --git a/sources b/sources deleted file mode 100644 index aeca842..0000000 --- a/sources +++ /dev/null @@ -1,3 +0,0 @@ -SHA512 (krakatoa.pdf) = 5d0f4e6b938ddc1eafa48264c02cf99e68f776a7e190b997e35fb2cd154627b5d27369886f570cbcfdfe5f3a1929a97a1fec9457a6f6662f83cbb2e51f65ca04 -SHA512 (why-2.41.tar.gz) = 2e31ed2642a29ecbbc05954f2aa5c841befa68959f571bcde134a56639cec49a51351e5c7781a1a50fc531f2111b5649c710fa3e60c0f71f222b192d8c41cc86 -SHA512 (why-icons.tar.xz) = d6ca78cf09540f5742564912470fb8c49f7d11ca16cd8bb60c8790af10c1591198f6020bd792cff8e3464f762b7ef0a690d3e4ba1a2cf670c286c8056d266bc3 diff --git a/why-frama-c.patch b/why-frama-c.patch deleted file mode 100644 index a439b78..0000000 --- a/why-frama-c.patch +++ /dev/null @@ -1,809 +0,0 @@ ---- frama-c-plugin/common.ml.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/common.ml 2019-08-02 12:09:33.202030622 -0600 -@@ -56,8 +56,9 @@ let fatal fmt = Jessie_options.fatal ~cu - - let unsupported fmt = - Jessie_options.with_failure -- (fun evt -> -- raise (Unsupported evt.Log.evt_message) -+ (function -+ | (Some evt) -> raise (Unsupported evt.Log.evt_message) -+ | None -> raise (Unsupported "No message") - ) ~current:true fmt - - let warning fmt = Jessie_options.warning ~current:true fmt -@@ -1173,7 +1174,7 @@ let rec force_exp_to_predicate e = - { pred_name = []; pred_loc = e.eloc; pred_content = pnode; } - - let force_exp_to_assertion e = -- Logic_const.new_code_annotation (AAssert([], force_exp_to_predicate e)) -+ Logic_const.new_code_annotation (AAssert([], Assert, force_exp_to_predicate e)) - - - (* Visitor methods for sharing preaction/postaction between exp/term/tsets *) ---- frama-c-plugin/common.mli.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/common.mli 2019-06-03 09:38:56.727035437 -0600 -@@ -102,7 +102,7 @@ val term_of_var : Cil_types.varinfo -> C - val mkterm : - Cil_types.term_node -> - Cil_types.logic_type -> -- Lexing.position * Lexing.position -> Cil_types.term -+ Filepath.position * Filepath.position -> Cil_types.term - - val mkInfo : Cil_types.exp -> Cil_types.exp - ---- frama-c-plugin/interp.ml.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/interp.ml 2019-08-02 12:44:32.970899836 -0600 -@@ -702,14 +702,14 @@ let rec coerce_floats t = - if isLogicFloatType t.term_type then - List.map - (fun e -> -- mkexpr (JCPEcast(e, mktype (JCPTnative Treal))) t.term_loc) -+ mkexpr (JCPEcast(e, mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc)) - (terms t) - else terms t - - and terms t = - CurrentLoc.set t.term_loc; - let enode = match constFoldTermNodeAtTop t.term_node with -- | TConst c -> [logic_const t.term_loc c] -+ | TConst c -> [logic_const (Location.to_lexing_loc t.term_loc) c] - - | TDataCons({ctor_type = {lt_name = name} } as d,_args) - when name = Utf8_logic.boolean -> -@@ -727,7 +727,7 @@ and terms t = - | Toffset _ -> Common.unsupported "logic offset" - - | TLval lv -> -- List.map (fun x -> x#node) (terms_lval t.term_loc lv) -+ List.map (fun x -> x#node) (terms_lval (Location.to_lexing_loc t.term_loc) lv) - - | TSizeOf _ | TSizeOfE _ | TSizeOfStr _ | TAlignOf _ | TAlignOfE _ -> - assert false (* Should be removed by constant folding *) -@@ -741,7 +741,7 @@ and terms t = - let t1 = terms t1 in - let t2 = terms t2 in - let expr x y = -- let sube = mkexpr (JCPEbinary(x,`Bsub,y)) t.term_loc in -+ let sube = mkexpr (JCPEbinary(x,`Bsub,y)) (Location.to_lexing_loc t.term_loc) in - JCPEbinary(sube,binop op,zero_expr) - in product expr t1 t2 - -@@ -867,7 +867,7 @@ and terms t = - | TAddrOf _tlv -> assert false (* Should have been rewritten *) - - | TStartOf tlv -> -- List.map (fun x -> x#node) (terms_lval t.term_loc tlv) -+ List.map (fun x -> x#node) (terms_lval (Location.to_lexing_loc t.term_loc) tlv) - - | Tapp(linfo,labels,tlist) -> - begin -@@ -887,7 +887,7 @@ and terms t = - then - List.map - (fun t' -> -- mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) t.term_loc) -+ mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc)) - t' - else t') - prof -@@ -950,17 +950,17 @@ and terms t = - | TLogic_coerce(_,t) -> List.map (fun x -> x#node) (terms t) - - in -- List.map (swap mkexpr t.term_loc) enode -+ List.map (swap mkexpr (Location.to_lexing_loc t.term_loc)) enode - - and tag t = - let tag_node = match t.term_node with - | Ttypeof t -> JCPTtypeof (term t) - | Ttype ty -> -- let id = mkidentifier (get_struct_name (pointed_type ty)) t.term_loc in -+ let id = mkidentifier (get_struct_name (pointed_type ty)) (Location.to_lexing_loc t.term_loc) in - JCPTtag id - | _ -> assert false (* Not a tag *) - in -- mktag tag_node t.term_loc -+ mktag tag_node (Location.to_lexing_loc t.term_loc) - - and terms_lval pos lv = - match lv with -@@ -1042,6 +1042,7 @@ and term t = - *) - and pred p = - CurrentLoc.set p.pred_loc; -+ let ploc = Location.to_lexing_loc p.pred_loc in - let enode = match p.pred_content with - | Pfalse -> JCPEconst(JCCboolean false) - -@@ -1060,7 +1061,7 @@ and pred p = - let t' = term t in - if isLogicFloatType t.term_type && isLogicRealType lv.lv_type - then -- mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) t.term_loc -+ mkexpr (JCPEcast(t', mktype (JCPTnative Treal))) (Location.to_lexing_loc t.term_loc) - else t') - pinfo.l_profile - tl -@@ -1072,7 +1073,7 @@ and pred p = - | Prel((Rlt | Rgt | Rle | Rge as rel),t1,t2) - when app_term_type isPointerType false t1.term_type -> - (* Pointer comparison is translated as subtraction *) -- let sube = mkexpr (JCPEbinary(term t1,`Bsub,term t2)) p.pred_loc in -+ let sube = mkexpr (JCPEbinary(term t1,`Bsub,term t2)) ploc in - JCPEbinary(sube,relation rel,zero_expr) - - (* | Prel((Req | Rneq as rel),t1,t2) *) -@@ -1087,14 +1088,14 @@ and pred p = - JCPEeqtype(tag t1,tag t2) - - | Prel(Rneq,t1,t2) when isTypeTagType t1.term_type -> -- let eq = mkexpr (JCPEeqtype(tag t1,tag t2)) p.pred_loc in -+ let eq = mkexpr (JCPEeqtype(tag t1,tag t2)) ploc in - JCPEunary(`Unot,eq) - - | Prel(rel,t1,t2) -> - let res = -- product (fun t1 t2 -> mkexpr (JCPEbinary(t1,relation rel,t2)) p.pred_loc) -+ product (fun t1 t2 -> mkexpr (JCPEbinary(t1,relation rel,t2)) ploc) - (coerce_floats t1) (coerce_floats t2) -- in (mkconjunct res p.pred_loc)#node -+ in (mkconjunct res ploc)#node - | Pand(p1,p2) -> - JCPEbinary(pred p1,`Bland,pred p2) - -@@ -1170,21 +1171,21 @@ and pred p = - | None,None -> true_expr - | Some t2,None -> - let e2 = term t2 in -- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in -- mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc -+ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in -+ mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc - | None, Some t3 -> - let e3 = term t3 in -- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in -- mkexpr (JCPEbinary(eoffmax,`Bge,e3)) p.pred_loc -+ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in -+ mkexpr (JCPEbinary(eoffmax,`Bge,e3)) ploc - | Some t2,Some t3 -> - let e2 = term t2 in - let e3 = term t3 in -- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in -- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc in -- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in -- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e3)) p.pred_loc in -- mkconjunct [emin; emax] p.pred_loc -- in (mkconjunct (List.map mk_one_pred e1) p.pred_loc)#node -+ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in -+ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc in -+ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in -+ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e3)) ploc in -+ mkconjunct [emin; emax] ploc -+ in (mkconjunct (List.map mk_one_pred e1) ploc)#node - - | Pvalid(_lab,{ term_node = TBinOp(PlusPI,t1,t2)}) -> - let e1 = terms t1 in -@@ -1193,23 +1194,23 @@ and pred p = - (List.flatten - (List.map - (fun e1 -> -- let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) p.pred_loc in -- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) p.pred_loc in -- let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) p.pred_loc in -- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e2)) p.pred_loc in -+ let eoffmin = mkexpr (JCPEoffset(Offset_min,e1)) ploc in -+ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,e2)) ploc in -+ let eoffmax = mkexpr (JCPEoffset(Offset_max,e1)) ploc in -+ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,e2)) ploc in - [emin; emax]) -- e1)) p.pred_loc)#node -+ e1)) ploc)#node - | Pvalid (_lab,t) -> - let elist = - List.flatten (List.map (fun e -> -- let eoffmin = mkexpr (JCPEoffset(Offset_min,e)) p.pred_loc in -- let emin = mkexpr (JCPEbinary(eoffmin,`Ble,zero_expr)) p.pred_loc in -- let eoffmax = mkexpr (JCPEoffset(Offset_max,e)) p.pred_loc in -- let emax = mkexpr (JCPEbinary(eoffmax,`Bge,zero_expr)) p.pred_loc in -+ let eoffmin = mkexpr (JCPEoffset(Offset_min,e)) ploc in -+ let emin = mkexpr (JCPEbinary(eoffmin,`Ble,zero_expr)) ploc in -+ let eoffmax = mkexpr (JCPEoffset(Offset_max,e)) ploc in -+ let emax = mkexpr (JCPEbinary(eoffmax,`Bge,zero_expr)) ploc in - [emin; emax] - ) (terms t)) - in -- (mkconjunct elist p.pred_loc)#node -+ (mkconjunct elist ploc)#node - - | Pvalid_read _ -> Common.unsupported "\\valid_read operator" - -@@ -1236,7 +1237,7 @@ and pred p = - | Pvalid_function _ -> Common.unsupported "\\valid_function" - - in -- mkexpr enode p.pred_loc -+ mkexpr enode ploc - - (* Keep names associated to predicate *) - let named_pred p = -@@ -1447,7 +1448,7 @@ let built_behavior_ids = function - let code_annot pos ((acc_assert_before,contract) as acc) a = - let push s = s::acc_assert_before,contract in - match a.annot_content with -- | AAssert (behav,p) -> -+ | AAssert (behav,_,p) -> - let behav = built_behavior_ids behav in - let asrt = Aassert in (* [VP] Needs to retrieve exact status *) - push -@@ -1492,14 +1493,15 @@ let set_curFundec, get_curFundec = - - let rec expr e = - -+ let eloc = Location.to_lexing_loc e.eloc in - let enode = - let e = stripInfo e in - match e.enode with - | Info _ -> assert false - -- | Const c -> const e.eloc c -+ | Const c -> const eloc c - -- | Lval lv -> (lval e.eloc lv)#node -+ | Lval lv -> (lval eloc lv)#node - - | SizeOf _ | SizeOfE _ | SizeOfStr _ | AlignOf _ | AlignOfE _ -> - assert false (* Should be removed by constant folding *) -@@ -1509,7 +1511,7 @@ let rec expr e = - - | UnOp(op,e,_ty) -> - let e = -- locate (mkexpr (JCPEunary(unop op,expr e)) e.eloc) -+ locate (mkexpr (JCPEunary(unop op,expr e)) eloc) - in - e#node - -@@ -1518,24 +1520,24 @@ let rec expr e = - - | BinOp(op,e1,e2,_ty) -> - let e = -- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) - in - e#node - - | CastE(ty,e') - when isIntegralType ty && isFloatingType (typeOf e') -> - let e1 = -- locate (mkexpr (JCPEcast(expr e',mktype (JCPTnative Treal))) e.eloc) -+ locate (mkexpr (JCPEcast(expr e',mktype (JCPTnative Treal))) eloc) - in - let e = -- locate (mkexpr (JCPEapp("\\truncate_real_to_int",[],[e1])) e.eloc) -+ locate (mkexpr (JCPEapp("\\truncate_real_to_int",[],[e1])) eloc) - in e#node - - | CastE(ty,e') when isIntegralType ty && isArithmeticType (typeOf e') -> - (integral_expr e)#node - - | CastE(ty,e') when isFloatingType ty && isArithmeticType (typeOf e') -> -- let e = locate (mkexpr (JCPEcast(expr e',ctype ty)) e.eloc) in -+ let e = locate (mkexpr (JCPEcast(expr e',ctype ty)) eloc) in - e#node - - | CastE(ty,e') when isIntegralType ty && isPointerType (typeOf e') -> -@@ -1572,7 +1574,7 @@ let rec expr e = - (* else *) - (* bitwise cast *) - let enode = JCPEcast(expr e,ctype ptrty) in -- let e = locate (mkexpr enode e.eloc) in -+ let e = locate (mkexpr enode eloc) in - e#node - (* let _,ptr_to_ptr = type_conversion ptrty ety in *) - (* JCPEapp(ptr_to_ptr,[],[expr e]) *) -@@ -1600,9 +1602,9 @@ let rec expr e = - - | AddrOf _lv -> assert false (* Should have been rewritten *) - -- | StartOf lv -> (lval e.eloc lv)#node -+ | StartOf lv -> (lval eloc lv)#node - in -- mkexpr enode e.eloc -+ mkexpr enode eloc - - (* Function called when expecting a boolean in Jessie, i.e. when translating - a test or a sub-expression of an "or" or "and". -@@ -1614,6 +1616,7 @@ and boolean_expr e = - else assert false - in - -+ let eloc = Location.to_lexing_loc e.eloc in - let enode = match (stripInfo e).enode with - | Info _ -> assert false - -@@ -1633,43 +1636,44 @@ and boolean_expr e = - JCPEbinary(expr e1,binop op,expr e2) - else - (* Pointer comparison is translated as subtraction *) -- let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) e.eloc in -+ let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) eloc in - JCPEbinary(sube,binop op,zero_expr) - - | _ -> boolean_node_from_expr (typeOf e) (expr e) - in -- mkexpr enode e.eloc -+ mkexpr enode eloc - - (* Function called instead of plain [expr] when the evaluation result should - * fit in a C integral type. - *) - and integral_expr e = - -+ let eloc = (Location.to_lexing_loc e.eloc) in - let rec int_expr e = - let node_from_boolean_expr e = JCPEif(e,one_expr,zero_expr) in - - let enode = match e.enode with - | UnOp(LNot,e',_ty) -> -- let e = mkexpr (JCPEunary(unop LNot,boolean_expr e')) e.eloc in -+ let e = mkexpr (JCPEunary(unop LNot,boolean_expr e')) eloc in - node_from_boolean_expr e - - | UnOp(op,e',_ty) -> - let e = -- locate (mkexpr (JCPEunary(unop op,expr e')) e.eloc) -+ locate (mkexpr (JCPEunary(unop op,expr e')) eloc) - in - e#node - - | BinOp((LAnd | LOr) as op,e1,e2,_ty) -> - let e = -- mkexpr (JCPEbinary(boolean_expr e1,binop op,boolean_expr e2)) e.eloc -+ mkexpr (JCPEbinary(boolean_expr e1,binop op,boolean_expr e2)) eloc - in - node_from_boolean_expr e - - | BinOp((Lt | Gt | Le | Ge as op),e1,e2,_ty) - when isPointerType (typeOf e1) -> - (* Pointer comparison is translated as subtraction *) -- let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) e.eloc in -- let e = mkexpr (JCPEbinary(sube,binop op,zero_expr)) e.eloc in -+ let sube = mkexpr (JCPEbinary(expr e1,`Bsub,expr e2)) eloc in -+ let e = mkexpr (JCPEbinary(sube,binop op,zero_expr)) eloc in - node_from_boolean_expr e - - (* | BinOp((Eq | Ne as op),e1,e2,_ty) *) -@@ -1681,11 +1685,11 @@ and integral_expr e = - (* node_from_boolean_expr e *) - - | BinOp((Eq | Ne) as op,e1,e2,_ty) -> -- let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc in -+ let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc in - node_from_boolean_expr e - - | BinOp((Lt | Gt | Le | Ge) as op,e1,e2,_ty) -> -- let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc in -+ let e = mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc in - node_from_boolean_expr e - - | BinOp(Shiftrt,e1,e2,_ty) -> -@@ -1694,13 +1698,13 @@ and integral_expr e = - Integer.lt i (Integer.of_int 63) -> - (* Right shift by constant is division by constant *) - let pow = constant_expr (Integer.two_power i) in -- locate (mkexpr (JCPEbinary(expr e1,`Bdiv,expr pow)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,`Bdiv,expr pow)) eloc) - | _ -> - let op = - if isSignedInteger (typeOf e1) then `Barith_shift_right - else `Blogical_shift_right - in -- locate (mkexpr (JCPEbinary(expr e1,op,expr e2)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,op,expr e2)) eloc) - in - e#node - -@@ -1710,36 +1714,36 @@ and integral_expr e = - Integer.lt i (Integer.of_int 63) -> - (* Left shift by constant is multiplication by constant *) - let pow = constant_expr (Integer.two_power i) in -- locate (mkexpr (JCPEbinary(expr e1,`Bmul,expr pow)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,`Bmul,expr pow)) eloc) - | _ -> -- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) - in - e#node - - | BinOp(op,e1,e2,_ty) -> - let e = -- locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) e.eloc) -+ locate (mkexpr (JCPEbinary(expr e1,binop op,expr e2)) eloc) - in - e#node - - | CastE(ty,e1) when isFloatingType (typeOf e1) -> -- let e1' = locate (mkexpr (JCPEcast(expr e1,ltype Linteger)) e.eloc) in -+ let e1' = locate (mkexpr (JCPEcast(expr e1,ltype Linteger)) eloc) in - if !int_model = IMexact then - e1'#node - else -- let e2' = locate (mkexpr (JCPEcast(e1',ctype ty)) e.eloc) in -+ let e2' = locate (mkexpr (JCPEcast(e1',ctype ty)) eloc) in - e2'#node - - | CastE(ty,e1) when isIntegralType (typeOf e1) -> - if !int_model = IMexact then - (int_expr e1)#node - else -- let e = locate (mkexpr (JCPEcast(int_expr e1,ctype ty)) e.eloc) in -+ let e = locate (mkexpr (JCPEcast(int_expr e1,ctype ty)) eloc) in - e#node - - | _ -> (expr e)#node - in -- mkexpr enode e.eloc -+ mkexpr enode eloc - in - - match e.enode with -@@ -1814,8 +1818,9 @@ let keep_only_declared_nb_of_arguments v - - let instruction = function - | Set(lv,e,pos) -> -- let enode = JCPEassign(lval pos lv,expr e) in -- (locate (mkexpr enode pos))#node -+ let lpos = Location.to_lexing_loc pos in -+ let enode = JCPEassign(lval lpos lv,expr e) in -+ (locate (mkexpr enode lpos))#node - - | Call(None,{enode = Lval(Var v,NoOffset)},eargs,pos) -> - if is_assert_function v then -@@ -1834,9 +1839,10 @@ let instruction = function - v - (List.map expr eargs)) - in -- (locate (mkexpr enode pos))#node -+ (locate (mkexpr enode (Location.to_lexing_loc pos)))#node - - | Call(Some lv,{enode = Lval(Var v,NoOffset)},eargs,pos) -> -+ let lpos = Location.to_lexing_loc pos in - let enode = - if is_malloc_function v || is_realloc_function v then - let lvtyp = pointed_type (typeOfLval lv) in -@@ -1849,7 +1855,7 @@ let instruction = function - let arg = stripInfo arg in - let loc = arg.eloc in - let aux arg nelem = -- let factor = Integer.div (value_of_integral_expr arg) lvsiz in -+ let factor = Integer.e_div (value_of_integral_expr arg) lvsiz in - let siz = - if Integer.equal factor Integer.one then expr nelem - else -@@ -1862,12 +1868,12 @@ let instruction = function - let ty,arg = match arg.enode with - | Info _ -> assert false - | Const c when is_integral_const c -> -- let allocsiz = Integer.div (value_of_integral_expr arg) lvsiz -+ let allocsiz = Integer.e_div (value_of_integral_expr arg) lvsiz - in - let siznode = - JCPEconst(JCCinteger(Integer.to_string allocsiz)) - in -- lvtyp, mkexpr siznode pos -+ lvtyp, mkexpr siznode lpos - | BinOp(Mult,({enode = Const c} as arg),nelem,_ty) - when is_integral_const c -> aux arg nelem - | BinOp(Mult,nelem,({enode = Const c} as arg),_ty) -@@ -1895,7 +1901,7 @@ let instruction = function - | Const c when is_integral_const c -> - let lvtyp = pointed_type (typeOfLval lv) in - let lvsiz = Integer.of_int64 ((bits_sizeof lvtyp) lsr 3) in -- let factor = Integer.div (value_of_integral_expr arg) lvsiz in -+ let factor = Integer.e_div (value_of_integral_expr arg) lvsiz in - let siz = - if Integer.equal factor Integer.one then - expr nelem -@@ -1928,24 +1934,24 @@ let instruction = function - (List.map expr eargs)) - in - let lvty = typeOfLval lv in -- let call = locate (mkexpr enode pos) in -+ let call = locate (mkexpr enode lpos) in - let enode = - if Typ.equal lvty (getReturnType v.vtype) - || is_malloc_function v - || is_realloc_function v - || is_calloc_function v - then -- JCPEassign(lval pos lv,call) -+ JCPEassign(lval lpos lv,call) - else - let tmpv = makeTempVar (get_curFundec()) (getReturnType v.vtype) in - let tmplv = Var tmpv, NoOffset in - let cast = - new_exp ~loc:pos (CastE(lvty,new_exp ~loc:pos (Lval tmplv))) - in -- let tmpassign = JCPEassign(lval pos lv,expr cast) in -- JCPElet(None,tmpv.vname,Some call,locate (mkexpr tmpassign pos)) -+ let tmpassign = JCPEassign(lval lpos lv,expr cast) in -+ JCPElet(None,tmpv.vname,Some call,locate (mkexpr tmpassign lpos)) - in -- (locate (mkexpr enode pos))#node -+ (locate (mkexpr enode lpos))#node - - | Call _ -> Common.unsupported ~current:true "function pointers" - -@@ -1976,9 +1982,10 @@ let rec statement s = - in - *) - -+ let lpos = Location.to_lexing_loc pos in - let assert_before, contract = - Annotations.fold_code_annot -- (fun _ ca acc -> code_annot pos acc ca) s ([],None) -+ (fun _ ca acc -> code_annot lpos acc ca) s ([],None) - in - let snode = match s.skind with - | Instr i -> instruction i -@@ -1986,7 +1993,7 @@ let rec statement s = - | Return(Some e,_) -> JCPEreturn(expr e) - - | Return(None,_pos) -> -- JCPEreturn(mkexpr (JCPEconst JCCvoid) pos) -+ JCPEreturn(mkexpr (JCPEconst JCCvoid) lpos) - - | Goto(sref,_pos) -> - (* Pick the first non-case label in the list of labels associated to -@@ -2050,7 +2057,7 @@ let rec statement s = - | case_stmt :: _ as slist -> - let switch_labels = List.filter is_case_label case_stmt.labels in - let labs = List.map switch_label switch_labels in -- let slist = mkexpr (JCPEblock(statement_list slist)) pos in -+ let slist = mkexpr (JCPEblock(statement_list slist)) (Location.to_lexing_loc pos) in - labs, slist - in - let case_list = List.map case (case_blocks bl.bstmts slist) in -@@ -2098,7 +2105,7 @@ let rec statement s = - let inv = - match invs with - | [] -> None -- | _ -> Some (mkconjunct invs pos) -+ | _ -> Some (mkconjunct invs lpos) - in - let ass = assigns ass in - (beh_names,inv,ass)) -@@ -2119,7 +2126,7 @@ let rec statement s = - in - (* Prefix statement by all non-case labels *) - let labels = filter_out is_case_label s.labels in -- let s = mkexpr snode pos in -+ let s = mkexpr snode lpos in - let s = - match contract with - | None -> s -@@ -2145,13 +2152,13 @@ let rec statement s = - in - mkexpr - (JCPEcontract(requires, decreases, behaviors, s)) -- pos -+ lpos - in - let s = match assert_before @ [s] with - | [s] -> s -- | slist -> mkexpr (JCPEblock slist) pos -+ | slist -> mkexpr (JCPEblock slist) lpos - in -- List.fold_left (fun s lab -> mkexpr (JCPElabel(label lab,s)) pos) s labels -+ List.fold_left (fun s lab -> mkexpr (JCPElabel(label lab,s)) lpos) s labels - - and statement_list slist = List.rev (List.rev_map statement slist) - -@@ -2228,7 +2235,7 @@ let rec annotation is_axiomatic annot = - if _attr <> [] then warning "ignoring attributes of axiom %s" name; - ignore - (reg_position ~id:name -- ~name:("Lemma " ^ name) pos); -+ ~name:("Lemma " ^ name) (Location.to_lexing_loc pos)); - begin try - [JCDlemma(name,is_axiom,[],logic_labels labels,pred property)] - with (Unsupported _ | Log.FeatureRequest _) -@@ -2263,6 +2270,7 @@ let rec annotation is_axiomatic annot = - - | Dtype (info,pos) when info.lt_params=[] -> - CurrentLoc.set pos; -+ let lpos = Location.to_lexing_loc pos in - let myself = mktype (JCPTidentifier (info.lt_name,[])) in - let mydecl = JCDlogic_type (info.lt_name,[]) in - let axiomatic ctors = -@@ -2295,8 +2303,8 @@ let rec annotation is_axiomatic annot = - (* TODO: give unique name *) - (fun x -> - mkexpr (JCPEquantifier(Forall,ltype t, -- [new identifier prms_name], [],x)) pos), -- mkexpr (JCPEvar prms_name) pos -+ [new identifier prms_name], [],x)) lpos), -+ mkexpr (JCPEvar prms_name) lpos - in - let (quant,args) = - List.fold_right -@@ -2314,17 +2322,17 @@ let rec annotation is_axiomatic annot = - (mkexpr - (JCPEbinary - (mkexpr (JCPEapp (info.lt_name ^ "_tag",[], -- [mkexpr expr pos])) pos, -+ [mkexpr expr lpos])) lpos, - `Beq, -- mkexpr(JCPEconst(JCCinteger (Int64.to_string i))) pos)) -- pos) -+ mkexpr(JCPEconst(JCCinteger (Int64.to_string i))) lpos)) -+ lpos) - in - (i+one, - JCDlemma(cons.ctor_name ^ "_tag_val",true,[],[], pred) - ::axioms) - in - let (_,axioms) = List.fold_right tag_axiom ctors (zero,[]) in -- let xvar = mkexpr (JCPEvar "x") pos in (* TODO: give unique name *) -+ let xvar = mkexpr (JCPEvar "x") lpos in (* TODO: give unique name *) - let one_case cons = - let prms = ref(-1) in - let param t = -@@ -2333,8 +2341,8 @@ let rec annotation is_axiomatic annot = - (* TODO: give unique name *) - ((fun x -> - mkexpr (JCPEquantifier(Exists,ltype t, -- [new identifier prms_name], [],x)) pos), -- mkexpr (JCPEvar prms_name) pos) -+ [new identifier prms_name], [],x)) lpos), -+ mkexpr (JCPEvar prms_name) lpos) - in let (quant,args) = - List.fold_right - (fun arg (quants,args) -> -@@ -2345,7 +2353,7 @@ let rec annotation is_axiomatic annot = - quant - (mkexpr - (JCPEbinary(xvar,`Beq, -- mkexpr (JCPEapp(cons.ctor_name,[],args)) pos)) pos) -+ mkexpr (JCPEapp(cons.ctor_name,[],args)) lpos)) lpos) - in - match ctors with - [] -> cons -@@ -2354,7 +2362,7 @@ let rec annotation is_axiomatic annot = - [JCDlemma(info.lt_name ^ "_inductive", true, [], [], - (mkexpr (JCPEquantifier - (Forall,myself, -- [new identifier "x"], [],one_case x)) pos))] -+ [new identifier "x"], [],one_case x)) lpos))] - | x::l -> - tag_fun :: cons @ axioms @ - [JCDlemma(info.lt_name ^ "_inductive", true, [], [], -@@ -2365,8 +2373,8 @@ let rec annotation is_axiomatic annot = - List.fold_right - (fun cons case -> - mkexpr (JCPEbinary(case,`Blor, -- one_case cons)) pos) -- l (one_case x))) pos)] -+ one_case cons)) lpos) -+ l (one_case x))) lpos)] - in - (*NB: axioms stating that two values beginning with different - symbols are different are not generated. *) -@@ -2380,7 +2388,7 @@ let rec annotation is_axiomatic annot = - | _ when is_axiomatic -> axiomatic - | _ -> - [JCDaxiomatic (info.lt_name ^ "_axiomatic", -- List.map (fun x -> mkdecl x pos) axiomatic)]) -+ List.map (fun x -> mkdecl x lpos) axiomatic)]) - - | Dtype _ -> unsupported "type definitions" - | Dvolatile _ -> Common.unsupported "volatile variables" -@@ -2395,8 +2403,9 @@ let rec annotation is_axiomatic annot = - Format.eprintf "Translating axiomatic %s into jessie code@." id; - *) - let l = List.fold_left (fun acc d -> (annotation true d)@acc) [] l in -- [JCDaxiomatic(id,List.map (fun d -> mkdecl d pos) -+ [JCDaxiomatic(id,List.map (fun d -> mkdecl d (Location.to_lexing_loc pos)) - (List.rev l))] -+ | Dextended _ -> unsupported "extended global annotation" - - let default_field_modifiers = (false,false) - -@@ -2457,7 +2466,7 @@ let global vardefs g = - ignore(Typ.Hashtbl.find Norm.generated_union_types ty); - [JCDtag(compinfo.cname,[],None,fields,[])] - with Not_found -> -- let id = mkidentifier compinfo.cname pos in -+ let id = mkidentifier compinfo.cname (Location.to_lexing_loc pos) in - [ - JCDtag(compinfo.cname,[],None,fields,[]); - JCDvariant_type(compinfo.cname,[id]) -@@ -2466,9 +2475,10 @@ let global vardefs g = - - | GCompTag(compinfo,pos) -> (* union type *) - assert (not compinfo.cstruct); -+ let lpos = Location.to_lexing_loc pos in - let field fi = - let ty = pointed_type fi.ftype in -- mkidentifier (get_struct_name ty) pos -+ mkidentifier (get_struct_name ty) lpos - in - (* match pointed_type fi.ftype with *) - (* | TComp(compinfo,_) -> *) -@@ -2483,7 +2493,7 @@ let global vardefs g = - (* | _ -> *) - (* assert false *) - (* in *) -- let union_id = mkidentifier compinfo.cname pos in -+ let union_id = mkidentifier compinfo.cname lpos in - let union_size = match compinfo.cfields with - | [] -> 0 - | fi::_ -> -@@ -2558,7 +2568,7 @@ let global vardefs g = - | TFun(rt,_,_,_) -> rt - | _ -> assert false - in -- let id = mkidentifier v.vname pos in -+ let id = mkidentifier v.vname (Location.to_lexing_loc pos) in - let kf = Globals.Functions.get v in - Jessie_options.debug - "Getting spec of %s" (Kernel_function.get_name kf); -@@ -2587,22 +2597,23 @@ let global vardefs g = - if f.svar.vname = name_of_assert - || f.svar.vname = name_of_free then [] - else -+ let lpos = Location.to_lexing_loc pos in - let rty = match unrollType f.svar.vtype with - | TFun(ty,_,_,_) -> ty - | _ -> assert false - in - let formal v = true, ctype v.vtype, v.vname in - let formals = List.map formal f.sformals in -- let id = mkidentifier f.svar.vname f.svar.vdecl in -+ let id = mkidentifier f.svar.vname (Location.to_lexing_loc f.svar.vdecl) in - let funspec = - Annotations.funspec (Globals.Functions.get f.svar) - in - begin try - let local v = -- mkexpr (JCPEdecl(ctype v.vtype,v.vname,None)) v.vdecl -+ mkexpr (JCPEdecl(ctype v.vtype,v.vname,None)) (Location.to_lexing_loc v.vdecl) - in - let locals = List.rev (List.rev_map local f.slocals) in -- let body = mkexpr (JCPEblock(statement_list f.sbody.bstmts)) pos in -+ let body = mkexpr (JCPEblock(statement_list f.sbody.bstmts)) lpos in - let s,cba,dba = spec f.svar.vname funspec in - let body = - List.fold_left -@@ -2630,10 +2641,10 @@ let global vardefs g = - :: acc) - body dba - in -- let body = mkexpr (JCPEblock body) pos in -+ let body = mkexpr (JCPEblock body) lpos in - ignore - (reg_position ~id:f.svar.vname -- ~name:("Function " ^ f.svar.vname) f.svar.vdecl); -+ ~name:("Function " ^ f.svar.vname) (Location.to_lexing_loc f.svar.vdecl)); - [JCDfun(ctype rty,id,formals,s,Some body)] - with (Unsupported _ | Log.FeatureRequest _) - when drop_on_unsupported_feature -> -@@ -2652,7 +2663,7 @@ let global vardefs g = - | GAnnot(la,_) -> annotation false la - - in -- List.map (fun dnode -> mkdecl dnode pos) dnodes -+ List.map (fun dnode -> mkdecl dnode (Location.to_lexing_loc pos)) dnodes - - let integral_type name ty bitsize = - let min = min_value_of_integral_type ~bitsize ty in ---- frama-c-plugin/norm.ml.orig 2018-06-28 16:43:25.000000000 -0600 -+++ frama-c-plugin/norm.ml 2019-08-02 12:24:56.510573782 -0600 -@@ -471,6 +471,7 @@ object - end; - DoChildren (* FIXME: correct ? *) - | Dcustom_annot _ -> DoChildren (* FIXME: correct ? *) -+ | Dextended _ -> DoChildren (* FIXME: correct ? *) - in annot - - method! vterm_lval tlv = diff --git a/why.rpmlintrc b/why.rpmlintrc deleted file mode 100644 index d790618..0000000 --- a/why.rpmlintrc +++ /dev/null @@ -1,27 +0,0 @@ -# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON -# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors - -# The dictionary lacks some technical words -addFilter(r'W: spelling-error .* (frama|provers)') - -# Caused by ocaml; this package cannot fix it -addFilter(r'why[^:]+: E: missing-call-to-chdir-with-chroot') - -# Oh yes, we have no manual page -addFilter(r'W: no-manual-page-for-binary (jessie|krakatoa|patch_jessie_pvs)') - -# Indeed there is no documentation -addFilter(r'why.[^:]+: W: no-documentation') -addFilter(r'why-(jessie|pvs-support).[^:]*: W: no-documentation') - -# This is a devel package -addFilter(r'why-jessie\.[^:]+: W: devel-file-in-non-devel-package') - -# PVS creates, and requires, hidden files -addFilter(r'why-pvs-support\.[^:]+: W: hidden-file-or-dir .*\.pvscontext') - -# This package has no binary bits -addFilter(r'why-pvs-support\.[^:]+: W: only-non-binary-in-usr-lib') - -# The icons were created by the Fedora packager; there is no URL -addFilter(r'why\.spec: W: invalid-url Source[^:]+: why-icons\.tar\.xz') diff --git a/why.spec b/why.spec deleted file mode 100644 index 5aa375a..0000000 --- a/why.spec +++ /dev/null @@ -1,634 +0,0 @@ -# Whether PVS is available -%ifarch %{ix86} x86_64 ppc sparcv9 -%global has_pvs 1 -%else -%global has_pvs 0 -%endif - -Name: why -Version: 2.41 -Release: 11%{?dist} -Summary: Software verification platform - -License: LGPLv2 with exceptions -URL: http://why.lri.fr/ -Source0: http://why.lri.fr/download/%{name}-%{version}.tar.gz -Source1: http://krakatoa.lri.fr/manual/krakatoa.pdf -Source2: README.why-coq.Fedora -Source3: README.why -Source4: jessie.desktop -Source5: jessie.appdata.xml -Source6: div.pvs -Source7: rem.pvs -Source8: patch_jessie_pvs -# Created with gimp from official upstream icon -Source9: %{name}-icons.tar.xz -# Adapt to Frama-C 18.0 -Patch0: %{name}-frama-c.patch - -BuildRequires: auto-destdir -BuildRequires: desktop-file-utils -BuildRequires: xemacs xemacs-packages-extra -BuildRequires: frama-c -BuildRequires: gappalib-coq -BuildRequires: ocaml -BuildRequires: ocaml-apron-devel -BuildRequires: ocaml-camlp5-devel -BuildRequires: ocaml-findlib -BuildRequires: ocaml-mlgmpidl-devel -BuildRequires: ocaml-ocamldoc -BuildRequires: ocaml-ocamlgraph-devel -BuildRequires: ocaml-zarith-devel -BuildRequires: why3 -BuildRequires: coq -%if %{has_pvs} -BuildRequires: pvs -%endif - -Requires: gappalib-coq -Requires: hicolor-icon-theme -Requires: emacs-filesystem - -# Filter out bogus requires -%global __requires_exclude ocaml\\\((Ast|Cc|Env|Error|Jc_ast|Jc_env|Loc|Logic|Logic_decl|Misc|Ptree|Types)\\\) - -%description -Why is a software verification platform that applies formal proving -tools to annotated programs. It is currently capable of analysis of C -(through "Frama-C"), Java (through the included tool "Krakatoa"), and -potentially ML programs with some modification into Why's own ML-like -language. Furthermore, Why is capable of analysis of any program that -is mapped onto its own internal language. It uses a weakest -precondition involving calculus to generate potential theorems necessary -for the proof of a program's correctness. It translates these theorems -into formats that can be used by external proof assistants (without any -extra work Coq, PVS, HOL Light, and Mizar are supported - having one is -recommended and both Coq and PVS are packaged for Fedora) and automated -theorem provers (without any extra work Simplify, Alt-Ergo, Yices, Z3, -CVC3, and Zenon are supported and Alt-Ergo, Z3, and Zenon are packaged -for Fedora) so that these results can be externally proven, resulting in -a proof of program correctness. - -Note: Each user account must be set up by running "why-config" at the -command line (to set up a configuration file). - -%package jessie -Summary: Interface between why and frama-c -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: frama-c - -%description jessie -The Jessie plugin, an interface between why and frama-c. Invoke it with: - frama-c -jessie FILE.c - -%if %{has_pvs} -# Why's integration with PVS depends on the NASA Langley PVS Libraries, -# which have no license information. This provides an alternative: -%package pvs-support -Summary: Complete Why software verification platform suite -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: pvs - -%description pvs-support -This package provides support definitions so that the Why software -verification platform suite can invoke PVS without licensing issues. -%endif - -%package all -Summary: Complete Why software verification platform suite -Requires: why%{?_isa} = %{version}-%{release} -Requires: why-jessie%{?_isa} = %{version}-%{release} -%if %{has_pvs} -Requires: why-pvs-support%{?_isa} = %{version}-%{release} -%endif -Requires: alt-ergo yices z3 zenon - -%description all -This package provides a complete software verification platform suite -based on Why, including various automated and interactive provers. - -%prep -%setup -q -%setup -q -T -D -a 9 -%patch0 - -cp -p %SOURCE2 ./ - -# Link with Fedora LDFLAGS -for flag in $RPM_LD_FLAGS; do - sed -e "\%^bin/jessie\.opt%,\%^bin/jessie\.byte%s|-o|-ccopt $flag &|" \ - -e "/gtkThread\.cmx/s|-o|-ccopt $flag &|" \ - -i Makefile.in -done - -%define fix_encoding() \ - iconv -f %2 -t %3 %1 > %1.utf8; \ - touch -r %1 %1.utf8; \ - mv -f %1.utf8 %1; - -# Fix encodings -for f in CHANGES COPYING; do - %fix_encoding $f ISO-8859-1 UTF-8 -done - -# APRON support: add a missing rpath and adapt to newer versions of apron -sed -e "s|-lpolkaMPQ_caml|-Wl,-rpath,%{_libdir}/ocaml/apron|;s| -lbigarray||" \ - -e "s|box\.cmxa polka.cmxa|boxMPQ.cmxa polkaMPQ.cmxa octMPQ.cmxa|" \ - -i configure - -# Enable debuginfo -sed -i 's,@STRIP@,/usr/bin/true,;s,-dtypes [^-],-g &,' Makefile.in -sed -ri 's,ocaml(c|opt),& -g,' atp/Makefile - -# Command "pvs" is LVM2's /sbin/pvs, so rename "pvs" to pvs-sbcl: -sed -i 's/pvs/pvs-sbcl/' configure - -# Allow building with ocaml 4.07 and up -sed -i 's,4\.06\.\*,&|4.07.*|4.08.*|4.09.*|4.1*,' configure -sed -i 's,4\.0\*,4.*,' Makefile.in - -# Allow building with why3 1.2.1 -sed -i 's,0\.88\.\*,&|1.2.1,' configure - -# Allow building with Frama-C 19.1 -sed -i 's,Chlorine-20180501,19.1*,' configure - -%build -%ifarch %{ocaml_native_compiler} -%global opt_option OCAMLBEST=opt -%else -%global opt_option OCAMLBEST=byte OCAMLDEP=ocamldep OCAMLYACC=ocamlyacc OCAMLLEX=ocamllex -%endif - -%configure --enable-apron --enable-verbosemake -make %{opt_option} - -%install -# Avoid a bug in PVS batch mode when using emacs -make install DESTDIR=%{buildroot} %{opt_option} \ - PVSLIB=%{buildroot}%{_libdir}/pvs/lib PVSEMACS=xemacs - -# Fix permissions -chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/META.frama-c-jessie -chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/Jessie.cmi -chmod a-x %{buildroot}%{_libdir}/frama-c/plugins/top/Jessie.cm{a,o,x} - -# If no PVS, no .pvs files should be installed -%if ! %{has_pvs} -rm -fr %{buildroot}%{_libdir}/pvs -%endif - -# Install desktop file -desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4} - -# Install AppData files -mkdir -p %{buildroot}%{_datadir}/appdata -install -pm 644 %{SOURCE5} %{buildroot}%{_datadir}/appdata - -# Install the icons -mkdir -p %{buildroot}%{_datadir}/icons -cp -a icons %{buildroot}%{_datadir}/icons/hicolor - -%if %{has_pvs} -# Get rid of a BUILDROOT reference in a log file (fails QA_CHECK_RPATHS) -sed -i "s|%{buildroot}||" %{buildroot}%{_libdir}/pvs/lib/why/top.out - -mkdir -p %{buildroot}%{_libdir}/pvs/lib/ints/ -cp -p %{SOURCE6} %{SOURCE7} %{buildroot}%{_libdir}/pvs/lib/ints/ -install -m755 -p %{SOURCE8} %{buildroot}%{_bindir}/ -%endif - -%global why_doc_dir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} - -# Fix up documentation and examples -mkdir -p %{buildroot}%{why_doc_dir} -cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} CHANGES README Version \ - %{buildroot}%{why_doc_dir} - -%check -make check - -%files -%license COPYING LICENSE -%{_bindir}/krakatoa -%{_libdir}/why/ -%{_datadir}/icons/hicolor/*/apps/%{name}.png -%{why_doc_dir}/ - -%files jessie -%{_bindir}/jessie -%{_libdir}/frama-c/plugins/Jessie.cmi -%{_libdir}/frama-c/plugins/META.frama-c-jessie -%{_libdir}/frama-c/plugins/top/Jessie.* -%{_datadir}/appdata/jessie.appdata.xml -%{_datadir}/applications/jessie.desktop - -%if %{has_pvs} -%files pvs-support -%{_libdir}/pvs/lib/* -%{_bindir}/patch_jessie_pvs -%endif - -# "why-all" is a meta-package; it just depends on other packages, so that -# it's easier to install a useful suite of tools. Thus, it has no files: -%files all - - -%changelog -* Fri Jan 31 2020 Fedora Release Engineering - 2.41-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jan 23 2020 Jerry James - 2.41-10 -- Rebuild for apron 0.9.12 - -* Mon Dec 9 2019 Jerry James - 2.41-9 -- OCaml 4.09.0 (final) rebuild. - -* Tue Oct 29 2019 Jerry James - 2.41-8 -- Rebuild for why3 1.2.1 - -* Fri Oct 11 2019 Jerry James - 2.41-7 -- Rebuild for ocaml-mlgmpidl 1.2.11 - -* Mon Sep 23 2019 Jerry James - 2.41-6 -- Rebuild for frama-c 19.1 - -* Fri Sep 6 2019 Jerry James - 2.41-5 -- Rebuild for ocaml-zarith 1.9 - -* Fri Aug 2 2019 Jerry James - 2.41-4 -- Rebuild for frama-c 19.0 - -* Sat Jul 27 2019 Fedora Release Engineering - 2.41-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Wed Jun 5 2019 Jerry James - 2.41-3 -- Rebuild for coq 8.9.1, why3 1.2.0, and frama-c 18.0 - -* Sun Feb 03 2019 Fedora Release Engineering - 2.41-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jan 26 2019 Jerry James - 2.41-1 -- New upstream release -- All patches have been upstreamed; drop them all - -* Sat Jul 14 2018 Fedora Release Engineering - 2.40-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Feb 12 2018 Jerry James - 2.40-1 -- New upstream release -- Add -num patch to fix incomplete num to zarith conversion - -* Fri Feb 09 2018 Fedora Release Engineering - 2.39-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jan 18 2018 Igor Gnatenko - 2.39-4 -- Remove obsolete scriptlets - -* Sat Dec 9 2017 Jerry James - 2.39-3 -- Bring back the -project patch, still needed (bz 1520483) -- Add the -safe-string patch for building with ocaml 4.06.0 -- Build the Jessie plugin with -runtime-variant _pic - -* Sat Dec 02 2017 Richard W.M. Jones - 2.39-3 -- OCaml 4.06.0 rebuild. - -* Sat Oct 7 2017 Jerry James - 2.39-2 -- Rebuild for why3 0.88.0 - -* Thu Sep 7 2017 Jerry James - 2.39-1 -- New upstream release - -* Wed Sep 06 2017 Richard W.M. Jones - 2.38-6 -- OCaml 4.05.0 rebuild. - -* Thu Aug 03 2017 Fedora Release Engineering - 2.38-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 2.38-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Jul 01 2017 Richard W.M. Jones - 2.38-3 -- Rebuild for OCaml 4.04.2. - -* Mon May 15 2017 Richard W.M. Jones - 2.38-2 -- Rebuild for OCaml 4.04.1. - -* Fri Mar 24 2017 Jerry James - 2.38-1 -- New upstream release - -* Sat Feb 11 2017 Fedora Release Engineering - 2.36-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jan 12 2017 Jerry James - 2.36-1 -- New upstream release - -* Wed Nov 30 2016 Jerry James - 2.35-23 -- Rebuild for gappalib-coq 1.3.2 - -* Sun Nov 06 2016 Richard W.M. Jones - 2.35-21 -- Rebuild for OCaml 4.04.0. -- Modify configure script to allow building with OCaml 4.04. -- Modify configure script to use octMPQ library (part of Apron). - -* Fri Oct 28 2016 Jerry James - 2.35-20 -- Rebuild for coq 8.5pl3 -- Remove obsolete scriptlets - -* Thu Sep 29 2016 Jerry James - 2.35-19 -- Rebuild for flocq 2.5.2 and gappalib-coq 1.3.1 - -* Fri Sep 2 2016 Jerry James - 2.35-18 -- Rebuild for why3 0.87.2 - -* Fri Jul 22 2016 Jerry James - 2.35-17 -- Rebuild for apron 0.9.11 and gappalib-coq 1.3.0 - -* Wed Jul 13 2016 Jerry James - 2.35-16 -- Rebuild for coq 8.5pl2 - -* Wed Jun 1 2016 Jerry James - 2.35-15 -- Rebuild for why3 0.87.1 and Frama-C Aluminium - -* Fri Apr 22 2016 Jerry James - 2.35-14 -- Rebuild for coq 8.5pl1 - -* Sat Apr 16 2016 Jerry James - 2.35-13 -- Rebuild for ocaml-ocamlgraph 1.8.7 - -* Fri Mar 18 2016 Jerry James - 2.35-12 -- Rebuild for why3 0.87.0 - -* Fri Feb 12 2016 Jerry James - 2.35-11 -- Rebuild for coq 8.5, flocq 2.5.1, gappalib-coq 1.2.1, why3 0.86.3, and - Frama-C Magnesium -- Use camlp4 in preference to camlp5 -- Drop cvc3 support -- Update appdata for latest specification - -* Fri Feb 05 2016 Fedora Release Engineering - 2.35-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Wed Oct 14 2015 Jerry James - 2.35-9 -- Rebuild for flocq 2.5.0, gappalib-coq 1.2.0, and why3 0.86.2 - -* Thu Jul 30 2015 Richard W.M. Jones - 2.35-8 -- OCaml 4.02.3 rebuild. - -* Mon Jun 22 2015 Jerry James - 2.35-7 -- Rebuild for why3 0.86.1 - -* Fri Jun 19 2015 Richard W.M. Jones - 2.35-6 -- Rebuild for ocaml-4.02.2. - -* Fri Jun 19 2015 Fedora Release Engineering - 2.35-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Sat May 16 2015 Jerry James - 2.35-4 -- Rebuild for why3 0.86 - -* Mon Apr 13 2015 Jerry James - 2.35-3 -- Rebuild for coq 8.4pl6 - -* Wed Apr 1 2015 Jerry James - 2.35-2 -- Adjust requires filter - -* Tue Mar 31 2015 Jerry James - 2.35-1 -- New upstream release -- Drop upstreamed -flocq24 and -frama-c-sodium patches -- Drop all gwhy-related sources, as gwhy has been retired -- Merge (X)Emacs files into the main package due to change in policy - -* Thu Mar 19 2015 Jerry James - 2.34-18 -- Rebuild for Frama-C Sodium -- Add -ocamlgraph186 patch to adapt to ocamlgraph 1.8.6 -- Add -frama-c-sodium patch to adapt to Frama-C Sodium - -* Thu Feb 19 2015 Richard W.M. Jones - 2.34-17 -- ocaml-4.02.1 rebuild. - -* Sat Nov 15 2014 Jerry James - 2.34-16 -- Fix gwhy-2.33.patch (bz 1164470) - -* Thu Nov 13 2014 Richard W.M. Jones - 2.34-15 -- Bump and rebuild for broken dependencies. - -* Thu Oct 30 2014 Jerry James - 2.34-14 -- Rebuild for coq 8.4pl5 - -* Thu Sep 18 2014 Jerry James - 2.34-13 -- Rebuild for why3 0.85 - -* Mon Sep 8 2014 Jerry James - 2.34-12 -- Rebuild for fixed frama-c -- Fix license handling - -* Tue Sep 2 2014 Jerry James - 2.34-11 -- Rebuild for the final ocaml 4.02.0 release - -* Mon Aug 25 2014 Jerry James - 2.34-10 -- ocaml-4.02.0+rc1 rebuild. - -* Mon Aug 18 2014 Fedora Release Engineering - 2.34-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Mon Aug 4 2014 Jerry James - 2.34-8 -- OCaml 4.02.0 beta rebuild -- BR emacs instead of emacs-nox, which no longer exists - -* Tue Jun 24 2014 Jerry James - 2.34-7 -- Omit "-z now" when building with relro (bz 1105265) -- Resolve a conflict between Frama-C and why modules both named "Project" - -* Sun Jun 08 2014 Fedora Release Engineering - 2.34-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue May 13 2014 Jerry James - 2.34-5 -- Rebuild for coq 8.4pl4 - -* Mon Apr 21 2014 Jerry James - 2.34-4 -- Rebuild for ocamlgraph 1.8.5 and flocq 2.3.0 -- Drop has_coq macro, since coq is now universally available -- Add -flocq23 patch to adapt to flocq 2.3.0 - -* Tue Apr 15 2014 Richard W.M. Jones - 2.34-3 -- Remove ocaml_arches macro (RHBZ#1087794). - -* Mon Mar 24 2014 Jerry James - 2.34-2 -- Remove dropped patches -- Add icons -- Fix the desktop icon entries - -* Tue Mar 18 2014 Jerry James - 2.34-1 -- New upstream release -- Drop upstreamed -hashtbl, -flocq, and -or patches -- Add ocaml-findlib BR - -* Wed Feb 26 2014 Jerry James - 2.33-6 -- Rebuild for ocamlgraph 1.8.4 -- Update desktop files -- Add AppData files for gwhy and jessie - -* Tue Sep 17 2013 Jerry James - 2.33-5 -- Rebuild for OCaml 4.01.0 -- Enable debuginfo -- Add -or patch to fix warnings, since warnings are errors - -* Sat Jul 27 2013 Ville Skyttä - 2.33-4 -- Install docs to %%{_pkgdocdir} where available. - -* Fri Jun 21 2013 Jerry James - 2.33-3 -- Rebuild for frama-c Fluorine 20130601 - -* Thu May 23 2013 Jerry James - 2.33-2 -- Rebuild for new frama-c and why3 builds - -* Tue May 14 2013 Jerry James - 2.33-1 -- New upstream release -- Drop upstreamed -warning, -coq84, and -ocaml4 patches -- Add -hashtbl patch -- Enable Jessie plugin again - -* Sat Feb 09 2013 Parag Nemade - 2.31-7 -- Remove vendor tag from desktop file as per https://fedorahosted.org/fesco/ticket/1077 - -* Mon Jan 14 2013 Jerry James - 2.31-6 -- Rebuild for alt-ergo 0.95 - -* Mon Jan 7 2013 Jerry James - 2.31-5 -- Rebuild for coq 8.4pl1 - -* Fri Oct 19 2012 Jerry James - 2.31-4 -- Rebuild for OCaml 4.00.1 and frama-c Oxygen -- Recripple the Jessie plugin until it works with frama-c Oxygen - -* Tue Sep 11 2012 Jerry James - 2.31-3 -- Rebuild for new frama-c build with altered API. - -* Mon Aug 27 2012 Jerry James - 2.31-2 -- Frama-c is fixed; rebuild with the Jessie plugin enabled and functioning - -* Thu Aug 23 2012 Jerry James - 2.31-1 -- New upstream version -- Drop upstreamed patches -- Add ocaml-mlgmpidl-devel and why3 BRs -- Add -warning, -ocaml4, and -coq84 patches to fix the build -- Cripple the Jessie plugin until problems with frama-c and hashtables are fixed - -* Mon Jul 30 2012 Richard W.M. Jones - 2.30-7 -- Rebuild for OCaml 4.00.0 official. - -* Sun Jul 22 2012 Fedora Release Engineering - 2.30-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Wed Jan 11 2012 Jerry James - 2.30-5 -- Patch to work with flocq 2.0.0 - -* Tue Dec 27 2011 Jerry James - 2.30-4 -- Rebuild for coq 8.3pl3 - -* Tue Dec 6 2011 Jerry James - 2.30-3 -- Update alt_ergo and yices "okay" version numbers - -* Wed Nov 23 2011 Jerry James - 2.30-2 -- Rebuild with APRON and gappalib-coq support - -* Fri Oct 28 2011 Jerry James - 2.30-1 -- New upstream release - -* Thu Jul 14 2011 Jerry James - 2.29-2 -- Fix broken conditionals - -* Mon Jul 11 2011 Jerry James - 2.29-1 -- New upstream release (fixes FTBFS: bz 715902) -- Remove unnecessary spec file elements (BuildRoot, etc.) -- Update approach to filtering provides and requires -- Add has_pvs analogously to has_coq, and simplify macro usage -- Add (X)Emacs support packages -- New subpackage for the jessie plugin to avoid unowned directories and - permit a direct dependency on frama-c -- Prepare for the eventual availability of APRON - -* Thu Apr 14 2011 Karsten Hopp 2.28-2.2 -- add ppc to excludearch, too. No pvs-sbcl available there - -* Wed Apr 13 2011 Karsten Hopp 2.28-2.1 -- add ppc64 to excludearch, no sbcl available there - -* Mon Feb 07 2011 Fedora Release Engineering - 2.28-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Jan 21 2011 Richard W.M. Jones - 2.28-1 -- Since 2.26 FTBFS, try latest upstream (2.28). -- Rebase Makefile.in patch. -- Fix(?) test result. -- No libdir/frama-c directory is created any more. - -* Fri Jan 21 2011 Richard W.M. Jones - 2.26-2 -- Bump and rebuild for OCaml 3.12. - -* Sat Oct 09 2010 David A. Wheeler + Mark Rader - 2.26-1 -- Upgrade to upstream version 2.26 (inc. update of krakatoa.pdf) -- Integrated with Frama-C and PVS (as pvs-sbcl) - -* Mon Jan 11 2010 Richard W.M. Jones - 2.23-2 -- Rebuild to fix dependencies. - -* Fri Jan 08 2010 Alan Dunn - 2.23-1 -- Upgrade to upstream version 2.23 -- Move execstack fixing to spec file from patch -- Moved patch descriptions to initial patch declaration as in examples - in Fedora documentation -- New Caduceus, Krakatoa documentation -- Update test result from small test min.mlw -- Added CVC3 interfacing capabilities -- Removed patch for gwhy configuration, as there is a new mechanism for this - -* Tue Sep 22 2009 Dennis Gilmore - 2.17-5 -- Exclude sparc64 s390 s390x there is no ocaml there - -* Fri Aug 07 2009 Alan Dunn - 2.17-4 -- Removed now irrelevant check for no OCaml in Fedora < 9 (those - distributions are EOL) -- Changed ExcludeArch to proper Fedora versions -- Builds coq subpackage exactly when Coq can be built, thus making - build independent of whether Coq can be built -- define -> global -- Fixed accidental use of in tar ocamlgraph instead of one that is - separately packaged - -* Mon Jul 27 2009 Fedora Release Engineering - 2.17-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 2.17-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Wed Dec 24 2008 Alan Dunn 2.17-1 -- Upgrade to version 2.17 (bz: 477790) -- Add ownership of two directories common with Coq, but neither program requires the other (bz: 474016) -- Minor filename change in 2.17 (GPL -> LICENSE) -- Added back Coq .v files to match policy for Coq -- Changed directory structure re: jessie and krakatoa to match new structure in 2.17 -- Minor changes to patches to ensure they still work in 2.17 -- Corrected package location gwhy-icon.png (should only be in gwhy) -* Tue Aug 5 2008 Alan Dunn 2.14-2.1 -- ExcludeArch ppc64 on Fedora 8 due to no ocaml. -* Fri Aug 1 2008 Alan Dunn 2.14-2 -- Fixed minor issues in response to package review: -- Inclusion of COPYING, GPL license-related files -- Added config.mll patch to make default config file created nicer -- Changes subpackage dependencies to be fully versioned. -- Makes during build allowed to be noisy (allowed to print). -* Wed Jul 30 2008 Alan Dunn 2.14-1 -- Changed to new version of why, removed previous why-cpulimit name - change, zenon output format patches as the issues were fixed in - why 2.14. -- Moved doc subpackage back into main package. -- Added example files to documentation subpackage. -- Added check section with test on small why file. -- Reformatted some macro names for greater readability. -* Thu Jul 24 2008 Alan Dunn 2.13-2 -- Added several patches: fixed Zenon output, completed fix of rename - of cpulimit -> why-cpulimit. -* Wed Jul 23 2008 Alan Dunn 2.13-1 -- Initial Fedora RPM version.
%s%s
Interactive proof sessionMax function proofBinary search function proofBinary search arithmetic overflowBinar search function behavior