M

odel

O

riented

D

evelopment with

E

xecutable

L

ogic

O

bject

G

eneration

 

Goal

Methodology

Application to General Purpose Software Engineering

Application to Intelligent Agent Engineering

Application to Semantic Web Service Engineering

Current Status

Publications

References

Goal

Started in 2002, the MODELOG project aims at developing an automated mapping from fully refined Platform Independent Model (PIM) of a system as UML2.1 Class Diagrams annotated with complete OCL2.0 structural constraints, business rules and behavior specifications to an implementation of that system in the Object-Oriented Logic Programming (OOLP) and Knowledge Representation (KR)  language Flora-2. Such a mapping has the potential to simultaneously address in synergy various gaps that remain in the extended usages of UML2.1 for general purpose software engineering, intelligent agent engineering and semantic web services engineering.

Methodology

The MODELOG mapping is built following an Model-Driven Engineering (MDE) methodology: it starts with the reuse of the relevant subset of the UML2.1 and OCL2.0 meta-models in MOF2.0 provided by OMG, continues with the specification of the full Flora-2 meta-model (also in MOF2.0), and finishes with the specification of Model Transformation (MT) OO rules from the source integrated UML/OCL meta-model to the target Flora-2 meta-model. Two MT languages have been chosen to implement MODELOG:

·          The Atlas Transformation Language (ATL) based on rules, procedures and OCL to specify transformation between meta-models specified in Ecore (a subset of MOF2.0);

·          Flora-2 itself playing the dual role of transformation and target language.

Note that since (a) Ecore is a largely a subset of the UML2.1 infra-structure that itself corresponds to class diagrams and (b) ATL is a small extension of OCL2.0, the MODELOG mapping from UML class diagram and OCL constraints and expressions to Flora-2 as a prototype application implementation language, should be largely reusable as the main part of a mapping from ATL transformations to Flora-2 as a transformation language between Ecore meta-models.

Application to General Purpose Software Engineering

MODELOG contributes to software engineering by providing a CASE tool that allows reconciling three software engineering approaches that have been traditionally conceived as pair wise antagonistic:

·          OOMDE based on constructing long-term reusable, fully structurally and behaviorally refined OO business PIM from which system implementations on diverse OO platforms can be automatically generated;

·          Agile development based on fast prototyping for early testing;

·          Formal development based on rigorous model verification through Automated Reasoning (AR) prior to implementation.

One key OOMDE principle is to construct a fully refined PIM in an OO language such as UML - which very platform-independence makes it inherently non-executable and thus non-testable by developers and non-demonstrable to prospective users  - before starting to translate this PIM into an executable but platform-specific OO language. One key agile development principle is to deliver a tested partial running prototype of the system as early as possible to check its validity directly with the prospective users in the absence of formally defined, detailed requirements. These two principles are normally conflicting. As a CASE tool that fully automatically generates a running prototype, with complete structural and behavioral code for the OO Flora-2 platform from an OO UML/OCL PIM, MODELOG overcomes this conflict. It reconciles the respective goals behind these two principles: (a) produce artifacts that constitute long-term and widely reusable strategic assets by capturing business structures and behaviors uncluttered by platform-specific technical details, and (b) produce testable and demonstrable artifacts for fast development iterations involving prospective users. The former is attained by the construction of the UML/OCL PIM, while the latter is attained by MODELOG's instantaneous automated generation of complete executable code from such PIM. Thus, with MODELOG, one does not have to sacrifice the long-term cost-cutting benefits of software reuse on the altar of the short-term cost-cutting benefits of fast development iterations nor vice-versa.

