halting-problem

Do all regular expressions halt?

荒凉一梦 提交于 2019-11-28 03:09:33
问题 Is there any regular expression that will, for some input string, search for a match forever? 回答1: For a finite input, there is no formal regular expression that will not halt. Any formal regular expression can be translated into a Deterministic Finite Automata. A DFA reads the input one character at a time, and, at the end of the input, you are either in an accepting state or in a non-accepting state. If the state is accepting, then the input matches the regular expression. Otherwise, it

Practical non-Turing-complete languages?

余生长醉 提交于 2019-11-27 17:01:38
Nearly all programming languages used are Turing Complete , and while this affords the language to represent any computable algorithm, it also comes with its own set of problems . Seeing as all the algorithms I write are intended to halt, I would like to be able to represent them in a language that guarantees they will halt. Regular expressions used for matching strings and finite state machines are used when lexing , but I'm wondering if there's a more general, broadly language that's not Turing complete? edit: I should clarify, by 'general purpose' I don't necessarily want to be able to

When have you come upon the halting problem in the field? [closed]

人走茶凉 提交于 2019-11-27 05:06:38
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . When have you ever personally come upon the halting problem in the field? This can be when a co-worker / boss suggested a solution which would violate the fundamental limits of computation, or when you realized yourself that a problem you were trying to solve was, in fact,

What exactly is the halting problem?

廉价感情. 提交于 2019-11-26 19:46:26
Whenever people ask about the halting problem as it pertains to programming, people respond with "If you just add one loop, you've got the halting program and therefore you can't automate task " Makes sense. If your program has an infinite loop, then when your program is running, you have no way of knowing whether the program is still crunching input, or if it is just looping infinitely. But some of this seems counter intuitive. What if I was writing a halting problem solver, which takes source code as its input. rascher@localhost$ ./haltingSolver source.c If my code (source.c) looks like this

Practical non-Turing-complete languages?

老子叫甜甜 提交于 2019-11-26 18:49:34
问题 Nearly all programming languages used are Turing Complete, and while this affords the language to represent any computable algorithm, it also comes with its own set of problems. Seeing as all the algorithms I write are intended to halt, I would like to be able to represent them in a language that guarantees they will halt. Regular expressions used for matching strings and finite state machines are used when lexing, but I'm wondering if there's a more general, broadly language that's not

What exactly is the halting problem?

痞子三分冷 提交于 2019-11-26 07:25:17
问题 Whenever people ask about the halting problem as it pertains to programming, people respond with \"If you just add one loop, you\'ve got the halting program and therefore you can\'t automate task \" Makes sense. If your program has an infinite loop, then when your program is running, you have no way of knowing whether the program is still crunching input, or if it is just looping infinitely. But some of this seems counter intuitive. What if I was writing a halting problem solver, which takes