The Journal of Forth Application and Research
ISSN: 0738-2022

Forth Institute

Editorial Board

Author's Guidelines


Authors Index


Volume 7
Volume 6
Volume 5
Volume 4
Volume 3
Volume 2
Volume 1

Valid XHTML 1.0 Strict
Valid CSS!


1986 Rochester Forth Conference Proceedings
on Real-Time Artificial Intelligence


PDFs provided by Paul E. Bennett
Introduction
Lawrence P. Forsley

Invited Papers
REAL-OPS - A Real-Time Engineering Applications Language for Writing Expert Systems
W. B. Dress
Abstract
This work describes how Forth was used as a descriptive language for rewriting the expert-systems language OPS5. The goal was to produce a multitasking applications language for real-world, intelligent control problems. The next logical step--a derivative REAL-OPS running on a high-speed Forth engine--is discussed. The resulting integration of Forth, Forth engines, and expert-system technology in the mid-1980s will provide the high performance needed in the time-critical expert systems required for intelligent control of military and industrial systems now planned for the mid-1990s.
Sensor Fusion: The Application of Artificial Intelligence Technology to Process Control
Steven R. Le Clair
Abstract
At both the unit process and systems level of manufacturing there is a need to collect and understand aggregate (fused) data from multiple sources (sensors). The concept of fusing multiple-sense data is analogous to human sensory processing of vision, tactile, audio, thermal, etc. data. Evaluation of combined input from several senses produces a richer and more reliable perception of the environment than does evaluation of a single sense or separate evaluation of multiple sense data. The objective of understanding fused multiple-sense data is to improve awareness of current equipment/system states, anticipate future states and detect/diagnose faults. The approach presented in this paper to accomplish sensor fusion employs the use of Artificial Intelligence (AI) technology. The design is based on the parallel Operation of three (3) inference systems, one for monitoring and understanding sensor data, another for control, of the process and finally one for communication via a blackboard.
Toward the Development of a Real-Time Expert System
Jack Park
Abstract
Application of the Forth environment to applied artificial intelligence projects has led to the development of a concurrent processor, real-time expert system. Steps toward the development of the EXPERT-5 concurrent system have included EXPERT-2, EXPERT-4, and early versions of the EXPERT-5 technology running on a personal computer. The concurrent EXPERT-5 consists of two EXPERT-5 shells running on separate M68000-based co-processors mapped into the memory structure of a third EXPERT-5 based blackboard controller running under MS-DOS on a PC. A "parser-thinker" paradigm is being explored with this architecture.
ACTOR, A Threaded Object-Oriented Language
Charles B. Duff
Abstract
Object-oriented programming, in which objects encapsulate private data and respond to generic messages, has become increasingly popular in the last several years. OOP is particularly effective when implemented as a consistent programming environment in the manner of Smalltalk.

This paper describes a new language, ACTOR, that attempts to address the central problem of object-oriented language design: achieving a practical, efficient language without compromising the integrity of the runtime environment. ACTOR uses a token-threaded interpreter as an efficiency measure, permitting a more flexible optimization strategy. While other researchers have suggested threading as an optimization technique [Deutsch83], to the author's knowledge, no other pure threaded OOLs have been implemented.


