Principles of Programmable SuperMemo

At opening a database, Programmable SuperMemo checks if a database DLL file is present and if it exports the minimum set of procedures needed to run a programmed repetition. If these procedures are present, Programmable SuperMemo sets a flag which makes it substitute original SuperMemo procedures for procedures defined in the DLL file. For example, instead of running a standard repetition course, SuperMemo calls the external procedure repetition which is defined in the DLL file. This procedure obtains a pointer to a structure with data that might be useful for the programmer to implement a programmed repetition. This structure includes among others: (1) number of the repeated item, (2) question and answer strings (that may be used for any purpose the programmer chooses, for example, storing internal text data needed in the learning process), (3) current interval of the item, its last repetition date, number of lapses, and other item parameters, (4) handle to the Learn window, (5) handle to the main menu of SuperMemo, (6) extensions of two external files associated with the item (these can be images, sound, MIDI files, video clips, and whatever the programmer opts to use), (7) grade that should be set on output, and many more. The only obligatory member of the repetition data structure that must be used is grade. This member must be set on output to communicate to SuperMemo the outcome of the repetition. All the computation needed to schedule the date of the next repetition is done by SuperMemo.

Apart from the procedure Repetition, programmed database may implement many other database-specific actions as database initialization (e.g. in order to modify the menu of Programmable SuperMemo), database uninitialization (e.g. to restore the original menu), item appending procedure, and many more.

In the future, depending on the suggestions and requests of database programmers, SuperMemo World will work on extending the set of programmable components of SuperMemo to give the programmer the maximum control over the appearance and behavior of the program working with a particular database. Future versions of Programmable SuperMemo will rely on Object Linking and Embedding paradigm; however, maximum possible compatibility with the present specification will be retained.