HDTenEightyP/NetNews huggingface dataset:
From: costello@mbunix.mitre.org (Costello)
Newsgroups: comp.lang.ada
Subject: Instantiating a Generic Pkg with a Variant Rcd
Date: 14 Aug 92 17:48:55 GMT
Article-I.D.: linus.1992Aug14.174855.6049
Distribution: usa
Organization: The MITRE Corp., Bedford, Ma.

Hi folks,
   I have the following situation:

(1) I have a generic (list handling) package
(2) I want to instantiate it with a variant record

eg. generic
      type Element_Type is private;
    Package Linked_List_Handler is
    ...

I want to instantiate this with the type:
   type Variant_Rcd (c : discr_type) is record
   ...
      case c is
   ...
      end case;
   end  record;

When I compile this I get the error:

>>>>SEMANTIC : Constrained subtype required <3.6.1:6>

I'm afraid that the LRM pages weren't very helpful (to me anyway).
Does this mean error that I cannot instantiate a generic pkg with
a variant record?  Note: when I put a default value with the 
discriminant in the variant record (i.e. c : discr_type := init_value)
then it compiles fine, but from testing it appears that the
generic pkg is working with the record that has c = init_value, and
is not variable (i.e. not really variant).  Could someone please
explain the finer points of generic pks with variant records?

Please mail responses directly to me at:
  
   costello@mitre.org

Thanks.  /Roger
From: nba1382@dsacng1.dsac.dla.mil (RHauser)
Newsgroups: comp.lang.ada
Subject: Seeking ADA Manuals
Keywords: ADA Help Manuals
Date: 12 Aug 92 18:27:27 GMT
Organization: Defense Logistics Service Center, Battle Creek, MI

I'm soliciting recommendations for Ada books for programmers with       
experience using other languages.  I am seeking books which can serve 
as tutorials, reference manuals, or for both purposes.  We have a copy of
"Ada as a second language" by Norman H. Cohen.  Please email your 
recommendations and comments.
From: gt1827a@prism.gatech.EDU (david daniell)
Newsgroups: comp.lang.ada
Subject: TEXT_IO.FILE_TYPE passing
Date: 18 Aug 92 16:55:48 GMT
Organization: Georgia Institute of Technology

First, thanks to everybody who responded to my question about an Ada
interrupt handler.  

My question now:
I am writing a simple procedure/function to open or create a file,
depending upon a parameter passed to it of type FILE_MODE.  Here's 
a simplified listing of what I have written:

   function OPEN_OR_CREATE_FILE (THE_MODE : FILE_MODE := IN_FILE)
             return FILE_TYPE is
      THE_FILE  : FILE_TYPE;
      FILE_NAME : STRING (80);
      INDEX     : NATURAL := 0;
      begin
         PUT ("Input file name:  ");
         GET_LINE (ITEM => FILE_NAME,
                   LAST => INDEX);
         if THE_MODE = IN_FILE then
            OPEN (FILE => THE_FILE,
                  MODE => IN_FILE,
                  NAME => FILE_NAME (1 .. INDEX));
         else
            CREATE (FILE => THE_FILE,
                    MODE => OUT_FILE,
                    NAME => FILE_NAME (1 .. INDEX));
         end if;
         return THE_FILE;
      end OPEN_OR_CREATE_FILE;

This compiles fine, but when I go to use it:
      INPUT_FILE := OPEN_OR_CREATE_FILE (THE_MODE => IN_FILE);
I get a compiler error stating that INPUT_FILE is not valid in an assignment
statement.  It was declared as type FILE_TYPE.  

