Concatenative topics
Concatenative meta
Other languages
Meta
Dialog System for Structured Programming (DSSP) was a programming language developed in the 1980s at Moscow State University. Its development was lead by Dr. Brusentsov who acted as theorist and project lead. It based its implementation on the short-lived Setun-70, a ternary stack-based computer system. It took many of its ideas from the Forth programming language while evolving into a its own unique language.
One goal of DSSP was "one word of text - one word of machine code". Therefor to reach this goal, DSSP often introduced additional control structures. One such example is in flow control. Forth only described a IF ... ELSE ... THEN
operator, whereas the DSSP included several branch operators:
DSSP Forth [n] IF+ A [n] 0> IF A THEN [n] IF0 A [n] 0= IF A THEN [n] IF- A [n] 0< IF A THEN [n] BR+ A B [n] 0> IF A ELSE B THEN [n] BR- A B [n] 0< NEG IF A ELSE B THEN [n] BR0 A B [n] 0= IF A ELSE B THEN [n] BRS X Y Z [n] BR c1 p1 c2 p2 ... cN pN else pN+1
BRS
is a ternary branch operate that stand for BRanch on Sign. BR
is the DSSP equivalent to a switch statement. The follow provides an example of BR
being used to implement a transcription function for the letters [A-Z]:
: TRANSCRIPTION [n] BR #A ."ei" #B ."bi" #C ."ci" .... #Z ."zet" ELSE ."???" ;
Further details on the differences between DSSP and Forth can be found in http://brokestream.com/daf.txt (https://archive.ph/ZdNAD) (https://web.archive.org/web/20230405010717/http://brokestream.com/daf.txt). Finally, an example of DSSP's syntax can be seen in the following Fibonacci implementation:
[FG - факториал N, если N>0, иначе 0] : FG [N] C BR+ FCT T0 [N! или 0] ; [FCT - факториал N] : FCT [N] C 1- C DO P D [N!] ; : P [F,K] E2 C2 [K,F,K] * E2 1- [F*K,K-1] ;
Many of the sources around DSSP are written in Russia. However, there are a handful of English sources. These English sources around the DSSP and Setun-70 were used to write this article.
Information about the Setun and the Setun-70:
Finally, there exist a open source, tho incomplete, implementation of DSSP called https://github.com/mechaniputer/libreDSSP.
This revision created on Sat, 6 May 2023 05:31:17 by CapitalEx (Add DSSP to Concatenative Languages)