swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A thought on portability...


From: glen e. p. ropella
Subject: Re: A thought on portability...
Date: Fri, 21 Feb 1997 16:10:32 -0700

"nelson" == Nelson Minar <address@hidden> writes:
nelson> We talked about the typedef unsigned short unsigned32; typedef
nelson> short int32; typedef double ieee64; thing back when we started
nelson> Swarm. It's not such a bad idea on the face of it. But, well,
nelson> it's unaesthetic - it's not really C code, it's trying to make
nelson> C do something that it just doesn't do. In my experience
nelson> systems that do this don't work very well.

nelson> OTOH, it's really nice to know exactly how big your datatypes
nelson> are, *especially* when doing simulation. I really like the
nelson> fact that Java makes guarantees, even if the Alpha folks hate
nelson> it because it means their fancy 64 bit processors aren't good
nelson> for much.

nelson> Overall, I think there's really no good answer for this.

I agree.  Portability specifically addresses machine-to-machine
differences.  This has to be handled by machine-to-machine
relationships.  Java targets a virtual machine.  But, that
just moves the programmer a level away from the machine-to-machine
relationship.  And that's fine.

But the issue is:

  What is Swarm's target?

Is it "sameness" across all platforms?  (i.e. portability) I don't
tend to think so.  Swarm, as I understand it, is targeting large
problems while providing open ended interpretation of the results of
integrating models of the systems where those problems arise.
Typically, the open ended interpretations of the output of a
simulation is statistical.  And the statistical nature of a simulation
can be determined without requiring perfect portability.

So, while I've used schemes where one only uses types well-defined
only on specific systems (the int32, ...) and they work quite well as
long as the set of targets is pre-defined.  (At one time we had
discrete-event sim written in C/C++/Ada/Assembly that matched
across Windows 3.1/hardware, Ultrix 4.2, Solaris 2.3, and IRIX 5.3,
which included variants for endianness and word-size. Unfortunately,
I never got to see the Alpha version validated. [sigh])  Since Swarm's
target machines are not pre-defined, an attempt at designing a scheme
that will work specifically on the ones we know about might not be a
good idea because it could preclude any others that are added later.

But, the primary effect of doing what Barry suggested would be to
isolate some of the pieces of code susceptible to required changes
due to porting.  I don't see this as a bad thing.

With respect to aesthetics... Well, beauty is in the eye of the
beholder.  And the bottom line is whether or not it works.

glen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]