INTRODUCTION PETRI NET SIMULATOR version 1.1 May 1993 This is an example of a reasonably serious application written using the "Simple User Interface Toolkit" (SUIT). Please read the DISCLAIMER and SUIT sections below. ABOUT I have implemented a simple petri-net simulator (sim) which allows: o addition of places, tokens, transitions and paths. o removal of places, tokens, transitions and paths. o labeling of places and transitions. o loading and saving net descriptions. o random firing of active transitions. o single stepping (tracing) of the network. That's about all it does. Everything is accessed using the interface. There is only one command line switch sim -mono This uses only two colours for the interface making it suitable for mono-chrome displays. BUGS I expect there are a few lurking bugs in the program. Ive tried to remove as many as possible and have had little problems using the software. But then every author says the same. The system I compiled the software on was a SPARCstation IPC, running SunOS Release 4.1.1. I compiled using gcc 1.37.1 with SUIT libraries version 2.3. The X library used was libX11.so.4.2. I've tried as much as possible to use ANSI C, I am unlikely to be able to solve any compilation problems that you may have. If you have a problem compiling SUIT then please get in contact with SUIT support. Similarly I can't guarantee to fix any bug-reports I might get. Although as a budding software engineer (so I've been told) I guess I should make sure my software is as free from bugs as possible. TODO If I had the time I would do the following things: Make the interface better so it didn't flicker so much on slow systems. Implement functions to move objects in the net. Have a less silly file format. Allow importing/exporting of standard petri-net notation. Allow curved paths (arcs) between net objects. Add analysis capabilities to the package (reachability, etc). I am unlikely to have the necessary amount of spare time until after I complete my course of studies. If I am still connected to the net, and if there is a sufficient demand I will continue working on this hobby-horse after August 1993. MANIFEST Please ensure that the sim.c file is write protected or backed-up. This file is contains UIL code for the SUIT interface. If this file is corrupted or modified the application may become unusable. The *.net files are examples of petri-net files that are used by this application. It uses a weird format that I dreamt up, mainly because I didn't look around for other suitable file formats. DISCLAIMER I'm in no way claiming that this is the best serious SUIT application. I can`t even claim that this software is fit for any purpose whatsoever. As for using this software, there`s no way that I can be held responsible for what it does or fails to do. As far as I'm concerned this software is provided free of charge and no support or warranty is either implied or provided. You are welcome to use any part of the source of this application for any purpose whatsoever. Lets face it even if you did use the code, you aren't likely to show me you code are you? And do you think I'm going to admit that I wrote this? The software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (LICENSE) ; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. SUIT SUIT -- The Simple User Interface Toolkit SUIT is a library of interface tools developed at the University of Virginia to help C programmers create sophisticated mouse based interfaces without the lengthy learning period associated with traditional user interface toolkits. Ease of learning and fast ramp up time is central to SUIT's design. Also central to SUIT design is portability. SUIT programs currently run without changes to the source code on the following platforms: IBM PC, Macintosh, Sun3, Sun4 (SparcStation), SGI (Silicon Graphics IRIS workstations), DECstation, HP. SUIT is available through anonymous ftp from uvacs.cs.virginia.edu (128.143.8.29). Each SUIT distribution package comes with full source code and documentation. SUIT, including all its source code, is available without charge to Universities and other non-profit institutions. For-profit organizations, and people requiring more information can send email to suit@uvacs.cs.virginia.edu SUIT (c) 1990, 1991 , 1992 Copyright Rector and Visitors of the University of Virginia THANKS Thanks go to the people who created SUIT. Without them I probably wouldn't have bothered writing this SUIT application. Thanks also go to the Joint Network Team at the Rutherford Appleton Laboratory for teaching me C. I must thank Laser Scan Ltd, for giving me 2 excellent placements and giving me a taste of the real world. How can I not mention the people at Robert Fleming Ltd for unknowingly starting me out on the computing trail. If as a result of using this application, you feel that I have some potential, and you happen to have an opening in your company. I'll be graduating in BSc Computer Science in about August 1993 and wouldn't mind getting a job overseas. THE AUTHOR My current email address is cs89ssg@uk.ac.brunel. This certainly will not be the case after July 1993. I am likely to have an account on at least a public access unix site so I should be contactable via newsgroups after this date.