comp.lang.ada
 help / color / mirror / Atom feed
* Hi all. Novice question.
@ 1999-09-04  0:00 G
  1999-09-04  0:00 ` Matthew Heaney
  1999-09-07  0:00 ` Hi all. Novice question Nick Roberts
  0 siblings, 2 replies; 7+ messages in thread
From: G @ 1999-09-04  0:00 UTC (permalink / raw)


I made the regrettable mistake of posting a message here about a year
ago whilst
I may have been a little intoxicated.

Ever since, all my messages are deleted by some automated process set up
by the
webmaster/sysop.  So... I still have questions and I will try to ask
them.

I am interested in designing simulations.  I have a philosophical
interest in ontology (the study of being and existence) and I believe
that this relates to entities and objects in programming.  I am using
things like ada and xml to elaborate other concepts - the structures of
the languages help with organisation of ideas, etc.  The XMLspy editor
is great for playing with design concepts and ada is useful to elaborate
a logical structure even if it is not going to be employed in an actual
program.

I am a novice... so please do not shoot me down in flames for doing
something
completely anathema to ada principles .

I got the M1A2 specifications from army-technology.com so don't wet
yourself if you think
I shouldn't write it here.  (Someone noted previously something of a
"precious" atmosphere here at times).

Anyway - I wanted to try and delineate an "object".  This was written
over a half-hour period and as a novice I still understand little of ada
but can anyone tell me if it makes sense to define an object like this.
I realise that there are many issues with
type definition and which variables should be constant but I just want
to know if it makes sense to define something this way - it compiles
fine on GNAT.  I also realise that many of the variables in this sort of
thing would be of types in external packages -
but I am a novice, in this field at least.  I have no idea if making
this type (M1A2_Abrams) private means that it could not
be instantiated in a program.  I have not got that far.

It is not supposed to be a credible package definition, just a
(relatively) sensible one.


This (Ada95) package spec and body:

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

   package M1A2_Abrams is

      private type M1A2_Abrams;

   end M1A2_Abrams;

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

package body M1a2_Abrams is

   type Physical_Specification is new Float;

   type Weapon_Specification is (M256_120_00mm_Smooth_Bore_Cannon,
      M240_7_62mm_Machine_Gun, M240_7_62mm_Machine_Gun_Skate_Mount,
      M2_0_50mm_Machine_Gun);

   type Mobility_Specification is new Float;

   type Engine is (Gas_Turbine);

   type Transmission is (Hydro_Kinetic);

   type Misc_Parameters is (Nbc_System);

   type Crew is new Integer;

   -- Type => M1a2 Abrams
   type M1a2_Abrams is
   record
      -- Type => Physical_Specification.
      Weight : Physical_Specification := 69.54;             -- tons
      Length_Gun_Forward : Physical_Specification := 387.0; -- inches
      Turret_Height : Physical_Specification := 93.5;       --
      Width : Physical_Specification := 144.0;              --
      Ground_Pressure : Physical_Specification := 15.4;     -- PSI
      Power_Weight_Ratio : Physical_Specification := 21.6;  -- hp/ton

      -- Type => Weapon_Specification.
      Main_Armament : Weapon_Specification :=
M256_120_00mm_Smooth_Bore_Cannon; -- 120 mm
      Coaxial_Weapon : Weapon_Specification :=
M240_7_62mm_Machine_Gun;         -- 7.62 mm
      Loaders_Weapon : Weapon_Specification :=
M240_7_62mm_Machine_Gun_Skate_Mount;
      Commanders_Weapon : Weapon_Specification :=
M2_0_50mm_Machine_Gun;        -- .50 mm

      -- Type => Mobility_Specification.
      -- Conversion to metric pending.
      Maximum_Speed : Mobility_Specification := 42.0;        -- 42.0 mph
(Governed)
      Cross_Country_Speed : Mobility_Specification := 30.0;  -- mph
      Speed_10pc_Slope : Mobility_Specification := 17.0;     -- mph
      Speed_60pc_Slope : Mobility_Specification := 4.1;      -- mph
      Acceleration_0_To_20 : Mobility_Specification := 7.2;  -- seconds
      Cruising_Range : Mobility_Specification := 265.0;      -- miles
      Obstacle_Crossing : Mobility_Specification := 42.0;    -- inches
      Vertical_Trench : Mobility_Specification := 9.0;       -- feet

      -- Type => Engine.
      M1a2_Engine : Engine := Gas_Turbine;


      -- Type => Transmission.
      M1a2_Transmission : Transmission := Hydro_Kinetic;

      -- Type => Misc_Parameters.
      M1a2_Air_Control : Misc_Parameters := Nbc_System;  -- Clean,
