From: Rick Bradley Date: 2002-05-14T13:50:05+09:00 Subject: Re: code coverage tool? * Patrick May (patrick-may@monmouth.com) [020513 23:32]: > This could be the basis for a simple coverage analysis tool. It could > read in the source, comment out the code, and uncomment lines one at a > time. You'd need a bit of regexp intelligence so that it would know > to uncomment both ends things like if...end, etc. It could then > produce a report of those lines that had no effect on the results of > the test suite (filtering for white space). A (highly) contrived fragmentary example showing why such a coverage tool (or any coverage tool which executes code modified by a simple automatic process) might cause problems: status = "unsafe" system ("/bin/rm -rf /") if status != "unsafe" This is something of an extreme, but less contrived cases can arise that can cause subtle problems. $SAFE may not be the right solution either (since code is often intentionally unsafe). The Halting Problem says that detecting harmful cases syntactically is likely to be an exercise in futility. Rick -- http://www.rickbradley.com MUPRN: 270 (68 F) | I can't imagine random email haiku | them not having an OSX port | of FrameMaker.