Starset
A Forgotten Programming Language from Russia
Starset is a high-level programming language developed under the guidance of M. M. Gilula at the Program Systems Institute of the Russian Academy of Sciences in 1991.
Starset supports three data types: words (aka strings), sets, and classes. A word that looks like a valid number, has a numerical value (as in Tcl). If the numerical value of a word is 0, then the word is logically interpreted as False
. Otherwise, it is logically interpreted as True
. The set type is defined as a mathematical set of words. The class type is defined as a mathematical set of sets. Starset allows one to define indices for variables of the class type. An indexed class is the equivalent of a dictionary in a language like Python. Set and class variables begin with $ and $$, respectively.
Starset is a procedural language with a limited set of built-in functions and the ability to create custom procedures. In addition to the traditional arithmetic and logical operators, and string operators, Starset supports pattern matching for both words and sets.
Starset supports branching (if
), simple loops, parallel loops over a set or a class, and sequential loops over a set or class. The operators of creating and deleting an index, searching a set, modifying a set, adding a set, and selecting a set are used to simulate working with a database. Sets and classes can be stored externally in files.
Code example. Procedure Ivanov
reads a class from the standard input, removes all subsets that do not contain a single word with the substring ‘Ivanov’, and displays the resulting class on the display.
Proc Ivanov ()
word: x;
set: $line;
class: $$text;
Read $$text;
$$text: = {$line in $$text: (Exist x in $line)(x is [..]^'Ivanov'^[..])};
Write $$text;
Endproc
Read more about Starset in the book The Set Model for Database and Information Systems published by Addison-Wesley in 1994 (ISBN 0–201–59379–3).