Comments on: What to do about nondeterministic tests? http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/ Stuff Ron Gross Finds Interesting Sun, 02 Aug 2015 11:03:35 +0000 hourly 1 https://wordpress.org/?v=4.5.3 By: yonatan http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1519 Sun, 26 Jul 2009 16:47:19 +0000 http://v1.ripper234.com/?p=822#comment-1519 hi! better late than never. many times problems in such tests arise from timers/synchronization problems.
another method for handling those unpredictable tests is via use of mock objects/substitutes for the timers and synchronizers.
you can write your custom timer to tick manually from your code and set the fake clock to any ol’ time you need.
and you can set your mock synchronizer to enforce a certain order of execution to match the scenario you are testing.
my two cents.

]]>
By: A Quantum Immortal » Blog Archive » Keep fighting the voodoo http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1364 Thu, 19 Mar 2009 17:03:30 +0000 http://v1.ripper234.com/?p=822#comment-1364 […] developers dislike Voodoo, but sometimes all the good will can’t stop a dark spawn of evil. For example, one of our […]

]]>
By: ripper234 http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1286 Sat, 07 Feb 2009 15:32:03 +0000 http://v1.ripper234.com/?p=822#comment-1286 I wasn’t talking about Turing determinism or in Turing terms.
I’m well aware of nondeterminstic Turing machines, but one can talk about a deterministic result, outcome or program for that matter, without defining acceptance models in the Turing while. The word determinisim was around way before Turing, so we must be careful to choose our context properly.

The important thing about nondeterministic turing machines is not that they make every outcome possible (because they don’t have to, the indeterminism is bounded). The real kicker is the acceptance model – the machine is defined to Accept if at least one possible run accepts. This is the problem in actually implementing nondeterministic Turing machines.

]]>
By: Friend http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1284 Sat, 07 Feb 2009 08:18:45 +0000 http://v1.ripper234.com/?p=822#comment-1284 You have a misconception, you talk about probability distribution, that is, the probability for a given output, while non-deterministic is all about making every possible outcome rather than a distribution. This is not a matter of definition, since there is a huge difference.
Actually, there is no non-deterministic machine available, otherwise you cloud have prove that P=NP!.

]]>
By: ripper234 http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1276 Fri, 06 Feb 2009 17:50:01 +0000 http://v1.ripper234.com/?p=822#comment-1276 It’s a matter of definition. My definition here: a deterministic program emits the same output for a given input. This can certainly be achieve without quantum computers, but it requires a specific definition of input.

Try opening 100 threads and have them all print their sequence number 10000 times. I assure you that on most platforms the output will not be the same between different runs of the program.

]]>
By: Friend http://v1.ripper234.com/p/what-to-do-about-nondeterministic-tests/comment-page-1/#comment-1273 Fri, 06 Feb 2009 15:17:59 +0000 http://v1.ripper234.com/?p=822#comment-1273 You probably talk about “Random” tests and not non-deterministic tests, since the letter cannot be achieved (maybe in quantum computing), this is just a mental experiment.

]]>