Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mapping computer state changes as a space.

  1. Jun 3, 2015 #1
    I want to see if we can map the space that is computable programs.

    You wouldn't consider complex problems, once you mapped the simplest problems into a space of points you can get a distribution. You may see that these clump. Seeing as several of the variables are proportional to the history of the variables and one is time from then on. You could develop 2D field lines. This could be then turned into.
  2. jcsd
  3. Jun 3, 2015 #2

    jim mcnamara

    User Avatar

    Staff: Mentor

    How to measure program state is what? I'm missing something here.

    If you use some arbitrary tool, like McCabe's complexity, then larger programs -- ones that have a large number of parameters and several functions, for example, the complexity values that pretty much suggest the program is not completely understandable nor completely testable. And I assume not measurable, at least not easily.

    I get that you are restricting complexity, but I do not see what you think is 'measurable'. Content of variables? Using this approach gets us in trouble fast. Here is why: If you have a simple addition of two double precision variables then the upper limit of possible program state "space" is the cartesian product of all values from DBL_MIN -> DBL_MAX by increments of DBL_EPSILON for both variables. --- This is an enormous number. Really, really big. This also runs afoul of the problems with limits of precision DBL_DIGITS - e.g. adding 10^50 + (1/10^50) results in 10^50 - and the problems of undefined behavior and overflow - getting a NAN or INF result.

    So. I'm confused.
    Last edited: Jun 3, 2015
  4. Jun 4, 2015 #3
    I excluded the abstraction process. For very small functions you can map it's space. The process described is effectively path independent. If you know the start and end points and can parameterise it as a function of the localised change you can then ignore the space in between and consider them sequences that have a determined path.
  5. Jun 4, 2015 #4


    User Avatar
    Homework Helper

    One of the simplest examples of a state machine would be a rom only program for a microprocessor that controls a dumb traffic signal, which consists of a series of delay loops for each of the 6 states in this example {all signals red, north south green, north south yellow, all signals red, east west green, east west yellow}. Registers would be used for the loop count for the delay in each state.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook