|Page 28 of 800||Search internet|
Since the Logiweb programming language is pure functional, it is unable to perform I/O. To cope with that, Logiweb includes the Logiweb Abstract Machine (lgwam) which is an infinite state machine.
The Logiweb machine is described in Chapter 7 of the base page. In short, the Logiweb machine has the following features:
To write a program that can run on the Logiweb machine, the author has to write a 'handler'. A handler is a function which can take lists of input events as an argument and produce a list of output events as a return value.When the Logiweb machine starts up, it loads the handler to be executed. Then the machine enters a input-eval-output loop.
In each loop, the machine collects input, convert them to input event data structures, invokes the handler on the list of input events, and converts the return value into calls to output routines.
When a Logiweb machine starts up it can do the following:
Whenever the handler produces an extend event, a new collection of events become available in addition to those already available. Which and how many events become available depends on the string sent through the C compiler.
In other words, Logiweb uses C as backstop: Whatever Logiweb cannot do itself has to be delegated to C.
|Page 28 of 800||Search logiweb.eu|