Article View: comp.lang.clos
Article #194Re: Beginner's Question - CLOS
From: Bruce R. Miller
Date: Wed, 26 Aug 1992 16:53
Date: Wed, 26 Aug 1992 16:53
39 lines
2141 bytes
2141 bytes
In article <9208261407.AA05332@news.cis.ohio-state.edu>, cb 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. > > > >k > > 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. > > > Chris Since I haven't much idea about Petri nets, I'm sticking my neck out, but... Maybe rather than object-oriented _simulation_ you might think about object-oriented _compilation_; If Lisp & Clos allow you to quickly write a program which `compiles' the petri net into a fast running program --- it can even write a C program for all I care --- then it's served a worthwhile purpose, no? Ie. rather than have the objects & methods simulate whatever, why not have them produce code which does the simulation? I've done something similar generating some impressively fast Fortran code from Lisp. I would have hated to deal with the datastructures to do the same using C, and Fortran!?!?! Ha. Nobody would have attempted to write the generated code manually in Fortran. In anycase, you invent a mini-language on top of lisp; the specification of the Petri net (whatever that may be), in effect, becomes the program.
Technical Details
Message-ID:
<2923836791@ARTEMIS.cam.nist.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!dove!cam!ARTEMISReferences:
<9208261407.AA05332@news.cis.ohio-state.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dove!cam!ARTEMIS From: miller@FS1.cam.nist.gov (Bruce R. Miller) Newsgroups: comp.lang.clos Subject: Re: Beginner's Question - CLOS Message-ID: <2923836791@ARTEMIS.cam.nist.gov> Date: 26 Aug 92 16:53:12 GMT References: <9208261407.AA05332@news.cis.ohio-state.edu> Sender: news@cam.nist.gov Organization: NIST - Computing and Applied Mathematics Laboratory Lines: 39