• How could we use DOES-HALT to determine if a program produces the correct output for a specific input? Keep in mind that DOES-HALT does just that — it halts.

    对于特定输入来说我们如何DOES - HALT判断程序是否产生了一个恰当输出呢?

    youdao

  • Now, all we need to do is run DOES-HALT (COMPARE-OUTPUT, [program, input, expected output]) to know whether or not program passes the test case, input, and outputs the expected output.

    现在我们所要全部事情就是运行DOES - HALT (COMPARE - output,[program,input,expected output]),这样一来我们就会知道程序是否通过测试用例输入输出预期的输出。

    youdao

  • That means work on this input will halt, as it should.

    意味着输入作业停止因为应该停下。 但如果它检测到一个不可停止的循环,那么P报告"Bad"!

    youdao

  • Some programs might never halt when run on themselves, though -- so let's use DOES-HALT to write pseudo-code for a program that checks to see what happens when a program is given itself as input.

    有些程序把它们自己当作输入运行可能永远不会停下来,既然这样——那么我们DOES-HALT编写一端代码,用测试一个程序把它自己作为输入参数时会发生什么好了。

    youdao

  • Some programs might never halt when run on themselves, though -- so let's use DOES-HALT to write pseudo-code for a program that checks to see what happens when a program is given itself as input.

    有些程序把它们自己当作输入运行可能永远不会停下来,既然这样——那么我们DOES-HALT编写一端代码,用测试一个程序把它自己作为输入参数时会发生什么好了。

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定