What is the Name of the Problem or Technique of Determining if a Line in a Program Will Execute
$begingroup$
If I were to pose the question: "Given a program $P$ containing statement $X$, will $X$ be executed (given enough runs with all possible inputs)?"
This strikes me of being a relative of the Halting Problem, but I just don't know the taxonomy here.
What is the name of this problem, or does it not have a name because it is solved/uninteresting?
computability rice-theorem
New contributor
$endgroup$
add a comment |
$begingroup$
If I were to pose the question: "Given a program $P$ containing statement $X$, will $X$ be executed (given enough runs with all possible inputs)?"
This strikes me of being a relative of the Halting Problem, but I just don't know the taxonomy here.
What is the name of this problem, or does it not have a name because it is solved/uninteresting?
computability rice-theorem
New contributor
$endgroup$
add a comment |
$begingroup$
If I were to pose the question: "Given a program $P$ containing statement $X$, will $X$ be executed (given enough runs with all possible inputs)?"
This strikes me of being a relative of the Halting Problem, but I just don't know the taxonomy here.
What is the name of this problem, or does it not have a name because it is solved/uninteresting?
computability rice-theorem
New contributor
$endgroup$
If I were to pose the question: "Given a program $P$ containing statement $X$, will $X$ be executed (given enough runs with all possible inputs)?"
This strikes me of being a relative of the Halting Problem, but I just don't know the taxonomy here.
What is the name of this problem, or does it not have a name because it is solved/uninteresting?
computability rice-theorem
computability rice-theorem
New contributor
New contributor
edited 3 hours ago
PyRulez
326114
326114
New contributor
asked 8 hours ago
Keenan DiggsKeenan Diggs
1183
1183
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.
$endgroup$
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
add a comment |
$begingroup$
This is called the reachability problem -- is it possible for a given system to enter a given state?
Techniques that attempt to answer this problem fall under reachability analysis, which is one of the main goals of (finite / symbolic) model checking.
As the other answer suggests, this is one of the many instances covered by Rice's theorem. Answering questions about the runtime behavior of programs from only their source code is almost always undecidable. Nonetheless, there are many attempts to solve these problems that can be fairly effective in "real world" code (e.g., Microsoft's 2002 project SLAM), because human programmers tend to try to make their code easy to understand (for other humans; we hope incidentally also for mechanical analysis)
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "419"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f103247%2fwhat-is-the-name-of-the-problem-or-technique-of-determining-if-a-line-in-a-progr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.
$endgroup$
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
add a comment |
$begingroup$
EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.
$endgroup$
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
add a comment |
$begingroup$
EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.
$endgroup$
EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.
edited 2 hours ago
answered 7 hours ago
PyRulezPyRulez
326114
326114
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
add a comment |
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
$begingroup$
Thank you for answering my question. I will continue my research toward Rice's Theorem.
$endgroup$
– Keenan Diggs
7 hours ago
1
1
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs if you have any other questions, let me know.
$endgroup$
– PyRulez
7 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
$begingroup$
@KeenanDiggs Also, I added a caveat to the answer.
$endgroup$
– PyRulez
4 hours ago
add a comment |
$begingroup$
This is called the reachability problem -- is it possible for a given system to enter a given state?
Techniques that attempt to answer this problem fall under reachability analysis, which is one of the main goals of (finite / symbolic) model checking.
As the other answer suggests, this is one of the many instances covered by Rice's theorem. Answering questions about the runtime behavior of programs from only their source code is almost always undecidable. Nonetheless, there are many attempts to solve these problems that can be fairly effective in "real world" code (e.g., Microsoft's 2002 project SLAM), because human programmers tend to try to make their code easy to understand (for other humans; we hope incidentally also for mechanical analysis)
$endgroup$
add a comment |
$begingroup$
This is called the reachability problem -- is it possible for a given system to enter a given state?
Techniques that attempt to answer this problem fall under reachability analysis, which is one of the main goals of (finite / symbolic) model checking.
As the other answer suggests, this is one of the many instances covered by Rice's theorem. Answering questions about the runtime behavior of programs from only their source code is almost always undecidable. Nonetheless, there are many attempts to solve these problems that can be fairly effective in "real world" code (e.g., Microsoft's 2002 project SLAM), because human programmers tend to try to make their code easy to understand (for other humans; we hope incidentally also for mechanical analysis)
$endgroup$
add a comment |
$begingroup$
This is called the reachability problem -- is it possible for a given system to enter a given state?
Techniques that attempt to answer this problem fall under reachability analysis, which is one of the main goals of (finite / symbolic) model checking.
As the other answer suggests, this is one of the many instances covered by Rice's theorem. Answering questions about the runtime behavior of programs from only their source code is almost always undecidable. Nonetheless, there are many attempts to solve these problems that can be fairly effective in "real world" code (e.g., Microsoft's 2002 project SLAM), because human programmers tend to try to make their code easy to understand (for other humans; we hope incidentally also for mechanical analysis)
$endgroup$
This is called the reachability problem -- is it possible for a given system to enter a given state?
Techniques that attempt to answer this problem fall under reachability analysis, which is one of the main goals of (finite / symbolic) model checking.
As the other answer suggests, this is one of the many instances covered by Rice's theorem. Answering questions about the runtime behavior of programs from only their source code is almost always undecidable. Nonetheless, there are many attempts to solve these problems that can be fairly effective in "real world" code (e.g., Microsoft's 2002 project SLAM), because human programmers tend to try to make their code easy to understand (for other humans; we hope incidentally also for mechanical analysis)
answered 2 hours ago
Curtis FCurtis F
324110
324110
add a comment |
add a comment |
Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.
Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.
Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.
Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Computer Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f103247%2fwhat-is-the-name-of-the-problem-or-technique-of-determining-if-a-line-in-a-progr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown