Skip to content

Commit

Permalink
Merge pull request #142 from uwplse/from-require
Browse files Browse the repository at this point in the history
consistently use From-Require
  • Loading branch information
palmskog authored Oct 20, 2023
2 parents f31f907 + 354c8da commit bfb44e8
Show file tree
Hide file tree
Showing 37 changed files with 124 additions and 212 deletions.
1 change: 1 addition & 0 deletions core/DupDropReordering.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
From Coq Require Import List Relations Permutation.
From StructTact Require Import StructTactics.
From Verdi Require Import Net.

Import ListNotations.

Section dup_drop_reorder.
Expand Down
14 changes: 5 additions & 9 deletions core/DynamicNetLemmas.v
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
Require Import Verdi.Verdi.

Require Import StructTact.Update.
Require Import FunctionalExtensionality.
Require Import Sumbool.
Require Import Relation_Definitions.
Require Import RelationClasses.

Require Import Verdi.Ssrexport.
From Verdi Require Import Verdi.
From StructTact Require Import Update.
From Coq Require Import FunctionalExtensionality.
From Coq Require Import Sumbool Relation_Definitions RelationClasses.
From Verdi Require Import Ssrexport.

Set Implicit Arguments.

Expand Down
15 changes: 5 additions & 10 deletions core/GhostSimulations.v
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
Require Import List.

Require Import StructTact.StructTactics.
Require Import Verdi.Net.
Require Import StructTact.Util.

Require Import FunctionalExtensionality.
Require Import Verdi.TotalMapSimulations.

Require Import Verdi.Ssrexport.
From Coq Require Import List.
From StructTact Require Import StructTactics Util.
From Verdi Require Import Net TotalMapSimulations.
From Coq Require Import FunctionalExtensionality.
From Verdi Require Import Ssrexport.

Set Implicit Arguments.

Expand Down
3 changes: 2 additions & 1 deletion core/HandlerMonad.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Require Import List.
From Coq Require Import List.

Import ListNotations.

Definition GenHandler (W S O A : Type) : Type := S -> A * list O * S * list W % type.
Expand Down
7 changes: 3 additions & 4 deletions core/InverseTraceRelations.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Require Import List.

Require Import Verdi.Net.
Require Import StructTact.StructTactics.
From Coq Require Import List.
From Verdi Require Import Net.
From StructTact Require Import StructTactics.

