|VERY PRELIMINARY! EXPECT REVISIONS|
Amulet is a real-time programming environment based on deadline-based event scheduling. The Amulet environment is implemented as a collection of C routines and a set of C preprocessor macros that, in combination, produce what is effectively a new programming language. Amulet programs consist of a collection of objects which communicate by sending messages to methods of other objects.
Every Amulet message has a time window during which it must be delivered. The kernel will not deliver a message before its starting time, and it will deliver messages in order of their deadlines. Thus, Amulet implements classic deadline-based scheduling in the context of an essentially object oriented programming framework.
This manual focuses on the basics of the Amulet programming system. It details the syntax, macros, functions, and structures that comprise the Amulet language. An example program is provided along with information on how to acquire the Amulet source.
Amulet is a real-time programming system developed to be a general tool for handling time critical processes. Amulet was inspired by the parallel programming language Charm and borrows freely from the syntax of that language. Like Charm, Amulet is based on C, although unlike the Charm project, we do not use a separate preprocessor, but rely entirely on C preprocessor macros to translate from Amulet to C.
Amulet relies upon two main structures: chares and messages. As in Charm, a chare is a class of objects, as used in object oriented programming. Messages are the vehicles by which information is passed between chares. Each chare has one or more entries, each of which implements a method of that class of objects, to use object oriented terminology. When a message is sent to an entry of an instance of a chare, the associated block of C code is executed.
All Amulet messages contain a deadline, and the Amulet kernel delivers messages in deadline order. Furthermore, messages may also have start times, before which the Amulet kernel will not deliver them. Between them, the start time and deadline of a message define the window in real-time during which that message must be processed. Amulet applications must compute the start times and deadlines for each message sent, and to support this, Amulet provides a variety of functions to allow for efficient temporal computation.