comp.lang.ada
 help / color / mirror / Atom feed
From: Lucas Redding <lucas.redding@gmail.com>
Subject: Re: Addressing in Object Ada v/s GNAT (2013) showing Vast Differences
Date: Tue, 8 Sep 2015 00:27:10 -0700 (PDT)
Date: 2015-09-08T00:27:10-07:00	[thread overview]
Message-ID: <df098e2d-2572-4602-9e60-04bda3bfade2@googlegroups.com> (raw)
In-Reply-To: <mskbhr$67s$1@dont-email.me>

On Monday, September 7, 2015 at 4:49:01 PM UTC+1, Jeffrey R. Carter wrote:
> On 09/07/2015 04:39 AM, Lucas Redding wrote:
> > 
> > I have a program that runs perfectly in Object Ada. The program relies
> > heavily on "USE AT" clauses together with 'SIZE on underlying type
> > definition. This is in order to map directly and deterministically to memory
> > with bit precision. The data is independently produced so this is very
> > important.
> 
> "Use at" is the Ada-83 mechanism for specifying an object's address; since Ada
> 95 the form
> 
> for V'Address use A;
> 
> is preferred, and "use at" is considered obsolete. I would guess, then, that
> this program has been around for quite a while, having originally been Ada 83,
> and that there has been on-going effort to port it to new hardware, OS versions,
> and compilers to keep it available.
> 
> Addresses are something that are platform and compiler dependent. It probably
> took a fair amount of effort to understand how Object Ada lays things out in
> memory to get to the version you currently have. A similar amount of effort
> should be expected to understand GNAT's approach to these things and to modify
> the representation clauses to achieve the same representation as OA. You've
> already found that GNAT wants to align things differently from OA, so specifying
> non-default alignments may be necessary.
> 
> -- 
> Jeff Carter
> "Why, the Mayflower was full of Fireflies, and a few
> horseflies, too. The Fireflies were on the upper deck,
> and the horseflies were on the Fireflies."
> Duck Soup
> 95

Thanks Jeff. 

Good guess. Yes it has been around quite long.

You confirmed my worst fears, re Addressing is compiler dependent. I knew I had read that somewhere but I did not expect there to be such a big difference if you had made full use of the language facilities which on their own seem to specify a great deal of precision in mapping to memory. 

I need to draw a balance between the effort of porting the application and the gain in productivity after porting it. After all, it works on OA with no extra effort (only without the richness of the features offered by GNAT) The more effort it takes to port it the weaker the attraction.

I have tried the -gnatR that GB kindly suggested. I am now studying the information to measure the amount of effort required to port. I am still hoping my expectations are somehow correct (re make full use of the language facilities for mapping on to memory makes the mapping precise).

I shall report back when I have made a decsion.

Thanks agaion

LR

  reply	other threads:[~2015-09-08  7:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 11:39 Addressing in Object Ada v/s GNAT (2013) showing Vast Differences Lucas Redding
2015-09-07 11:54 ` Lucas Redding
2015-09-07 14:04   ` G.B.
2015-09-07 16:02     ` Lucas Redding
2015-09-07 16:28       ` Anh Vo
2015-09-08  7:30         ` Lucas Redding
2015-09-08 15:11           ` Anh Vo
2015-09-08 17:20           ` Jeffrey R. Carter
2015-09-07 17:20   ` Pascal Obry
2015-09-07 17:21   ` Pascal Obry
2015-09-08  7:04     ` Lucas Redding
2015-09-07 21:02   ` Niklas Holsti
2015-09-08  8:00     ` Lucas Redding
2015-09-07 15:48 ` Jeffrey R. Carter
2015-09-08  7:27   ` Lucas Redding [this message]
2015-09-08  7:12 ` Markus Schöpflin
2015-09-08  8:05   ` Lucas Redding
2015-09-10 10:47 ` Lucas Redding
2015-09-10 12:34   ` G.B.
2015-09-21 11:12     ` Lucas Redding
2015-09-21 11:57       ` Jacob Sparre Andersen
2015-09-21 13:22         ` Lucas Redding
2015-09-21 13:47           ` Jacob Sparre Andersen
2015-09-21 13:52           ` Georg Bauhaus
2015-09-21 15:54             ` Lucas Redding
2015-09-22 17:49               ` Jacob Sparre Andersen
2015-09-22 18:45               ` Jacob Sparre Andersen
2015-10-01  6:50                 ` Lucas Redding
2015-09-21 16:48       ` Dmitry A. Kazakov
2015-10-01  7:25         ` Lucas Redding
2015-10-01 20:04           ` Randy Brukardt
replies disabled

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