• No results found

Semantic Isolation

3.7 Meta-Programming as a Model Creation Technique

Model-Driven Programming and Meta-Programming together with Semantic Web and End-User Programming techniques are vital ingredients of the User Driven Programming/Modelling approach used in this thesis. The use of Meta-Programming in the User Driven Modelling/Programming approach is described in 4.8. This section (3.7) builds on the research covered in section 2.6 - ‘Model- Driven Programming for Better Model Production’. Dmitriev (2006) explains the problem to be solved in order to improve model production as “limitations of programming which force the programmer to think like the computer rather than having the computer think more like the programmer.” Meta- programming (Dmitriev, 2006) is a useful way of allowing for language independent software development, and can aid in providing a high level front-end to programming languages. “Meta- programming is the writing of programs that write or manipulate other programs (or themselves) as their data” (Wikipedia, 2009). Fischer’s (2007) examination of the overall meta-design concept was described in section 2.5 - ‘Visualisation and Interaction’. The idea behind use of meta-programming in this thesis is that instead of writing programs to do a task a domain expert needs the program for, the Meta program developer creates an environment which all domain experts, in this and similar fields can use to create their own solutions. The developer then only needs to maintain and improve this

programming environment, and can concentrate on this task; the domain expert can concentrate on solving the problem at hand without having to ask the developer to create the code on his or her behalf.

Dmitriev (2006) advocates reducing dependency on languages and environments by enabling programmers to develop their own specific languages for solving each domain problem:

“If we are going to make creating languages easy, we need to separate the representation and storage of the program from the program itself. We should store programs directly as a structured graph, since this allows us to make any extensions we like to the language. Sometimes, we wouldn’t even need to consider text storage at all. A good example of this today is an Excel spreadsheet. Ninety-nine percent of people don’t need to deal with the stored format at all, and there are always import and export features when the issue comes up. The only real reason we use text today is because we don’t have any better editors than text editors. But we can change this... Text editors... don’t know how to work with the underlying graph structure of programs. But with the right tools, the editor could work directly with the graph structure, and give us freedom to use any visual representation we like in the editor. We could render the program as text, tables, diagrams, trees, or anything else. We could even use different representations for different purposes, e.g. a graphical representation for viewing, and a textual representation for editing. We could use domain specific representations for different parts of the code, e.g. graphical math symbols for math formulas, graphic charts for charts, rows and columns for spreadsheets, etc. We could use the most appropriate representation for the problem domain, which might be text, but is not limited to text. The best representation depends on how we think about the problem domain. This flexibility of representation would also enable us to make our editors more powerful than ever, since different representations could have specialized ways to edit them.”

This visual tree/graph diagrammatic approachprovides a way to create programs that create programs so enabling the 3 step translation process used in this thesis, and this enables translations between people, between systems, and between languages. This translation could enable those who are not currently programmers to create models at their domain level using domain specific systems created for them by programmers, and with visual management of formulae and versions. The mechanisms for this arerecursive translation of the tree/graph code representation to multiple models and languages, where necessary aided by user/modeller choices, as demonstrated in chapter 6.

3.7.1 Model-Driven Programming

Spahn et al. (2007) explain that end-users are domain experts not IT professionals, and because they cannot program their own solution, this is requiring them to communicate their needs to IT developers. Spahn et al. argue for the empowerment of users to customise software by providing an abstraction layer to hide technical details and allow for concentrating on business needs. Model-Driven

Programming and the Semantic Web are explained by Frankel et al. (2004), and they discuss how these techniques can be combined (section 4.2.1). Bringing together model-driven programming with the Semantic Web can enable diagrammatic programming, and translation to structured and searchable Semantic Web output, this eases visualisation and interaction problems at each stage of translation.

relationship diagrams that use graphical notations and store in formats such as XMI1920 (Example visualisation in appendix), and translationsinto OWL.

As models and ontologies in this research are to be cohesive and closely linked, visualisation and interaction techniques can be applied to either or both. Model-Driven Programming can be an important technique for dealing with complexity. Gray et al. (2004) explain how this technique can assist in the development of software for a large avionics system, and also investigates program and model transformation. Gray et al. (2004, 361) explain Program Transformation/Translation for Model- Driven Programming:

“Research into horizontal transformation concerns modification of a software artifact at the same abstraction level. This is the typical connotation when one thinks of the term transformation, with examples being code refactoring at the implementation level, and model transformation and aspect weaving at a higher design level. Horizontal transformation systems often lead to invasive composition of the software artifact. In contrast, vertical transformation is typically more appropriately called translation (or synthesis) because a new artifact is being synthesized from a description at a different abstraction level (e.g., model-driven software synthesis and reverse engineering). Vertical translations often are more generative in nature.”

Gray et al. (2004, 367) also investigate “interpreters that traverse the internal representation of the model and generate new artifacts”, e.g. XML files and source code, though their main emphasis is on transformation of existing code. Gray et al. explain that a model/developer does not create the

transformation/translation rules. For this thesis this role is assigned to the ‘System Creator’ who creates the translation system for the ‘model builders’ and ‘model users’, these roles were examined in section 3.3.1 - ‘Users and De-abstraction for Translation’. This thesis concentrates on vertical generative translations for creation of new artefacts, in order to assist end-user programming/modelling.

Coutaz (2007, 2) explains how Model Driven Engineering and Service Oriented Architecture can be combined. Coutaz also explains that “An interactive system is a graph of models related by mappings and transformations.” This would fit in well with the structure of RDF, which is also a graph structure, an interactive editable tree/graph of models could be produced, in order to relate models and sub models, and ontologies, and sub ontologies all to each other. Baclawski et al. (2001) and Kogut et al. (2002) explain how UML can be used as a tool to produce ontologies. Kogut et al. make the point that UML was originally designed for human-human communication, but is being driven to become more formal and ‘machine-processable’ and is now being used to generate code and schemas. Baclawski et al. translate from UML diagrams to ontologies represented in graph based languages; thus

demonstrating the use of translation to aid diagrammatic visualisation and editing for ontology creation, and enabling closing of gaps between UML and ontology languages and modelling. Section 4.2.1

19 OMG (Object Management Group) (2011) MOF 2.0 / XMI Mapping Specification, v2.1.1 [online]. Available from: http://www.omg.org/spec/XMI/ [Accessed 14 June 2011].

examines ways UML tools could facilitate translation, interaction, and visualisation for ease of use. UML tools are beginning now to use and translate to and from Semantic Web languages; indicating a step towards co-operation and merging of ontologies and modelling.