One key formal development principle is to construct a fully refined PIM in a language with precise formal semantics in a mathematical notation, and, using an AR engine, to verify that such PIM is logically consistent and completely satisfies its formally specified requirements before starting to translate it into an executable, platform-specific language. This normally conflicts with the agile development principle of fast prototyping, testing and validating running code from sketchily and informally specified requirements. As a CASE tool that fully automatically generates from a PIM a full running prototype in a language Flora-2 - which is executable but nevertheless possesses formal semantics in Transaction Frame Logic (TFL) [1] [2] [4] [5] [7] and an AR engine to automatically verify formal properties as logical queries to prove  - MODELOG overcomes this conflict. It reconciles the respective goals behind these two principles: (a) produce highly robust, provably reliable and requirement conformant artifacts and (b) produce testable and demonstrable artifacts for fast development iterations involving prospective users. In the MODELOG approach, these two artifacts are reified as one: the Flora-2 code that is automatically generated by MODELOG from the UML/OCL PIM and automatically verified by the Flora-2 AR engine by running queries that are either manually specified or automatically generated by MODELOG from the UML/OCL PIM. It even closes the robustness loophole of traditional formal development where the PIM is specified in a non-executable formal language (e.g., Object-Z) and verified with an AR tool, but then manually translated to an executable imperative platform that lacks complete formal semantics (e.g., Java) : namely the reintroduction of semantics errors during this translation step.

One key OOMDE principle is to ease the specification of a fully refined PIM by relying on largely visual languages that are intuitive for mainstream software developers such as UML and OCL. This normally conflicts with the formal development principle to rely on languages with mathematically defined formal semantics to specify the PIM, since, one the one hand, no standard formal semantics for UML and OCL has yet been published by OMG, and, on the other hand, most formal specification languages rely on arcane mathematical notations with a prohibitively steep learning curve for mainstream software developers. By providing a formal semantics for UML and OCL through an automatic mapping to Transaction Frame Logic via Flora-2, MODELOG overcomes this conflict. It reconciles the visual clarity of UML, intuitive and simple syntax of OCL for PIM construction with the rigor of a formal representation that is automatically generated from the PIM.

MODELOG thus combines the respective, complementary strengths of OOMDE, agile development and formal development:

·          Fast prototyping for early testing and validation with prospective users in rapid development iterations;

·          Scalable construction of fully refined and formally verified PIM for cross-platform reuse of guaranteed correct and consistent business structures and behaviors.

It derives this unique breakthrough from three key principles:

·          Choosing a standard, visual, intuitive, complete OO language at the PIM level: UML2.1 which includes OCL2.0

·          Choosing an executable yet formal logic OO language at the PSM level: Flora-2 with its semantics in TFL and powerful AR engine;

·          Making the translation from the PIM language to the PSM language fully automatic as executable model transformations.

Application to Intelligent Agent Engineering

Most intelligent agent engineering methods extend with agent-oriented concepts (e.g., agent, sensor, percept, actuator, action, goal, plan, belief, encapsulated KR and AR, role, agent society, communication, coordination, cooperation and negotiation protocols) either Logic-based Formal Software Engineering (LFSE) or Object-Oriented Software Engineering (OOSE) methods. OOSE methods - especially those of the Component-Based flavor (CBOOSE) - form a sound basis on top of which to define the concepts of sensor, percept, actuator, action, role, agent society, communication, coordination, cooperation and negotiation protocols that focus on modeling interactions between agents. But it provides little basis to define the concepts of goal, plan, belief and encapsulated KR and AR that focus on modeling the internal architecture and private behaviors of individual agents. In contrast, LFSE is especially suited for the latter but provide little reusable support for the former. These two bases for agent development thus appear almost perfectly complementary. Surprisingly, none of the most sophisticated and widely used AOSE methods are based on an OO logic formalism able to provide reusable concepts on top of which to define the entire range of agent-oriented concepts, from those needed to model the structures and behaviors encapsulated in each agent to those to model the structure of agent societies and the multi-agent behaviors that emerge inside them.

