Article View: comp.lang.clos
Article #192Compiling objects (was Beginner's Question - CLOS)
From: john
Date: Wed, 26 Aug 1992 07:03
Date: Wed, 26 Aug 1992 07:03
33 lines
2158 bytes
2158 bytes
Chris (cb@maths.bath.ac.UK) writes:
It sounds like you don't need C++ as much as a Petri net compiler
that takes your nice object oriented specification and spits out
fast code, like a big PROG, for example.
I could do that, but part of the reason I started doing this was to
show that petri-nets are a good example of something that maps well
into object-oriented simulation. As far as the programming of it
goes, it is real nice to represent Places and transitions as objects
and have the actions on them represented as methods. However, if
it's that much faster to compile the petri net spec into
non-object-based code, then its pretty hard to argue that
object-oriented simulation is a good thing.
Ah, but the code for compiling the Petri nets might be very easy to
design and write because you can distribute it like any other OO
program. Even better, compiled and non-compiled objects can coexist.
I'm currently working on a natural language understanding system that
represents many things as different kinds of functors, and combines
them with combinators like function application and composition. To
make it faster, each class of functor knows how to compile an instance
of that class into what is essentially a big PROG. Also, the
combinators themselves get compiled as well. Finally, there are
special methods on the combinators that know how to combine compiled
functors by executing the compiled code. All of this exists on top
of, and in coexistence with, the original code for non-compiled
functors and combinators.
This was much easier to do in an OO language like CLOS.
John Burger
john@mitre.org
Technical Details
Message-ID:
<9208261503.AA02837@thelonius.mitre.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!linus.mitre.org!johnShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!linus.mitre.org!john From: john@linus.mitre.org Newsgroups: comp.lang.clos Subject: Compiling objects (was Beginner's Question - CLOS) Message-ID: <9208261503.AA02837@thelonius.mitre.org> Date: 26 Aug 92 07:03:08 GMT Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Lines: 33