cooled air

      -- Type => Crew.
      M1a2_Crew : Crew := 4;

   end record;


end M1a2_Abrams;


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



-- I am teaching myself this stuff, so understand that before you grill
me.
-- Any feedback is useful.  Can an object be defined as a record like
this and
-- does it make sense to do so (?).



-- GM WALLACE
-- (does volunteer work online for welfare organisations)
-- AUSTRALIA





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hi all. Novice question.
  1999-09-04  0:00 Hi all. Novice question G
@ 1999-09-04  0:00 ` Matthew Heaney
  1999-09-07  0:00   ` Idiots (was Re: Hi all. Novice question.) Mark Lundquist
  1999-09-07  0:00 ` Hi all. Novice question Nick Roberts
  1 sibling, 1 reply; 7+ messages in thread
From: Matthew Heaney @ 1999-09-04  0:00 UTC (permalink / raw)


In article <37D0D701.90F1B6F0@interact.net.au> , G <Dizzy@interact.net.au>
wrote:

> I am interested in designing simulations.  I have a philosophical
> interest in ontology (the study of being and existence) ...

Me too.  I also have an interest in the philosophy of science, especially
now because of those creationist pinheads in Kansas.

> ... and I believe that this relates to entities and objects in programming.

Indeed it does.

Actually, biology relates to programming too.  The study of evolution of
natural systems (Darwinian theory) can be most helpful in understanding the
evolution of artificial systems, especially large, complex software systems.
Manny Lehman wrote a whole book on the subject.

But the programmers who grow up in Kansas will never know this, because
those idiots on the Kansas State Board of Education decided that Darwinian
evolutionary theory doesn't need to be taught!

> I am a novice... so please do not shoot me down in flames for doing something
> completely anathema to ada principles.

I'll be nice.  ;^)

>    package M1A2_Abrams is
>
>       private type M1A2_Abrams;

This should be

   type M1A2_Abrams_Type is private;
   -- if you want assignment, i.e. Tank_1 := Tank_2

or

   type M1A2_Abrams_Type is limited private;
   -- if you don't want assignment

or

   package Tanks is

      type Root_Tank_Type is abstract tagged limited private;

   end Tanks;

   package Tanks.M1A2_Abram is

      type Tank_Type is new Root_Tank_Type with private;


However, you're going to have declare the full view of the type in the
private region of the spec:

   package M1A2_Abrams is

      type Tank_Type is limited private;

      <tank ops = "things you can tell a tank to do">

   private

      type Tank_Type is
         limited record
            <tank attributes>
         end record;

   end M1A2_Abrams;


>    end M1A2_Abrams;
>
> -------------------------------
>
> package body M1a2_Abrams is
>
>    type Physical_Specification is new Float;
>
>    type Weapon_Specification is (M256_120_00mm_Smooth_Bore_Cannon,
>       M240_7_62mm_Machine_Gun, M240_7_62mm_Machine_Gun_Skate_Mount,
>       M2_0_50mm_Machine_Gun);
>
>    type Mobility_Specification is new Float;
>
>    type Engine is (Gas_Turbine);
>
>    type Transmission is (Hydro_Kinetic);
>
>    type Misc_Parameters is (Nbc_System);
>
>    type Crew is new Integer;

All these supplementary types should probably go in the somewhere in the
spec.

>    -- Type => M1a2 Abrams
>    type M1a2_Abrams is
>    record
>       -- Type => Physical_Specification.
>       Weight : Physical_Specification := 69.54;             -- tons
>       Length_Gun_Forward : Physical_Specification := 387.0; -- inches
>       Turret_Height : Physical_Specification := 93.5;       --
>       Width : Physical_Specification := 144.0;              --
>       Ground_Pressure : Physical_Specification := 15.4;     -- PSI
>       Power_Weight_Ratio : Physical_Specification := 21.6;  -- hp/ton
>
>       -- Type => Weapon_Specification.
>       Main_Armament : Weapon_Specification :=
> M256_120_00mm_Smooth_Bore_Cannon; -- 120 mm
>       Coaxial_Weapon : Weapon_Specification :=
> M240_7_62mm_Machine_Gun;         -- 7.62 mm
>       Loaders_Weapon : Weapon_Specification :=
> M240_7_62mm_Machine_Gun_Skate_Mount;
>       Commanders_Weapon : Weapon_Specification :=
> M2_0_50mm_Machine_Gun;        -- .50 mm
>
>       -- Type => Mobility_Specification.
>       -- Conversion to metric pending.
>       Maximum_Speed : Mobility_Specification := 42.0;        -- 42.0 mph
> (Governed)
>       Cross_Country_Speed : Mobility_Specification := 30.0;  -- mph
>       Speed_10pc_Slope : Mobility_Specification := 17.0;     -- mph
>       Speed_60pc_Slope : Mobility_Specification := 4.1;      -- mph
>       Acceleration_0_To_20 : Mobility_Specification := 7.2;  -- seconds
>       Cruising_Range : Mobility_Specification := 265.0;      -- miles
>       Obstacle_Crossing : Mobility_Specification := 42.0;    -- inches
>       Vertical_Trench : Mobility_Specification := 9.0;       -- feet
>
>       -- Type => Engine.
>       M1a2_Engine : Engine := Gas_Turbine;
>
>
>       -- Type => Transmission.
>       M1a2_Transmission : Transmission := Hydro_Kinetic;
>
>       -- Type => Misc_Parameters.
>       M1a2_Air_Control : Misc_Parameters := Nbc_System;  -- Clean,
> cooled air
>
>       -- Type => Crew.
>       M1a2_Crew : Crew := 4;
>
>    end record;


This looks like it should go in the private part of the spec.

> end M1a2_Abrams;

> I am teaching myself this stuff, so understand that before you grill me.
> Any feedback is useful.  Can an object be defined as a record like this and --
> does it make sense to do so (?).

You should probably spend a few hours with an Ada tutorial.  Try Lovelace,
or some other one.  They're all available at the adahome and adapower pages;
just follow the tutorial links.

<http://www.adahome.com/>
<http://www.adapower.com/>

--
Matt

It is impossible to feel great confidence in a negative theory which has
always rested its main support on the weak points of its opponent.

Joseph Needham, "A Mechanistic Criticism of Vitalism"




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hi all. Novice question.
  1999-09-04  0:00 Hi all. Novice question G
  1999-09-04  0:00 ` Matthew Heaney
