Showing posts with label Transformation. Show all posts
Showing posts with label Transformation. Show all posts

Monday, February 15, 2010

Translation between models/programs

As well as user to computer translation, an important area of research is similar semi-automated translation between computer programs and models. Much of the structure of programs/models is the same regardless of what particular programming language is used. Making translations of a program/model available on multiple systems by translation from one to the other eases maintenance and re-use and widens availability. Also involving users in such a process would enable sharing and understanding of models/programs, so aiding Decision Support.

Friday, July 17, 2009

User Driven Modelling Explanation - Wing Spar

Figure 1 illustrates the implementation of the translation stages. Step 1 is creation of the ontology, which is then translated to the decision support and modelling tool (Vanguard System) for Step 2. Step 2 is illustrated to the right, and this shows colour coding of the taxonomies (sub ontologies) that make up the ontology e.g. parts, processes, and materials. Step 3 involves translations to visualisations for the web (using Semantic Web formats) and alternative representations. Step 3 can also produce program and/or meta-program code.





Figure 1. Stepped Translation and Visualisation

Figure 2 demonstrates the ontology translated via Step 2 into XML for Step 3 visualisation in Flash (see reference end of article). This creates a tree with a three dimensional look, colour and shading, and interactive repositioning of nodes to make it intuitive and assist in navigation. When a node is chosen, this is moved to the centre of the display and all the other nodes are moved or rotated to position themselves in relation to it.

Figure 2. Flash interface for navigating exported XML tree

Figure 3 shows the view resulting from choosing the 'SparPart Definition'. This shows the parents, children, siblings, and contents of that node. It also allows navigation to any of the related nodes.

Figure 3. Flash viewing of Spar Part Definition node

Figure 4 is produced via an automated conversion from a tree representation of the spar component. The interface demonstrates modelling of information within a browser; ‘Periphery’, ‘Area’, ‘Raw Volume’, ‘Finished Volume’, ‘Part Width’ and ‘Part Height’ are all calculated dynamically. This calculation is in response to changes the user makes to the attributes on the left; as these changes are made the diagram changes in response.


Figure 4. Interactive Spar Diagram (SVG)

Reference
Rhodes, G., Macdonald, J., Jokol, K., Prudence, P., Aylward, P., Shepherd, R., Yard, T., 2002. A Flash Family Tree, In: Flash MX Application and Interface Design Flash MX Application and Interface Design. ISBN:1590591585. [online]. Available from: http://www.friendsofed.com/book.html?isbn=1590591585.

Friday, July 03, 2009

User Driven Modelling Explanation - Rectangle

This simple model explains all the implementation of translation steps.

Step 1

A rectangle is defined with attributes for length and width, shown in the screenshot below :-



Figure 1 - Rectangle Definition in Ontology

Width is then defined as 2m.

In the next figure another class is created for calculation of area.

Figure 2 - Rectangle Area Attribute

In figure 1 'Area' was assigned a value of 'Length' * 'Width'. This is a simple equation that will be used to calculate the result. This illustrates how modelling calculations are performed. They are all defined by equations that relate attributes of the taxonomy/sub ontology. The taxonomy can be read by the decision support system in Step 2.

Step 2

For Step 2 the decision support/modelling system reads the ontology, performs the calculation and deals with units giving the result for area as 8 metres squared. This is shown in Figure 3 below :-



Figure 3 - Step 2 - Translation and Calculation

The modelling system can then output the results to web-based visualisations, or to program/meta-program code.

Step 3
As well as showing the model itself on the web it is possible to translate the model results into other representations and visualisations, so making it as widely accessible as practical. Figure 4 shows the result model translated into XML and visualised as a tree view on the web. The automated menu provides for some of McGuinness (2003) 7 uses of simple ontologies :-
2. site organization and navigation support
3. expectation setting
5. browsing support
The use and visualisation of Semantic Web languages at all stages in the translation process facilitates 6. ‘Search support’, and 7. ‘sense disambiguation support’; the structure of the ontology is visualised in order to enable users to determine the context of terms.


Figure 4 Results Output as Tree (XML based)

Figure 5 shows an output SVG rectangle diagram that includes interactivity; this has been translated from the tree/graph-based representation. The input values used for the calculation and the diagram itself can be changed via an automatically produced user interface that is related to the taxonomy structure. These changes cause the shape representation and the area to be recalculated.



Figure 5 - CAD type interface and User Interaction and Calculation

A demonstration and related pages can be accessed below -
Background information to justify why this approach should be researched is here - User Driven Modelling Background.
A Flash movie that presents this concept using a simple example - User Driven Modelling Demonstration.
Translation demonstration (A Flash Player is required to view this) - RectangleDemo

- Explanation - http://www.cems.uwe.ac.uk/~phale/RectangleDemo/RectangleDemo.viewlet/RectangleDemo_launcher.html
Demonstraion of User-Driven Modelling/Programming process for translating from taxonomy based to diagram based rectangle representation
Simple SVG Example of Rectangle as demonstrated in the Flash Movie - Internet Explorer Version - Requires SVG player - SVG Rectangle Internet Explorer.
Simple SVG Example of Rectangle as demonstrated in the Flash Movie - Mozilla Firefox - SVG Rectangle Mozilla Firefox.
Reference
McGuinness, D. L., 2003. Ontologies Come of Age. In: Dieter Fensel, Jim Hendler, Henry Lieberman, and Wolfgang Wahlster, ed. Spinning the Semantic Web: Bringing the World Wide Web to Its Full Potential. MIT Press, 2003.

