comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: Re: NFA to DFA
Date: 1996/05/15
Date: 1996-05-15T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96May15195956@organon.com> (raw)
In-Reply-To: 4n1its$rtt@news2.h1.usa.pipeline.com


In article <3199D093.41C67EA6@escmail.orl.mmc.com> "Theodore E. Dennison" <dennison@escmail.orl.mmc.com> writes:

> > > ARRAYS of boolean in a bitwise fashion. So why bother with some fancy
> > > generic ADT package (that might have bugs)?
> > 
> > Simple.  If the universe over which you can construct sets is "big",
> > but the sets themselves are typically not "so big" relative to the
> > universe (the cardinality of the compliment of any set >> cardinality
> > of the set - at least typically...) then the array of boolean impl.
> > offers poor quality of service (maybe not even plausible...).  Also,
> 
> What? You don't LIKE bit arrays that take up 1/8th of your virtual
> memory space?  :-)
> 
> O.K. But most Modula-2 compilers couldn't handle sets that large either.

I believe that the original "definition" of Modula-2 by Wirth had sets
being completely lame and virtually useless.  They had to fit within a
single "machine word".  To get sets that were actually useful (in
anything like a typical range of applications) you had to build your
own - i.e., build a set ADT.  Typically this was _implemented_ using
the basic set type.  This gave you a kind of poor-man's "equivalent" to
what you get in Ada with packed arrays of boolean for free.


> What you are describing is more of a list than a set. An ADT would be
> put to good use in making a list look like a set.

Well, I'm not really describing anything - not enough detail for that.
But, I am talking about a _set_ type - its implementation (whether by
lists or what have you) is not relevant.  That is why a set ADT makes
sense.  You can have the abstraction and the impl. can vary - as I
mentioned, in Ada95 it can even vary at runtime.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





      parent reply	other threads:[~1996-05-15  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-11  0:00 NFA to DFA Boaz Chow
1996-05-13  0:00 ` JEAN CLAUDE GALLO
1996-05-14  0:00   ` Theodore E. Dennison
1996-05-16  0:00     ` Data Structures as ADTs (was: NFA to DFA) Matthew Heaney
1996-05-16  0:00       ` Theodore E. Dennison
1996-05-14  0:00 ` NFA to DFA Jon S Anthony
1996-05-15  0:00 ` Theodore E. Dennison
1996-05-15  0:00 ` Jon S Anthony [this message]
replies disabled

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