What is the Name of the Problem or Technique of Determining if a Line in a Program Will Execute












3












$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?










share|cite|improve this question









New contributor




Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$

















    3












    $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?










    share|cite|improve this question









    New contributor




    Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$















      3












      3








      3





      $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?










      share|cite|improve this question









      New contributor




      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $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






      share|cite|improve this question









      New contributor




      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|cite|improve this question









      New contributor




      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|cite|improve this question




      share|cite|improve this question








      edited 3 hours ago









      PyRulez

      316114




      316114






      New contributor




      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 7 hours ago









      Keenan DiggsKeenan Diggs

      1183




      1183




      New contributor




      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Keenan Diggs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          2 Answers
          2






          active

          oldest

          votes


















          4












          $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.






          share|cite|improve this answer











          $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



















          3












          $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)






          share|cite|improve this answer









          $endgroup$













            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.










            draft saved

            draft discarded


















            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









            4












            $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.






            share|cite|improve this answer











            $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
















            4












            $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.






            share|cite|improve this answer











            $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














            4












            4








            4





            $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.






            share|cite|improve this answer











            $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.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited 2 hours ago

























            answered 7 hours ago









            PyRulezPyRulez

            316114




            316114












            • $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






            • 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











            3












            $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)






            share|cite|improve this answer









            $endgroup$


















              3












              $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)






              share|cite|improve this answer









              $endgroup$
















                3












                3








                3





                $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)






                share|cite|improve this answer









                $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)







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered 2 hours ago









                Curtis FCurtis F

                314110




                314110






















                    Keenan Diggs is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