-------------------------------------------------------------------------------
-- (C) Altran Praxis Limited
-------------------------------------------------------------------------------
--
-- The SPARK toolset is free software; you can redistribute it and/or modify it
-- under terms of the GNU General Public License as published by the Free
-- Software Foundation; either version 3, or (at your option) any later
-- version. The SPARK toolset is distributed in the hope that it will be
-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-- Public License for more details. You should have received a copy of the GNU
-- General Public License distributed with the SPARK toolset; see file
-- COPYING3. If not, go to http://www.gnu.org/licenses for a complete copy of
-- the license.
--
--=============================================================================

package ExaminerConstants
is
   -------------------------------------------------------------------
   -- General purpose RefType
   --
   -- This type is used as a general purpose reference in the
   -- Examiner.  It is used in particular, as a general reference
   -- in an STree Node to refer to other useful info associated
   -- with that Node.
   --
   -- It is declared here for ease of visibiltiy to other units
   -------------------------------------------------------------------
   type RefType is range 0 .. Natural'Last;
   --# assert RefType'Base is Integer;


   -------------------------------------------------------------------
   -- Principal table sizes (as reported by Examiner -stat switch)
   -------------------------------------------------------------------

   MaxRecordComponents       : constant := 16_000;
   MaxRecordErrors           : constant := 16_000;
   String_Table_Size         : constant := 2_097_152;
   SyntaxTreeSize            : constant := 3_200_000;
   ContextManagerMaxFiles    : constant := 8192;
   ContextManagerMaxUnits    : constant := 8192;
   FlowAnalysisMaxExpnNumber : constant := 32000;
   MaxErrorsPerFile          : constant := 65535;
   MaxIndexComponents        : constant := 256;
   MaxIndexNumber            : constant := 256;
   VCGMatrixOrder            : constant := 8000;
   StmtStackSize             : constant := 1000;

   -------------------------------------------------------------------
   -- Constants invariant across different sizes
   -------------------------------------------------------------------

   String_Hash_Size                 : constant := 2**8;
   -- Must be power of 2 and
   -- less than String_Table_Size.

   SPStackSize                      : constant := 256;
   SPErrLookahead                   : constant := 6;
   SPLocalErrLookahead              : constant := 3;

   Lex_Token_Lists_Max_Length       : constant := 16;
   ListsHeapSize                    : constant := 10000;
   MaxFilesOnCommandLine            : constant := 100;

   MaxErrorSetSize                  : constant := 9;
   MaxJustificationsPerFile         : constant := 300;

   ErrorBufferSize                  : constant := 5000;

   MaxPragmasInWarningFile          : constant := 120;

   FlowAnalysisMaxVarNumber         : constant := 10_000;
   StackManagerStackSize            : constant := 1000;

   SimpleListsSize                  : constant := 10000;
   WalkExpStackMax                  : constant := 1000;
   AggregateStackMax                : constant := 20;
   WalkStmtStackMax                 : constant := 100;
   MaxProcCallParams                : constant := 1000;
   WfCompilationUnitStackMax        : constant := 100;

   CompleteCheckSize                : constant := 32000;

   WalkAnnotationExpressionStackMax : constant := 1000;

   -- Address_Size is determined by GNATPREP definition file.
   -- Needs to be a typed static constant, so we can
   -- use it in a type declaration.
   Address_Size : constant Positive := $Address_Size;

end ExaminerConstants;