@ 1999-09-07  0:00 ` Nick Roberts
  1999-09-08  0:00   ` Hi all. Novice question. from an idiot G
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Roberts @ 1999-09-07  0:00 UTC (permalink / raw)


Fascinating, Captain!

GMW, I think, at the very least, there some vital questions you have got to
answer: how does the study of ontology (which, incidentally, I am myself
very interested in) relate to computers; what are you actually trying to
achieve with your Ada program; might another (higher level) programming
language be more suited to your needs?

I'm afraid I think you'll find most of the denizens of this newsgroup highly
sceptical about your post, unless you can make it a bit more coherent, and
focused in on a genuine Ada problem.

-------------------------------------
Nick Roberts
http://www.adapower.com/lab/adaos
-------------------------------------








^ permalink raw reply	[flat|nested] 7+ messages in thread

* Idiots (was Re: Hi all. Novice question.)
  1999-09-04  0:00 ` Matthew Heaney
@ 1999-09-07  0:00   ` Mark Lundquist
  1999-09-08  0:00     ` Marin David Condic
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Lundquist @ 1999-09-07  0:00 UTC (permalink / raw)


Matthew Heaney wrote:

>

<snip>

> Me too.  I also have an interest in the philosophy of science, especially
> now because of those creationist pinheads in Kansas.
>
> ....
>
> Actually, biology relates to programming too.  The study of evolution of
> natural systems (Darwinian theory) can be most helpful in understanding the
> evolution of artificial systems, especially large, complex software systems.
> Manny Lehman wrote a whole book on the subject.
>
> But the programmers who grow up in Kansas will never know this, because
> those idiots on the Kansas State Board of Education decided that Darwinian
> evolutionary theory doesn't need to be taught!

I'm not on the KSBE, but if all it takes is to be a non-believer in Evolutionism,
then for the record I'm also a pinhead and an idiot.  But do I have to do anything
signficant to be a true idiot, besides just declaring myself one?  I wouldn't want
to be a mere titular idiot... :-)

Did I mention that I'm also a card-carrying Doofus?  As I type this I'm wearing my
official cone-shaped hat... :-)

-- Mark





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Idiots (was Re: Hi all. Novice question.)
  1999-09-07  0:00   ` Idiots (was Re: Hi all. Novice question.) Mark Lundquist