Wednesday, June 24, 2009

Collaborative Modelling and Visualisation For Complex Systems

The aim of the research described in this article is to apply the research first where it can have the most use,and then encourage others to expand it for other domains and other users. This is in order to simplify modelling and computing for computer literate non programmers, this includes many engineers, and so enable users such as engineers to model the manufacturing and design.

The problem to be tested her is enabling de-abstraction of engineering problems from engineers' representation to computer models and code. This is order to find out to what extent diagrammatic representations of problems can be used in order to provide modelling solutions. So to test this a source tree is created, then translated to computer code, then represented as a result tree.

To test this problem - the research examines a part of C.S. Peirce's (1906) - 'Prolegomena to an Apology for Pragmaticism' call to action"Come on, my Reader, and let us construct a diagram to illustrate the general course of thought; I mean a system of diagrammatization by means of which any course of thought can be represented with exactitude".

It isn't possible to solve this problem and do this all at once so to limit the scope this research is restricted mainly to engineers (who often use diagrams). Engineers often model problems using computer systems, so to make this research effective these areas are prioritised -

  • To domain of modelling (which often requires diagrams)
  • Management of ontologies and related models is essential for management and understanding of complex systems.

Breaking both the research and the modelling system into testable steps improves the chances of project success. Breaking a complex systems engineering problem or project into modular steps and stages ensures that if failure looks likely it is possible to go back a step, rather than restart or abandon the project. This also informs, teaches and enables systems thinking and design. This can be achieved by transforming engineering knowledge into code in collaborative computer systems, and visualising the structure of the resultant system to all domain experts. This enables translation (both in human communication and computing model and program transformation) from the business and/or engineering focus of the domain expert end-users, to the software developers and help desk and vice versa.

Enabling, providing and supporting staff to use Semantic Web and Web 2.0 technologies can lower costs, improve collaboration, and improve staff satisfaction and retention. This is an important technology for Semantic Web collaboration. Visualisation of every stage in collaborative model creation and every part of the model enables determination of whether the model and view(s) of it are useful and correct, and so aids this sharing of human knowledge to solve problems.

A problem can be represented and shared as visual diagrams, and then translated from this abstract view to models and code. Gross (2007) argues the need for end user programming by designers using diagrams and scratchpads. Tufte (1990) explains how diagrams can be more effective than words for representing geometry. This links with the theme through our research of translating from an abstract to a concrete representation; Green et al. (2007) explain this distinction between abstract and concrete models. This distinction is more gradual than the distinction between classes and objects for object oriented programming. To achieve this it is necessary to enable translation from ontologies and Semantic Web information to diagrammatic representations and vice versa. Green et al. (2007) discuss terminology problems, and how ontologies and models and collaboration can be used to help solve this problem. A classification scheme or ontology is necessary in order to make communication precise. Ontology/ies can be used to define terms and higher level relationships and these extended for application to particular modes. Such ontology/ies can also be used to help non-specialists understand the terminology of a particular domain.

Sternemann and Zelm (1999) explain that it has become necessary to research collaborative modelling and visualisation tools, because of the business trend towards global markets and decentralised organisation structures; Green et al. (2007) also explain this.
The benefits of this research are - enabling engineers to visualise problems such as representation of a product data structure in a familiar way. This gives a visual and colour coded representation of equations. Visualisation is easier to navigate and understand than that in spreadsheets, and more maintainable. The translation, visualisation and interactions close the gap between human representations of problems, and the representations that are possible using computer languages.

The Wider Implications of this research is that this research could also be used for business modelling, process modelling, and workflow.

References

Green, S., Beeson, I., Kamm, R., 2007. Process architectures and process models: opportunities for reuse. In: 8th Workshop on Business Process Modeling, Development, and Support BPMDS07 and CAiSE'07 11-15 June 2007, Trondheim, Norway.

Gross, M. D., 2007. Designers Need End-User Software Engineering. In: End-User Software Engineering Dagstuhl Seminar February 2007.

Peirce, C.S. - 1906. Prolegomena to an Apology for Pragmaticism - http://www.existentialgraphs.com/peirceoneg/prolegomena.htm.

Sternemann, K. H., Zelm, M., 1999. Context sensitive provision and visualisation of enterprise information with a hypermedia based system, Computers in Industry Vol 40 (2) pp 173-184.

Tufte, E., R., 1990. Envisioning Information. Graphics Press.

Wednesday, May 20, 2009

Enabling diagrammatic de-abstraction and modelling of engineering problems

Abstract
This paper discusses efforts to enable de-abstraction of engineering problems from a representation suitable for engineers to that suitable for computer models and code. The key question is to what extent diagrammatic representations of problems can be used in order to provide modelling solutions. To achieve this, a source tree is created, this is translated to computer code, then represented as a result tree. This enables engineers to visualise problems such as representation of a product data structure in a way familiar to them, and this also gives a visual and colour coded representation of equations. This visualisation is easier to navigate and understand than that which can be provided by spreadsheets, and more maintainable. This research could also be used for business modelling, process modelling, and workflow.