Presented Papers
Artificial Intelligence
Symbolic Processing Potential of Forth-Based Microcomputers
Harry G. Arnold
Abstract
The potential of microcomputers using Forth to perform Symbolic processing is evaluated using integers, strings, and rules in timing benchmarks. In addition to comparing 8086, 68000, and NC-4000 performance, some order-of-magnitude comparisons with popular mainframes are made. The conclusions reached are that rule processing speed in the neighborhood of 5000 rules per second can be achieved at the sacrifice of program complexity using a Forth engine microprocessor and that programming complexity can be preserved with the same processing speed now obtainable with mainframes (10 to 200 rules per second) by using Forth on a microcomputer.
Artificial Intelligence: The Human-Computer Interface?
James D. Basile
Abstract
This paper explores some applications of artificial intellegence as a front end interface for computer systems. It is intended to acquaint the reader with possible areas where such an interface has been used and to provide a summary of some relevant sources for-further reading.
Fifth-Generation Forth
James C. Bender
Abstract
Fifth-Generation Forth is a language which combines characteristics of both Lisp and Forth. The core vocabulary includes built-in functions supporting object-oriented programming (the Simple system, developed for Prolog), and forward and backward chaining functions. Other built-in functions support list-processing, string-processing, and frames (as defined in Winston's Artificial Intelligence, 2nd Edition. Fifth-Generation Forth, then, has many attributes of an expert system building tool. An interpreter is under development for the IBM PC and compatibles.
FORTH for AI?
Harold Carr and Robert R. Kessler
Abstract
Is FORTH a viable language for Artificial Intelligence (AI)? At first glance, one would be inclined to answer yes since FORTH has several features in common with Lisp and Prolog, the languages predominantly used in AI. All three have some form of runtime symbol table (dictionary, database) making it possible to incrementally (re)define functions. This promotes interactive programming, where statements in the language serve as the command language. They are all weakly typed: any variable (or stack location) may have as its value any object. This makes it possible to write routines that can work on any kind of data or do generic dispatches. Both Lisp and FORTH provide methods to create new defining words so the programmer is not limited to the defining words in the language kernel. Are these (and other) similarities enough? To answer this, we show the beginnings of a simple symbolic differentiation program in both Lisp and Prolog. We then discuss the built-in features of Lisp and Prolog that are used to an advantage by the program. The lack of these features makes standard FORTH a poor choice for AI research, at least for symbolic processing. However, we do point out that FORTH may be useful as a "delivery vehicle" for well understood programs.
Systems That Have Ideas Instead of Rule Based Knowledge
Rene Heuer
Abstract
Definition of an idea

If you have a screwdriver, you have a lot of ideas what could be done with this tool. These ideas are coming up because you know that the screwdriver is a tool and there could be a situation where you have - for example - an unopened bottle and a screwdriver. A screwdriver is one of a lot tools that opens bottles.

An idea is knowing about alternatives which are found by assoziations. My human idea was to organize possible assoziations in computer memorys. After a short time of hard work I stopped because I found that it is absolutely impossible to organize assoziations. Assoziations must be found and organized by the system itself. What I had to do was to find out something like basic motivation to search assoziations. This basic motivation must be programmable.

An Implementation of FORPS on a NOVIX Beta Board
Christopher J. Matheus
Abstract
FORPS is a Forth-based Production System (in the public, domain) developed for fast, real time control problems [MATHUES86a]. It employs a very small and efficient inference engine (source <3k) to cycle through sets of IF-THEN production rules. The original version of FORPS was written in polyFORTH for a 68000 microcomputer. It has been applied to the real time control problem of robot obstacle avoidance [MATHEUS86a], and to the classic AI problem, The Towers of Hanoi [MATHEUS86b].

Recently, FORPS has been ported to the NOVIX Beta Board running novixFORTH. The translation from polyFORTH to novixFORTH was straightforward but was complicated by some problems with the NOVIX Beta Board. For timing comparisons, the Towers of Hanoi solution was run on the 6 MHz NOVIX with a realized speedup over the 10 MHz 68000 of nearly 30:1. With further optimization it is hoped that FORPS running on the NOVIX will approach speeds of 10,000 rules per second.

Knowledge Engineering, Expert Systems, and Real-Time Environments
Nicholas Solntseff, A.D. Hurst and W.F.S. Poehlmann
Abstract
This paper describes the work on artificial intelligence and real-time systems being planned in the newly formed Department of Computer Science and Systems at McMaster University. After a brief overview of the problems being considered, the goals of the proposed research are presented.
Some Experiences with EXPERT-2
C. M. Sargent, L. G. Watson, R. M. Westman
Abstract
The use of FORTH to implement knowledge-based (expert) systems is seldom endorsed by the Artificial Intelligence community. However, FORTH's speed, extensibility, portability, and rapid-prototyping environment make it ideally suited for this task, especially on microcomputer-based systems. One example of using FORTH as a basis for expert system development is a very useful tool kit called EXPERT-2 (Park, Mountain View Press).

Although EXPERT-2 is intended to be a learning aid only, it is much more, because the full FORTH language is accessible through the RUN-type operators. Also, since the source code is included, programmers can tailor the tool kit to a specific application, or add features that are not presently available. Thus, EXPERT-2 provides the basis for an extremely powerful, flexible expert system tool kit in FORTH.

Our experience with EXPERT-2 .As described on two levels:

  1. modifications to the tool kit source code itself, and
  2. exploitation of the syntactical and structural constraints within the program environment.
Among the useful modifications are the additions of tracing and debugging facilities, a simple forward reasoning scheme, additional operators, and the ability to chain several rule-bases together in one consultation.
Pattern Variables in Forth
Martin J. Tracy
Abstract
Lists are an effective way of maintaining and manipulating facts and information in readable form. Pattern variables can be used to recover information from lists given a partial pattern or "key." When one structure is matched against another structure identical in form, the pattern variables in the first structure are set or "instantiated" to the corresponding values in the second structure.

This paper is a continuation of a paper on 'list-handling' in Forth which was presented at the FORML conference in November, 1988. The list handler is reviewed here and then extended to include pattern variables.

Object Oriented Programming
Object Oriented Programming in Fifth
Cliff Click and Paul Snow
Abstract
Object orientated programming is fundamentally different from traditional languages. Instead of passing data structures to functions, the programmer passes messages (function names) to objects (data structures). The objects determine what function actually gets executed. Our system was modeled after SmallTalk and is implemented in a Fifth, a Forth based programming environment.
Defining Words with Class
Alan T. Furman
Abstract
Defining words can be implemented that collect new words in a set or class as they are being created. One can then automatically apply functions to the entire class. This technique leads to more concise and expressive code, and works very synergistically with symbolic self-labeling output. It finds practical use with surprising frequency.
Other Languages Implemented in Forth
Fifth: A Forth Based Programming Environment
Cliff Click and Paul Snow
Abstract
Forth is an excellent base for a complete programming environment. Fifth is a version of Forth with memory management, scoping, a large memory model, and a highly visual programmer interface. Fifth allows editing on two levels, the module level and the program level. Modules are easily modified without changing their position in the dictionary. The dictionary can be easily rearranged using the dictionary editor.
PostScripttm
Paul Snow, Cliff Click and Norman Naugle
Abstract
PostScript is a page description language developed and implemented by Adobe. Adobe appears to have implemented PostScript in C, but we thought Forth would be better suited for the job. We explored the issue by developing X-Script in a Forth-like programming environment called Fifth. We soon learned much of PostScript is designed to fit in nicely with common C functions. Much of Forth's flexibility and speed is hampered by PostScript 's inflexible design.
COMICAL: A Forth-Based Programming Language for Optimized Array Processor Programming
John E. Lecky
Abstract
A new programming language for directing highly parallel hardware systems such as array processors has been developed. This language is called COncurrent MICrocode Assembly Language, or Comical. A Comical assembler for a commercial array processor has been written in Forth. This combination allows array processor programs to be quickly developed and tested in, the interactive Forth environment. Comical allows the software designer to take full advantage of the parallel processing paths of the array processor, maximizing execution speed. At the same time, programming in Comical is no more difficult than conventional assembly language programming, and Comical statements are descriptive and readable.
A Survey of the Characteristics of Very High Level Languages
Regis Loffman
Abstract
Although there is no consensus on the characteristics of very high level languages (VHLLs), ample evidence exists that users of such languages have several expectations. As a result of an extensive survey of the literature and communications with researchers, it was concluded that six characteristics of VHLLs are desired. These are that the language (1) be nonprocedural, (2), allow implicit referencing, (3) provide a good interface between user and computer, (4) allow for verification, (5) be extensible, and (6) provide the, means for better data representation. It was also concluded that no existing language has all six characteristics.
A Simple Authoring System for Computer-Assisted Instruction
B. Gregory Louis
Abstract
The FORTH outer interpreter provides a convenient infrastructure on which to build support routines for writing computer-assisted instructional material (CAI). We have implemented a system that runs courseware by LOADing FORTH screens on which the course author has prepared the material to be presented. The system supports both unconditional and conditional branching (necessary to allow the courseware to adapt itself to the student's progress based on test results). There are few tools to master; course writers who know FORTH can expect to be ready to use the system productively within half an hour of initial contact.
A Polyphonic Electronic Organ
C. H. Ting
Abstract
A simple method is developed to encode polyphonic music. This method allow us to assign up to 16 voices to be played out on that many speakers. Thus we are able to spatially separate the voices in polyphonic music. Many of Bach's organ pieces were coded to demonstrate this effect.
REPTIL - Promoting Dialog Between Humanoid and Computer
Israel Urieli
Abstract
Traditional humanoid math education and experience which has been inherited over generations is diametrically opposed to the computer infrastructure and environment. Unfortunately the designers of the traditional procedural languages (such as FORTRAN, BASIC, Pascal, C) have found it necessary to emulate the questionable humanoid math heritage, and have thus provided a computational tool rather than a problem solving tool. REPTIL is an attempt to bridge the gap between the humanoid and computer approaches. The syntax and structure of REPTIL have been described elsewhere (1), and in this paper we give an example of the goal directed approach to solution which REPTIL promotes.
Authoring System Tools for CAI
Jamison H. Abbott
Abstract Only
This paper describes authoring system tools that have been used to construct two Medical CAI programs. The tools include: a window-oriented text-display system; a robust keyboard input and menu matcher; a vector based APA graphics display system; an IBM graphics-character based block graphics display routine; a window and display format manager; and a table driven display-page update mechanism.
C and FORTH Machines
Robert D. Dixon and Debra Roark
Abstract Only
The Small-C compiler of J.E. Hendrix has been modified to issue code for a FORTH machine as an undergraduate honors project. The source for Small-C is available and easily understood so both the expression evaluation and argument passing mechanisms can be examined. Modifications in the standard FORTH model, which would allow for easier framing of parameters and local variables are discussed.
A Requirement Definition Language, Simulator and Test Harness for Programmable Logic Control Systems
C.L. Stephens, A.C. Daly, B.J. Mercer
Abstract Only
In order to validate the design and specification of a large distributed PLC based control system for an accelerator a FORTH application program has been built that simulates the operation of that control system. The FORTH compiler was extensively modified to provide forms and structures that could be understood by engineers with knowledge of ladder diagrams but no knowledge of computer languages or of FORTH. As well as providing an infix compiler a major addition was the inclusion of special structures to allow the necessary representation of simultaneity. The simulation included a database of plant variables with upper and lower limits as well as default initial states. A display description interpreter was devised that allowed dynamic changes of the nature and format of the simulations two operator interface displays; if necessary while the simulation was running. Mouse activated display interaction was provided.

Implementation of this required a major change in the standard polyFORTH multi-tasker in order both to cope with the large (> 350) number of tasks and the requirements of the simultaneity structure chosen. A recent enhancement to the simulation has been to provide real world I/O rather than computer variables and these can then be used to subject the delivered control system to the anticipated enviornment to ensure that the PLC's programming meets its specification.

Software Tools
.ORPHANS - An Unreferenced Code Finder
Jamison H. Abbott
Abstract
For a variety of reasons a program may contain compiled code that is not used by it. This tool, .ORPHANS, allows the Programmer to find that unused or 'orphan' code so that it may be removed. The choice of a very 'Forth-like' implementation of this tool, relying heavily on the data stack and the dictionary, instead of a more classical approach, using a symbol table, results in trade-offs in speed versus generality. This paper also briefly discusses how .ORPHANS can be used for pruning a Forth nucleus; this can be particularly useful in target-compiling.
A More Thorough Syntax Checker for FORTH
Robert D. Dixon and David Hemmendinger
Abstract
A sample grammar for FORTH is developed using ideas from categorial grammars which are used in natural language processing. This grammar is in the spirit of FORTH compilers but in addition a simulation of certain runtime activities is conducted to attempt a verification of correctness of parameters.
A Threaded Interpretive Language Supporting Programming in the Large
Mikael R. K Patel
Abstract
One crucial element that threaded programming languages such as FORTH [Brodie 81] lack is the ability to generate modules and support calls between modules. This is the main reasons why FORTH is so difficult to use in developing Large Software Systems. This paper discusses the definition and development of a FORTH inspired threaded language which offers the ability to generate sharable code and thus support Programming in the Large and idea of the Programmers Team [Brooks 80, Boehm 81, Ghezzi et al. 82].

Traditional Threaded Languages may be regarded to be closed systems, since the code generated maybe re-used only on source level. This leads to some problems when dealing with Very Large Software System. The use of vocabularies can solve some of the problems involved but not all. Many of FORTH system in use today are indirectly threaded and use absolute addresses in their threading scheme [Kogge 82]. This reduces the ability to share code among programmers without having to pay the price of recompiling the code for every usage.

In the present paper, a Threaded Interpretive Language supporting Module Management and dynamic linkage of modules is described. The first section of the paper deals with the definition of the goals for the language designed. In the second section some of the inspiration sources are examined and discussed, and in the third, some implementation details are reviewed.

Automatic Word Glossary Generation
Norman E. Smith
Abstract
I seem to be the only Forth programmer that thinks Forth is a good general purpose language. The computer shop I work in primarily uses Fortran-77 and a little C. Needless to say I have had a hard time getting Forth accepted. I did develop one small communications program on an IBM-PC in Forth. That experience taught me several things about trying to use Forth in a non-Forth environment. Management must be convinced that the system will be maintainable. The best way to do that is to properly document the system.
The LMI Forth-83 Metacompiler
Ray Duncan
Abstract
Forth Metacompilers, cross-compilers, and target compilers have been used since the invention of Forth to transport the language to new processors, modify the underlying implementations, and compile programs into ROM. They have also found use in commercial applications where there, is a need for code security because Forth programs of significant size that are compiled without dictionary headers are nearly impossible to decompile.

Without exception, previous Forth metacompilers have been single-pass, inflexible, extremely dependent on the structure and interpretation mechanisms of the host system, and have incorporated little or no error-handling.

The LMI Forth-83 Metacompiler contains a number of major departures from traditional Forth metacompilers.

Software Prototyping with Forth
Kim R. Harris
Abstract Only
This paper discusses how to develop software in Forth using a prototyping development life cycle. The goals of a good development process are described. Several different lifecycle models are compared: waterfall, mockups, and enhancement. Each model consists of the same steps (investigation, analysis, design, construction, test, release, and support), but the models repeat the steps differently.

The benefits of the enhancement life cycle are listed. A general implementation plan is outlined that can be used to apply the model to new projects. A case study is presented which illustrates using the model.

( Comments on Documentation)
Elizabeth D. Rather and E.K. Conklin
Abstract Only
Good programmer-level documentation is essential in a professional software application, regardless of the language used. It is traditionally a difficult problem, as most programmers do not enjoy writing. Forth presents some special documentation challenges, most notably the necessity to describe a large vocabulary of defined words, sometimes numbering in the thousands. The authors discuss the pros and cons of various techniques they have used in the last fifteen years, including: in-line comments, glossaries, on-line shadow blocks, on-line LOCATE, off-line manuals, and other techniques. The recent McDonnell Douglas Electrophoresis Operations in Space project is used as an example.
An Object-Compiled Forth Interpreter with a Segmented Memory Model
Richard Wilton
Abstract Only
This paper describes a Forth interpreter designed for integration into modern operating systems on 16-bit and 32-bit processors. The interpreter is built from object modules compiled from high-level Forth source code and linked with a standard operating system linker. The interpreter has a segmented run-time memory model in which logically distinct components of the system are maintained in discrete memory partitions. This design facilitates the integration of Forth modules with code written in compiled high-level languages, and allows dynamic memory allocation and protection schemes to be utilized without sacrificing the advantages of the interactive Forth environment. Initial implementations of this interpreter run on the Motorola 68000 (Unix System V), the Intel 8086 (MS-DOS) and the 80286 (protected mode XENIX).
Implementation
A Stand-alone Forth System
D. B. Brumm and Upendra D. Kulkarni
Abstract
A general purpose, diskless microprocessor system operating in Forth has been implemented. It behaves just like a normal disk-based system. The Forth kernel, contained in EPROMs, was generated with the Laboratory Microsystems metacomplier.

This system has the following features:

  • Forth 83 standard (except for vocabularies)
  • nonvolatile source code storage
  • nonvolatile retention of compiled code
  • interrupt support (written in Forth)
  • stand-alone operation
  • built-in editor
  • Z80 STD bus
  • low power consumption
  • no mechanical devices
The source code storage area consists of up to 64 K bytes of nonvolatile memory on a separate board which is accessed through I/O ports. New source code can be entered into the screen memory by using the built-in editor, downloading through a serial link, or plugging the board into a disk-based STD bus system. Any block can be designated as a boot screen, permitting any sequence of words to be executed automatically at power-on.

The use of CMOS chips for the main memory permits the nonvolatile retention of compiled code as well, so that any application words are ready to run immediately after turning the system on.

The system is being used to control an automatic tree harvesting machine designed by the U.S. Forest Service; it can easily be adapted for other tasks.

Release of Z80 RTL to the Public Domain
Bob Buege
Abstract
Over the past several years I have developed a variant of Forth which I call RTL for Relocatable Threaded Language. Unfortunately, the coats involved in marketing and supporting RTL have proven to be greater than the income generated and I have now largely abandoned the sale of RTL as a source of income, concentrating instead on application software. As a result, I am now releasing the Z80 version of RTL to the public domain.
MVP Microcoded CPU/16: History
Glen B. Haydon and Philip Koopman, Jr.
Abstract
The MVP-MICROCODED CPU/16 design resembles that conceived in the ALCOR project in developing an ALGOL translator utilizing multiple hardware stacks combined with the powerful techniques of a freely microcodable processor implemented in discrete components. In the present form of the CPU/16 design, the user is free to structure the processor according to application requirements for optimal efficiency.
MVP Microcoded CPU/16: Architecture
Philip Koopman, Jr. and Glen B. Haydon
Abstract
The MVP Microcoded CPU/16 is a 16-bit coprocessor board that directly executes high level stack-oriented programs. The CPU/16 may be micro-programmed to execute any stack-oriented language. FORTH was used as the initial implementation language to reduce development time and costs.
An Embedded Forth Environment for a Programmable Bus Interface
Michael Pandolfo
Abstract
The Programmable StrataBus Interface (PSI) is a board that mediates high speed data transfer between a customer-supplied peripheral and the duplexed, fault-tolerant bus of a Stratus computer module. Forth-83 was implemented for the PSI in order to replace the existing resident debugger with a more flexible facility. It resides in a 64K portion of memory and runs as a separate task.

It should come as no surprise that the interactive, extensible nature of Forth provides the PSI programmer with more power than the precompiled debugger. Additionally, Forth has proven to be a natural fit for the I/O architecture of the board. With the Forth subsystem, the ease in which new functions can be defined has given the PSI an ad hoc control capability; programmers can now direct hardware functions as easily as they have controlled software in the past.

Design of a Fast 68000-based Subroutine Threaded FORTH
Anthony Rose
Abstract
An examination of several 68000-based FORTH implementations (direct, indirect, token, subroutine threading) showed that up to half the CPU time is spent executing NEXT, DOCOL or other chaining words. Processors such as the 68000 have complex instruction sets which allow the coding of many FORTH primitives in few bytes, sometimes fewer than the alternative JSR to them. ART-FORTH is a full 32-bit subroutine-threaded FORTH which, by compiling words shorter than a dynamically alterable size inline, increases execution speed, as shown below.
Machine FORTH Sieve time #NEXTs NEXT-time Fraction of time threading
Macintosh MacFORTH 3480ms 203682 1430ms 41%
HP9816 MultiFORTH 2330ms 203682 1020ms 44%
HP9816 ART-FORTH
unoptimised1050ms 2 10μs <1%
optimised 820ms 1 10μs <1%
#NEXTs is the number of times NEXT was called during execution of the Sieve. NEXT-time is the time spent executing NEXT and the calls to it.

Since the Sieve uses only primitives, no calls to DOCOL are performed. As more colon definitions and DOCOLs are encountered, the proportion of the time spent threading increases and hence the efficiency decreases. ART-FORTH attempts to reduce this threading overhead by coding short words inline, bypassing NEXT.

Making Novix Beta Boards into Development Workstations
R.K. Adams and T.L. Bowers
Abstract Only
The potential of the Novix Forth engine as a very fast Reduced Instruction Set Computer (RISC) can be realized in real-world applications by placing the Novix cpu chip in an environment that gives the application engineer/programmer convenient access to the chip and to hardware and software interfaces. First-level access to the Novix RISC is provided by the beta board and its lower cost (less complex) cousins, the delta board and the FORTHkit.

This paper describes our approach to the second-level capability useful for evaluation of hardware/software interfacing such as math co-processors, standard bus interfaces, and memory management hardware. This capability is especially important for proving the viability of Forth RISC concepts and for conducting comparison studies against more conventional microprocessors. We implemented two packaging approaches. The first one resulted in a semi-portable unit that can be carried in a salesman's catalog case. The second approach resulted in a desk-top unit that resembles a commercially available personal computer. Both types are configured with a 20-Mbyte hard disk and two 360-Kbyte floppy disk drives. Packaging and interfacing details are addressed in the paper.

Compiling Forth for Performance
Thomas Almy
Abstract Only
Conventional Forth environments use threaded code interpretation techniques. While this makes compilation fast, and keeps the compiler size extremely small, the execution performance tends to be five to ten times slower than that obtainable with compiled languages. Subroutine threaded code, combined with more intelligent compiling words can increase performance markedly on some systems, and several companies sell code optimizers which turn colon definitions into code words either by copying primitives to make inline code or by more sophisticated techniques.

The author has for over a year been compiling complete Forth applications directly into machine code on 8086 and Z-80 based systems. Of course, the compiler is written in Forth!

By compiling the complete application, many code optimizations are possible that are not available to mixed systems. For instance, no memory space is allocated for constants, and colon definitions become machine language subroutines. Compiled programs run faster than equivalent programs compiled in C or Pascal, yet have the same code compactness of conventional Forth. Additionally, the compiler compilers faster than most C or Pascal compilers. Performance on an IBM/PC was measured to be roughly 0.25 MOPS (using the sieve benchmark), or about 19 clock cycles per Forth primitive.

The paper will discuss the user interface and implementation concepts a Forth compiler, and will give examples of some possible optimizations that can be performed.

An Indirect Threaded Code Organization to Support Dynamic Memory Management
Harvey Glass and Paul Higgins
Abstract Only
A major advantage of Forth systems is the development environment they offer a programmer. A difficulty is the lack of convenient facilities for revising or removing definitions. Memory management in current implementations of Forth systems, especially on small computers, is limited because of the lack of hardware support. We describe a scheme that simplifies the problems associated with relocation and redefinition. It provides a more convenient environment for building system prototypes. The proposed organization is a variant of the indirect threaded code mechanism and has properties related to that of token threaded schemes. The implementation allows memory to be reclaimed and code to be efficiently relocated and compacted. It can be used without hardware support to provide a virtual memory mechanism based upon Forth words.
A Single-Board Forth Computer with Versatile Analog I/O Circuitry
Terje G. Vold
Abstract Only
A complete stand-alone computer with versatile analog and digital I/O circuitry, two serial ports, and the Forth language in ROM has been built. These features make it uniquely valuable and easy to use as a general purpose programmable interface between any personal computer with an RS-232 serial port (such as a Macintosh, IBM/PC, Apple II, or Commodore 64) and electrical signals commonly encountered in laboratories. It has been designed to optimize performance and versatility while keeping its cost low enough to be affordable by researchers on tight budgets and by hobbiests.

The I/O hardware includes 16 differential (or 32 single-ended) high impedance analog voltage input channels with software-programmable gain and sampling rates of up to 100 KHz, 2 programmable differential analog voltage output channels with 12-bit resolution, and 16 digital TTL voltage I/O channels with flexible features including two 16-bit counters. Combined with the R65F12 microcomputer and RAM, EPROM, and EEPROM, this hardware allows the device to be used with a personal computer to mimic many common laboratory instruments such as a waveform generator, strip chart recorder, phase sensitive detector, or frequency meter, or to perform much more sophisticated tasks.

Space Applications
A Prototype Expert System in OPS5 for Data Error Detection
James Rash
Abstract
A prototype expert system has been developed in the OPS5 language to perform error checking on data which spacecraft builders/users supply to the NASA Goddard Space Flight Center for processing on the Communications Link Analysis and Simulation System (CLASS) computer. This prototype expert system, called Trajectory Preprocessing System (TRAPS), contains 49 rules and at present runs on an IBM PC in the OPS5+ software package from Artelligence, Inc. In its operational phase, TRAPS will run in the Oak Ridge Production Language (ORPL) on the CLASS computer (a Perkin-Elmer 3244 supermini). ORPL, an implementation of OPS5 by the Oak Ridge National Laboratory in MULTIFORTH on a Hewlett-Packard 9836 desktop computer, is now being ported to SS-FORTH on the CLASS computer. This paper discusses the expert system problem domain, development approach, tools, results and future plans stemming from the TRAPS project.
Developing Real Time Process Control in Space
R.J. Wood
Abstract
Since 1982, McDonnell Douglas Corporation has been purifying new pharmaceutical materials on the space shuttle. As demonstrated using a continuous flow electrophoresis system mounted in the crew comparment, McDonnell Douglas can process over 700 times more material and achieve purity levels four times higher than those possible in similar operations on the ground.
Development of an Expert System for Command and Control of an Orbiting Spacecraft
Henry M. Harris
Abstract Only
The operation of a large spacecraft in Earth orbit containing many experiments controlled remotely from the ground is a difficult problem which requires a very interactive environment to be successful. Compound the problem by separating the scientist and engineers who designed and built the complex probe from any real time interactions with their orbiting instruments and a real dilemma emerges. How is a complicated space mission controlled, where possible failure of subsystems, or unpredictable effects in a dynamic, changing environment can risk the very success of the mission? This describes a space mission being designed for the late 1980's for which the speaker is the Mission Design and Operations Manager. A proposed solution is the subject of this talk: the development of an expert system for the command and control of a scientific spacecraft. The solution is described in the context of space mission previously flown and work in AI currently being done by the speaker.
Use of a FORTH-Based Prolog for Real-Time Expert Systems
William H. Paloski, Louis L. Odette and Alfred J. Krever
Abstract Only
A frame/rule-based expert system is being developed to serve as the astronaut interface for a series of vestibular investigations to fly aboard the IML-1 Spacelab mission. This expert system is written in a fully-Clocksin and Mellish compatible Prolog, which is itself written in poly-FORTH. The Prolog contains a predicate that can be used to execute any FORTH definition; thus, the polyFORTH becomes an embedded real-time operating system. Using this Prolog, the power of FORTH for handling classical real-time tasks such as data acquisition, experiment control, serial communication, and graphical data display is available with the powerful procedure call mechanism, backtracking control, and built-in data base of Prolog.

The expert system data base comprises six frames, each of which contains detailed set-up, calibration, performance, sequencing, and debriefing information for a separate vestibular experiment. The expert system rule base consists of approximately 50 Horn clause format rules used to determine the next step in the experiment sequence based on operator input or real-time requirements. The expert system is used to step the operator logically through a complex experimental procedure, to initiate and suspend data acquisition and experiment control tasks, and to signal data display intervals and formats to a computer in the ground-based science monitoring area.

Process Monitoring
A Forth Controlled Oceanographic Instrument
Everett F. Carter and H. T. Rossby
Abstract
Our research group has developed a microprocessor-controlled neutrally bouyant float for making measurements of ocean currents, such as the Gulf Stream in the Atlantic Ocean. The float freely drifts at a predefined density level (which is typically at about 800 meters depth), measuring temperature and depth and recording acoustic navigation signals (emitted at precisely known times from sound sources that were placed in the ocean in advance. These sound sources can be as much as 1200 km from the float). After a programmed amount of time (typically 30 to 45 days) the float surfaces and transmits the recorded data to shore via satellite.

The first generation floats were programmed in assembly language. This was reasonable since all the floats followed essentially the same sampling strategy. The new generation of floats are to be much more flexible. Different floats may have different sensors attached, or may have to sample in different ways. In order to allow greater flexibility in the software a Forth interpreter was developed for the floats.

The Forth interpreter is modeled after the-1979 standard, but is customized for the floats in several ways: (1) The memory space for the microprocessor (the MC146805) is only 8k and the data as well as code must reside in this space. Hence the memory restrictions are severe. (2) The Forth interpreter must be ROM based since no mass storage is available. (3) The limited instruction set of the processor forced us to use a direct threaded interpreter instead of the more traditional indirect threaded interpreter.

A Computerized Corrosion Monitoring System
Edward H. Schmauch
Abstract
A system has been developed to automatically monitor corrosion, by an electrochemical technique. The system strategy employed is to dedicate a microcomputer system to each electrochemical probe, and serially interface all microcomputers to a single personal computer (PC). The dedicated microcomputer systems are the topic of this paper. Each dedicated microcomputer controls the electrochemical scanning of its probe, acquires the electrochemical data, temporarily stores the data, and transmits the data to, the PC upon request where it is analyzed and stored. All input/output (I/O) is interrupt-driven. The time critical work is done within assembly coded interrupt service routines (ISRs), while less critical work is done in high-level FORTH.
A Large (10,000 Sensor) Fire and Gas Safety System Implemented Using polyFORTH and Execution Queues
C.L. Stephens and R.M. Rodriguez
Abstract
A polyFORTH system has been designed that holds details of a large number of sensors in a database. Outstations using triplicated 6809s monitor these sensors and take shutdown actions if required reporting sensor status changes to a pair of VME 68000 based computers, one of which acts as a warm standby. The 68000 systems are responsible for processing these reports to produce operator displays, printed logs and to maintain fault reports. In the event of an incident the 68000 based system must absorb all of the reports being generated by the 6809s and react to them as appropriate. A major feature of any such system is invariably a queuing mechanism. This is used both to handle the input load and to prepare information for the 9600 baud terminals. In the process of developing such a system a mechanism called the execution queue was developed which was found to have many beneficial attributes. This paper will describe the application and the execution queue mechanism as well as highlighting the advantages of this powerful tool.
HHC
The Use of Forth in a Portable, Point of Sale Environment
Laslo Szasz, Robert Marshall and Anthony Kobykin
Abstract
Our introduction to Forth has been dictated by the hardware, the Panasonic HHC. This machine is highly portable (only 2 pounds) and is widely used in the insurance environment to do sales illustrations of products.

We have had to implement strict project management structures to make our Forth environment productive, and to keep the lines of communication clear with our clients.

The hardware environment and the EPROMing methodology limits-some of the well known advantages of Forth. Overall, we find Forth to be special because it allows for very small code and the easy access to hardware controls and the assembler.

We have developed many routines and structures to enhance the programming environment provided by Panasonic. Some of these are:

  • Input with Validation,
  • Non-checking Floating Point,
  • Assembly Routines,
  • Mathematical functions,
  • LCD special characters (French & Spanish characters),
  • Printer routines,
  • Program swapping,
  • Storage, of Numeric Data - Space considerations,
  • Storage of Strings,
  • Multiple Module Systems.
What Can Be Done with Metacompilers?
Rieks Joosten
Abstract
A Forth system has been modified and extended so that it became a tool with which compilers can he built; these unite the powers of classical compilers with the characteristic development facilities found in Forth systems. This Meta-tool (Meta as in Meta-Physics) not only allows for building powerful compilers for almost any machine; but also for building an integrated development system that includes debugging and simulation facilities. Also, the variety of tools that may be needed for a number of different target machines, may look very much alike so that one can speak of an integrated tool kit, i.e. a complete software development environment that embraces a (rather large) class of machines.
Simulating and Symbolic Debugging
Harm Braams
Abstract Only
This paper describes the experiences that have been acquired when writing a debugging aid on top of the metacompilation environment of which the structured ideas have been presented at the 1985 Rochester Forth Conference. In spite of having defined and written it, it is stunning to see the multitutde of ways in which the degugger is used: it turns out that the facilities offered by the overall system have been employed in a variety of ways suitable for a number of different tasks.
Mathematics
FACS - A Forth Analog Computer Simulator
Nicholas G. Lordi
Abstract
Forth provides a natural programming environment for creating special purpose simulation languages. FACS is a block-oriented continuous-system simulation language implemented in both integer and floating-point versions. Forth versions of CSSL's (including FDARE, a Forth equation-oriented CSSL) have the following advantages over CSSL's written in Pascal and Fortran: minimal memory requirements, keyboard alteration of Model parameters without recompilation, and extensibility. Only the integer version, programmed in F83 Forth, will be discussed.
Forth Advanced Scientific Tools: How Intelligent Should Arrays Be?
Ferren MacIntyre
Abstract
FAST, the Forth Advanced Scientific Tools package, should treat arrays as entities and not as collections. The question is how much information DATATYPE== (the grandparent word which creates data-type-defining words in the proposed Forth Floating-Point Standard Extension) should store in an array header, and how array operators should use the information. As megabyte memories and 10 MHz speeds become the PC norm, there are applications in which arrays should remember dimensions, data type, address type, and storage byte-width.
Exploring Mandelbrot Fractals with MMSFORTH
Jill A. Miller and James J. Gerow
Abstract
Mandeibrot fractals became generally known in 1985 and instantly fascinated mathematicians, artists and all those who marvel at the richness and beauty which results from the plotting of these relatively simple equations. Initially, the generation of a sufficiently detailed plot would require calculation on a large computer, or an overnight run. However, combining standard MMSFORTH for IBM PC with three of its optional extension wordsets - floating-point QUANs, long addressing, and 8087 fast-math support - we are able to generate 200x200-pixel Mandelbrot plots of typically 80 iterations at about 10 minutes per plot.
SWIFT - A New Type of Forth Application
John Mullen
Abstract
Nonlinear optimization (NLO) is the search for the best solution within a set of feasible solutions. There are no restrictions on the type of constraints that determine the feasible region or on the ordering function that is used to compare feasible solutions. Search techniques, analogous to groping for the highest spot in a field by night, are often used to find solutions to this type of problem. Specific algorithms differ in the types of problems they can solve, in how efficient they are, and in what information they require.

Because of the variety of such problems, no single algorithm can be guaranteed to work at all times. In addition, results often depend on the starting point of the search and on the working parameters of the chosen algorithm. Thus, the analyst must often apply each of several techniques many times in a trial and error process to find an optimal point.

In addition, the form of the constraint functions and the ordering function may be arbitrarily complex. Thus the analyst must be able to specify them in a general way, usually by using external functions or subroutines. Finally, since many calculations may be required for each point and since many points have to be evaluated, high execution speed is a necessity [1].

Because of the power, flexibility and speed required, most such analysis has been done in FORTRAN. This is a good choice if one is using a large computer, but microcomputers are often used to solve moderately large problems. Current implementations of FORTRAN do not allow one to make full use of the microcomputer's interactive nature, and much of the potential advantage in this approach is lost. Forth is a good alternative to FORTRAN. It is fast, modular, and interactive. In addition, the advent of the mathematic coprocessor has made needed functions available and floating-point operations efficient.

Circular Statistics in Forth
Charles Creutz and M. Kwon
Abstract Only
Many organisms, and often cells within organisms, move or grow preferentially oriented with respect to specific directions within their environment. Examples of such activity include the motion of white blood cells toward sites of inflammation, the oriented growth of plants toward the sun, and the seasonal migration of birds. To study these phenomena, data may be taken about the direction of movement of individual organisms or cells within a population of similar organisms or cells. Analysis of this data with the use of the branch of mathematics known as circular statistics provides parameters such as the average direction of movement of the population, and more importantly, the dispersion about this average that is exhibited by the population. This parameter is useful in that it represents a quantitative measure of the ability of the population to orient. A small dispersion indicates a high degree of orientation within the population. Observing how drugs, temperature or other perturbations on the biological material effect this parameter is a way to investigate the mechanism causing the orientation. Forth has been used to write routines to do the required circular statistics calculations and to model the behavior of the population using von-Mises distributions from circular statistics. Hardware dependent Forth routines have also been written to provide circular coordinate system histograms of this type of data.
Philosophy
Signal Space, Address Space, & Symbol Space
James C. Brakefield
Abstract
Three major engineering disciplines (computer or hardware, software, and knowledge) can be abstracted so that they deal with vector spaces. The three abstract spaces can be mapped into one another such that concepts in one take another form in one of the others. This leads to insights into the nature of various problems.

Boolean signal space is a variation of the binary hyper-cube. It can be used as a framework for logic design.

Address space is a variation of Forth. It can be used as a framework for the programming of computers.

Symbol space is an approach to the artificial intelligence paradigm. Its intuitive appeal is as a model of thought.

The talk will describe each of these in greater detail, show the mappings from one to another, and show some problems which benefit from the recasting of their context.

A Century of FORTH: Issues and Trends Projected by a Remarkably Parallel Spoken Language, ESPERANTO
A. Richard Miller
Abstract
In 1887, one person developed a logical, efficient and expressive speaking language to offer the world a simple, non-political "second language" for all peoples. Since 1910, each year over a million people have used this international language effectively.

In and about 1970, one person developed a logical, efficient and expressive computer language to offer himself a better way to create a few more programs during his career. In the past 15 years, his "personal solution" has spread to many thousands of other programmers and continues to grow.

Forth introduces many opportunities each year, but its flexible nature and the lack of a central controlling organization also have weakened its acceptance by the general public. How flexible - read non-standard - should Forth be? Should any group attempt to arbitrate this matter? A century of Esperanto history offers some provoking insights into the future of Forth and Forth users.


Working Group Reports
Forth-like Languages for Artificial Intelligence
Forth Engines
Programming Environments
Object-Oriented
Graphics
Standards