Asked 21st Apr, 2012

Are there any successful DSL's which are turing complete?

As far as I know most domain specific languages are not turing complete and they don't have to since they are only designed to solve very specific problems.
I even noticed a trend that a lot of newer DSL's tend to avoid turing completeness on purpose.
But I think that there might be also examples of useful and / or succesful domain specific languages which are turing complete. Can you point me to a good example?

Most recent answer

16th May, 2016
Shivam Khandelwal
International Institute of Information Technology, Hyderabad
"JavaScript is a fully Turing-complete interpreted language".
"XSLT and m4 macros are both purely declarative and Turing-complete"
troff: "it is accidentally Turing-complete"
"The awk action language is Turing-complete, and can read and write files."
bc and dc: "These minilanguages have both conditionals and loops; they are Turing-complete""

All Answers (6)

15th Jan, 2013
Marjan Mernik
University of Maribor
Pragmatically, any DSL implemented using the embedded approach within GPL is Turing complete. In that case the host language compiler is not changed and a DSL using it inherit all GPL features.
1 Recommendation
4th Feb, 2013
Janosch Woschitz
Independent Researcher
If we add the constraint that we may only use the specific subset of the language provided by the DSL (or exclude embedded DSLs completely), are there still any good examples? I would consider shell script as such an example but I am not sure if it may count as a DSL from a strictly theoretical standpoint.
1 Recommendation
5th Feb, 2013
Marjan Mernik
University of Maribor
One good example which I come across recently might be the Proto DSL. See:
Operational semantics of Proto
Mirko Viroli, Jacob Beal, Kyle Usbeck
Despite that the syntax of Proto resembles LISP it is implemented as full compiler.
1 Recommendation
14th May, 2013
Christopher Landauer
Topcy House Consulting
lisp has a full compiler (i hope you were not implying otherwise)
I guess that this example is sort of cheating, but John Conway's Game of Life, which is an array DSL for studying classes of cellular automata, is Turing complete
1 Recommendation
4th Jul, 2014
Juha-Pekka Tolvanen
Depends a bit on definitions: but if you leave the restriction on unlimited memory, one example is ITU’s SDL targeting a special domain in telecommunication and it has been used several decades to build some of the most complex systems (telecommunication systems we rely today). It is also an example of what we call today external DSL, and it has also both textual and graphical notations.
1 Recommendation

Similar questions and discussions

Related Publications

Every domain has a language that helps practitioners communicate their thoughts easily. When a chef instructs a helper to sauté vegetables, both parties know what the term means. However, software solutions created for several domains using general-purpose, high-level programming languages such as C# or Java often quickly become difficult to mainta...
Conference Paper
Full-text available
Requirement specification is usually done with a combination of Natural Language (NL) and informal diagrams. Modelling approaches to support requirement engineering activities have involved a combination of text and graphical models. In this work, a textual domain specific modelling notation for requirement specification is presented. How certain r...
Got a technical question?
Get high-quality answers from experts.