turing-complete

What are practical guidelines for evaluating a language's “Turing Completeness”?

北城余情 提交于 2019-12-18 09:59:20
问题 I've read "what-is-turing-complete" and the wikipedia page, but I'm less interested in a formal proof than in the practical implications of being Turing Complete. What I'm actually trying to decide is if the toy language I've just designed could be used as a general-purpose language. I know I can prove it is if I can write a Turing machine with it. But I don't want to go through that exercise until I'm fairly certain of success. Is there a minimum set of features without which Turing

Creating the shortest Turing-complete interpreter [closed]

强颜欢笑 提交于 2019-12-17 21:47:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I've just tried to create the smallest possible language interpreter. Would you like to join and try?

If a computer can be Turing complete with one instruction what is the purpose of having many instructions?

夙愿已清 提交于 2019-12-10 19:46:19
问题 I understand the concept of a computer being Turing complete ( having a MOV or command or a SUBNEG command and being able to therefore "synthesize" other instructions such as ). If that is true what is the purpose of having 100s of instructions like x86 has for example? Is to increase efficiency? 回答1: Yes. Equally, any logical circuit can be made using just NANDs. But that doesn't make other components redundant. Crafting a CPU from NAND gates would be monumentally inefficient, even if that

What are the practical limitations of a non-turing complete language like Coq?

寵の児 提交于 2019-12-09 04:03:04
问题 As there are non-Turing complete languages out there, and given I didn't study Comp Sci at university, could someone explain something that a Turing-incomplete language (like Coq) cannot do? Or is the completeness/incompleteness of no real practical interest (i.e. does it not make much difference in practice)? EDIT - I'm looking for an answer along the lines of you cannot build a hash table in a non-Turing complete language due to X , or something like that! 回答1: First, I assume you've

Really minimum lisp

余生长醉 提交于 2019-12-04 22:20:25
问题 What is the minimum set of primitives required such that a language is Turing complete and a lisp variant? Seems like car, cdr and some flow control and something for REPL is enough. It be nice if there is such list. Assume there are only 3 types of data, integers, symbols and lists.(like in picolisp) 回答1: There's a good discussion of this in the Lisp FAQ. It depends on your choice of primitives. McCarthy's original "LISP 1.5 Programmer's Manual" did it with five functions: CAR, CDR, CONS, EQ

Looking for languages that are not Turing complete

吃可爱长大的小学妹 提交于 2019-12-04 20:39:13
问题 I know a little about what is a turing-machine and a turing-complete language, but to understand better, could someone give examples of languages that are not Turing complete? (maybe even machines that are not Turing, as well?) 回答1: Regular expressions, in the formal definition, consisting only of: concatenation ( ab ) unbounded repetition ( a* ) alternation ( a|b ) grouping ( (ab)|(cd) ) can only recognise regular languages. A Turing-complete programming language can recognise recursively

I've heard that LaTeX is Turing complete. Are there any programs written in LaTeX?

故事扮演 提交于 2019-12-04 07:36:44
问题 It's possible to do interesting things with what would ordinarily be thought of as typesetting languages. For example, you can construct the Mandelbrot set using postscript. It is suggested in this MathOverflow question that LaTeX may be Turing-complete. This implies the ability to write arbitrary programs (although it may not be easy!). Does anyone know of any concrete example of such a program in LaTeX, which does something highly unusual with the language? 回答1: In issue 13 of The Monad

Halting in non-Turing-complete languages

我的梦境 提交于 2019-12-04 00:17:58
The halting problem cannot be solved for Turing complete languages and it can be solved trivially for some non-TC languages like regexes where it always halts. I was wondering if there are any languages that has both the ability to halt and not halt but admits an algorithm that can determine whether it halts. A. Rex Yes. One important class of this kind are primitive recursive functions . This class includes all of the basic things you expect to be able to do with numbers (addition, multiplication, etc.), as well as some complex classes like @adrian has mentioned (regular expressions/finite

What logic gates are required for Turing completeness?

不羁的心 提交于 2019-12-03 14:33:53
问题 My son has been playing Little Big Planet 2 lately, and I noticed that the game editor allows AND gates, OR gates and NOT gates... Is it Turing complete? If so, can anyone recommend a source for learning to turn those primitives into something like a higher level conditional if? 回答1: You need NOT and one of AND or OR to be able to do all binary logic. This is DeMorgan's Law, basically. However, this is not sufficient for Turing completeness. For that you also need random (or reducably

Really minimum lisp

孤者浪人 提交于 2019-12-03 14:00:25
What is the minimum set of primitives required such that a language is Turing complete and a lisp variant? Seems like car, cdr and some flow control and something for REPL is enough. It be nice if there is such list. Assume there are only 3 types of data, integers, symbols and lists.(like in picolisp) There's a good discussion of this in the Lisp FAQ . It depends on your choice of primitives. McCarthy's original "LISP 1.5 Programmer's Manual" did it with five functions: CAR, CDR, CONS, EQ, and ATOM. The lambda calculus is turing complete. It has one primitive - the lambda. Translating that to