This blog is about my PhD research (now finished) at University of the West of England into User Driven Modelling. This is to make it possible for people who are not programmers to create software. I create software that converts visual trees into computer code. My web site is http://www.cems.uwe.ac.uk/~phale/. I'm continuing this research and the blog. My PhD is at http://eprints.uwe.ac.uk/17918/ and a journal paper at http://eprints.uwe.ac.uk/17817/.
Tuesday, September 09, 2008
SWRL (Semantic Web Rule Language) and Protege
So far in creating ontologies for modelling for my thesis, if-then-else structures were edited using simplified english language. Elenius et al. explain that Protege now supports SWRL. This makes it possible to use SWRL expressions within Protege. So if-then-else and other control structures could be specified using SWRL. Protege provides an expression builder for this purpose. This also opens up the possibility of translating between an english representation of such structures and an SWRL structure or vice versa, so would be useful future research.
Protege support for SWRL is through the SWRLTab, and has been available since 2004 - http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab.
This paper by Elenius et al. is available online - The OWL-S Editor - A Development Tool for Semantic Web Services - http://owlseditor.semwebcentral.org/documents/paper.pdf - Daniel Elenius, Grit Denker, David Martin, Fred Gilham, John Khouri, Shahin Sadaati, and Rukman Senanayake - SRI International, Menlo Park, California, USA.
This is the relevant paragraph - Refering to their own research - "One aspect of OWL-S services not covered in this paper is the editing of preconditions and effects of processes, and conditions associated with control constructs such as If-Then-Else. In OWL-S, these are normally described in the SWRL language. Currently, we simply provide a text box where users can enter these SWRL expressions. However, we plan to provide more user-friendly editing capabilities. Protege has recently" ... (2004)... "been enhanced with native support for SWRL, including a SWRL expression-builder, which will serve as the basis of this work."
One possible application of this would be using OWL-S, and UML type diagrams to produce interoperable process models diagrammatically.
More information on OWL is at http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/RDF/RDF.htm#OWL.
More information on SWRL is at http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/RDF/RDF.htm#SWRLRuleML
The Protege homepage is - http://protege.stanford.edu/.
Friday, August 24, 2007
PIXEL Programming Interaction with XML Environments and Languages
Mayo and Steinberg [1] authored a cabinet office report for the UK Government recommending government partners with other providers to make use of User generated content and enable provision of information that helps achieve public policy objectives. A JISC (Joint Information Systems Committee) report explains the power of networks and how important it is for educational establishments to make proper use of them [2]. The flexibility of information representation languages could enable administrative users to maintain, adapt and extend a system themselves. This goes beyond open source development to enable development of communities of end-user programmers. Users can interact with XML via programs written in interpreted languages such as JavaScript. The user will not require any software except for a web browser as the development environment will be web-based.
XML is used for structuring information so different software systems can interpret it. This language can be used to structure web pages so that they can represent and link to programming objects. XML can be used as a way to manage workflow within and between organisations. XML provides the basis for creation of taxonomies and ontologies. Using Meta-tags defined with XML it is possible to create documents that define their own structure and to provide a consistent and understandable user interface. A further objective of this research is automating the conversion of information between formats, to assist organisations to manage their information.
Mechanisms for this Research
The intention is to prototype the creation an environment based on Semantic Web languages such as OWL (Web Ontology Language), RDF (Resource Description Framework) [3] and XML, not just for search but also combined into a comprehensive application that is usable for end-user programming of a large range of problems. To allow users to create Rich Internet Applications we intend to create a translator using XML or RDF/XML programming so the entire solution would be in XML based languages. This involves programming with Semantic Web languages rather than just using them for information representation. This will make the translation from visualisation to code easier and more reliable, and further improve the maintainability of the software created.
It is essential that new ways of enabling collaboration between all those involved in software creation and use are investigated. An important part of the research will be to investigate the use of Semantic Web languages for programming, rather than just for representation of information, this would expand on languages such as SPARQL (Simple Protocol and RDF Query Language) [3] and XQuery [4]. The use of Semantic Web languages for declarative programming can ease the translation between different representations of information, and ease interoperability between systems.
End-User XML Editing
An XML based drag and drop programming example has been created [5], this example was created with AJAX (Asynchronous JavaScript And XML). XML can be manipulated directly from the browser rather than requiring a specialist XML editor. This allows open standards platform independent end-user programming. The example is based on the Scand dhtmlxTree [6] and this makes it possible to enable many other programming actions such as adding and deleting nodes, and to create other editing controls. It will be possible to make use of XML based meta programming to allow end-user programming, Simkin [7] and Lemos [8] are examples of this approach. We intend to investigate and extend this approach to create meta language tools for programming, including for the display interface. Semantic languages provide a higher level declarative view of the problem to be modelled. We will develop declarative programming with XML based languages. Examples of research into XML as a programming language are AspectXML [9], and the Minimal Imperative Language XIM [10]. Interactive web programs can be created using scripting languages and XML combinations such as AJAX (Asynchronous JavaScript And XML) [11], which is a name for techniques to create highly interactive web pages. Web 2.0 technologies (often making use of Ajax) aim to reproduce on the web the functionality provided by office software and this can be extended to enable users to create their own programs using XML and a visual interface.
Even where documents are represented using XML or other structured languages, it is important to structure the contents and semantics using an ontology, Erdmann and Studer [12] experiment with this.
References
[1] Mayo E, Steinberg T, 2007, The Power of Information, Cabinet Office independent review - http://www.cabinetoffice.gov.uk/publications/reports/power_information/power_information.pdf?id=3965.
[2] JISC (Joint Information Systems Committee) Anderson P, 2007, Technology and Standards Watch What is Web 2.0? Ideas, technologies and implications for education - http://www.jisc.ac.uk/media/documents/techwatch/tsw0701b.pdf.
[3] World Wide Web Consortium (W3C), 2007, SPARQL Query Language for RDF, http://www.w3.org/TR/rdf-sparql-query/.
[4] McGovern J, Cagle K, Bothner P, Nagarajan V, Linn J, 2003, XQuery Kick Start.
[5] Drag and Drop, 2007, http://www.cems.uwe.ac.uk/amrc/seeds/Ajax/samples/components.html.
[6] Scand dhtmlxTree, 2007, http://www.scbr.com/docs/products/dhtmlxTree/index.shtml.
[7] Whiteside S, 2007, Simkin the embeddable scripting language, http://www.simkin.co.uk/.
[8] Lemos M, 2007, MetaL: An XML based Meta-Programming language, http://www.meta-language.net.
[9] Peterson M D, 2005, O'Reilly XML.com - [Part 3] Assets, Atom Feeds, and AspectXML - The Triple Threat of Web Development? - http://www.oreillynet.com/xml/blog/2005/09/part_3_assets_atom_feeds_and_a.html.
[10] Bayram Z, Onder R, 2007, XSL Transformations A delivery medium for executable content over the Internet, http://www.ddj.com/web-development/198800555.
[11] Cagle K, 2006, AJAX on the Enterprise, AJAXWorld conference, October 4, 2006 - http://www.oreillynet.com/xml/blog/2006/10/ajax_on_the_enterprise.html.
[12] Erdmann M, Studer R, 1999, Ontologies as Conceptual Models for XML Documents, Proceedings of the 12th Workshop on Knowledge Acquisition, Modelling and Management.
More Information
Ajax/Web2.0 - http://www.cems.uwe.ac.uk/amrc/seeds/Ajax/ajax.htm.
Drag and Drop Programming - http://www.cems.uwe.ac.uk/amrc/seeds/Ajax/ajax.htmDragandDropProgramming.
RDF, OWL, Semantic Web - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/RDF/RDF.htm.
XML - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/XML/XML.htm.
XML Programming - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/XML/XML.htmProgrammingwithXML.
Friday, June 15, 2007
Markup Languages
An important reason for creating the open standards ontology is that it can be accessed by many different users and/or applications. The open standard OWL (Web Ontology Language) is used in my thesis and is explained by (Bechhofer and Carrol), and there are several markup languages that can be used to represent structured information.
McGuinness (2003) explains the role of markup languages in defining content to be machine readable, McGuinness cites a diagram from a presentation by Berners-Lee (2000) that contains a diagrammatic representation of the place of each language in a stacked representation alongside the purpose of the language. This is shown in below.
Architecture, sourced from Berners-Lee (2000) - http://www.w3.org/2000/Talks/1206-xml2k-tbl/slide10-0.html.
XML may not be sufficient on its own for defining ontologies. The XML syntax defines relationships by their position within the text file. Thus XML syntax always implies a sequence whereas in reality the order of items may be unimportant, also there is no explicit way of representing associations between items, or differentiating between an Inheritance and a Contains relationship. XML schemas and DTDs (Document Type Definitions) can be helpful in defining these relationships, but there is then scope for differences in the way they are defined. RDF has provided a layer of standardised semantics which overlays the basic XML. The RDF text can be embedded within XML.
I have chosen to use RDF represented using RDF/XML as this allows me to continue using XML tools for visualising or searching the RDF/XML while also allowing the use of tools available for representing RDF. Vehicle'. RDF consists of a resource, a property, and a property value. This 'Triple' corresponds to 'Subject', 'Predicate', and 'Object' in logic. Each RDF triple represents a fact. So RDF structures information into individual facts that link as a graph, each fact is a triple. This can be thought of as a sentence representing a fact such as 'Aircraft is a Vehicle'. An example of an RDF graph is shown in the figure below and the table illustrates rows of facts that make up the graph. More information is available here - Quick Intro to RDF.
RDF Graph Example, RDF Description of Aircraft
Resource | Property | Value | |
Subject | Predicate | Object | |
Fact | Aircraft | Is a | Vehicle |
Fact | Aircraft | Flown by | Pilot |
Fact | Aircraft | Has | Engine |
Fact | Plane | Is an | Aircraft |
Fact | Plane | Has | Wings |
Uniform Resource Identifier (URI) |
A Resource is anything that can have a URI (uniform resource identifier). A URI can look like a web address and can actually be a web address, but this is not always the case, it is a way of representing an entity. A URI consists of the name and location of the entity. An RDF Resource is described through a collection of properties and property values called an RDF Description. RDF provides a mechanism for describing collections, which are special kinds of resources, and a sequence is an ordered collection. A collection does not have to possess its own URI but it can.
RDF/XML has provided a layer of standardised semantics which overlays the basic XML. RDF does not have to be based on XML there is also a format called N3 http://rdfabout.com/quickintro.xpd. RDF extends the XML model and syntax to be specific for describing resources. For example Engine Ring Manufacture sequence can be represented as a sequence of groups of sequential operations as in this example. RDF is a W3C (World Wide Web Consortium) Recommendation, this means it is a stable specification and therefore a standard. Because a resource can represent anything, knowledge from any domain can theoretically be represented in RDF, this together with it's standardised syntax that allows it to be machine understandable are the reasons why RDF is such a useful and important technology for the Semantic Web.
RDF/XML Web pages can be linked to each other indefinitely, which is why it is such an important technology for the Semantic Web. If a web page exists for a URI there could be further information possibly represented using RDF on this web page. This allows resources to be linked to each other, which is why it is such an important technology for the semantic web. Because it is XML based, an RDF/XML Web page can be linked to an XSL stylesheet to produce a visual representation of the structure as in this example. This is also explained in this paper http://www.cems.uwe.ac.uk/~phale/ISPECE2003.htm, and by (Cayzer, 2004) who uses RDF to provide structure for Semantic blogging. Oren et al (2006) also use this approach of combining RDF and Semantic Web use with ease of editing in a Semantic Wiki.
SPARQL Simple Protocol and RDF Query Language is a query language and protocol for RDF being recommended to the W3C.
RDF/XML can be used to encode an ontology. (Fensel et al. 1998) and (Fensel et al. 2001) describe Ontobroker and the use of XML and RDF within this ontology tool. The use of ontologies is being driven by e-commerce and e-procurement where trading is online (UN/CEFACT and ebXML 2007).
References
Bechhofer S, Carrol J (2004) Parsing owl dl: trees or triples? Proceedings of the 13th international conference on World Wide Web, NY, USA pp 266 - 275.
Berners-Lee, T., 2000. Semantic Web on XML http://www.w3.org/2000/Talks/1206-xml2k-tbl/slide1-0.html.
ebXML 2002, ebXML Enabling a Global Electronic Market. http://www.ebxml.org/, OASIS & UN/CEFAC, accessed on 9th January 2007.
Cayzer, S. 2004. Semantic Blogging and Decentralized knowledge Management. Communications of the ACM. Vol. 47, No. 12, Dec 2004, pp. 47-52. ACM Press.
Fensel, D. & Angele, J. & Decker, S. & Erdmann, M. & Shnurr, H. & Studer, R. & Witt, A. 1998. On2broker: Lessons Learned from Applying AI to the Web. http://www.aifb.uni-karlsruhe.de/WBS/Publ/2000/llfaattw_dfeetal_2000.pdf, accessed on 9th January 2007.
Fensel, D. Van Harmelen, F. Horrocks, I. McGuinness, D. Patel-Schneider, P. F., 2001. OIL: An ontology infrastructure for the semantic web. IEEE Intelligent Systems, 16(2), pp 38-45. - http://www.cs.man.ac.uk/~horrocks/Publications/download/2001/IEEE-IS01.pdf.
McGuinness D. L., 2003. Ontologies Come of Age. http://www-ksl.stanford.edu/people/dlm/papers/ontologies-come-of-age-mit-press-(with-citation).htm 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.
Oren, E., Breslin, J. G., Decker, S., 2006. How Semantics Make Better Wikis - WWW 2006, May 23-26, 2006, Edinburgh, Scotland.
Relevant Web Pages
Semantic Web Page - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/RDF/RDF.htm
Sunday, May 13, 2007
Programming with Semantic Web Languages
For my PhD thesis in User Driven Programming I've been experimenting with using Semantic Web Languages as programming languages. The two approaches I've used are:-
Option 1 - To put all the data in Semantic Web languages e.g XML, SVG, RDF/XML, OWL, and then display them using a programming language such as Flash, or Java (applets) -http://www.cems.uwe.ac.uk/~phale/Flash/FlashHCI.htm
http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/JavaTree/AutomaticaOutputSpar/classes/TreeOutput.html.
Option 2 - To use the above languages as meta languages for actual programming -
http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/SparMenu.xml
http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/SparMenu.html
Some of these solutions have used aspects of both approaches. These examples use SVG and JavaScript -http://www.cems.uwe.ac.uk/~phale/InteractiveSVGExamples.htm.
It is becoming increasingly practical to program completely in the Semantic Web languages. These languages enable declarative programming where we tell the computer what we want to do, and a translation is performed either using languages such as JavaScript or Java, or into JavaScript or Java.
The advantages of this form of declarative programming are that we can use a language that is at a much higher level of abstraction, closer to the way people think. I have been creating these programs by editing them in Protege (ontology editor) and using a translator to convert them to whatever code is needed. This makes it possible to perform visual programming in a meta language (OWL) Web Ontology Language (option 2), without needing to worry about how it's implemented. The possibilities for this are that it becomes sufficiently intuitive, so that people can eventually create their own software for a wide variety of tasks, in a point and click way and using similar tools to web page editors. This would enable anyone who is computer literate to program the computer themselves to do their tasks, and if this is of interest to others, they can release their solution over the web.
Technologies such as XForms - http://www.cems.uwe.ac.uk/amrc/seeds/Ajax/ajax.htm#XForms, XQuery - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/XML/XML.htm#XQuery, and SPARQL - http://www.cems.uwe.ac.uk/amrc/seeds/PeterHale/RDF/RDF.htm#SPARQL
make it possible to provide the sort of collaborative interactivity that Tim Berners-Lee calls 'Intercreativity' in Weaving the Web - http://www.w3.org/People/Berners-Lee/Weaving/. In this book he also discussed the use of Semantic Web Languages as programming languages. He makes the point that it isn't the power of the language that is important in providing this intercreativity. The simplicity of a language such as RDF makes it easier to provide interconnected solutions to complex problems, without becoming bogged down with the complexity of the language itself, and interoperability problems. Tim Berners-Lee sums up the advantage of a Semantic Web program over programs in other languages. He writes "The advantage of putting the rules in RDF is that in doing so, all the reasoning is exposed, whereas a program is a black box: you don't see what happens inside it." If these rules are also visualised, they are exposed to everyone, including non-programmers.
These advances make it practical to develop a high level visual interface that can allow people to develop open source, open standard, interoperable programs and share them. This can allow the development of open source communities similar to those developing software currently, but only requiring the level of skill it takes to get started in visual collaboration tools such as MySpace.
In Weaving the Web Tim Berners-Lee writes "The Semantic Web, like the Web already, will make many things previously imposible just obvious". I think visual Semantic Web programming is one of those obvious things.
Semantic Web Languages could also be a useful programming tool for creation and editing of E-Learning objects (Stutt and Motta, 2004).
References
Bechhofer, S., Carrol, J., 2004. Parsing owl dl: trees or triples?. In: Proceedings of the 13th international conference on World Wide Web, NY, USA, pp 266-275.
Berners-Lee, T., Fischetti, M., 1999. Weaving the Web. Harper San Francisco; Paperback: ISBN:006251587X - http://www.w3.org/People/Berners-Lee/Weaving/.
Stutt, A., Motta, E., 2004. Semantic Learning Webs. Journal of Interactive Media in Education, 2004 (10). Special Issue on the Educational Semantic Web. ISSN:1365-893X - http://www-jime.open.ac.uk/2004/10.
World Wide Web Consortium (W3C), 2007. Extensible Markup Language (XML) http://www.w3.org/XML/.
World Wide Web Consortium (W3C), 2007. Resource Description Framework (RDF) http://www.w3.org/RDF/.
World Wide Web Consortium (W3C), 2007. Scalable Vector Graphics (SVG) XML Graphics for the Web http://www.w3.org/Graphics/SVG/.
World Wide Web Consortium (W3C), 2006. SPARQL Query Language for RDF http://www.w3.org/TR/rdf-sparql-query/.
World Wide Web Consortium (W3C), 2006. XQuery 1.0: An XML Query Language http://www.w3.org/TR/xquery/.