Programming with pictures and homomorphic planning
暂无分享,去创建一个
While single diagrams can convey large amounts of information compactly, there are many interesting domains where sequences of diagrams are used in every day life. For example, each Lego™ kit is accompanied by instructions that are almost free from text, yet are easily comprehensible to the youngest of children. Programmers routinely appeal to diagrams not only to express the static elements of software systems (e.g. class diagrams in UML), but also the dynamics of the topological structure of programs as they execute. In these and other situations, sequences of diagrams are used to succinctly and exactly prescribe actions that have quite complex specifications.
When teaching programming to students, diagrams are often used in a simple but powerful manner. A picture is drawn representing the initial conditions of a program state. This picture is modified, perhaps several times, until some final goal state is represented. Imperative code is then written, which is shown, usually by waving of hands, to perform transformations on the program's state which are analogous to the transformations that were applied to the diagrams. This thesis began with a simple idea: to provide a formal framework within which we could account for, and subsequently automate, the translation process from diagram sequence to code.
We also present a visual programming environment, built upon the framework, which produces working code from sequences of diagrams similar to those found in text books (e.g. (Kingston, 1990)) describing basic abstract data type (ADT) operations. As it transpires, the framework which we have developed seems to express a common underlying metaphor which recurs in many uses of sequences of diagrams, which we calf Homomorphic planning. Homomorphic planning is a technique which allows planning to occur in one domain (which may be diagrammatic), with the resultant plans being applicable in another (which may also be diagrammatic). We outline the criteria that a pair of domains must abide by to perform such a type of planning.