MODELOG allows integrating objects with logic in an MDE context at both the PIM and the PSM levels. At the PIM level, UML class diagrams are used for OO structural representation, while OCL constraints and expressions are used for logical representation (as arbitrary first-order formulas) of the relations between elements of this UML OO structural representation as well as their behavior.  At the PSM level, Flora-2 facts are used for OO structure representation and Flora-2 rules for logical representation (of the relations between elements of this OO structural representation as well as their behavior). MODELOG automatically generates Flora-2 facts from UML class diagrams and Flora-2 rules from OCL constraints and expressions.  It thus provides an integrated basis for intelligent agent engineering that combines the respective strengths of LFSE and OOSE for this purpose. MODELOG can act as a productivity boosting CASE tool for an agent-oriented method which integrates and extends steps from OOMDE and LFSE methods and defines a UML profile for PIM level agent engineering.

Application to Semantic Web Service Engineering

Two initially distinct World-Wide Web Consortium (W3C) initiatives, the semantic web and web services are currently being integrated. The semantic web initiative aims at developing standard languages and tools to publish and distribute on the web intentional knowledge bases, called ontologies, modeling common sense or specialized task domains. Once a critical mass of such ontologies have been published, the natural language phrases of a web page can then be annotated by extensional knowledge instances of concepts from such ontologies. Then, once a critical mass of web pages have been semantically annotated this way, web crawling agents that encapsulate an engine able to reason with the same standard KR language than these ontologies and semantic page annotations should be able to understand precisely the meaning many pages. This should in turn allow developing web search services of dramatically higher level of precision and recall than the current state-of-the art engines which are based on statistical analysis of highly ambiguous keywords and links. In essence, the semantic web aims to leverage the web to create a gigantic, global shared knowledge base for intelligent agents. However, in the semantic web vision, while these agents reason with web accessible knowledge, the computational services performed by such reasoning are not available on the web. It is thus complementary to the web service initiative that aims at developing standard languages and tools to publish and distribute on the web computational processing services that can be dynamically composed on demand to quickly assemble an application or a more complex web service. In essence, web services aim to leverage the web to create a gigantic, global reusable software component repository. However, most of these components do not perform AR on knowledge bases. The Semantic Web Service (SWS) initiative aims at developing standard languages and tools to publish and distributed on the web the AR services of intelligent agents that leverage intentional knowledge published in web ontologies and extensional knowledge published in web page semantic annotations which instantiate concepts of these ontologies. It thus aims at leveraging the web to create gigantic, global repository of reusable intelligent agent services and their shared knowledge bases.

The first practical SW standard for web ontologies such as the Ontology Web Language (OWL) integrates markup languages for web page meta-data languages such as XML, the Resource Description Framework (RDF), and RDF Schema (RDFS) with the Description Logic SHIQ [3]. OWL has been extended into OWL-S to represent SWS specifications. However, as most language with description logic semantics, OWL is not a Turing-complete language capable of representing arbitrary complex state-changing behaviors. It is merely a purely structural knowledge representation language of deliberately limited expressivity to ensure scalable worst-case complexities of purely monotonic, stateless, deductive AR services of subsumption, entailment, satisfiability and consistency for sentences in the language. Consequently, neither OWL nor OWL-S can be easily extended to represent SWS realizations. This limitation has led the W3C to define another standard language for SWS, the Semantic Web Service Language (SWSL). SWSL is based on Flora-2 which it extends with composition in SWSL clause premises of Flora-2's OO molecules with arbitrary combinations of first-order logic connectives, control annotations to declare application priorities among rules and XML syntax for web distribution.

