diff options
Diffstat (limited to 'src/hls')
-rw-r--r-- | src/hls/DeadBlocksproof.v | 2 | ||||
-rw-r--r-- | src/hls/HTLgenproof.v | 2 | ||||
-rw-r--r-- | src/hls/HashTree.v | 4 | ||||
-rw-r--r-- | src/hls/PipelineOp.v | 2 | ||||
-rw-r--r-- | src/hls/Sat.v | 104 |
5 files changed, 5 insertions, 109 deletions
diff --git a/src/hls/DeadBlocksproof.v b/src/hls/DeadBlocksproof.v index 7f1da9c..107e206 100644 --- a/src/hls/DeadBlocksproof.v +++ b/src/hls/DeadBlocksproof.v @@ -544,7 +544,7 @@ Proof. elim H. intros. - elim not_seen_sons_prop6 with (1:=TT) (i0:=i); auto with datatypes. + eelim not_seen_sons_prop6 with (1:=TT) (i:=i); auto with datatypes. rewrite PTree.gsspec; destruct peq; subst; intros; auto with datatypes. rewrite PTree.gempty in H0; congruence. diff --git a/src/hls/HTLgenproof.v b/src/hls/HTLgenproof.v index 1089356..4fc00bc 100644 --- a/src/hls/HTLgenproof.v +++ b/src/hls/HTLgenproof.v @@ -140,7 +140,7 @@ Definition match_prog (p: RTL.program) (tp: HTL.program) := Linking.match_program (fun cu f tf => transl_fundef f = Errors.OK tf) eq p tp /\ main_is_internal p = true. -Instance TransfHTLLink (tr_fun: RTL.program -> Errors.res HTL.program): +#[global] Instance TransfHTLLink (tr_fun: RTL.program -> Errors.res HTL.program): TransfLink (fun (p1: RTL.program) (p2: HTL.program) => match_prog p1 p2). Proof. red. intros. exfalso. destruct (link_linkorder _ _ _ H) as [LO1 LO2]. diff --git a/src/hls/HashTree.v b/src/hls/HashTree.v index 7387401..a088a54 100644 --- a/src/hls/HashTree.v +++ b/src/hls/HashTree.v @@ -498,14 +498,14 @@ Module HashTree(H: Hashable). forall x, match_one x x. Proof. unfold match_one; auto. Qed. - Instance match_one_Reflexive : Reflexive match_one. + #[global] Instance match_one_Reflexive : Reflexive match_one. Proof. unfold Reflexive. auto using match_one_refl. Qed. Lemma match_one_trans : forall x y z, match_one x y -> match_one y z -> match_one x z. Proof. unfold match_one; auto. Qed. - Instance match_one_Transitive : Transitive match_one. + #[global] Instance match_one_Transitive : Transitive match_one. Proof. unfold Transitive. eauto using match_one_trans. Qed. Lemma hash_value_gt : diff --git a/src/hls/PipelineOp.v b/src/hls/PipelineOp.v index 90ccea0..76634a6 100644 --- a/src/hls/PipelineOp.v +++ b/src/hls/PipelineOp.v @@ -34,7 +34,7 @@ Require Import vericert.hls.FunctionalUnits. Require Import vericert.common.Monad. Module OptionExtra := MonadExtra(Option). -Import OptionExtra.MonadNotation. +(*Import OptionExtra.MonadNotation.*) Local Open Scope positive. diff --git a/src/hls/Sat.v b/src/hls/Sat.v index 3924ce7..b5970da 100644 --- a/src/hls/Sat.v +++ b/src/hls/Sat.v @@ -372,110 +372,6 @@ Fixpoint interp_alist (al : alist) : asgn := | l :: al' => upd (interp_alist al') l end. -(** Here's the final definition! - - This implementation isn't #<i>#quite#</i># what you would expect, since it - takes an extra parameter expressing a search tree depth. Writing the function - without that parameter would be trickier when it came to proving termination. - In practice, you can just seed the bound with one plus the number of variables - in the input, but the function's return type still indicates a possibility for - a "time-out" by returning [None]. - *) -Definition boundedSat: forall (bound : nat) (fm : formula), - option ({al : alist | satFormula fm (interp_alist al)} - + {forall a, ~satFormula fm a}). - refine (fix boundedSat (bound : nat) (fm : formula) {struct bound} - : option ({al : alist | satFormula fm (interp_alist al)} - + {forall a, ~satFormula fm a}) := - match bound with - | O => None - | S bound' => - if isNil fm - then Some (inleft _ (exist _ nil _)) - else match unitPropagate fm with - | Some (inleft (existT _ fm' (exist _ l _))) => - match boundedSat bound' fm' with - | None => None - | Some (inleft (exist _ al _)) => Some (inleft _ (exist _ (l :: al) _)) - | Some (inright _) => Some (inright _ _) - end - | Some (inright _) => Some (inright _ _) - | None => - let l := chooseSplit fm in - match setFormula fm l with - | inleft (exist _ fm' _) => - match boundedSat bound' fm' with - | None => None - | Some (inleft (exist _ al _)) => Some (inleft _ (exist _ (l :: al) _)) - | Some (inright _) => - match setFormula fm (negate l) with - | inleft (exist _ fm' _) => - match boundedSat bound' fm' with - | None => None - | Some (inleft (exist _ al _)) => Some (inleft _ (exist _ (negate l :: al) _)) - | Some (inright _) => Some (inright _ _) - end - | inright _ => Some (inright _ _) - end - end - | inright _ => - match setFormula fm (negate l) with - | inleft (exist _ fm' _) => - match boundedSat bound' fm' with - | None => None - | Some (inleft (exist _ al _)) => Some (inleft _ (exist _ (negate l :: al) _)) - | Some (inright _) => Some (inright _ _) - end - | inright _ => Some (inright _ _) - end - end - end - end); simpl; intros; subst; intuition; try generalize dependent (interp_alist al). - firstorder. - firstorder. - firstorder. - firstorder. - assert (satFormula fm (upd a0 l)); firstorder. - assert (satFormula fm (upd a0 l)); firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - firstorder. - destruct (satLit_dec l a); - [assert (satFormula fm (upd a l)) | assert (satFormula fm (upd a (negate l)))]; firstorder. - destruct (satLit_dec l a); - [assert (satFormula fm (upd a l)) | assert (satFormula fm (upd a (negate l)))]; firstorder. - destruct (satLit_dec l a); - [assert (satFormula fm (upd a l)) | assert (satFormula fm (upd a (negate l)))]; firstorder. - destruct (satLit_dec l a); - [assert (satFormula fm (upd a l)) | assert (satFormula fm (upd a (negate l)))]; firstorder. - destruct (satLit_dec l a); intuition eauto; - assert (satFormula fm (upd a l)); firstorder. - destruct (satLit_dec l a); intuition eauto; - assert (satFormula fm (upd a l)); firstorder. - firstorder. - firstorder. - destruct (satLit_dec l a); intuition eauto; - assert (satFormula fm (upd a (negate l))); firstorder. - destruct (satLit_dec l a); intuition eauto; - assert (satFormula fm (upd a (negate l))); firstorder. - destruct (satLit_dec l a); - [assert (satFormula fm (upd a l)) | assert (satFormula fm (upd a (negate l)))]; firstorder. -Defined. - -Definition boundedSatSimple (bound : nat) (fm : formula) := - match boundedSat bound fm with - | None => None - | Some (inleft (exist _ a _)) => Some (Some a) - | Some (inright _) => Some None - end. - (*Eval compute in boundedSatSimple 100 nil. Eval compute in boundedSatSimple 100 (((true, 1%nat) :: nil) :: ((false, 1%nat) :: nil) :: nil). Eval compute in boundedSatSimple 100 (((true, 0) :: nil) :: nil). |