An integral part of current GRUMPS design was finding ways to detect and avoid potential time paradoxes. On my first outing, I attempted to assassinate Hitler, setting off a wild cascade of unpredictable events: I postponed the invention of the transistor, changed the country my grandfather settled in, and popularized disco three decades too early. Things progressed so wildly until damn-near the whole universe crashed. Were it not for the last-minute interference of some vastly more experienced time travelers, the end result could have been truly disastrous.
It is of key importance to ensure the operational consistency of a system, particularly in parallel or chaotic domains. Potential race conditions, deadlocks, and death-of-your-grandfather-prior-to-your-birth scenarios may remain unseen for years after a system is deployed. Predicting, identifying, and repeating these unstable scenarios is necessary for system-wide stability.
But how does one test for these kinds of conditions? Optimally, one will explore as many scenarios as possible, emphasizing the ones likely to produce errors. The "small-scope hypothesis" speculates that the majority of problems can be discovered by simple tests--that problems arise from the breadth of possible scenarios, rather than the depth. You could theoretically describe any software as a superbly complex state-machine, with state transitions described not only based on user input, but environmental factors like thread interrupts.
If one could construct such an elaborate tree (even for just a few seconds of potential behavior) then the small-scope hypothesis could be objectively tested by performing Djikstra's algorithm on the starting state, and using that to calculate the average number of state transitions before an error occurs. In all likelihood, most bugs can arise from a simple, but highly-particular thread interweaving.
In the field of Time Travelology, this kind of metric is discussed most frequently in chaos theory: how does a slight perturbation at a moment in time cascade into the future? Because most errors are small-scope (that is, the instability begins soon after the interruption), I have found it imperative to clean up these unstable branches immediately after creation.
For assistance, I use a highly modified version of the CHESS model checker. GRUMPS will create a small bubble of unstable space-time, performing a quantum simulation of a vast array of possible short-term futures. (As a fascinating aside, note that a quantum simulation is, for all practical purposes, an actual progression of reality... quantum simulation is indistinguishable from reality itself). CHESS' interleaving algorithm is utilized to scope these futures, quickly pinpointing unstable ones. Once the stablest one is identified, the quantum superposition collapses, the unstable states are thrown into the universe's dustbin, and I leave as if I had never come, my only disturbances insubstantial on a large scale.
Complex systems are inherently chaotic. We can attempt to control this chaos (say, by stress testing), or we can attempt to manipulate it into its unstablest forms (by controlling thread interleaving). From experience, I'll have you know that the latter tends to be vastly more reliable, having saved my programs and the very consistency of space-time on a number of occasions. Otherwise, you might still be a slave to Xuth!a, the bionic emperor-god who rose to power when I once accidentally spilled the beans about 23rd century biotech to a certain Henry Kissinger.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment