Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Design

Generative and Transformational Techniques in Software Engineering


Transformations In Functional and Database Contexts

Two tutorials reflected the wide range of application of transformation techniques: Zhenjiang Hu (University of Tokyo) focused on deterministic transformations from one algorithmic representation of a functional program to another, and Jean-Luc Hainault (University of Namur) showed jhow transformation tie all the levels a database schema together and how to take advantage of this.

Zhenjiang described how to write both clear and efficient programs. He proposes to write clear programs not bothering about efficiency, then to transform them automatically to make them more efficient. This is not low-level compiler optimization but high-level transformations where lists or trees can be merged with the corresponding transformations to their corresponding functions. An existing way to perform this optimization is to expand function calls and propagate known facts (unfolding), while searching for expressions that can be converted back into function calls (folding). This so-called "fold/unfold" method is somewhat heuristic as there is no easy way to decide what can or cannot be folded. Zhenjiang argued that a better way to transform the code is through program calculation where no guessing is necessary--"you just need to solve equations!".

There is a catch. The programs must be written using homomorphisms (a restricted form of recursion) and promotions (transformation properties of the homomorphisms) need to be defined. He then used his method to easily transform an inefficient max function built by selecting the first result of a sort function into an efficient program. Going a bit deeper he showed how different loops can be merged together in a formal manner (loop fusion) and how parallel execution also fits into program calculation. If you have ever delved some depth into functional programming you will know how tricky it is to get anywhere near this type of result. These technics are definitely impressive and supported as part of Haskell tool he has written.

Jean-Luc Hainault's tutorial was more pragmatic. He has led a team that has developed a "universal" database schema model. He has taken many different existing schema models (for example, conceptual, logical, physical, product specific, SQL, COBOL, relational, UML, and so on) and brought them all into a single model. He can then apply 40 or so primitive operations which lets him convert pretty much any type of schema to another. This is really impressive, but gets even better because many of these transformations can be run backwards--allowing reengineering from a deeper schema level to a higher one. With the addition of a COBOL analysis tool he showed us how he could make sense out of 30-year old databases. He did mention that for these types of refactoring some human help is needed. The work is available as part of the DB-MAIN tool. Anthony Cleve, a member of Jean-Luc's team, later showed us how queries could be transformed to automatically reflect schema transformations, including both COBOL and SQL sources.


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.