Monday, November 29, 2010

Concept: Dynamic analysis of code statically

Some idle browsing of the architects' dzone led me to think about how programs can not be completely analyzed statically; which led me to think of how humans understand code by just looking at the source.

We run it in our heads.

If we can do it, can't computers? And I don't mean it in a Godel-limit-breaking way, but surely there should be small enough chunks of code that a computer can "run in its head"?

Related thought bits:

  • Since the godel limit is that representation != understanding, how about we settle for metadata calculus = very weak for of understanding? Semantic web for code, that is.
  • Would knowing the type and range of inputs to a particular piece of code help us understand the code better - a la Agitar creating unit tests on the fly?
  • Often missed out is the "world" around the code, and its impact on the running of the code. It might be useful to model the world as well, and probably develop a taxonomy of such environments. Eg: when function x() is run in java it will behave in one way vs when run as javascript. This is a loaded statement 

Need to think more about this.

No comments: