CUG New Releases



February 01, 1994
URL:http://www.drdobbs.com/cug-new-releases/184402840

February 1994/CUG New Releases


Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to The C Users Journal since 1987. He is currently employed as Senior Analyst at H.C.I.A. of Ann Arbor, Michigan. He can be reached by dial-in at the HAL 9000 BBS (313) 663-4173 or by Usenet mail to [email protected].

Introduction

Every month I get dozens of e-mail inquiries about how to obtain archive distributions listed in these monthly columns. I only reply that people should use the C Users Order Form in the center portion of the magazine. Using the Order Form is simpler and easier than chasing after archives from online services.

Of course, the CUG does not claim to be the exclusive distributor of anything in its library. This means that these archives are frequently available from many online sources, including FTP servers, Compuserve, and dial-up BBSes. These online sources often have older versions or sometimes just patches. What CUG guarantees is that each archive is completely intact, and fully authorized for distribution.

New Library Acquisitions

C++SIM Discrete Simulations: CUG 394

C++SIM is a newly released package from M.C. Little, at the Department of Computing Science in the University of Newcastle upon Tyne (England), and D.L. McCue at Xerox Corp. (Webster, NY). The C++SIM discrete event process based simulation package provides Simula-style class libraries. The same distribution also includes the SIMSET linked list manipulation facilities. (According to MacLennan [1], Simula was the first computer language to incorporate the ideas of "class" and "object" constructs back in 1967.) SIM++ currently claims usability only on UNIX workstations, such as SUN Spares. C++SIM version 1.0 (released 06/15/92) is now available as CUG volume #394.

C++SIM uses inheritance throughout the design to an even greater extent than already provided by Simula. C++SIM's use of inheritance allows you to add new functionality without affecting the overall system structure. Thus, C++SIM provides for a more flexible and expandable simulation package.

C++SIM provides the following classes: Process, ProcessList, ProcessIterator, ProcessCons, Random, Element & Head, thread, lwp_thread, and gnu_thread.

C++SIM includes a 20-page paper entitled "Construction and Use of a Simulation Package in C++." This paper is available in PostScript format only. The paper describes the class hierarchy itself as well as how to further refine the simulation package.

The simulation package requires a threads package and currently works only with the Sun lightweight process library or the included GNU thread package. The thread library is the only system-specific code, so porting the remainder of the code to other UNIX workstations should be easy. C++SIM compiles with Cfront 2.1 and Cfront 3.0.1 and GNU g++ 2.3.3

The C++SIM license grants permission to use, copy, modify, and distribute the program for evaluation, teaching and/or research purposes only and without fee. The University of Newcastle upon Tyne copyright and permission notice must appear on all copies and supporting documentation, and similar conditions are imposed on any individual or organization to whom the program is distributed.

Input-Edit, SORTLIST AVL, and Typing Tutor: CUG #395

This volume combines three relatively small but powerful archives on a single diskette. Chris Thewalt (University of California at Berkeley, Civil Engineering) presents his interactive line editor library. Walter Karas (Cary, NC) contributes his implementation of the classic binary search tree with AVL balancing. Last, Christopher Sawtell (Linwood, Christchurch, New Zealand) releases his Typing Tutor for use with Curses. All three are immediately available as CUG volume #395.

Input-Edit: CUG #395A

Input-Edit, also known as getline, greatly increases the functionality of programs which read input a line at a time. With Input-Edit, interactive programs that read input line by line can now provide line editing and a history buffer to the end user that runs the program. As far as the programmer is concerned, the program only asks for the next line of input. However, until the user presses the RETURN key he can use Emacs-style line editing commands and can traverse the history buffer of lines previously typed.

Other packages, such as GNU's readline, have greater capability but are also substantially larger. Input-edit is small (1200 source lines) and quite portable because it uses neither stdio nor any termcap features. For example, Input-edit only uses \b to backspace and \007 to ring the bell on errors. Since Input-edit cannot edit multiple lines, it scrolls long lines left and right on the same line.

Input edit is written in K&R C and can run on any UNIX system (BSD, SYSV or POSIX), AIX, and XENIX, as well as non-UNIX systems such as MS-DOS with MSC, Borland Turbo C, or djgpp, OS/2 with gcc (EMX), and DEC VAX-11 VMS. Porting Input-Edit to new systems consists mainly of altering the package's character read function to read a character when it is typed without echo.

Sortlist AVL: CUG #395B

SORTLIST implements a "sorted list" data structure library in ANSI C. This library is appropriate whenever all elements of the sorted list have the following characteristics:

1. All elements are of a single fixed size.

2. Each element is associated with a unique key value.

3. The set of key values has a well-defined "less than, greater than" relation.

Symbol tables and dictionary applications are excellent candidates for the sorted list data structure. This implementation of a sorted list data structure employs an AVL tree. AVL trees were invented by Adelson-Velskii and Landis in 1962. Specifically, Karas draws on algorithms presented by Horowitz and Sahni in Fundamentals of Data Structures (Computer Science Press). The add, find, and delete operations on an AVL tree have worst-case O (n) time complexity. SORTLIST version 1.1 (released 8/25/93) is now available on CUG volume #395.

Typing Tutor: CUG #395C

The Typing Tutor for use with Curses is a marvel of compactness. Since it builds on the substantial functionality of the UNIX Curses library, the Typing Tutor consists of just 250 source lines. Typing Tutor's learning scenario is simple, yet easily customizable to fit any lesson plan. Typing Tutor's screen displays two windows. The top window contains the "lesson" which is the text you will be typing from. The bottom window contains the results of your (presumably) touch typing. Every time a character in the bottom window fails to match the original in the top window, Typing Tutor flags it by changing the screen attribute to flashing. Although Sawtell does not specify compatability for Typing Tutor, he expects it to run on any UNIX system with a Curses package available.

NNUTILS Neural Network: CUG #396

NNUTILS, by Gregory Stevens (Rochester, NY), is a public domain package to help you to start programming neural networks in C. NNUTILS is a tutorial with source code as your textbook. Stevens' intensely documented source code contains everything you need to implement several kinds of net architectures. NNUTILS gives you a series of simple implementations to let you see how they work step by step.

Each NNUTILS subdirectory contains a different example application with six standard C source files and a main program. The source is written in ANSI-compliant C and developed primarily under Borland C++ 3.1. Accordingly, the CUG distribution includes DOS executables and project files for each implementation. Because the code is ANSI compliant, all of the examples work with GNU C under UNIX. Building executables with GNU C is simple enough without makefiles, so none are included.

Briefly, here's a summary of problem sets included with NNUTILS:

NNUTILS versions 1.01 (released 08/02/93) is immediately available as CUG #396.

References

[1] MacLennan, Bruce J., Principles of Programming Languages: Design, Evaluation, and Implementation. New York: H.H. Rhinehart, and Winston. 1983.

Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.