Please excuse if this is OT, but I was wondering about the subject topic, i.e., using a test code suite (run with special-command-line-option?) as a kind of substitute for pragmas within a language e.g. defining a function, and winding up with some intermediate representation of the constrained function that can be used in the compilation and linking of an application that does not include the function test suite per se, yet makes use of the implicit info from the test code (per command line option that caused the compiler's info transfer to the test-info-constrained-function's intermediate representation).
Maybe this could also be viewed as a kind of global optimization using combined test and application code, but factoring out and pre-caching some results of separated function+test_function inferences, and editing out test code from the final linking. I guess this is trying to use test code as a general source of auxiliary information using inference as a way to be independent of particular languages' ability to express explicit type declarations or contracts etc. TIA for any pointers/urls where I might read about this kind of thing, and whether it's a dead end or a trail being explored, either in pypy or elsewhere. Regards, Bengt Richter _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
