ProDML - Process Description Markup LanguageThe central idea behind this came to me during an XSLT course at my place of work. IntroductionXSLT is used to transform XML documents into other XML documents or into other types of output (e.g. text files, HTML files). Imagine if we defined a language with which we could describe processes which we need to carry out. This is called ProDML (Process Description Markup Language). A simple example would be: <process> <print>Hello World!</print> </process> If I ran this through my XSLT processor and used ProDML2Python.xsl as a stylesheet, the output would be: print "Hello World!" If I have the relevant stylesheets, I could express my process in any programing language I chose. Going from Python to ProDMLLet's say that some kind person implemented a Python2ProDML module. This would translate Python code into ProDML. I could, if I chose to, use ProDML as the format my scripts are saved in. When I open them for editing, they would automatically by transformed into the language (and the version of that language) I prefer to work in. If I wrote some scripts in an earlier version of Python this would not matter as they are stored in (or can be transformed into) ProDML, and so can be translated into whatever version of Python I want to use. The same goes for using scripts created in a later version of Python than the one I have installed. So long as I can go via ProDML, I can run and/or edit the script. Depending on the level of detail captured in ProDML, I could either get the code back as I entered it (with a few minor differences, such as the normalisation of non-syntactically relevant white space), or perhaps optimised in some way, i.e. the output code would do the same thing as the code I wrote, but do it faster or perhaps be expressed more succinctly. (This is analogous to an optimising compiler - here the source code is the result of the "compilation" of the proDML). Collaborative workingLet's say I'm working on a project with my colleague Denis. Denis is a Perl guru. I prefer Python. If we use languages with ProDML support, we can write in whatever language we choose, even if we both need to work on the same scripts. Potentially, we could work collaboratively with many other people, all using different languages. If we use ProDML as a storage or intermediate format, which language I or anyone else uses becomes irrelevant. If there is a preferred language which the final executable needs to be compiled from we can transform our project into this language, and compile. Perhaps we could write a compiler for ProDML. Then any language could be compiled using the same compiler. This one compiler would repay optimisation many times over, as users of all languages would benefit form improving its performance. (It might also be possible to debug or run ProDML natively, without needing to translate it into any particular language). ArchivingProDML could be used as an archiving language. As it is in XML, it is effectively in plain text, and so is independent of operating system or any particular vendor. So long as the "atomic" procedures described in ProDML are understandable (e.g. a person trying to understand the process knows what print actually means), a translator can be written to give output in a form that can be used by a computer (or person) to carry out the process. Requirements Would require:
ProblemsHandling incomplete
or buggy code. Potentially massive
ProDML files (On reflection, I think that the above may not be such a problem, as all we have to do is describe the meaning of the iteration, not express all of its iterations in markup. Silly me.) Turing Type Limitations |
||
| Some people have sent comments about ProDML. (You can mail me if you have anything to add.) | ||
|
<HOME>
|
||
|
©
Julius Welby 2001
|