|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 4301 (0x10cd)
Types: TextFile
Names: »V«
└─⟦180fe333a⟧ Bits:30000405 8mm tape, Rational 1000, SW CATALOG, 10_20_0
└─⟦180fe333a⟧ Bits:30000537 8mm tape, Rational 1000, SW Catalog 10_20_0
└─⟦5cb1d1d7f⟧ »DATA«
└─⟦3b1ee7bd8⟧
└─⟦this⟧
-------- SIMTEL20 Ada Software Repository Prologue ------------
-- -*
-- Unit name : SET_PACKAGE
-- Version : 1.0
-- Author : Mike Linnig
-- : Texas Instruments Ada Technology Branch
-- : PO Box 801, MS 8007
-- : McKinney, TX 75069
-- DDN Address : linnig%ti-eg at csnet-relay
-- Copyright : (c)
-- Date created : 27 June 85
-- Release date : 27 June 85
-- Last update : 27 June 85
-- Machine/System Compiled/Run on : DG MV 10000 with ROLM ADE
-- DEC VAX 11/780 with DEC Ada
-- -*
---------------------------------------------------------------
-- -*
-- Keywords : SET, SET MANIPULATION
----------------:
--
-- Abstract : Set_Package contains a series of generic
----------------: routines which can be instantiated to create
-- routines which provide a series of set manipulation functions
-- for sets of enumeration or numeric objects. The functions in
-- Set_Package include:
-- set intersection
-- set union
-- set membership
-- set element count
-- and others
--
-- The code in this package was extracted from Chapter 15, Section 3
-- (15.3) of Grady Booch's Software Engineering with Ada book.
-- See 15.3 for further documentation on the functions.
--
-- -*
------------------ Revision history ---------------------------
-- -*
-- DATE VERSION AUTHOR HISTORY
-- 19850627 1.0 Mike Linnig Initial Release
-- -*
------------------ Distribution and Copyright -----------------
-- -*
-- This prologue must be included in all copies of this software.
--
-- This software is released to the Ada community.
-- This software is released to the Public Domain (note:
-- software released to the Public Domain is not subject
-- to copyright protection).
-- Restrictions on use or distribution: NONE
-- -*
------------------ Disclaimer ---------------------------------
-- -*
-- This software and its documentation are provided "AS IS" and
-- without any expressed or implied warranties whatsoever.
-- No warranties as to performance, merchantability, or fitness
-- for a particular purpose exist.
--
-- Because of the diversity of conditions and hardware under
-- which this software may be used, no warranty of fitness for
-- a particular purpose is offered. The user is advised to
-- test the software thoroughly before relying on it. The user
-- must assume the entire risk and liability of using this
-- software.
--
-- In no event shall any person or organization of people be
-- held responsible for any direct, indirect, consequential
-- or inconsequential damages or lost profits.
-- -*
-------------------END-PROLOGUE--------------------------------
generic
type Universe is (<>);
package Set_Package is
type Set is private;
Null_Set : constant Set;
function "*" (Set_1 : Set; Set_2 : Set) return Set;
function "+" (Element : Universe; Set_1 : Set) return Set;
function "+" (Set_1 : Set; Set_2 : Set) return Set;
function "+" (Set_1 : Set; Element : Universe) return Set;
function "-" (Set_1 : Set; Set_2 : Set) return Set;
function "-" (Set_1 : Set; Element : Universe) return Set;
function "<" (Set_1 : Set; Set_2 : Set) return Boolean;
function "<=" (Set_1 : Set; Set_2 : Set) return Boolean;
function Is_A_Member (Element : Universe; Of_Set : Set) return Boolean;
function Is_Empty (Set_1 : Set) return Boolean;
subtype Number is Integer range 0 .. (Universe'Pos (Universe'Last) -
Universe'Pos (Universe'First) + 1);
function Number_In (Set_1 : Set) return Number;
private
type Set is array (Universe) of Boolean;
Null_Set : constant Set := Set'(others => False);
end Set_Package;