I had similar troubles when I tried to make OPEN_OR_CREATE_FILE a procedure
with a parameter `THE_FILE : out FILE_TYPE'.  I'm fairly certain that this 
is because FILE_TYPE is limited private, but how can I get around this?  
Should THE_FILE be a global variable?  I don't want to have to OPEN/CREATE
a file in my main procedure, if possible, so how can I pass a variable of
type FILE_TYPE back to the main procedure?

I know this was sort of long and boring, but thanks in advance for any help
or advice.

-- 
David Daniell
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt1827a
Internet: gt1827a@prism.gatech.edu
Newsgroups: comp.lang.ada
From: tap@src.honeywell.com (Thomas A Peterson)
Subject: Need new idea to get around sunada 1.0 error
Organization: Honeywell Systems & Research Center
Date: Wed, 19 Aug 1992 18:56:09 GMT

I am using ayacc to develop a parser and have ran into a problem with
the Sun Ada 1.0 compiler returning an internal assertion error.

socrates: ada -O0 parser.a
internal: assertion error at file lreg.c, line 174
cg_ret: 1
socrates:

Parser.a contains a large case statement that is apparently larger
than what the compiler can handle. I have talked to a Verdix employee
about the problem and he told me to break up the case statement into
smaller case statements but this has not helped.

The case statement has 462 case statement alternatives each of which
contains about 3 statements. I have tried three approaches to get
around the problem so far but each still resulted in the same failure.

Has anyone else experienced this problem and found a way around it?

 1. Broke the single case statement down into about 90 smaller case
    statements, like the following chunk of code.

    case x is
    when 1 => statement1;
    when 2 => statement2;
    when 3 => statement3;
    when 4 => statement4;
    when 5 => statement5;
    when others => null;
    end case;
    ...

 2. Broke the single case statement down into 461 separate 'if
    statements', like the following chunk of code.

    if x = 1 then
      statement1;
    end if;
    if x = 2 then
      statement2;
    end if;
    ...

 3. Broke the single case statement down into one 'if then elsif
    statement', like the following chunk of code.

    if x = 1 then
      statement1;
    elsif x = 2 then
      statement2;
    ...
    end if;

Any suggestions would be very much appreciated.

Thanks, Tom
Newsgroups: comp.lang.ada
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Ada 9x Dispatching Question
Keywords: Ada Dispatching Polymorphism
Organization: Computer Science, University of Melbourne, Australia
Date: Tue, 18 Aug 1992 10:54:39 GMT

bwhite@cobra.camb.inmet.com (Bill White) writes:

>The MRT has discussed this at length in the past.  Tucker believes that
>it is important to have a syntactic marker to tell when a call is
>dispatching.  An alternative rule would be the C++ rule, where all
>dispatching operations dispatch always.  (Ada9X dispatching operations
>are roughly equivalent to C++ virtual operations.)  This means that the 
>compiler could not replace a dispatching call with a non-dispatching
>call even if the compiler knows where the routine is going to go
>anyway.  This is considered expensive.

I don't understand why the compiler can't replace a dispatching call
with a non-dispatching one if it really does know the exact type of
the operand.  This is quite possible in C++. Indeed, in C++ you can
declare a function to be both inline and virtual, so that if the
compiler manages to avoid the dispatch, it can then insert the code
directly and avoid any function call altogether.

For example, suppose BigCircle is derived from Circle.

	Circle c;	// An actual circle
	BigCircle b;	// BigCircle is-a circle
		
	Circle &c1 = c;	// A reference to a genuine circle 
	Circle &c2 = b; // A reference to a circle of some sort

	c2.draw();	// dispatches (needs to, since c2 actually refers
			// to a BigCircle not a Circle).

	c.draw();	// need not dispatch, since compiler knows the exact
			// type of c.

	c1.draw();	// will probably dispatch, since c1 is only a reference
			// to a Circle, not actually a Circle.
			// A clever compiler could deduce from the
			// initialization for c1 that it actually refers to a
			// genuine Circle and avoid dispatching, but current
			// compilers aren't that smart I suspect.

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature VIRUS is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
From: sjs@sbphy.physics.ucsb.edu (Steve J. Schmidhauser)
Newsgroups: comp.lang.ada
Subject: ftp site for Ref. Man. for Ada prog lang
Keywords: ada
Date: 17 Aug 92 22:05:13 GMT

I am looking for ftp site for the Reference Manual for the Ada
Programming Language ( ANSI/MIL-STD-1815A-1983 ) TIA
--
Steve Schmidhauser               |  INTERNET: sjs@sbphy.physics.ucsb.edu
LTA Santa Barbara City College   |  INTERNET: 2209schm@ucsbuxa.ucsb.edu
721 Cliff Dr, S.B.,CA 93109      |  PHONE: (805)965-0581 x2401
Newsgroups: comp.lang.ada
From: reashore@hac2arpa (Frank Reashore)
Newsgroups: comp.lang.ada
Subject: (none)
Date: 12 Aug 92 17:37:58 GMT
Distribution: world
Organization: The Internet
From: agnew@ast.saic.com (Robert Allen Agnew)
Newsgroups: comp.lang.ada
Subject: Re: Need new idea to get around sunada 1.0 error
Date: 20 Aug 92 14:47:30 GMT
Organization: SAIC

In article <1992Aug19.185609.10211@src.honeywell.com> tap@src.honeywell.com (Thomas A Peterson) writes:
>I am using ayacc to develop a parser and have ran into a problem with
>the Sun Ada 1.0 compiler returning an internal assertion error.
>
>socrates: ada -O0 parser.a
>internal: assertion error at file lreg.c, line 174
>cg_ret: 1
>socrates:
>
>Parser.a contains a large case statement that is apparently larger
>than what the compiler can handle. I have talked to a Verdix employee
>about the problem and he told me to break up the case statement into
>smaller case statements but this has not helped.
>
>The case statement has 462 case statement alternatives each of which
>contains about 3 statements. I have tried three approaches to get
>around the problem so far but each still resulted in the same failure.
>
>Has anyone else experienced this problem and found a way around it?
>
>Any suggestions would be very much appreciated.
>
>Thanks, Tom


Here's the way I've solved it. It's not efficient, but as I was bootstrapping,
I didn't care! Replace the case statement with two or more procedure calls,
each of which contains a smaller case statement. Extra work at compile time,
but it works in most cases as procedures are compiled with fresh table
allocations in most compilers.

agnew@actd.saic.com
From: crispen@efftoo.boeing.com (crispen)
Newsgroups: comp.lang.ada
Subject: MI last time
Date: 21 Aug 92 13:16:24 GMT
Distribution: world
Organization: The Internet

wellerd@ajpo.sei.cmu.edu (David Weller) says:

>  I believe that MI is useful, but I also
>believe that the 9X solution is reasonable.  As Grady Booch has said,
>multiple inheritance is like a parachute -- you don't always need it,
>but when you do, you're quite happy to have it.

And Peter Herman follows up:

>correct. You need a parachute in the worst case only.

What I'm trying to find out is in what domain a parachute is a reasonable
thing to have.  That is, I do accept the need for domain-specific
architectures.  The only question, then, is whether there exists at
all a problem domain for which MI is a necessary component of a
sensible architecture.

I have heard from one person who believes that MI helped in the
windowing systems of Symbolics and LMI Lisp machines, and I certainly
am not knowledgeable enough about that domain to know if MI was a real
help or not (I will post a summary of email responses to me, to save
traffic in this group, BTW).  This is the domain I have always seen as
an example when MI is touted.

So, is MI worthwhile in any other domains?  Or was MI even worthwhile
in that domain?

Dave also asks:

>Have you crossposted to comp.lang.c++ and comp.object? 

I have asked one person to crosspost my remarks to comp.lang.c++
since I only have mailing list access to the Ada newsgroup and don't
have write access to Usenet news.  If it doesn't show up there after
a while, I'll ask someone else.  I would rather not have everybody
crosspost it for me, though ;-)

Bob Crispen
crispen@foxy.boeing.com
From: crispen@efftoo.boeing.com (crispen)
Newsgroups: comp.lang.ada
Subject: Multiple Inheritance -- the last post?
Date: 19 Aug 92 15:57:06 GMT
Distribution: world
Organization: The Internet

It's now been two weeks since I asked people who had actually used
multiple inheritance on a non-toy-sized project to respond.  The only
mail I got was from someone else who suspected as I did that MI
is a trendy, academic, dangerous solution vainly in search of a problem,
and certainly not a requirement for working engineers using any future
version of Ada.

Having just stated the issue as belligerently as I know how, I now ask
people who think MI is a Good Thing, and who have experience to back
up that judgement, to come forward.  Come on, one last time, or let's
consider MI a plaything, not worthy of the attention of serious people.

Bob Crispen
crispen@foxy.boeing.com
Newsgroups: comp.lang.ada
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Seventh ASEET Call for Papers
Originator: mfeldman@seas.gwu.edu
Organization: George Washington University
Date: Fri, 21 Aug 1992 19:28:32 GMT

Seventh Annual ASEET Symposium
Call for Papers

12-14 January 1993
Monterey, CA


Ada education and training must focus on the use of good software
engineering techniques and practices in order to be effective.  Ada by
itself does not guarantee good software design or development.  Only
when Ada is taught in the context ofgood software engineering
practices do gains accrue.  In order to enhance the development of Ada
software engineering education and training, the Ada Software
Engineering Education and Training(ASEET) Team is sponsoring the
SixthAnnual ASEET Symposium.  This year's theme is"Ada Education and
Training:  Experiences and Techniques."
 
Papers which describe new software engineering education and training
techniques using Ada or report on teaching experiences using good
software engineering concepts (including sample courseware, completed
projects, and course syllabi) are sought.
 
Topics and areas of interest include:
    o   Computer-Aided Software Engineering
    o   Development of an Ada Curriculum
    o   Training the Trainer
    o   Transitioning to Ada
    o    Ada Training in the DoD
    o   Object-Oriented Requirements Analysis and Design
 
Authors are invited to prepare an extended abstract (2-4 pages) and
submit five copies of the abstract to the Program Chair by 15 September
1992.  Authors of accepted papers will be notified by 5 October 1992
with the full papers in camera ready form due to the Program Chair by
11 December 1992.  Proceedings will be published and distributed at
the symposium.
 
Papers must be original and of high quality.  All submitted abstracts
will be anonymously refereed for their significance, clarity and
originality.  Submission of an abstract is considered evidence that
the author has obtained clearance from his organization for
publication, that the author (if selected) will prepare a full paper
and present it at the symposium, and that the paper will not be
presented at any other symposium.
 
Program Chair:
 
Catherine W. McDonald
Institute for Defense Analyses
1801 N. Beauregard Street
Alexandria, VA 22311-1772
703-845-6626
703-845-6848 (fax)
mcdonald@ajpo.sei.cmu.edu
 


Newsgroups: comp.lang.ada
From: fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: Ada 9x Dispatching Question
Keywords: Ada Dispatching Polymorphism
Organization: Computer Science, University of Melbourne, Australia
Date: Fri, 21 Aug 1992 17:17:56 GMT

stt@spock.camb.inmet.com (Tucker Taft) writes:

>In article <9223120.6784@mulga.cs.mu.OZ.AU> 
>fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
>
>>bwhite@cobra.camb.inmet.com (Bill White) writes:
>>
>>>Tucker believes that
>>>it is important to have a syntactic marker to tell when a call is
>>>dispatching.  An alternative rule would be the C++ rule, where all
>>>dispatching operations dispatch always.  (Ada9X dispatching operations
>>>are roughly equivalent to C++ virtual operations.)  This means that the 
>>>compiler could not replace a dispatching call with a non-dispatching
>>>call even if the compiler knows where the routine is going to go
>>>anyway.  This is considered expensive.
[...]
>The Ada 9X approach is consistent with the way derived types
>work in Ada 83, with the addition of the "class-wide" alternative.

So am I correct in understanding that the reason for having the syntactic
marker is to maintain consistency with the rest of the language, rather
than because the alternative are "considered expensive"?

>S. Tucker Taft   stt@inmet.com

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature VIRUS is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
From: fortin@nosc.mil (Richard G. Fortin)
Newsgroups: comp.lang.ada
Subject: Ada tasking overhead
Keywords: tasking
Date: 18 Aug 92 23:35:52 GMT
Organization: Naval Ocean Systems Center, San Diego, CA

Hello,

We were wondering if anyone has done a tasking overhead study with the latest
version of the Verdix Ada compiler (even more interested if it was VADSworks)?
We're not real concerned with rendevouz, more with task start-up and teardown.

Thanks,
Richard Fortin                  | fortin@manta.nosc.mil
SAIC, Engineering Systems Group |--------------------------------
10770 Wateridge Circle          |It is easier to criticize than
San Diego, CA 92121             |to be correct.
Xref: sparky comp.lang.ada:2353 comp.software-eng:3189
From: hayes%valkris@hac2arpa.hac.com (Brian Hayes 74-35 x65129)
Newsgroups: comp.lang.ada,comp.software-eng
Subject: AutoCode by Integrated Systems
Summary: Seeking info regarding AutoCode
Date: 12 Aug 92 20:59:44 GMT
Organization: Hughes Aircraft Company, EDSG
Originator: hayes@valkris

While reading IEEE Software, May 1992, I stumbled upon a summary of
a code generator called AutoCode by Integrated Systems (needless to 
say, I was a bit disappointed since I have done some work along 
the same lines).  

My question is: Has anyone had experience with this product?

Thanks.

| Brian Hayes		| Is completeness checking a necessary  |
| (310) 616-5129	| criterium for a rigorous methodology?	|
| hayes@hac2arpa.hac.com| <standard disclaimer here>		|
-- 
| Brian Hayes		| "One person's requirement is another	|
| (310) 616-5129	|  person's design." - I.A.Pirbahi	|
| hayes@hac2arpa.hac.com| <standard disclaimer here>		|
From: beidler@guinness.cs.uofs.edu (Jack Beidler)
Newsgroups: comp.lang.ada
Subject: Instanciation
Date: 21 Aug 92 18:26:04 GMT
Distribution: usa
Organization: Department of Computing Sciences

With regard to :

>I've got a package which I'm currently coding which uses a static data
>structure (an array of records to be precise).  Now, this package is an
>ADT with a private data type.
>     
>I want to be able to modify the size of this array from within a client
>program at runtime.
>     
>Can anyone suggest how I might be able to go about this?
>     
>Thanks.
>     
>Cheers,
>%Ben%

The obvious choice is make your structured object available as a 
private type with a discriminant, as in 

    generic
         type Object_Type is private ;
    package Stack_Pt_Pt is

        type Stack_Type (Size : positive := 20) is private ;

          ....

and use the discriminat to determine the size of the stack

    private

       type stack_array is array ( positive range <>) of Object_Type;

       type Stack_Type (Size : positive := 20) is 
         record
            Top   : natural := 0 ;
            Actual: Stack_Array (1 .. Size) ;
         end record ;

Once the package is instantiated, 

       Int_Stack is new Stack_Pt_Pt (integer) ;
       use Int_Stack ;

stacks of various sizes may be declared,

        Short_Stack : Stack_Type (4) ;
        Big_Stack    : Stack_Type (1000) ;
-
-- 
+------------------------------------------------------------------+
|  John (Jack) Beidler				                   |
|  Prof. of Computer Science Internet: BEIDLER@JAGUAR.UOFS.ED      |
|  University of Scranton              beidler@guinness.cs.uofs.edu|
|  Scranton, PA 18510	      Bitnet : BEIDLER@SCRANTON            |
|                                                                  |
|          Phone: (717) 941-7446	 FAX:   (717) 941-4250     |
+------------------------------------------------------------------+
From: reashore@HAC2ARPA.HAC.COM (Frank Reashore)
Newsgroups: comp.lang.ada
Subject: Encoding Fixed Point Types with ASN.1
Date: 12 Aug 92 18:14:21 GMT
Distribution: world
Organization: The Internet

I would like to transfer Ada data structures between two heterogeneous
nodes using OSI. OSI provides mechanisms (Abstract Syntax Notation One
and Basic Encoding Rules) for encoding data types in a vendor-neutal
format. That will probably work fine for types like integers and floats,
but how are fixed point types encoded?

Frank

----------------------------------------------------------------------------

Frank J. Reashore                       address: reashore@hac2arpa.hac.com
Hughes Aircraft of Canada Ltd.                 
Systems Division                        phone:   (604) 279-5787 (W)
13951 Bridgeport Road                            (604) 732-8271 (H)
Richmond BC                             
Canada V6V 1J6                          fax:     (604) 279-5792 

Put_Line("Never mistake as malice that which can be explained as stupidity.");
Newsgroups: comp.lang.ada
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Multiple Inheritance -- the last post?
Organization: George Washington University
Date: Sat, 22 Aug 1992 22:18:40 GMT

In article <9208211503.AA12854@efftoo.boeing.com> crispen@efftoo.boeing.com (crispen) writes:
>seas.gwu.edu!mfeldman@uunet.uu.net (Mike Feldman) says:
>
>>It's time for a little bridge building in the otrher direction - high time, 
>>in my opinion. I am getting rather bored with hearing the word "academic" 
>>thrown around with the derision that conservatives reserve for the word 
>>"liberal."
>
>I will certainly withdraw the word, since my belligerence was intended
>to raise the visibility of the issue, not to have people take issue
>with the manner in which it was stated.  Looking back, it was probably
>a bad idea, though I note that the first, less outrageous posting of
>this question raised only a single email note to me while the second
>has filled my mailbox nicely (I promise to summarize).
>
All is forgiven. I just get hot under the collar when industry folks
label anything they don't understand, or think is risky, as academic.
These are separate traits. Thanks for the recognition of such.

Mike Feldman
Newsgroups: comp.lang.ada
Subject: Someone Please HELP!!!
From: mgeorgy@vmsclst1.sc.csupomona.edu
Date: 17 Aug 92 09:07:40 PDT
Organization: Computer Science Computational Systems
Nntp-Posting-User: mgeorgy

Someone please help!!!

I am writing a program for the PC using the Meridian ADA Compiler.  This
program interfaces with the printer (ie output to PRN).  Anyways I would
like to control the output (ie font, size, style).  The Epson printer that
I am using allows me to do that by sending a certain string to the printer,
the problem is that the examples in the book are in BASIC and I can't get
the compiler to understand what I'm telling it.  Any Reccomendations!!!

Matt Georgy
California State Polytechnic University, Pomona --Computer Science

Newsgroups: comp.lang.ada
From: mahesh@evb.com (B.G. Mahesh)
Subject: TeleSoft ada compiler : beginner's questions
Reply-To: mahesh@evb.com
Organization: SETT Inc.
Affiliate-Of: EVB Software Engineering, Inc.
Distribution: usa
Date: Mon, 17 Aug 1992 13:57:07 GMT


I have used only SunAda1.1 compiler and I am in the 
process of compiling ada programs with Alsys and TeleSoft
ada compiler.

I want to compile from the command line instead of using
the GUI. I would like to know the commands to be used from
the command line to create a library before I start compiling
a program (similar to "a.mklib" Sunada). If I try to compile
a program using the TeleSoft compiler,

widget(2)% ada search_program.a
Cannot Access liblst : liblst.alb

If some gurus on the net could give me a quick tutorial
about TeleSoft (Alsys tutorial too welcome !) compiler it would
be of great help to me. Please respond by email only.

thanks

-- 

B.G. Mahesh
mahesh@evb.com
Newsgroups: comp.lang.ada