From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,be21015280cacd24,start X-Google-Attributes: gid103376,public From: chico Subject: (no subject) Date: 1996/04/09 Message-ID: <4ke8pk$bua@post.tau.ac.il>#1/1 X-Deja-AN: 146579906 content-type: text/plain; charset=us-ascii organization: Bar Ilan University mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 1.1N (Windows; I; 16bit) Date: 1996-04-09T00:00:00+00:00 List-Id: I would Like to write an abstract package that will implement Sets in two ways, one with list and one with array, I need to declare a base type and then derive from it. doe's anybody has something like it or can help me write it.(I don't know how to write the spec for the the derived type) the base is : with Gnat.IO; use Gnat.IO; package Sets is generic type Set_Element is private; package Abstract_Sets is type Set is abstract tagged private; function Empty return Set is abstract; -- Empty Set function Unit (Element: Set_Elemet) return Set is abstract; -- build Set with 1 element function Union (Left, Right: Set) return Set is abstract; -- union of two sets function intersection (Left, Right: Set) return Set is abstract; -- intersection of two sets procedure Take (From: in out Set; Element: out Set_Elemet) is abstract; -- remove an element from a set private type Set is abstract tagged null record; end Abstract_Sets;