Synthesis 2.0: code coverage analysis, .NET compatibility, and more
Sterling Camden
I can’t believe that it’s been more than two months since I unleashed the Synthesis library on the unsuspecting Synergy/DE world. I promised then to enhance it further, so herewith I announce the arrival of Synthesis 2.0, which you can download via the link below. I bumped the primary version number because this version involves numerous changes throughout, and some significant new features. See the full change log here.
Synergy/DE Version 9.3.1
Synthesis 2.0 is fully compatible with Synergy/DE version 9.3.1. Unfortunately, I was unable to maintain compatibility with earlier versions of Synergy/DE, so don’t upgrade Synthesis until you’re ready to upgrade Synergy/DE as well.
Synergy.NET beta
Synergy/DE 9.3.1 also includes a beta version of Synergy.NET (Synergy/DE for the .NET Framework) on 32-bit Windows platforms. Synthesis 2.0 includes limited compatibility with this version as well. See the Known Issues for what’s missing. You can also search the code for DOTNET_BETA_WORKAROUND to see the code that I expect to support in the future versus what I’m doing now.
Code Coverage analysis
Synthesis 2.0 includes two new utilities for analyzing code coverage: cover and htmlcover. These are command-line utilities that can be run with either dbr or dbs. The only difference between them is the format of their output – cover writes tab-delimited data to stdout, while htmlcover writes an HTML-formatted report to a file.
Both utilities sample code execution by driving a debug session of the executable and stepping a line at a time through the code. For this purpose, they use the Synergy/DE remote debugger, which operates over Telnet. Thus, I added classes to Synthesis to support the Telnet protocol and sockets.
You can sample the code coverage for any Synergy/DE executable (except for .NET, because the Telnet debugger isn’t supported there). I’ve added a ‘coverage’ dependency to the makefile in the tests directory to generate HTML reports for each of the Synthesis tests into the coverage subdirectory. I didn’t include those in the download because of their size, but you can generate them with a ‘build coverage’ in the tests directory, if you have PVCS Configuration Builder and you’re patient enough to wait for them (especially test_regex). They’ve already revealed some areas where I need to beef up my tests.
For more information about how this works, see the CodeCoverage class.
Bug fixes
In several places, the comparison operators used for alphanumeric did not distinguish between strings of unequal length that match up to the lesser length (e.g., “bug” == “bugger”). That’s been corrected.
I fixed two issues related to Regular Expressions:
- You may now enclose a begin-line or end-line anchor within parentheses. Previously, they could only occur as the very first or last character in the pattern, respectively. Now, for example,
R$('/(^front|or_not)/')will correctly find “front” at the beginning of the line, or “or_not” anywhere. Likewise for a $ anchor.
- Certain complex nested sub-expressions had a bug that prevented them from ever matching.
For the future
I still have much more to add to this library. Here are some of the things on my list:
- Improved .NET compatibility
- Additional Regex features (full Perl 5 syntax)
- More methods for ls (inject/fold, etc.)
- Prevent multiple evaluation of assertion arguments when formatting a message
- … and more.
Is there anything you’d like to see added?
Posted in .NET, OpenVMS, Regexen, SynergyDE, Unix, Windows |
1 Comment » RSS 2.0 | Sphere it!





[...] Synthesis 2.0: Code coverage analysis, .NET compatibility, and more — Chip’s Tips for De…2.0 down, who knows how many to go?Tags: .net chipstips codecoverage synergyde synthesis Tags: .net, chipstips, codecoverage, consulting, del.icio.us, development, future, git, programming, resolutions, scm, svn, synergyde, synthesis, technology, techrepublic, vcs, versioncontrol [...]