Skip to content

Commit

Permalink
Reorganise project into 3 folders
Browse files Browse the repository at this point in the history
  • Loading branch information
tperami committed Feb 11, 2025
1 parent 01ec33c commit 4b652ed
Show file tree
Hide file tree
Showing 30 changed files with 106 additions and 196 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Require Import ASCommon.GRel.
Require Import ASCommon.FMon.
Require Import ASCommon.StateT.

Require Import ISASem.Interface.
Require Import Interface.
Require Import TermModels.

Open Scope Z_scope.
Expand Down
19 changes: 9 additions & 10 deletions promising-arm/GenPromising.v → ArchSem/GenPromising.v
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,11 @@ Require Import Program.

From stdpp Require Import relations.

Open Scope Z_scope.
Open Scope stdpp_scope.
#[local] Open Scope Z_scope.
#[local] Open Scope stdpp_scope.

Require Import ISASem.Interface.

Require Import GenModels.TermModels.
Require Import Interface.
Require Import TermModels.



Expand Down Expand Up @@ -131,7 +130,7 @@ Arguments t : clear implicits.
End PromMemory.

(* to be imported *)
Module Gen (IWA : InterfaceWithArch) (TM : TermModelsT IWA).
Module GenPromising (IWA : InterfaceWithArch) (TM : TermModelsT IWA).
Import IWA.Arch.
Import IWA.Interface.
Import TM.
Expand Down Expand Up @@ -385,8 +384,8 @@ Module Gen (IWA : InterfaceWithArch) (TM : TermModelsT IWA).
(* TODO state some soundness lemma between Promising_to_Modelnc and
Promising_Modelc *)

End Gen.
End GenPromising.

Module Type GenT (IWA : InterfaceWithArch) (TM : TermModelsT IWA).
Include Gen IWA TM.
End GenT.
Module Type GenPromisingT (IWA : InterfaceWithArch) (TM : TermModelsT IWA).
Include GenPromising IWA TM.
End GenPromisingT.
2 changes: 1 addition & 1 deletion ISASem/Interface.v → ArchSem/Interface.v
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ End Arch.

Module Interface (A : Arch).
Import A.
Open Scope N.
#[local] Open Scope N.

(** ** Memory utility *)
(** Virtual address are tag-less bitvectors *)
Expand Down
6 changes: 3 additions & 3 deletions GenModels/TermModels.v → ArchSem/TermModels.v
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ Require Import ASCommon.Exec.
Require Import Relations.
Require Import Program.

Open Scope Z_scope.
Open Scope stdpp_scope.
#[local] Open Scope Z_scope.
#[local] Open Scope stdpp_scope.

Require Import ISASem.Interface.
Require Import Interface.


