From 508da655367ecd8c56cdaf3c4bd3dba312cfd33f Mon Sep 17 00:00:00 2001 From: Dhruv Makwana Date: Fri, 20 Dec 2024 17:49:32 +0000 Subject: [PATCH] CN: Error on unused modules --- backend/cn/bin/dune | 2 +- backend/cn/lib/core_to_mucore.ml | 3 --- backend/cn/lib/definition.ml | 1 - backend/cn/lib/dune | 2 +- backend/cn/lib/explain.ml | 6 ------ backend/cn/lib/request.ml | 1 - backend/cn/lib/solver.ml | 4 ---- backend/cn/lib/testGeneration/genCodeGen.ml | 1 - backend/cn/lib/testGeneration/genCompile.ml | 1 - backend/cn/lib/testGeneration/genDistribute.ml | 1 - backend/cn/lib/testGeneration/specTests.ml | 1 - backend/cn/lib/typing.ml | 2 -- 12 files changed, 2 insertions(+), 23 deletions(-) diff --git a/backend/cn/bin/dune b/backend/cn/bin/dune index 94f3f9550..5ff6a3fbd 100644 --- a/backend/cn/bin/dune +++ b/backend/cn/bin/dune @@ -4,7 +4,7 @@ (public_name cn) (package cn) (flags - (:standard -w -37 -open Monomorphic.Int)) + (:standard -w @60 -open Monomorphic.Int)) (libraries cerb_backend cerb_frontend diff --git a/backend/cn/lib/core_to_mucore.ml b/backend/cn/lib/core_to_mucore.ml index 7bca6a7e2..c2159cac3 100644 --- a/backend/cn/lib/core_to_mucore.ml +++ b/backend/cn/lib/core_to_mucore.ml @@ -8,7 +8,6 @@ module Ctype = CF.Ctype module BT = BaseTypes module C = Compile module IT = IndexTerms -module IdMap = Map.Make (Id) module SBT = BaseTypes.Surface module Mu = Mucore @@ -849,9 +848,7 @@ let rec n_expr | Eexcluded _ -> assert_error loc !^"core_anormalisation: Eexcluded" -module RT = ReturnTypes module AT = ArgumentTypes -module LRT = LogicalReturnTypes module LAT = LogicalArgumentTypes let rec lat_of_arguments f_i = function diff --git a/backend/cn/lib/definition.ml b/backend/cn/lib/definition.ml index bfcfc6c2a..4db2a43a0 100644 --- a/backend/cn/lib/definition.ml +++ b/backend/cn/lib/definition.ml @@ -1,5 +1,4 @@ module IT = IndexTerms -module AT = ArgumentTypes module LAT = LogicalArgumentTypes module Function = struct diff --git a/backend/cn/lib/dune b/backend/cn/lib/dune index b82d2f8e3..46962df7d 100644 --- a/backend/cn/lib/dune +++ b/backend/cn/lib/dune @@ -4,7 +4,7 @@ (name cn) (public_name cn) (flags - (:standard -w -37 -open Monomorphic.Int)) + (:standard -w @33@60 -open Monomorphic.Int)) (libraries cerb_backend cerb_frontend diff --git a/backend/cn/lib/explain.ml b/backend/cn/lib/explain.ml index e42c39f12..e0990d322 100644 --- a/backend/cn/lib/explain.ml +++ b/backend/cn/lib/explain.ml @@ -1,16 +1,10 @@ open Report module IT = IndexTerms -module BT = BaseTypes -module Res = Resource module Def = Definition module Req = Request -module LC = LogicalConstraints module LF = Definition.Function module LAT = LogicalArgumentTypes -module StringMap = Map.Make (String) module C = Context -module Loc = Locations -module S = Solver open Request open IndexTerms open Pp diff --git a/backend/cn/lib/request.ml b/backend/cn/lib/request.ml index a8c04409d..b37fa7812 100644 --- a/backend/cn/lib/request.ml +++ b/backend/cn/lib/request.ml @@ -1,6 +1,5 @@ open Pp.Infix module IT = IndexTerms -module BT = BaseTypes let pp_maybe_oargs = function None -> Pp.empty | Some oargs -> Pp.parens (IT.pp oargs) diff --git a/backend/cn/lib/solver.ml b/backend/cn/lib/solver.ml index 141293aae..63f7b19e5 100644 --- a/backend/cn/lib/solver.ml +++ b/backend/cn/lib/solver.ml @@ -1,7 +1,5 @@ module SMT = Simple_smt -module IT = IndexTerms open IndexTerms -module BT = BaseTypes open BaseTypes module LC = LogicalConstraints open LogicalConstraints @@ -17,8 +15,6 @@ module Int_BT_Table = Map.Make (struct BT.compare bt1 bt2 end) -module BT_Table = Hashtbl.Make (BT) - module IntWithHash = struct (* For compatability with older ocamls *) include Int diff --git a/backend/cn/lib/testGeneration/genCodeGen.ml b/backend/cn/lib/testGeneration/genCodeGen.ml index 5e0ef5592..549278d2d 100644 --- a/backend/cn/lib/testGeneration/genCodeGen.ml +++ b/backend/cn/lib/testGeneration/genCodeGen.ml @@ -6,7 +6,6 @@ module Utils = Executable_spec_utils module BT = BaseTypes module IT = IndexTerms module LC = LogicalConstraints -module GT = GenTerms module GR = GenRuntime let mk_expr = Utils.mk_expr diff --git a/backend/cn/lib/testGeneration/genCompile.ml b/backend/cn/lib/testGeneration/genCompile.ml index f372fb22a..d6862e293 100644 --- a/backend/cn/lib/testGeneration/genCompile.ml +++ b/backend/cn/lib/testGeneration/genCompile.ml @@ -9,7 +9,6 @@ module GBT = GenBaseTypes module GT = GenTerms module GD = GenDefinitions module Config = TestGenConfig -module CtA = Cn_internal_to_ail type s = GD.context diff --git a/backend/cn/lib/testGeneration/genDistribute.ml b/backend/cn/lib/testGeneration/genDistribute.ml index 451e9f3b4..3a1cbc798 100644 --- a/backend/cn/lib/testGeneration/genDistribute.ml +++ b/backend/cn/lib/testGeneration/genDistribute.ml @@ -3,7 +3,6 @@ module IT = IndexTerms module LC = LogicalConstraints module GT = GenTerms module GD = GenDefinitions -module GA = GenAnalysis module Config = TestGenConfig let generated_size (bt : BT.t) : int = diff --git a/backend/cn/lib/testGeneration/specTests.ml b/backend/cn/lib/testGeneration/specTests.ml index 9709f2ccd..67c921d3c 100644 --- a/backend/cn/lib/testGeneration/specTests.ml +++ b/backend/cn/lib/testGeneration/specTests.ml @@ -1,7 +1,6 @@ module CF = Cerb_frontend module A = CF.AilSyntax module C = CF.Ctype -module BT = BaseTypes module AT = ArgumentTypes module LAT = LogicalArgumentTypes module CtA = Cn_internal_to_ail diff --git a/backend/cn/lib/typing.ml b/backend/cn/lib/typing.ml index c4f74ef25..a5377aa66 100644 --- a/backend/cn/lib/typing.ml +++ b/backend/cn/lib/typing.ml @@ -1,8 +1,6 @@ open Context module IT = IndexTerms module ITSet = Set.Make (IT) -module Req = Request -module Res = Resource open TypeErrors type solver = Solver.solver