Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

CUG New Releases

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]


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 (CUG#394): Simula-style class libraries for discrete event process based simulation.
  • Input-Edit, SORTLIST AVL, and Typing Tutor (CUG #395): multi-platform user-input line editor, AVL balanced binary tree, and typing instructor for Curses
  • NNUTILS (CUG #396): neural net source library & tutorial

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:

  • NNTEST1: A network with one input node and one output node.
  • NNTEST2: A network using the "logistic" activation function (as opposed to a linear function).
  • NNXOR: A network implementation of the famous Exclusive-Or problem.
  • NNSIM1: A generic feed-forward network with back propagation.
  • NNWHERE: A 5x5 retina is presented with shapes it must classify correctly.
  • NNWHAT: A continuation of above where shapes can assume any position.
  • NNEVOLVE: A feed-forward, back-propagation supervised net.
  • NNSIM2: Simulates a competitive learning network with a Hebbian learning algorithm.
  • NNRECUR1: A recurrent net with back propagation, and a kind of supervised learning called Self-Correlating, where the input patterns serve as their own output patterns.
NNUTILS versions 1.01 (released 08/02/93) is immediately available as CUG #396.


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

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.