Introduction
C.S. Peirce (1906) stated in 'Prolegomena to an Apology for Pragmaticism' "Come on, my Reader, and let us construct a diagram to illustrate the general course of thought; I mean a system of diagrammatization by means of which any course of thought can be represented with exactitude". That is the purpose of this research, but to limit the scope and so make application of this theory testable the research is restricted mainly to engineers (because they often think in terms of diagrams) and to the domain of modelling (which often requires diagrams). So the aim is to apply the research first where it can have the most use and encourage others to expand it for other domains and other users. This research is intended to simplify computing for computer literate non-programmers, this includes many engineers. The main research area is enabling users such as engineers to model the problems they encounter in manufacturing and design. However, the wider aim is to prototype research for enabling a larger range of software users to model their problems. The intention is to create collaborative tools that allow users to develop software in a way they will be familiar with from their use of spreadsheets. This research brings together approaches of object orientation, the Semantic Web, relational databases, and Model-Driven and Event-Driven programming. Frankel et al. (2004) explain the opportunities for, and importance of this kind of research.

Figure 1 shows the way iterative development is used both in this research and in the implementation to ensure that changes can be made systematically as necessary and without disrupting the project.


Figure 1. Research Development Iterations

Software engineering and modelling has much in common with engineering modelling, also the tools used for both have much in common. Software process modelling, engineering process modelling, and business/workflow modelling share a common approach, and similar tools. Much of this commonality is in the need to transform requirements into design into code semi-automatically. To achieve this, continuous consultation between potential users e.g. engineers for engineering modelling problems and developers for software problems is required.

Methodology
A common factor in these various types of modelling is the need to transform between a high level abstraction, to a lower level such as a computer model and then code. This is illustrated by examples of semi-automatically produced programs/models (Hale, 2008). The translation process involves translating from a tree/graph representation and for each node this is translated into a code representation of the equation that relates this node to any others, and this code is then presented in the interface as a result tree/graph. This can be achieved for programs and/or web pages. Kraus et al. (2007) examine and implement this transformation problem and also produce code and/or web pages. Uschold (2003) defines the Semantic Web as being machine usable and associated with more meaning. So this is a good way to convey the abstractions represented in a source and result tree to the end user.

The intention is to demonstrate a way to construct diagrammatic representations of cost using the example of an aircraft wingbox. The wingbox is the structure or skeleton of the wing. These diagrammatic representations are achieved by visual representation of items and equations that make up wingbox cost. These items and equations can be represented in standardised categories used in engineering - ‘materials’, ‘processes’, ‘cost rates’ etc. These categories are standard for engineering and the methods for representing items and equations that relate the items can be expressed in standard mathematical form. Therefore using the same methodology and same categories it would be possible to represent other items and equations in the same way. So this methodology is reusable for costing other engineering components including those outside aerospace. The costing method is also recursive because components and sub components can be costed separately or together and top down or from bottom up. This methodology has the potential to be applied to any calculation based modelling problem.

Solutions to this transformation problem can be found by adapting current tools and techniques using a systematic approach. Such tools and techniques involve use of modelling tools, spreadsheets, ontology management tools, and Semantic Web Web 2.0 tools. These possible solutions are not mutually exclusive and their combination could be the best way of providing usable collaborative modelling tools for computer literate end users and domain experts. The link between these alternative ways of advancing current research is translation and User Driven Modelling/Programming.

The User Driven Modelling/Programming approach advocated in this thesis has the advantage that it is using a modelling approach for creating modelling solutions and involves creating systems to create systems. This makes it possible to solve the problem by breaking it down into stages and allowing software developers to concentrate on the most complex software problems and domain experts to be able to concentrate on their domain problem. The standardisation possible in this approach can allow software developers to create modelling systems for generic purposes that can be customised and developed by domain experts to model their domain. This methodology can be facilitated by :-

· Modelling Tools - Building an end-user interface and extending the translation capabilities of UML (Unified Modelling Language) and/or other modelling tools (Johnson, 2004).
· Spreadsheets - Improving the structuring and collaboration capabilities of spreadsheets, and enabling customisation of spreadsheet templates for particular domains and users.
· Ontology Tools - Extending the modelling capabilities and equation calculations in ontology tools and providing an end-user interface.
· Semantic Web/Web 2.0 - Extending the capabilities of Semantic Web and Web 2.0 style web based development tools to allow collaborative modelling.

Figure 2 shows the solutions, and how these make User Driven Modelling/Programming possible :-


Figure 2. Methodology Diagram - Enabling User Driven Modelling/Programming

It is possible to create an extra layer of visualised semantics to enable users to specify commands in structured language. This approach of adding extra layers is the way this visual programming works. Users provide the information the program needs at the visual interface layer, and program code is created automatically. The layers provide the bridge between abstract ideas and computer code. If this approach is taken to its logical conclusion, it would be possible to allow the user to specify what the computer should do. Then each layer would communicate this to the layer below until the computer performs the action required. A simple example of this approach is the use of spreadsheets. Users can specify a calculation in mathematical terms using a formula. The spreadsheet then calculates the result of the formula. Users can change the formula if it is incorrect without any need to write code or re-compile. This accounts for the popularity of spreadsheets. However, spreadsheets do not provide the centralised and structured data-store required for a distributed collaborative system. Therefore, the research concentrates on combining the wide applicability of generic spreadsheet modelling with structured and adaptable modelling and visualisation.