Class InverseTraceRelation `{State : Type} `{Event : Type} (step : step_relation State Event) :=
{
Expand Down
8 changes: 3 additions & 5 deletions core/LabeledNet.v
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Require Import Verdi.Verdi.
Require Import InfSeqExt.infseq.
Require Import InfSeqExt.exteq.

Require Import Verdi.Ssrexport.
From Verdi Require Import Verdi.
From InfSeqExt Require Import infseq exteq.
From Verdi Require Import Ssrexport.

Set Implicit Arguments.

Expand Down
9 changes: 4 additions & 5 deletions core/NameOverlay.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Require Import Verdi.Verdi.
Require Import StructTact.Fin.

Require Import OrderedType.
From Verdi Require Import Verdi.
From StructTact Require Import Fin.
From Coq Require Import OrderedType.

Module Type NameType.
Parameter name : Type.
Expand Down Expand Up @@ -42,7 +41,7 @@ End NameOrderedTypeCompat.

Module FinNameOrderedTypeCompat (N : NatValue) (FN : FinNameType N) <: NameOrderedTypeCompat FN := fin_OT_compat N.

Require Import MSetInterface.
From Coq Require Import MSetInterface.

Module Type NameOrderedType (Import NT : NameType) <: OrderedType.
Definition t := name.
Expand Down
20 changes: 7 additions & 13 deletions core/Net.v
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
Require Import List.
Import ListNotations.

Require Import StructTact.StructTactics.
Require Import StructTact.Update.
Require Import StructTact.Update2.
Require Import StructTact.RemoveAll.
Require Import Sumbool.
Require Import Relation_Definitions.
Require Import RelationClasses.
From Coq Require Import List.
From StructTact Require Import StructTactics.
From StructTact Require Import Update Update2 RemoveAll.
From Coq Require Import Sumbool Relation_Definitions RelationClasses.
From Verdi Require Export VerdiHints.
From Cheerios Require Import Cheerios.

Require Export Verdi.VerdiHints.

Require Import Cheerios.Cheerios.
Import ListNotations.

Set Implicit Arguments.

Expand Down
15 changes: 5 additions & 10 deletions core/PartialExtendedMapSimulations.v
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
Require Import Verdi.Verdi.
Require Import Verdi.DynamicNetLemmas.
Require Import Verdi.TotalMapSimulations.
Require Import Verdi.PartialMapSimulations.
From Verdi Require Import Verdi DynamicNetLemmas.
From Verdi Require Import TotalMapSimulations PartialMapSimulations.
From Coq Require Import FunctionalExtensionality Sumbool.
From Coq Require Import Sorting.Permutation.
From Verdi Require Import Ssrexport.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Require Import FunctionalExtensionality.
Require Import Sumbool.
Require Import Sorting.Permutation.

Require Import Verdi.Ssrexport.

Set Implicit Arguments.

Class MultiParamsPartialExtendedMap
Expand Down
21 changes: 7 additions & 14 deletions core/PartialMapExecutionSimulations.v
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
Require Import Verdi.Verdi.
Require Import Verdi.LabeledNet.
Require Import Verdi.TotalMapSimulations.
Require Import Verdi.PartialMapSimulations.
Require Import Verdi.TotalMapExecutionSimulations.

Require Import InfSeqExt.infseq.
Require Import InfSeqExt.map.
Require Import InfSeqExt.exteq.

Require Import FunctionalExtensionality.
From Verdi Require Import Verdi LabeledNet.
From Verdi Require Import TotalMapSimulations PartialMapSimulations.
From Verdi Require Import TotalMapExecutionSimulations.
From InfSeqExt Require Import infseq map exteq.
From Coq Require Import FunctionalExtensionality.
From Verdi Require Import Ssrexport.
From Coq Require Import ssrbool.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Require Import Verdi.Ssrexport.
Require Import ssr.ssrbool.

Set Implicit Arguments.

Class LabeledMultiParamsPartialMapCongruency
Expand Down
15 changes: 5 additions & 10 deletions core/PartialMapSimulations.v
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
Require Import Verdi.Verdi.
Require Import Verdi.DynamicNetLemmas.
Require Import Verdi.TotalMapSimulations.
From Verdi Require Import Verdi DynamicNetLemmas TotalMapSimulations.
From Coq Require Import FunctionalExtensionality.
From Coq Require Import Sumbool Sorting.Permutation.
From Verdi Require Import DynamicNetLemmas.
From Verdi Require Import Ssrexport.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Require Import FunctionalExtensionality.
Require Import Sumbool.
Require Import Sorting.Permutation.
Require Import Verdi.DynamicNetLemmas.

Require Import Verdi.Ssrexport.

Set Implicit Arguments.

Class BaseParamsPartialMap (P0 : BaseParams) (P1 : BaseParams) :=
Expand Down
6 changes: 2 additions & 4 deletions core/SingleSimulations.v
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Require Import Verdi.Verdi.
Require Import Verdi.DynamicNetLemmas.

Require Import Verdi.Ssrexport.
From Verdi Require Import Verdi DynamicNetLemmas.
From Verdi Require Import Ssrexport.

Set Implicit Arguments.

Expand Down
2 changes: 1 addition & 1 deletion core/StateMachineHandlerMonad.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Import List.
From Coq Require Import List.

(*
This file is very similar to HandlerMonad.v, but supports step_1
Expand Down
8 changes: 1 addition & 7 deletions core/StatePacketPacketDecomposition.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Import Verdi.Verdi.
From Verdi Require Import Verdi.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Expand Down Expand Up @@ -101,12 +101,6 @@ Class Decomposition (B : BaseParams) (M : MultiParams B) :=
Section Decomposition.
Context `{d : Decomposition}.

(* Fixpoint remove_one {A : Type} (A_eq_dec : forall x y : A, {x = y} + {x <> y}) a l :=
match l with
| x :: xs => if A_eq_dec a x then xs else x :: remove_one A_eq_dec a xs
| [] => []
end. *)

Definition packet_eq_dec :
forall p1 p2 : packet,
{p1 = p2} + {p1 <> p2}.
Expand Down
15 changes: 4 additions & 11 deletions core/TotalMapExecutionSimulations.v
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
Require Import Verdi.Verdi.
Require Import Verdi.LabeledNet.
Require Import Verdi.TotalMapSimulations.

Require Import InfSeqExt.infseq.
Require Import InfSeqExt.map.
Require Import InfSeqExt.exteq.

Require Import FunctionalExtensionality.
From Verdi Require Import Verdi LabeledNet TotalMapSimulations.
From InfSeqExt Require Import infseq map exteq.
From Coq Require Import FunctionalExtensionality.
From Verdi Require Import Ssrexport.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Require Import Verdi.Ssrexport.

Set Implicit Arguments.

Class LabeledMultiParamsLabelTotalMap
Expand Down
12 changes: 4 additions & 8 deletions core/TotalMapSimulations.v
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
Require Import Verdi.Verdi.
Require Import Verdi.DynamicNetLemmas.
From Verdi Require Import Verdi DynamicNetLemmas.
From Coq Require Import FunctionalExtensionality.
From Coq Require Import Sorting.Permutation Sumbool.
From Verdi Require Import Ssrexport.

Local Arguments update {_} {_} _ _ _ _ _ : simpl never.

Require Import FunctionalExtensionality.
Require Import Sorting.Permutation.
Require Import Sumbool.

Require Import Verdi.Ssrexport.

Set Implicit Arguments.

Class BaseParamsTotalMap (P0 : BaseParams) (P1 : BaseParams) :=
Expand Down
8 changes: 4 additions & 4 deletions core/TraceRelations.v
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Require Import List.
Import ListNotations.
From Coq Require Import List.
From Verdi Require Import Net.
From StructTact Require Import StructTactics.

Require Import Verdi.Net.
Require Import StructTact.StructTactics.
Import ListNotations.

Class TraceRelation `{State : Type} `{Event : Type} (step : step_relation State Event) :=
{
Expand Down
20 changes: 7 additions & 13 deletions core/Verdi.v
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
Require Export List.
From Coq Require Export List.
Export ListNotations.
Require Export Arith.
Require Export Lia.
Require Export Coq.Numbers.Natural.Abstract.NDiv.
Require Export Sorting.Permutation.

Require Export StructTact.Util.
Require Export StructTact.StructTactics.

Require Export Verdi.VerdiHints.
Require Export Verdi.Net.

Require PeanoNat.
From Coq Require Export Arith Lia.
From Coq Require Export Numbers.Natural.Abstract.NDiv.
From Coq Require Export Sorting.Permutation.
From StructTact Require Export Util StructTactics.
From Verdi Require Export VerdiHints Net.
From Coq Require PeanoNat.
8 changes: 3 additions & 5 deletions core/VerdiHints.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Require Import StructTact.Util.
From StructTact Require Import Util.

#[global]
Hint Resolve app_cons_in : core.
#[global]
Hint Resolve app_cons_in_rest : core.
#[global] Hint Resolve app_cons_in : core.
#[global] Hint Resolve app_cons_in_rest : core.
2 changes: 1 addition & 1 deletion extraction/ExtrOcamlBasicExt.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Extraction.
From Coq Require Extraction.

Extract Inlined Constant fst => "fst".
Extract Inlined Constant snd => "snd".
4 changes: 2 additions & 2 deletions extraction/ExtrOcamlBool.v
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Require Import Bool.
Require Extraction.
From Coq Require Import Bool.
From Coq Require Extraction.

Extract Inlined Constant negb => "not".

Expand Down
4 changes: 2 additions & 2 deletions extraction/ExtrOcamlDiskOp.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Require Import Verdi.Net.
Require Extraction.
From Verdi Require Import Net.
From Coq Require Extraction.

Extract Inductive disk_op => "DiskOpShim.disk_op" ["DiskOpShim.Append" "DiskOpShim.Write" "DiskOpShim.Delete"].
4 changes: 2 additions & 2 deletions extraction/ExtrOcamlFinInt.v
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Require Import StructTact.Fin.
Require Extraction.
From StructTact Require Import Fin.
From Coq Require Extraction.

Extract Inlined Constant fin => int.

Expand Down
4 changes: 2 additions & 2 deletions extraction/ExtrOcamlList.v
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Require Import List.
Require Extraction.
From Coq Require Import List.
From Coq Require Extraction.

Extract Inlined Constant length => "List.length".
Extract Inlined Constant app => "List.append".
Expand Down
5 changes: 2 additions & 3 deletions extraction/ExtrOcamlNatIntExt.v
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Require Import PeanoNat.
Require Import Ascii.
Require Extraction.
From Coq Require Import PeanoNat Ascii.
From Coq Require Extraction.

Extract Inlined Constant Nat.max => "Pervasives.max".
Extract Inlined Constant Nat.min => "Pervasives.min".
Expand Down
22 changes: 7 additions & 15 deletions lib/FMapVeryWeak.v
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
Require Import ZArith.

Require Import FMapInterface.
Require Import FMapPositive.
Require Import FMapList.
Require Import FMapFacts.

Require Import String.
Require Import Ascii.
Require Import List.

Require Import StructTact.StructTactics.
Require Import StructTact.StringOrders.
From Coq Require Import ZArith.
From Coq Require Import FMapInterface FMapPositive.
From Coq Require Import FMapList FMapFacts.
From Coq Require Import String Ascii List.
From StructTact Require Import StructTactics StringOrders.

Import ListNotations.

Expand All @@ -20,8 +12,8 @@ Module Type VWS.
Declare Module E : DecidableType.

Definition key := E.t.
#[global]
Hint Transparent key : core.

#[global] Hint Transparent key : core.

Parameter t : Type -> Type.

Expand Down
6 changes: 3 additions & 3 deletions lib/Ssrexport.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From Coq Require Export ssreflect.
Global Set SsrOldRewriteGoalsOrder.
Global Set Asymmetric Patterns.
Global Set Bullet Behavior "None".
#[export] Set SsrOldRewriteGoalsOrder.
#[export] Set Asymmetric Patterns.
#[export] Set Bullet Behavior "None".
Loading

0 comments on commit bfb44e8

Please sign in to comment.