@ 1999-09-08  0:00     ` Marin David Condic
  0 siblings, 0 replies; 7+ messages in thread
From: Marin David Condic @ 1999-09-08  0:00 UTC (permalink / raw)


Mark Lundquist wrote:

> Matthew Heaney wrote:
>
> > Me too.  I also have an interest in the philosophy of science, especially
> > now because of those creationist pinheads in Kansas.
> >
> I'm not on the KSBE, but if all it takes is to be a non-believer in Evolutionism,
> then for the record I'm also a pinhead and an idiot.  But do I have to do anything
> signficant to be a true idiot, besides just declaring myself one?  I wouldn't want
> to be a mere titular idiot... :-)

In actuality, there is considerable scientific evidence that classic Darwinian theory
of gradual evolution cannot possibly be the explanation of life on this planet. But
that might be asking people to see past their Darwinian dogma and look at things like
fossile evidence with an open mind.

Be that as it may, what I mostly find objectionable here is an example of ad hominem
attack of the type that should be avoided - especially in a technical newsgroup where
we are completely off topic and the people involved aren't even present to defend
themselves. People can believe whatever they like, but we shouldn't ought to resort to
name calling.

Now back to programming in Ada?.....

MDC
--
Marin David Condic
Real Time & Embedded Systems, Propulsion Systems Analysis
United Technologies, Pratt & Whitney, Large Military Engines
M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600
***To reply, remove "bogon" from the domain name.***

Visit my web page at: http://www.mcondic.com/






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hi all. Novice question. from an idiot.
  1999-09-07  0:00 ` Hi all. Novice question Nick Roberts
@ 1999-09-08  0:00   ` G
  1999-09-08  0:00     ` Preben Randhol
  0 siblings, 1 reply; 7+ messages in thread
From: G @ 1999-09-08  0:00 UTC (permalink / raw)




Nick Roberts wrote:

> Fascinating, Captain!
>
> GMW, I think, at the very least, there some vital questions you have got to
> answer: how does the study of ontology (which, incidentally, I am myself
> very interested in) relate to computers; what are you actually trying to
> achieve with your Ada program; might another (higher level) programming
> language be more suited to your needs?
>
> I'm afraid I think you'll find most of the denizens of this newsgroup highly
> sceptical about your post, unless you can make it a bit more coherent, and
> focused in on a genuine Ada problem.
>
> -------------------------------------
> Nick Roberts
> http://www.adapower.com/lab/adaos
> -------------------------------------

Hi again.  Well... to be honest I find this group a little intimidating at
times.
There seems to be alot of intolerance for outsiders but hell... that's the way
of the world.
Virtual xenophobes.

I studied systems theory.  This relates to set theory but is literally a more
dynamic interpretation
and extrapolation.  I was working on a specific systems theoretical construction
involving complexity
and elaborating it through a spatiotemporal model (yes.. I know its all a tad
obscure).

I have been trying to find a way to elaborate what is in my mind's eye.  Thus
ADA has been useful.

But as it seems to me as though I may be the "idiot" referred to earlier.  I
don't think I should say anymore.

Inasfar as simulation is concerned - I desire to employ the systems theory in
battlefield simulation.

As I am an idiot, I don't suppose I ever will and I am sad that I have been
deleted from this group every time I have posted.
So I better leave, then.  Bye.

G
:-(





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hi all. Novice question. from an idiot.
  1999-09-08  0:00   ` Hi all. Novice question. from an idiot G
@ 1999-09-08  0:00     ` Preben Randhol
  0 siblings, 0 replies; 7+ messages in thread
From: Preben Randhol @ 1999-09-08  0:00 UTC (permalink / raw)


G <Dizzy@interact.net.au> writes:

| There seems to be alot of intolerance for outsiders but hell... that's the way
| of the world.
| Virtual xenophobes.

That is not my experience. I find Ada people very friendly as opposed
to other newsgroups.

| As I am an idiot, I don't suppose I ever will and I am sad that I have been
| deleted from this group every time I have posted.

Nobody (as I can make out from the thread) has called you an
idiot. Only asked for something more concrete to work on. 

PS: I'm a newbie too so I don't know the history here at comp.lang.ada
-- 
Preben Randhol             oO     "Don't think about domination,  think
[randhol@pvv.org]        .`  ;     about freedom, it doesn't dominate."
[www.pvv.org/~randhol/]   \ G                  -- RMS, LinuxWorld 1999.
                           `_) n o m e




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-09-08  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-04  0:00 Hi all. Novice question G
1999-09-04  0:00 ` Matthew Heaney
1999-09-07  0:00   ` Idiots (was Re: Hi all. Novice question.) Mark Lundquist
1999-09-08  0:00     ` Marin David Condic
1999-09-07  0:00 ` Hi all. Novice question Nick Roberts
1999-09-08  0:00   ` Hi all. Novice question. from an idiot G
1999-09-08  0:00     ` Preben Randhol

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