(** This module specify general definitions of hardware models over finite
Expand Down
2 changes: 1 addition & 1 deletion ISASem/_CoqProject → ArchSem/_CoqProject
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-R ../_build/default/ISASem ISASem
-Q ../_build/default/Common ASCommon
-R ../_build/default/ArchSem ArchSem
13 changes: 9 additions & 4 deletions GenModels/dune → ArchSem/dune
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
(coq.theory
(name GenModels)
(name ArchSem)
(package coq-archsem)
(modules TermModels CandidateExecutions ArmInst ArmSeqModel)
(theories ISASem ASCommon)
(modules
Interface
TermModels
CandidateExecutions
GenPromising
)
(theories SailStdpp ASCommon)
(coqdoc_flags :standard --utf8
--external https://plv.mpi-sws.org/coqdoc/stdpp/ stdpp
--external ../../Common/ASCommon.html ASCommon
--external ../../ISASem/ISASem.html ISASem
--coqlib_url https://coq.inria.fr/doc/V8.20.1/stdlib
)
)

; This alias is useful to build all the coq libaries without extraction
(alias
(name coq)
(deps (alias_rec all))
Expand Down
12 changes: 11 additions & 1 deletion ISASem/ArmInst.v → ArchSemArm/ArmInst.v
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ Require Import stdpp.base.
Require Import stdpp.countable.
Require Import stdpp.vector.
Require Import ASCommon.Options.
Require Import Interface.
Require Import SailStdpp.Base.
Require Export SailArmInstTypes.
Require Import Coq.Reals.Rbase.
From RecordUpdate Require Import RecordSet.
From ASCommon Require Import Common Effects CDestruct.
From ArchSem Require Import Interface TermModels CandidateExecutions GenPromising.


From Equations Require Import Equations.
Expand All @@ -63,6 +63,8 @@ From Equations Require Import Equations.
Require Import stdpp.decidable.
Require Import stdpp.list.

#[global] Open Scope stdpp.

#[global] Typeclasses Transparent bits.

Unset Elimination Schemes.
Expand Down Expand Up @@ -561,5 +563,13 @@ End Arm.

Bind Scope string_scope with Arm.Arch.reg.

Module ArmTM := TermModels Arm.
Module ArmCand := CandidateExecutions Arm ArmTM.
Module ArmGenPro := GenPromising Arm ArmTM.

Export Arm.Arch.
Export Arm.Interface.
Export ArmTM.
Export ArmCand.
Export ArmGenPro.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Require Import ASCommon.Options.
Require Import ASCommon.Common.
Require Import ASCommon.GRel.
Require Import ASCommon.FMon.
Require Import GenModels.ArmInst.
Require Import ArmInst.

(* NOTE: TODO change this.
This file defines the VMSA and User Arm axiomatic models. It starts with some
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion AxiomaticModels/UMArm.v → ArchSemArm/UMArm.v
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Require Import ASCommon.Options.
Require Import ASCommon.Common.
Require Import ASCommon.GRel.
Require Import ASCommon.FMon.
Require Import GenModels.ArmInst.
Require Import ArmInst.
Require Import GenAxiomaticArm.

(** This is an implementation of a user-mode Axiomatic model for ARM. It does
Expand Down
12 changes: 6 additions & 6 deletions promising-arm/UMPromising.v → ArchSemArm/UMPromising.v
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,18 @@
(* *)
(******************************************************************************)

Require Import Coq.Program.Equality.
From stdpp Require Import decidable.
Require Import ASCommon.Options.
Require Import ASCommon.Common.
Require Import ASCommon.Exec.
Require Import ASCommon.StateT.
Require Import ASCommon.FMon.
Require Import Coq.Program.Equality.

From stdpp Require Import decidable.
Require Import ArchSem.GenPromising.
Require Import ArmInst.


Require Import GenModels.ArmInst.
Require Import GenPromising.
Module ArmGP := Gen Arm ArmTM.
Import ArmGP.

(** The goal of this module is to define an User-mode promising model,
without mixed-size on top of the new interface *)
Expand All @@ -76,6 +75,7 @@ Module Loc.
FullAddress_address := bv_concat 52 loc (bv_0 3)
|}.


(** Recover a location from an ARM physical address. *)
Definition from_pa (pa : FullAddress) : option t :=
match FullAddress_paspace pa with
Expand Down
2 changes: 1 addition & 1 deletion AxiomaticModels/UMSeqArm.v → ArchSemArm/UMSeqArm.v
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Require Import ASCommon.Options.
Require Import ASCommon.Common.
Require Import ASCommon.GRel.
Require Import ASCommon.FMon.
Require Import GenModels.ArmInst.
Require Import ArmInst.
Require Import GenAxiomaticArm.

(** This is an implementation of a user-mode SC Axiomatic model in ARM style.
Expand Down
5 changes: 2 additions & 3 deletions promising-arm/VMPromising.v → ArchSemArm/VMPromising.v
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ From stdpp Require Import pretty.

Require UMPromising.

Require Import GenModels.ArmInst.
Require Import GenPromising.
Import UMPromising.ArmGP.
Require Import ArchSem.GenPromising.
Require Import ArmInst.

(** The goal of this module is to define an Virtual memory promising model,
without mixed-size on top of the new interface *)
Expand Down
2 changes: 1 addition & 1 deletion AxiomaticModels/VMSA22Arm.v → ArchSemArm/VMSA22Arm.v
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Require Import ASCommon.Options.
Require Import ASCommon.Common.
Require Import ASCommon.GRel.
Require Import ASCommon.FMon.
Require Import GenModels.ArmInst.
Require Import ArmInst.
Require Import GenAxiomaticArm.

Import Candidate.
Expand Down
3 changes: 1 addition & 2 deletions AxiomaticModels/VMUMEquivThm.v → ArchSemArm/VMUMEquivThm.v
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ Require Import ASCommon.Common.
Require Import ASCommon.GRel.

Require Import ASCommon.FMon.
Require Import ISASem.ArmInst.
Require Import GenModels.ArmInst.
Require Import ArmInst.
Require Import GenAxiomaticArm.
Require UMArm.
Module UM := UMArm.
Expand Down
3 changes: 3 additions & 0 deletions ArchSemArm/_CoqProject
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-Q ../_build/default/Common ASCommon
-Q ../_build/default/ArchSem ArchSem
-R ../_build/default/ArchSemArm ArchSemArm
29 changes: 29 additions & 0 deletions ArchSemArm/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
(coq.theory
(name ArchSemArm)
(package coq-archsem)
(modules
SailArmInstTypes
ArmInst
ArmSeqModel
UMPromising
VMPromising
GenAxiomaticArm
UMArm
UMSeqArm
VMSA22Arm
VMUMEquivThm
)
(theories ASCommon ArchSem)
(coqdoc_flags :standard --utf8
--external https://plv.mpi-sws.org/coqdoc/stdpp stdpp
--external ../../Common/ASCommon.html ASCommon
--external ../../ArchSem/ArchSem.html ArchSem
--coqlib_url https://coq.inria.fr/doc/V8.20.1/stdlib
)
)

; This alias is useful to build all the coq libaries without extraction
(alias
(name coq)
(deps (alias_rec all))
)
4 changes: 0 additions & 4 deletions AxiomaticModels/_CoqProject

This file was deleted.

18 changes: 0 additions & 18 deletions AxiomaticModels/dune

This file was deleted.

3 changes: 2 additions & 1 deletion Common/dune
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
StateT
Effects
FMon
Exec)
Exec
)
(theories stdpp Hammer RecordUpdate Equations Ltac2)
(coqdoc_flags :standard --utf8
--external https://plv.mpi-sws.org/coqdoc/stdpp/ stdpp
Expand Down
2 changes: 1 addition & 1 deletion Extraction/ArmInstExtr.v
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Require Import ASCommon.CExtraction.
Require Import GenModels.ArmSeqModel.
Require Import ArchSemArm.ArmSeqModel.

Unset Extraction SafeImplicits.

Expand Down
6 changes: 3 additions & 3 deletions Extraction/dune
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

(coq.extraction
(prelude ArmInstExtr)
(theories ISASem ASCommon stdpp SailStdpp Hammer RecordUpdate Equations
GenModels Ltac2)
(extracted_modules ArmInst0 ArmInst ArmSeqModel Ascii base Basics BinInt
(theories Ltac2 stdpp SailStdpp Hammer RecordUpdate Equations
ASCommon ArchSem ArchSemArm)
(extracted_modules ArmInst ArmSeqModel Ascii base Basics BinInt
BinNat BinNums BinPosDef BinPos CBase CBitvector CBool
CList CMaps COption countable CResult CSets Datatypes
decidable definitions Effects Exec fin0 finite fin_maps Fin
Expand Down
55 changes: 0 additions & 55 deletions GenModels/ArmInst.v

This file was deleted.

4 changes: 0 additions & 4 deletions GenModels/_CoqProject

This file was deleted.

4 changes: 0 additions & 4 deletions ISASem/README.md

This file was deleted.

Loading

0 comments on commit 4b652ed

Please sign in to comment.