Channels ▼

Jack Woehr

Dr. Dobb's Bloggers

PigIron 0.8 released

November 17, 2008

Image of noble porcine PigIron is an open source Java class library which implements the client side of the IBM ® z/VM ® Virtual Machine Operating System's Systems Management Application Programming Interface.

This cycle has been interesting. Having completed bindings to ObjectRexx , I drifted away from using them in favor of using my own FIJI ForthIsh Java Interepreter for testing. This was an eye-opener , since I wrote FIJI in the 1999-2002 time frame and really hadn't used it much since 2002. I'm luck, since it turns out that the younger me designed a pretty good system!

It was all about Testing. It's difficult to test this code because it does real things to real mainframes. That takes some preparation. Some APIs can be unhooked from actually making a change, but most of them you just have to plan out how to test them with real changes to the test system. I still have a lot to do, but great progress has been made.

The core of PigIron was designed according to a simple model. The Java source code for individual classes which embody the remote function call from the client to the mainframe is autogenerated from description files using Gnu m4 .

I should probably call this "metaprogramming" instead of "autogeneration" so as to be buzzword compliant.

The result of this, um, metaprogramming technique is that once the core system was debugged, the only bugs I've been finding are caused by incomplete definitions. You not only have the Java compiler doing type checking, you have the PigGen step prior to that generating either correct code or generating code that won't even dream of compiling under javac.

So the only kind of bug that slips through this double sieve is a PigGen definition file that's simply missing a param. This is quite easy to detect at testing time, since the host system returns errors pointing to specific missing or erroneous params.

PigGen turns out to be as interesting from a software engineering perspective as the application itself.

Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 


Video