Practical and Theoretical Aspects of

Forth Software Development

Peter J. Knaggs

All files are avaliable in both PostScript ( .ps ) and Adobe Portable Document Format ( .pdf ). The thesis has been splint into its individual chapters to assist in downloading the relivent parts of the document. The full document is also available if you want to download the full document (all 1 Meg of it). All documents have been re-processed to print on both American and European (A4) paper. It should be noted that as a consequence of this reformatting, the page numbering is not consistant between the two versions.

Where relivent the individual chapter contains its own "references" section, while the full verion contains a full Bibliography.

Abstract

Table of Contents

Acknowledgments

Overview [PDF (151K)] Introduction Equipment Forth The Novix NC4000 Forth Engine The Harris RTX-2000 Forth Engine Networks Mixed Languages Interface Formal Methods Formal Forth Type Algebra The Event Calculus Using IBM's NetBios [PDF (209K)] Introduction Functions Naming Sessions Datagrams Broadcasting House keeping Invoking NetBios Functions Multi-Tasking Examples Block Transfer Net-Chat Problems PolyForth Interrupts Porting Comparison with C interface Interface Code Error Handler Network Control Block Assembler Interface Low-Level interface General Support Naming Support Session Support Datagram Support Broadcast Support The "Net-Chat" Application Memory Buffers Listening Sending Initialisation Close Down Mixed Languages interface [PDF (87K)] Principles Argument Passing Programming The C Heap Organisation Generalisation Formal Forth [PDF (134K)] Introduction The Forth Toolbox The Basic Model Word Definitions Immediate Words Storage Units Stacks Code Definitions Wordlists Defining words High-Level words Immediate words Code words Dictionary Searching Stack Optimisation [PDF (174K)] Introduction Code Generation Inline Compilation Peep-Hole Optimisation Conditionals Registers Optimisation using a Stack image Argument Passing Conditional execution Looping structures The Cell Type [PDF (147K)] Introduction Stack Types Notation Rules Composition Rules Reduction Rules Wildcard Rules Simple Examples Multiple Signatures Pass by reference Control Structures Casting Strong vs Weak Typing Strong Typing Weak Typing A Forth Type Checker [PDF (166K)] Invocation Stack Notation Commands Classes Type Command Stack Command Assume Command Assert Command Syntax Command Variable Stack Items Or - | Alternative descriptions - + Flow Control Defining words Pre-defined User-defined Vocabularies Error Log Error report Verbose reports Statistics Statistics flag Problems The Event Calculus [PDF (270K)] Introduction State Machines The Formal Model An Algebra of machine behaviours Labelled Transitions Simple Examples The specification of mutual exclusion (without fairness) Asynchronous Events Value passing Mutual Exclusion with fairness A GCD algorithm, modelling parameter passing and procedure call Variables and Scopes Time The Dynamic model Combining the Event Calculus with Z schema calculus A Distributed seat booking system Conclusions and Recommendations [PDF (117K)] Introduction Networks Mixed Languages Interface Formal Forth Stack Optimisation Type Algebra Forth Type Checker The Event Calculus Future Directions Type Algebra Formal Forth Event Calculus

Bibliography

Communicating Novix NC4016s [PDF (172K)] Introduction Programming cmForth SCForth PolyForth FATWIN Single Boards Host Services Parallel Boards First Method Second Method Comparison Communicating Systems Hardware Restrictions Communication Code Multiple Boards "Boot" code First attempt at providing Host Services Revised Boot and Host code Forth++ and the MACH1 [PDF (167K)] The MACH1 The MACH2 Forth++ Memory Organisation Multi-Tasking and Windows Argument Records The Multi-Processor Forth Interpreter The Users View Implementation Notes Code Optimisation Graphics Mixed Languages Interface: Source Code [PDF (160K)] Loader Making the loader Overlay initialisation Context Switching Stack access User code Making the C Overlay Published Papers The Forth++ C interface Forth++ and the MACH1 RTX-2000 board The Cell Type Formal Forth Type inference in stack based languages The Event Calculus: Formal Specification of Real Time Systems by means of Diagrams and Z Schemas