Concatenative language
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 its own unique language. One goal of DSSP was "one word of text - one word of machine code". Therefore 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 operator that stands for BRanch on Sign. %BR% is the DSSP equivalent to a switch statement. The following 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|_DSSP and Forth. Compare Analysis_]] ([[https://archive.ph/ZdNAD|Archive 1]]) ([[https://web.archive.org/web/20230405010717/http://brokestream.com/daf.txt|Archive 2]]). Finally, an example of DSSP's syntax can be seen in the following factorial 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 Russian. However, there are a handful of English sources. These English sources around the DSSP and Setun-70 were used to write this article. - [[https://github.com/trinarium/DSSP-C|DSSP-C repo on github (Russian)]] - [[http://euroforth.org/ef00/lyakina00.pdf|Bilingue Programming System DSSP+Forth]] ([[https://web.archive.org/web/20211025222608/http://www.euroforth.org/ef00/lyakina00.pdf|Wayback Machine]]) - [[https://github.com/mechaniputer/libreDSSP|LibreDSSP]] Information about the Setun and the Setun-70: - [[https://en.wikipedia.org/wiki/Setun|Setun on Wikipedia]] - [[https://computer-museum.ru/english/setun.htm|Development of ternary computers at Moscow State University]] - [[https://link.springer.com/content/pdf/10.1007/978-3-642-22816-2_10.pdf|Ternary Computers: The Setun and the Setun 70]] Finally, there exists an open source, though incomplete, implementation of DSSP called [[https://github.com/mechaniputer/libreDSSP|LibreDSSP]].
Describe this revision:
Save