Valentin Turchin and Refal
Abstract
Valentin Turchin (1931–2010) was a Soviet nuclear physicist who switched to computer science in 1964, created the symbol-processing language Refal in the second half of the 1960s, and in the 1970s laid the foundations of supercompilation, a method that transforms a program by running it symbolically and building a simpler, faster equivalent. He was also a dissident. In 1974 he lost his job for defending Andrei Sakharov and Alexander Solzhenitsyn, spent three years unemployed while his students met in apartments for his weekly seminar, and left for the United States in 1977, where he taught at the City College of New York until 1999.
From Physics to Programming
Turchin was born on 14 February 1931, graduated from the physics faculty of Moscow University in 1952, and worked at the Institute of Physics and Power Engineering in Obninsk on slow neutrons, the subject of his doctoral dissertation. Soon after, Mstislav Keldysh invited him to the Institute of Applied Mathematics of the Academy of Sciences, now the Keldysh Institute, and in 1964 he moved to Moscow. He changed his field as well as his city: theoretical physics, he argued, was approaching a crisis that could only be resolved by deep automation of the processing of physical and mathematical theories, of formal-language models, by computer.
Refal
As a first step he designed Refal (from REcursive Functions Algorithmic Language), conceived in 1966 as a metalanguage for processing texts in formal languages. A Refal program is a set of sentences, each a pattern and a replacement: the machine looks for the first sentence whose pattern matches the expression in its “field of view” and replaces the match. At the time it was a higher-level language than the existing symbol-processing languages, Lisp and SNOBOL among them. Turchin, S. N. Florentsev, and V. Yu. Olyunin wrote the first interpreter for the BESM-6 in 1967–69, and his book on the language appeared from the Institute of Applied Mathematics in 1968. In the autumn of 1969 Turchin and Sergei Romanenko, then a second-year student, began a compiler, which made Refal programs run two and a half to five times faster.
In the 1970s Refal was used in the Soviet Union to write compilers, macro generators, and interpreters, and for computer algebra, artificial-intelligence tasks, and the construction of mathematical proofs. A group of his students from Moscow University, the Moscow Engineering Physics Institute, and the Moscow Institute of Physics and Technology formed around him.
Supercompilation
Turchin saw programming as the next stage of what he called a metasystem transition, his term for the step in evolution in which a new level of control arises over existing systems: computers had automated the manipulation of formal models, and the next step was to automate programming itself, treating programs as objects to be manipulated. In the 1970s he developed supercompilation. A supercompiler runs a program on symbolic data, follows all paths its computation can take, generalises the configurations that recur, and builds from this “process graph” a new program that does the same work, often with intermediate steps and redundant tests removed. The idea is related to partial evaluation, which Andrei Ershov developed in Novosibirsk under the name mixed computation (see Andrei Ershov). Turchin published its full statement in English as “The Concept of a Supercompiler” in the ACM Transactions on Programming Languages and Systems in 1986.
Dissent and Exile
In 1972 Turchin moved to a central research institute for automation in construction (TsNIPIASS), where he headed a laboratory and continued Refal and supercompilation with his students. In the summer of 1974 he was dismissed for his human-rights activity and for speaking in defence of Sakharov and Solzhenitsyn. Until he left the country he had no job and worked at home; his weekly Tuesday seminar continued throughout, in apartments when institutes would no longer host it. He wrote two books in those years, The Phenomenon of Science, on the metasystem transition as the unit of evolution from the origin of life to science, and The Inertia of Fear, which applied the same idea to society and described Soviet socialism as a failed transition that had produced totalitarianism instead.
He emigrated in 1977 and reached the United States in 1978. There he worked for a year and a half at the Courant Institute in New York in the group of Jacob Schwartz, author of the language SETL, and from 1979 until his retirement in 1999 was a professor at the City College of the City University of New York, where he carried out his main work on supercompilation and on the cybernetic foundations of mathematics. In the 1990s he founded the Principia Cybernetica project with Francis Heylighen and Cliff Joslyn. He died on 7 April 2010.
Dead End: A Language Without a Country
Refal stayed inside the Soviet Union. Its users were Turchin’s group and the institutes that ran it on the BESM-6, the M-220, and later machines, and when Turchin was dismissed in 1974 and then emigrated, the language lost its author and its official home at the same time. Supercompilation travelled further, because Turchin published it in English from New York; Refal itself remained a Russian-language research tool.
📚 Sources
- Klimov, A. V.: “О работах Валентина Федоровича Турчина по кибернетике и информатике”, Russian Virtual Computer Museum (life dates 14 February 1931 to 7 April 2010, Moscow University 1952, Obninsk, Keldysh and the move in 1964, the crisis of physics, Refal in the second half of the 1960s as a metalanguage, higher-level than Lisp and SNOBOL, uses in the 1970s, students, supercompilation in the 1970s, TsNIPIASS 1972, dismissal in summer 1974 for defending Sakharov and Solzhenitsyn, the Tuesday seminar, departure 1977, Courant Institute with Schwartz, City College until 1999, the metasystem transition, The Phenomenon of Science, The Inertia of Fear, Principia Cybernetica with Heylighen and Joslyn)
- Romanenko, S. A.: “История рефал-компилятора”, Russian Virtual Computer Museum (the interpreter by Turchin, Florentsev, and Olyunin 1967–1969 on the BESM-6, the compiler begun in autumn 1969, speed-up of 2.5 to 5 times)
- Turchin, Valentin F.: “The Concept of a Supercompiler”, ACM Transactions on Programming Languages and Systems 8(3), 292–325 (1986)
- Рефал, Wikipedia (Russian) and Refal, Wikipedia (finding aids: conceived 1966, first implementation and book 1968)
- Valentin Turchin, Wikipedia (finding aid: Keldysh Institute from 1964, emigration 1977, City College from 1979)