raw
ffa_ch17_peh.kv         1 ------------------------------------------------------------------------------
ffa_ch17_peh.kv 2 ------------------------------------------------------------------------------
ffa_ch17_peh.kv 3 -- This file is part of 'Finite Field Arithmetic', aka 'FFA'. --
ffa_ch17_peh.kv 4 -- --
ffa_ch17_peh.kv 5 -- (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) --
ffa_ch17_peh.kv 6 -- http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html --
ffa_ch17_peh.kv 7 -- --
ffa_ch17_peh.kv 8 -- You do not have, nor can you ever acquire the right to use, copy or --
ffa_ch17_peh.kv 9 -- distribute this software ; Should you use this software for any purpose, --
ffa_ch17_peh.kv 10 -- or copy and distribute it to anyone or in any manner, you are breaking --
ffa_ch17_peh.kv 11 -- the laws of whatever soi-disant jurisdiction, and you promise to --
ffa_ch17_peh.kv 12 -- continue doing so for the indefinite future. In any case, please --
ffa_ch17_peh.kv 13 -- always : read and understand any software ; verify any PGP signatures --
ffa_ch17_peh.kv 14 -- that you use - for any purpose. --
ffa_ch17_peh.kv 15 -- --
ffa_ch17_peh.kv 16 -- See also http://trilema.com/2015/a-new-software-licensing-paradigm . --
ffa_ch17_peh.kv 17 ------------------------------------------------------------------------------
ffa_ch17_peh.kv 18 ------------------------------------------------------------------------------
ffa_ch17_peh.kv 19
ffa_ch17_peh.kv 20 with Limits; use Limits;
ffa_ch17_peh.kv 21 with FFA_RNG; use FFA_RNG;
ffa_ch17_peh.kv 22
ffa_ch17_peh.kv 23
ffa_ch17_peh.kv 24 package FFA_Calc is
ffa_ch17_peh.kv 25
ffa_ch17_peh.kv 26 -- Peh Tapes:
ffa_ch17_peh.kv 27 subtype Peh_Tape_Range is Positive range 1 .. Max_Peh_TapeSpace;
ffa_ch17_peh.kv 28 type Peh_Tapes is array(Peh_Tape_Range range <>) of Character;
ffa_ch17_peh.kv 29
ffa_ch17_peh.kv 30 -- Possible Verdicts of a non-erroneous Peh Tape run:
ffa_ch17_peh.kv 31 type Peh_Verdicts is (Yes, No, Mu);
ffa_ch17_peh.kv 32
ffa_ch17_peh.kv 33 -- Operator-Selectable Spatial and Time Dimensions of a Peh Machine:
ffa_ch17_peh.kv 34 type Peh_Dimensions is
ffa_ch17_peh.kv 35 record
ffa_ch17_peh.kv 36 Width : Positive;
ffa_ch17_peh.kv 37 Height : Positive;
ffa_ch17_peh.kv 38 TapeSpace : Peh_Tape_Range;
ffa_ch17_peh.kv 39 Life : Natural;
ffa_ch17_peh.kv 40 end record;
ffa_ch17_peh.kv 41
ffa_ch17_peh.kv 42 -- Valid indices into the Control Stack:
ffa_ch17_peh.kv 43 subtype ControlStack_Range is Natural range 0 .. Peh_Control_Stack_Size;
ffa_ch17_peh.kv 44 -- The 'zero' position, as with the Data Stack, indicates 'emptiness'
ffa_ch17_peh.kv 45 -- when pointed to by CSP ( see ffa_calc.adb ) and is never accessed.
ffa_ch17_peh.kv 46
ffa_ch17_peh.kv 47 -- Ensure that requested Peh Dimensions are permissible. Terminate if not.
ffa_ch17_peh.kv 48 procedure Validate_Peh_Dimensions(Dimensions : in Peh_Dimensions);
ffa_ch17_peh.kv 49
ffa_ch17_peh.kv 50 -- Start a Peh Machine with the given Dimensions and Tape; return a Verdict.
ffa_ch17_peh.kv 51 function Peh_Machine(Dimensions : in Peh_Dimensions;
ffa_ch17_peh.kv 52 Tape : in Peh_Tapes;
ffa_ch17_peh.kv 53 RNG : in RNG_Device) return Peh_Verdicts;
ffa_ch17_peh.kv 54
ffa_ch17_peh.kv 55 end FFA_Calc;