Together with a UML editor that support UML2.1 and OCL2.0, a simple extension of MODELOG generating SWSL instead of Flora-2 as output would constitute a CASE tool suite for MDE of SWS. With this suite, one could first construct a fully refined SWS PIM is modeled as UML2.1 class diagrams fully annotated with OCL2.0 structural constraints (class invariants), business rules (derived classes, associations and attributes), and complete behavior specification (operations pre-conditions, bodies of read-only operations, post-conditions of state changing and constructor operations) and then use MODELOG to fully automatically generate the complete specification and realization of the SWS as SWSL code. Previous work [6] proposed MDE of SWS specification by constructing a PIM in UML2.0 of such specification and then use MT to automatically generate an OWL-S PSM from such PIM. A MODELOG extension to cover SWSL constructs not present in Flora-2 would allow generalizing this approach to also include MDE of SWS realization by constructing a PIM in UML2.1 and OCL2.0 and then automatically generate an SWSL PSM from such PIM.

Current Status

MODELOG was the doctoral research of Franklin Ramalho under my supervision. Franklin defended his thesis 28/02/2007 at CIn-UFPE.

The presentation slides of this defense are avalaible here: MODELOG.ppt

 The full text of his PhD. thesis should be released soon on this page.

MODELOG was partially funded by fellowships from CNPq and CAPES.

Dr. Ramalho, now Prof. at the Departamento de Sistemas e Computação, Universidade Federal de Campina Grande (DSC-UFCG) in Paraiba, Brazil, is pursuing the MODELOG project as a collaboration among three groups:

·          The software engineering group at DSC-UFCG

·          My ORCAS group at CIn-UFPE

·          The ODAC (Open Distributed Applications Construction) group at the Laboratoire d'Informatique de Paris 6, Université Pierre et Marie Curie (LIP6-UMPC), Paris, France.

Publications

·          Xavier Blanc, Franklin Ramalho and Jacques Robin. Metamodel reuse with MOF. ACM/IEEE 8th International Conference on Model-Driven Engineering, Languages and Systems. (MoDELs’2005). Montego Bay, Jamaica. 2005.

·          Franklin Ramalho and Jacques Robin.  Mapping UML class diagrams to object-oriented logic programs for model-driven development. Third UML Workshop in Software Model Engineering (WISME’2004), Lisbon, Portugal, 2004.

·          Franklin Ramalho, Jacques Robin and Ulrich Schiel. Concurrent transaction frame logic formal semantics for UML activity and class diagrams. Electronic Notes in Computer Science, 95(17), 2004.

·          Franklin Ramalho, Jacques Robin and Roberto Barros. XOCL, an XML language for representing logical constraints in object-oriented models. Journal of Universal Computer Science, 9(8), Springer, 2003.

·          Franklin Ramalho, Jacques Robin and Ulrich Schiel. Concurrent transaction frame logic formal semantics for UML activity and class diagrams. Sixth Brazilian Symposium on Formal methods, (WMF'2003), Campina Grande, Brazil, 2003.

References

[1] Bonner, A. and Kifer, M. Transaction Logic Programming. Technical Report CSRI-323. Computer Systems Research Institute, University of Toronto. 1995.

[2] Bonner, A. and Kifer, M. Concurrency and Communication in Transaction Logic. Proceedings of the Joint International Conference and Symposium on Logic Programming. Bonn, 1996. MIT Press.

[3] Horrocks, I. Patel-Schneider, P.F., Van Harmelen, F. From SHIQ and RDF to OWL: The Making of a Web Ontology Language. Journal of Web Semantics (1)1. 2003.

[4] Kifer, M. Deductive and Object Data Languages: A Quest for Integration.  Lecture Notes in Computer Science 1013. Springer. 1995.

[5] Kifer, M., Lausen, G. and Wu, J . Logical Foundations of Object-Oriented and Frame-Based Languages. Journal of the ACM 42. 1995.

[6] Lautenbacher, F. A UML profile and transformation rules for semantic web services. Technical Report 2006-20, Universität Augsburg. 2006.

[7] Yang, G. A Model Theory for Nonmonotonic Multiple Value and Code Inheritance in Object-Oriented Knowledge Bases. PhD. Thesis, Computer Science Department, Stony Brook University of New York, 2002.

 

© Jacques Robin 2007. Last Updated: 05/03/2007