It is important to enable changes to the design of the information source and its structure as necessary, even when it contains information. This makes possible continuous improvement of the information and its representation together. Clear visualisation of the structure makes out of date and duplicate information obvious, so it can be changed by the end-users of the information. This provides for maintenance of information quality without necessitating end-users to understand relational database design; though relational databases can still be accessed by software specialists for more in depth and less frequent structural changes.

Program transformation allows for writing in one representation or language, and translating to another. This is particularly useful for language independent programming, or for high level and end user programming that can then be translated to a language more easily interpreted by computer systems.

A taxonomy representation is translated into a computer model. Relationships can be conveyed to a software model that evaluates them. Information is translated from the taxonomy and is visualised in tree form in a decision support tool with the example of spar manufacture information. The visualisation of the information in a tree can be further translated into visualisation as an interactive diagram. The representation can be translated into different languages, to allow for language independence.

Figure 3 explains the transformation process.


Figure 3. Translation Process

Related Research
Crapo et al. (2002) assert the need for a methodology for creation of systems to enable more collaborative approaches to modelling by domain expert end-users, and that this combined with visualisation would allow engineers to model problems accurately. Huhns (2001) and Paternò, (2005) both explain that alternatives to the current approach to software development are required. Modelling languages such as Alloy explained by Wallace (2003) can be used as an interface to an End-User Programming environment. Transformation from a model building environment to program code has been investigated by Gray et al. (2004).

Conclusion
Experienced programmers can build a modelling environment that can then be used by non programmers to create models or solve other software problems. This was achieved for the DATUM (Design Analysis Tool for Unit-cost Modelling) project with Rolls-Royce, and the modelling environment created was used by their engineers. This is described by Scanlan et al. (2006). Collaboration, simulation and modelling have been investigated to determine the requirements for future research in modelling of problems. This should allow translation from a model-based representation of software to the actual software. This can involve automatically producing software for a Semantic website from visual representations of the problem. The core of this modelling infrastructure is automated generation of models created with World Wide Web Consortium (W3C) standards based languages, and the visualisation of information represented in such W3C standard ways. This research investigated alternative approaches to software development, which give users greater involvement. This partially automates the process of software creation via a collaborative process and equation tree that maps the problem structure, and user interface creation by providing a means to manage a hypermedia concept map.

References
Crapo, A. W., Waisel, L. B., Wallace, W. A., Willemain, T. R., 2002. Visualization and Modelling for Intelligent Systems. In: C. T. Leondes, ed. Intelligent Systems: Technology and Applications, Volume I Implementation Techniques, 2002 pp 53-85.

Frankel, D., Hayes, P., Kendall, E., McGuinness, D., 2004. The Model Driven Semantic Web. In: 1st International Workshop on the Model-Driven Semantic Web (MDSW2004) Enabling Knowledge Representation and MDA® Technologies to Work Together.

Gray, J., Zhang, J., Lin, Y., Roychoudhury, S., Wu, H., Sudarsan, R., Gokhale, A., Neema, S., Shi, F., Bapty, T., 2004. Model-Driven Program Transformation of a Large Avionics Framework. In: Third International Conference on Generative Programming and Component Engineering GPCE, pp 361-378.

Hale, P. 2008. http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Huhns, M., 2001. Interaction-Oriented Software Development. International Journal of Software Engineering and Knowledge Engineering, 11, pp 259-279.

Johnson, P., 2004. Interactions, collaborations and breakdowns. In: ACM International Conference Proceeding Series; Proceedings of the 3rd annual conference on Task models and diagrams Vol 86 Prague, Czech Republic.

Kraus, A., Knapp A., Koch, N., 2007. Model-Driven Generation of Web Applications in UWE. http://ftp.informatik.rwth-aachen.de/Publications/CEUR-WS/Vol-261/paper03.pdf In Proc. MDWE 2007 - 3rd International Workshop on Model-Driven Web Engineering, CEUR-WS/, Vol 261, July 2007.

Paternò, F., 2005. Model-based tools for pervasive usability. Interacting with Computers, 17(3), pp 291-315.

Peirce, C.S. - 1906. Prolegomena to an Apology for Pragmaticism - http://www.existentialgraphs.com/peirceoneg/prolegomena.htm.

Scanlan, J., Rao, A., Bru, C., Hale, P., Marsh, R., 2006. DATUM Project: Cost Estimating Environment for Support of Aerospace Design Decision Making. Journal of Aircraft, 43(4).

Uschold, M., 2003. Where are the semantics in the semantic web? AI Magazine Vol 24 (3) pp 25-36.

Wallace, C., 2003. Using Alloy in process modelling. Information and Software Technology, 45(15), pp 1031-1043.


Friday, December 19, 2008

Automated Production of Engineering Models

This example demonstrates the research I have undertaken into automating the model creation process for engineering process models.

This example is of manufacturing a cube, where the cost of manufacture depends mainly on the size of the cube, its wall thickness, what material is used, and what process is used. This is a simple example, a real world example involving hand layup of a spar (wing component) proved to be too complicated for ease of demonstration explanation, especially over the web.

An ontology (held in Protege http://protege.stanford.edu/) is used to represent the common information needed for all cube models, (and other models) produced. The ontology is broken down into sub ontologies for parts, materials, processes, consumables, resources, and tooling. These are colour coded in the visualisation/interactive model to ease understanding.

Code written for this research is used to recursively read the Protege tree (via nested SQL calls), and reproduce the tree in the modelling system (Vanguard System http://www.vanguardsw.com/products/vanguard-system/). The modelling system enables calculations, and extra code written for this research also allows choices to be made by the user/modeller.

This simple example enables the user/modeller to make choices of the material, process, consumables, resources, and tooling to be used, for the manufacture of this cube. In this example choices were made for material - Aluminium, and process - Rivetting.

PhD Research Development Diagram - Research and Development for Thesis.


Cube Model

This model is then output to an online representation (this works in Internet Explorer only, a version for Mozilla Firefox is also in progress). The IE version requires the Adobe SVG player, currently downloadable, and free).

The online SVG (Scalable Vector Graphics) representation provides an interactive CAD type representation of the component, that can be manipulated, to change size and wall thickness. The wall thickness is indicated by the inner dotted cube. As the size or wall thickness of the cube is altered, immediate feedback is provided. Alterations can be made with the up/down buttons. Also if these values, or the Aluminium cost per metre cubed are changed, the calculated parameter and cost values change automatically, in response.

The SVG representation shown below can be found at http://www.cems.uwe.ac.uk/~phale/SVGCubeExample/CubePartDefinitionwithCosts.htm.

PhD Research Development Diagram - Research and Development for Thesis - SVG.

Cube Model - Translated to SVG

http://www.cems.uwe.ac.uk/~phale/SVGCubeExample/CubePartDefinitionwithCosts.htm.

It is also possible to zoom in and out of the diagram, and move it around the screen.

As well as engineering models, I have experimented with economics models, and with translating either type of model to Java, and Java applets. Below is a screenshot of a simple economic model translated and visualised as an interactive Java applet.


PhD Research Development Diagram - Research and Development for Thesis.



Consumption Function translation from modelling system into Java

The models created as part of this research are available at - http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Friday, November 28, 2008

Research Methodology - Automated Model Production

Models are constructed and translated in a different way from object oriented programming. There is no clear distinction between classes and objects, as a class only becomes an instance gradually as translations are made from step 1 to 3, and as the models are visualised, interacted with, and represented to users. In the early research an ontology was translated and created from a C++ program, and also from a database. Now, models are created in the Vanguard System (http://www.vanguardsw.com/products/vanguard-system/) modelling tool, with information imported to this from a Protégé ontology, via the nested SQL queries. Vanguard System performs the calculations necessary for the economic model. After inferencing/calculation a result ontology is created for step 3. The step 3 result ontology/taxonomy is created by manually coding, then a system is created to reproduce and output this code automatically. This translation is then tested on many different models to ensure it is generic.

The diagram below examines many of the ways translation could be used for User Driven Modelling/Programming. An example of the repeatable process of this design is that the ‘System Translator Program’ created in Step 1 produces a new ‘System/Translator Program’ in Step 2 which creates a Visualisation. This technique is used to translate an ontology to a CAD style diagram using a second stage of translation. The second ‘System Translator Program’ could also have created a ‘Model/Program’, ‘Meta Program’ or translate to an ‘External Application’. So, this is not an exhaustive diagram, as many types of translation not shown on this diagram would be possible. Another option is that Step 1 could be repeated to translate between ontologies.

Diagram Translation Process for User Driven Modelling/Programming (UDM/P)


Translation Process for User Driven Modelling/Programming (UDM/P)

The ontology represents the relationships between nodes in a machine independent way, so this makes it possible to translate the information into Meta languages via recursive querying. For Step 2 translation, SQL (Structured Query Language) is then used to access the underlying database representation of the ontology. These SQL calls cycle recursively through all the relationships and write out result code for each node, and each relationship automatically. The translation code reads node names and node types (e.g. class, attribute) so it can make an appropriate SQL call for each node, and make a copy in another language or system, then look for children or attributes. This allows any tree to be represented in computer languages. Then recursive routines write the programming language to be output.

More information is available at http://sites.google.com/site/userdrivenmodellingprogramming/index.

Models produced so far are available at - http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Tuesday, November 18, 2008

Economic Models 2

These economic models are constructed and translated in a different way from object oriented programming. There is no clear distinction between classes and objects, as a class only becomes an instance gradually as translations are made, and the models are visualised and represented to users.

At present the main focus is on extending the translation to interactive representations in Java and JavaScript. These will allow users to amend the parameter values of models and to see the result recalculated.

Once all or most of the translations are fully working, I'll concentrate on adding multiple models. Each model could then be translated automatically to many different visualisations/representations. I'll concentrate mainly on economic models, but might also eventually include other kinds of equation based models.

Economic Models - previous post - http://userdrivenmodelling.blogspot.com/2008/11/economic-models.html.

Economic Models Example -
http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Java Applet Example - http://www.cems.uwe.ac.uk/~phale/EconomicModels/Bized/ConsumptionFunctionVanguardOutput/ConsumptionFunctionVanguardOutputInteractive/build/ConsumptionFunctionModelJavaAppletVanguardInteractive.html.

Demonstraion of Economic Model - Consumption Function - Java representation - automatically translated

Tuesday, November 11, 2008

Economic Models

In order to prove the concept that User Driven Modelling is applicable to domains outside engineering, I'm developing economic models using the same kind of translation technique as I used for engineering models. Models are created in the Vanguard System (http://www.vanguardsw.com/) modelling tool, and can be imported to this from Protégé http://protege.stanford.edu/, via nested SQL queries. Vanguard System performs the calculations necessary for the economic model.

The next step is to visualise the Models in the web browser, and in various languages, to show the concept of multiple language implementations being created from one model. These multiple language implementations all share the same semantics and provide a tree based representation of this semantics.

These are demonstrated at http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm, different representations are provides, so that hopefully at least one representation is accessible to the various web browsers. So far there is an XML, HTML, and Java Applet representation. My intention is to extend both the representation of models and the number and type of models represented, until there is a large grid of models, and representations. Options for extending the representation are to JavaScript, SVG, RSS, RDF, and meta programs, and to increase, the interactivity/editability of the models.

This technique should allow automated creation of many models and language representations of them automatically, using one set of model code outputters/translators.

I'm getting the economic models from Biz/ed - http://www.bized.co.uk/educators/he/spreadsheet/section_1.htm. Eventually I might extend this to other types of models as well as engineering and economic models.

The implementation of the models is at http://www.cems.uwe.ac.uk/~phale/EconomicModels/ModelsVisualised.htm.

Sunday, February 17, 2008

User Driven Modelling Justification

There are many computer literate people who are experts in a particular domain. Given the opportunity they will develop their own software (Scaffidi, 2005). There is a need in many domains for people to create software such as engineering models, scientific taxonomies, business systems, and in the arts. Examples of software systems that enable creation of models without necessitating code writing are spreadsheets, visual web development systems, and database management systems. Crapo et al (2002) explain the need for a methodology for creation of systems to enable more collaborative approaches to modelling by domain expert end-users that make use of structured and visualised information. Peirce (1904) explained that systems can be represented logically by humans, and this applies to software development and information representation on computers. Thus it could be made possible to represent systems with natural and visual languages. Though Nurminen et al (2003) argue that people prefer usability over automation, it is possible to achieve both by providing a stepped translation capability that ensures users are constantly kept informed of the steps taken. This approach is advocated by (Johnson, 2004). Automated translation from a people-centred view of information to software for computers can aid in software development by domain expert end-users and help ensure they can communicate models directly to computers. Software developers can then concentrate mainly on creating systems that enable domain experts to develop software, rather than developing individual software models on behalf of domain experts, which is difficult and prone to communication problems.

References

Crapo, A. W., Waisel, L. B., Wallace, W. A., Willemain, T. R., 2002. Visualization and Modelling for Intelligent Systems. In: C. T. Leondes, ed. Intelligent Systems: Technology and Applications, Volume I Implementation Techniques, 2002 pp 53-85.

Johnson, P., 2004. Interactions, Collaborations and breakdowns. In: ACM International Conference Proceeding Series; Proceedings of the 3rd annual conference on Task models and diagrams Vol 86 Prague, Czech Republic. - http://portal.acm.org/citation.cfm?id=1045448&coll=GUIDE&dl=GUIDE&CFID=17319495&CFTOKEN=29205382&ret=1Fulltext [Accessed 17th February 2008].

Nurminen, J. K., Karaonen, O., Hatonen, K., 2003. What makes expert systems survive over 10 years-empirical evaluation of several engineering applications. Expert Systems with Applications 24(2) pp 199-211. - http://citeseer.ist.psu.edu/630566.html [Accessed 17th February 2008].

Peirce, C.S., 1906. Prolegomena to an Apology for Pragmaticism [online]. Available from: http://www.existentialgraphs.com/peirceoneg/prolegomena.htm [Accessed 17th February 2008].

Scaffidi, C., Shaw, M., Myers, B., 2005. Estimating the Numbers of End-users and End-user Programmers. In: IEEE Symposium on Visual Languages and Human-Centric Computing, (VL/HCC'05): 207-214 Dallas, Texas. - http://www.cs.cmu.edu/~cscaffid/papers/eu_20050923_vlhcc.pdf [Accessed 17th February 2008].

Wednesday, January 09, 2008

Code Generation 2008 conference

Code Generation 2008 - http://www.codegeneration.net/conference/index.php - 25th-28th June 2008 - Cambridge, UK - A growing number of developers are using or planning to use model-based code generation - are you ready for the next evolutionary step in software? - WHO'S CG2008 FOR? - CG2008 is for software practitioners and those with a stake in the future of their development organisation.

Final Call for Speakers:
Submission Deadline: Friday January 18th 2008

We are seeking high-quality session proposals covering topics on
model-driven software development (including Software Factories,
Model-Driven Architecture (MDA), Domain-Specific Languages (DSLs),
Generative Programming, Software Product Lines and related areas).

Sessions could cover topics such as:
- Code Generation and Model Transformation tools and approaches
- Defining and implementing modelling languages
- Domain Analysis and Domain Engineering
- Language evolution and modularization
- Meta Modelling
- Runtime virtual machines versus direct code generation
- Tool and technology adoption

Real-world case studies based on any aspect of these and related
approaches are particularly encouraged although more theoretical
sessions are also welcome.

Accepted speakers have their conference fees waived. We will also be
offering a discount on conference fees to non-speaking academic
participants. More information will be available when the programme goes
online on 25th February.

Visit
http://www.codegeneration.net/conference/index.php for more
details on the event or contact me for more information.

What people said about our previous conference - Code Generation 2007:

"I've been working in domain-specific modelling for a dozen years ...
and in this time this has been the highest-quality conference on this
topic that I've been to - and I've been to a few."

"The combined-for that matter, individual-expertise present was
remarkable, and presented a tremendous opportunity for knowledge exchange."

"The presentations were all top quality, making it often difficult to
decide between the concurrently running sessions. The wealth of MDD
knowledge present and the event was impressive, not only from the
presenters, but from the other delegates as well."

Best wishes for a happy and successful 2008.


I have an Events page at which has mainly computing and aerospace events listed and linked to - http://www.cems.uwe.ac.uk/~phale/Events.htm.

Tuesday, December 04, 2007

SWIG-UK Powerpoint Presentation - at Hewlett-Packard

I gave a SWIG-UK Powerpoint Presentation - at Hewlett-Packard Bristol UK - semantic web interest group - http://www.cems.uwe.ac.uk/~phale/InteractiveModellingandVisualisationofInformation.ppt or http://cems.uwe.ac.uk/~phale/InteractiveModellingandVisualisationofInformation.ppt - November 23rd 2007.

This was on Interactive Modelling of Information, Visualisation and Translation Between different software and ontology representations.

There were many interesting presentations and links to all the talks are at - http://swig.networkedplanet.com/special.html.

More information about my research can be found at http://www.cems.uwe.ac.uk/~phale/ or http://cems.uwe.ac.uk/~phale/.

I had a comment saying Links don't work unless I remove www from the url. I'm not sure why the link seems OK as it is from my computer but not others so have put both options.

Friday, June 01, 2007

User Driven Modelling

In order to make user driven modelling and programming possible, it is essential that a communication mechanism is established, which allows users to generate changes and receive changes generated by the modelling system.


Types of Change


There are two types of change that can be applied to the model driven programming system, User Generated, and Model Generated.


User Generated


Figure 1 shows a user initiating a change, which is to delete a node from the bottom left and attach a new node to a branch in the top tight. The tree is translated to structured text, and this is further translated to Code.


User Generated Change.


Figure 1 - User Generated Change


For the second user generated change shown in figure 2 an object represented by a tree is visualised as a diagram. The user can amend either the diagram or the tree, in either case the change is filtered to the alternative representation and translated to the structured text and code.


User Generated Change, Alternative Interfaces.


Figure 2 - User Generated Change, Alternative Interfaces


Model Generated


A model generated change is initiated by the model itself, which changes the code and the structured text in response to a calculation (that may have been requested by the user). The model passes a translated result tree to the user interface to let the user know that the recalculations have been finished, and give the user the results using a suitable visualisation. This is shown in figure 3.


Model Generated Change.


Figure 3 - Model Generated Change


More Information on this research is available on my Website at http://www.cems.uwe.ac.uk/~phale/.


and on my End user programming page at http://www.cems.uwe.ac.uk/amrc/seeds/EndUserProgramming.htm.

Monday, May 07, 2007

Translation for Visual End User Programming

Research Theory influencing this Translation Mechanism


The use of the Semantic Web in my thesis is to be a means for open standard representation of information (built on XML), transformation into different representations as required, and for provision of a high level interface as a tool for model creation, and translation to program code. An 'elaborator', is used, this is a translator that converts the diagrammatic representation of the problem into software code. Translations can be performed into any programming or meta-programming language or open standard information representation language, the visualisation of the model created can be displayed on the web. This translation builds on research in program and model transformation. The translation software performs transformations as required between different programming languages and visual model views. This has been prototyped, but it is important to further this research in order to establish a user base, and make the translation generic. Figure 1 shows the process.



Figure 1 - Translation Process


Implementation


Translation Process


This research involves finding alternative ways of representing models, which do not require the user to write code. The intention is to make it easier to interact with and change the models, and to share information with colleagues. The information used in the models resides in an ontology, and from this ontology models can be automatically produced via a recursive translation tool that has been prototyped.



The research for my thesis uses a technique of interpreting information in order to create decision support programs automatically in response to user choices. This technique is then extended for use in the automatic creation of programs in other computer languages and systems. This can be achieved by automated translation of the Vanguard Studio information into other languages. The basis of this is that elaborators are nodes in the tree, which are automatically created and dynamically write objects. This allows the wing box definition to be translated to the decision support system for costing and then to other software such as web pages for further processing or visualization. An open standard semantic editor Protégé created by Stanford University (2007) was used to structure this information into related taxonomies. This ontology holds the definitions of nodes representing information, and calculations to be performed. Taxonomies are created in Protégé for 'Parts', 'Materials', 'Consumables', 'Processes', 'Rates', and 'Tooling' for a prototype costing system. 'Parts' is the core taxonomy. New categories can be produced as required. Domain experts would edit the taxonomies; these experts can specify the relationships of classes and the equations to be used via a visual user interface in Protégé. These relationships are evaluated and translated to produce computer code. Figure 2 illustrates how code is produced from the semantic relationships.



Figure 2 - Translation Process Implementation


This model can be used as it is, or be a template for the generation of a further model(s). An example interface, a section from a model produced automatically, is shown in figure 3. This information is saved using a generic structure based on keys that define all relationships, into a relational database. This enables storage of hierarchical data in a relational database and also allows for separation of information into tables according to category, and the use of SQL (Structured Query Language) to automatically query and structure the information as required. Vanguards' tree based decision support tool Vanguard Studio (2007) reads this information and represents it as colour-coded nodes. The code written for this thesis automatically queries the taxonomies that make up the ontology and links the information as required for the model. The code builds in all the links required for the equations and thus links up information from different taxonomies, the information is colour coded according to which taxonomy it is from. This same code can be reused for any modelling problem, it builds the equations and follows the links to build each equation tree, and attach this to the rest of the tree. The decision support tool can perform calculations and so output results. Figure 3 shows how the decision support tool can automatically construct and represent a branch in the tree, visualize an equation and calculate a result. Red nodes represent processes, green nodes represent the part definition and magenta nodes represent resources. This illustrates how 3 taxonomies have been automatically linked because they are needed in this calculation. In this prototype hundreds of calculations have been related to each other, this example illustrates that 'Area' was also calculated, and that this forms part of the tree for the 'Hand Layup Tool Cleaning Cost', which in turn is passed into other calculations. Hundreds of calculations using information from all the taxonomies are linked as required in this costing example. The time taken to perform the translation from the ontology and to perform all the calculations is a less than a second.




Figure 3 Ontology to Model Conversion



References


Stanford University, 2007. Welcome to protégé - http://protege.stanford.edu/.


Vanguard Studio, 2007. Global Knowledge Portal http://wiki.vanguardsw.com/.



My Research - http://www.cems.uwe.ac.uk/~phale/.


Modelling - http://www.cems.uwe.ac.uk/amrc/seeds/Modelling.htm


Semantic Web Modelling - http://www.cems.uwe.ac.uk/amrc/seeds/ModellingSemanticWeb.htm


Visualization - http://www.cems.uwe.ac.uk/amrc/seeds/Visualisation.htm

Tuesday, April 03, 2007

Translation And Pipelining Applied To End-User Programming

This research involves using Semantic Web technologies to enable end user programming. This technology is applicable to any problem that involves user interaction, so can be applied in industries and home use for any task or subject area.

The work involves allowing non-programmers to model complex problems visually and without having to use programming languages. Information is created in a visual tree using an Ontology editor, the information is then transformed, and all calculations performed. Further transformations can be performed into any programming language or open standard information representation language, and this can be displayed on the web. This approach can be described as 'pipelining', which is explained by Gropp (2003) using the example of a project to convert Geography Markup Language (GML) to Scalable Vector Graphics (SVG). SVG is explained by McKeown and Grimson (2000). Pipelining is also core to XML (eXtensible Markup Language) (w3C, 2006) and XForms technologies (Bruchez, 2006), which are explained in this thesis. Pipelines are important for translation and Meta Programming techniques I use as they apply one program to the results of another. Also transformations can be performed between a tree representation and other styles of representation e.g. an interactive CAD style representation, using SVG. A major theme of the research is that of prototyping solutions to the problems raised, using web and other software technologies. These are then referenced from the thesis document to illustrate the solutions discussed.

The additional advantage is that of displaying the expressions in the appropriate context. Crapo et al (2002) explain that visualization helps the modeller to maintain a hierarchy of submodels at different stages of development and to navigate effectively between them, this is my reason for breaking down the models into a tree structure.

Semantic Web research has been developed from the work of Tim Berners-Lee (1997). Uschold (2003) defines the Semantic Web as being machine usable and associated with more meaning. Semantic web technologies and the use of agents and ontologies are explained by Hendler (2001) and Uschold who explains that "In order to carry out their required tasks, intelligent agents must communicate and understand meaning".

Meta programming is the writing of programs that write or manipulate other programs (or themselves) as their data. The idea behind this technique is that instead of writing programs to do a task a person 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. This can prevent problems of misunderstanding, delay, and expense that often result from communication of difficult concepts between people who are experts in different areas (domain expert and programming expert).

This is another useful article on sharing RSS feeds via linked up pipes (Yahoo Pipes) -

Pipes and Filters for the Internet-http://radar.oreilly.com/archives/2007/02/pipes_and_filte.html.

This approach could make it easier for web developers to build interacive websites without needing to do in depth coding.

References

Berners-Lee, T., Fischetti, M., 1997. Weaving the Web. Harper San Francisco; Paperback: ISBN:006251587X

Bruchez, E, 2006. XForms: an Alternative to Ajax?. In: XTech 2006: Building Web 2.0 16-19 May 2006, Amsterdam, The Netherlands.

Crapo, A. W., Waisel, L. B., Wallace, W. A., Willemain, T. R., 2002. Visualization and Modelling for Intelligent Systems. In: C. T. Leondes, ed. Intelligent Systems: Technology and Applications, Volume I Implementation Techniques, 2002 pp 53-85.

Gropp, E., 2003. Accelerating SVG Transformations with Pipelines. In: SVG Open 2003 - Conference and Exhibition 2nd Annual Conference on Scalable Vector Graphics - Vancouver, Canada.

Hendler, J., 2001. Agents and the Semantic Web. IEEE Intelligent Systems Journal.

McKeown, J., Grimson, J., 2000. SVG: putting XML in the picture In: XML Europe 2000 Paris France.

Uschold, M., 2003. Where are the semantics in the semantic web? AI Magazine Vol 24 (3) pp 25-36.

W3C (World Wide Web Consortium), 2006. http://www.w3.org/TR/xproc/ XProc: An XML Pipeline Language W3C Working Draft 17 November 2006.

I am developing a project to provide free online collaborative modelling tools.

My Research - http://www.cems.uwe.ac.uk/~phale/

My Blog - http://userdrivenmodelling.blogspot.com/

My SVG Page - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/SVG/SVG.htm