------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. -- -- -- -- (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) -- -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html -- -- -- -- You do not have, nor can you ever acquire the right to use, copy or -- -- distribute this software ; Should you use this software for any purpose, -- -- or copy and distribute it to anyone or in any manner, you are breaking -- -- the laws of whatever soi-disant jurisdiction, and you promise to -- -- continue doing so for the indefinite future. In any case, please -- -- always : read and understand any software ; verify any PGP signatures -- -- that you use - for any purpose. -- -- -- -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . -- ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ with Limits; use Limits; with FFA_RNG; use FFA_RNG; package FFA_Calc is -- Peh Tapes: subtype Peh_Tape_Range is Positive range 1 .. Max_Peh_TapeSpace; type Peh_Tapes is array(Peh_Tape_Range range <>) of Character; -- Possible Verdicts of a non-erroneous Peh Tape run: type Peh_Verdicts is (Yes, No, Mu); -- Operator-Selectable Spatial and Time Dimensions of a Peh Machine: type Peh_Dimensions is record Width : Positive; Height : Positive; TapeSpace : Peh_Tape_Range; Life : Natural; end record; -- Valid indices into the Control Stack: subtype ControlStack_Range is Natural range 0 .. Peh_Control_Stack_Size; -- The 'zero' position, as with the Data Stack, indicates 'emptiness' -- when pointed to by CSP ( see ffa_calc.adb ) and is never accessed. -- Valid indices into the Subroutine Table: subtype Subroutine_Table_Range is Natural range 0 .. Subroutine_Table_Size; -- The 'zero' position indicates 'emptiness', as in the above. -- Ensure that requested Peh Dimensions are permissible. Terminate if not. procedure Validate_Peh_Dimensions(Dimensions : in Peh_Dimensions); -- Start a Peh Machine with the given Dimensions and Tape; return a Verdict. function Peh_Machine(Dimensions : in Peh_Dimensions; Tape : in Peh_Tapes; RNG : in RNG_Device) return Peh_Verdicts; end FFA_Calc;