comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert C. Leif" <rleif@rleif.com>
Subject: RE: runtine instanciation
Date: Sun, 16 Jun 2002 20:16:25 -0700
Date: 2002-06-16T20:16:25-07:00	[thread overview]
Message-ID: <mailman.1024283825.12319.comp.lang.ada@ada.eu.org> (raw)
In-Reply-To: <aehr7g$716kk$1@ID-77047.news.dfncis.de>

From: Bob Leif
To: Dmitry Kazakov et al.
I suspect that in many cases there is a very straightforward approach to
accomplish the equivalent of runtime instantiation. In my own work on
the creation of a new bioinformatics standard, CytometryML, I have a
requirement to create an array of records, which can have up to 15
fields. Each of the data types for the fields (parameters) will be
represented by a compiled package with a complete set of specific
operations. However, the user (customer) at runtime will have the
prerogative of selecting from 1 to 15 of these parameters to include in
the record. Fortunately, this is directly analogous to the creation of
the data type in a database. It does NOT have to occur instantaneously.
Conceivably, the user could wait about a minute for this to occur. I
would like to be able to compile and link the instantiation of the
record and the array. Parenthetically, I am quite willing, if need be,
to precompile 15 generic packages of records, which have from one to
fifteen fields and instantiate only one of them. The 15 generic records
perhaps could also be included in one package.

Another similar problem, is to create a calculation program in Ada that
is very general for evaluating a mathematical expression. If the
expression can be converted to an Ada function, why not just compile it?

I believe Rational and DEC had incremental compilers. Could this
facility be made available, even in a space inefficient form, in one of
the Ada 95 compilers? This approach has a significant potential
commercial benefit for the vendors. It would require a runtime version
of their compilers, which could be licensed for a fee to be ultimately
paid by the end users of the program.

Before any of the real-time enthusiasts become upset by this proposal,
please remember, that this is not to be applied to the run-time
operations of mission critical applications where execution time and
scheduling are important.

-----Original Message-----
From: comp.lang.ada-admin@ada.eu.org
[mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Dmitry A.Kazakov
Sent: Sunday, June 16, 2002 4:07 PM
To: comp.lang.ada@ada.eu.org
Subject: Re: runtine instanciation

Immanuel Scholz wrote:

> Hello again,
> 
> In Ada, can create a class at runtime? Like the getClass().forClass()
in
> Java.
> 
> As example create a variable from the type entered by the user at
runtime.

I am not sure what you want, but I suppose that Ada.Streams is what you 
need. In short it allows you to create a class-wide object from some 
external source (like user input) without a factory. Or better to say
the 
factory is distributed over the implementations of 'Input/'Read
attributes.

-- 
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de




  reply	other threads:[~2002-06-17  3:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-15 11:43 runtine instanciation Immanuel Scholz
2002-06-15 15:20 ` Simon Wright
2002-06-16 23:07 ` Dmitry A.Kazakov
2002-06-17  3:16   ` Robert C. Leif [this message]
2002-06-17 22:04     ` Dmitry A.Kazakov
2002-06-17 14:54       ` Robert C. Leif
2002-06-17 21:16         ` Robert I. Eachus
2002-06-18 22:35         ` Dmitry A.Kazakov
2002-06-17 10:07   ` Antonio Duran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox