Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

alice.tucson
Class Automaton  view Automaton download Automaton.java

java.lang.Object
  extended byalice.tucson.User
      extended byalice.tucson.Agent
          extended byalice.tucson.Automaton
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable, TucsonInterface

public abstract class Automaton
extends Agent
implements java.io.Serializable

Defines a more involved type of TuCSoN agent (compared to Agent one).

The agent is structured as a finite state automaton. The behaviour of its states is defined writing public methods; the become method is used to go make a transition from state to state, which in this case means from method to method. It's based on continuation-passing style of arranging computation.

TuCSoN automata are spawned using Threads:

the first state (method) executed is always "boot" state (method).

to stop shutdown the automaton the state "end" is provided: