CLIPS representation of ontology classes in an ontology-driven information system builder part 1

Similar documents
Intelligent Systems: Reasoning and Recognition. Rule based programming - Introduction to CLIPS 6.0

Rule based GUI modification and adaptation

Intelligent Systems: Reasoning and Recognition. Rule based programming - Forward chaining

TOWARDS ONTOLOGY DEVELOPMENT BASED ON RELATIONAL DATABASE

SISE Semantics Interpretation Concept

CLIPS C LANGUAGE INTEGRATED PRODUCTION SYSTEM

A Development Method for Ontology Based Business Processes

Using DSM to Generate Database Schema and Data Management

Abstract. 1. Conformance. 2. Introduction. 3. Abstract User Interface

Creating Reports using Report Designer Part 1. Training Guide

Prototyping Navigation in Web-Based Information Systems Using WebML

Towards the Semantic Grid: Putting Knowledge to Work in Design Optimisation

Making EXCEL Work for YOU!

System Models & Simulation

Java Learning Object Ontology

Integrating SysML and OWL

Kendo UI. Builder by Progress : Using Kendo UI Designer

Ontology Construction -An Iterative and Dynamic Task

Comparison of Simple Graphical Process Models

Intelligent Systems: Reasoning and Recognition. CLIPS: RULE Syntax, Actions, The RETE Algorithm. Production System Architecture...

Useware Dialog Modeling (usedm) Language

Towards a Global Component Architecture for Learning Objects: An Ontology Based Approach

Chapter 8: Enhanced ER Model

Introduction to CLIPS

Ontology Development Tools and Languages: A Review

Semantics in the Financial Industry: the Financial Industry Business Ontology

ORM Modeling Tips and Common Mistakes

A Community-Driven Approach to Development of an Ontology-Based Application Management Framework

QuantLib User Meeting 30 November Deriscope. by Ioannis Rigopoulos, owner of deriscope.com

Mandatory Roles. Dr. Mustafa Jarrar. Knowledge Engineering (SCOM7348) (Chapter 5) University of Birzeit

2 nd UML 2 Semantics Symposium: Formal Semantics for UML

Kendo UI. Builder by Progress : What's New

Doc. Version 1.0 Updated:

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Programming Logic and Design Sixth Edition

Extension and integration of i* models with ontologies

Transforming Enterprise Ontologies into SBVR formalizations

CALUMMA Management Tool User Manual

Reasoning on Business Processes and Ontologies in a Logic Programming Environment

Data Modeling - Conceive, Collaborate, Create. Introduction: The early conceptual beginnings of data modeling trace back to the origins

CEN/ISSS WS/eCAT. Terminology for ecatalogues and Product Description and Classification

Data Model and Software Architecture for Business Process Model Generator

DIRA : A FRAMEWORK OF DATA INTEGRATION USING DATA QUALITY

Teiid Designer User Guide 7.5.0

Managing the Emerging Semantic Risks

UNIT V *********************************************************************************************

XML ALONE IS NOT SUFFICIENT FOR EFFECTIVE WEBEDI

POS Designer Utility

Dictionary Driven Exchange Content Assembly Blueprints

Simulating Task Models Using Concrete User Interface Components

VISUALIZATIONS AND INFORMATION WIDGETS

CRW DOCUMENTATION. The schema is a CoreTrac xml file that defines a set of databases to work with.

What are the characteristics of Object Oriented programming language?

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

Keywords Data alignment, Data annotation, Web database, Search Result Record


Teamcenter 11.1 Systems Engineering and Requirements Management

Interactive 3D Representation as a Method of Investigating Information Graph Features

Subset, Equality, and Exclusion Rules In ORM

Opus: University of Bath Online Publication Store

Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static

Higres Visualization System for Clustered Graphs and Graph Algorithms

The MAXQDA Stats Data Editor

Pattern composition in graph transformation rules

UNIT 3 INTRODUCTORY MICROSOFT EXCEL LESSON 6 MAKING THE WORKSHEET USEFUL

You can link completely different files into one by adopting a file to one or more of your topics.

Workbooks (File) and Worksheet Handling

Domain Models for Laboratory Integration

Participatory Quality Management of Ontologies in Enterprise Modelling

Client Access Template Reporting Guide

Visual Layout of Graph-Like Models

Information mining and information retrieval : methods and applications

Ontology for Exploring Knowledge in C++ Language

Lesson 1: Exploring Excel Return to the FastCourse Excel 2007 Level 1 book page

Authoring and Maintaining of Educational Applications on the Web

UNIT 4. Research Methods in Business

ISO INTERNATIONAL STANDARD. Financial services Universal financial industry message scheme Part 8: ASN.1 generation

Ontology Creation and Development Model

Monitoring BPMN-Processes with Rules in a Distributed Environment

Object-Oriented Programming Concepts

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Whole Platform Foundation. The Long Way Toward Language Oriented Programming

CSE 132A. Database Systems Principles

2AIT503 - EXPERT SYSTEMS. Lecture 4: Representing Facts and Writing Rules. Dr Dimitris C. Dracopoulos

Administrative Training Mura CMS Version 5.6

UML-Based Conceptual Modeling of Pattern-Bases

Architectural Design

Python Scripting for Computational Science

Defining an Abstract Core Production Rule System

DATABASE TECHNOLOGY - 1DL124

Reporting User Guide. Account Summary Widget

A GRAPHICAL TABULAR MODEL FOR RULE-BASED LOGIC PROGRAMMING AND VERIFICATION **

Schema Equivalence and Optimization

Domain-Specific. Languages. Martin Fowler. AAddison-Wesley. Sydney Tokyo. With Rebecca Parsons

This document is a preview generated by EVS

ISO INTERNATIONAL STANDARD. Financial services Universal financial industry message scheme Part 3: Modelling

XSFORM: A SCHEMA-DRIVEN FORM-BASED XML INFORMATION PROCESSOR

WHY WE NEED AN XML STANDARD FOR REPRESENTING BUSINESS RULES. Introduction. Production rules. Christian de Sainte Marie ILOG

Meta Architecting: Towered a New Generation of Architecture Description Languages

ARCHER Metadata Schema Editor. User Guide METADATA EDITOR. Version: 1.1 Date: Status: Release

Transcription:

CLIPS representation of ontology classes in an ontology-driven information system builder part 1 Samuil Nikolov Abstract: The paper describes the structure of a CLIPS program representing an ontology class in an ontology-driven information system builder. The program has a specific format which is presented in the paper. A set of programs can be used to quickly and easily create an ontology-driven information system when loaded in a C++ core which interoperates with an instance of a CLIPS interpreter. An example bank loan class expressed as a CLIPS program is presented in the second part of the publication. Key words: Ontology-Driven Information Systems, Knowledge Representation, Expert systems. INTRODUCTION The goal of the publication is to describe a way for representing ontology classes used by the author while developing an ontology-driven information system (IS) builder. The classes contain the information system business logic and describe its user interface. The general principles of operation and the database structure are presented in other publications with participation of the author and are not subject of this paper. The IS builder allows creation of a full scale information system by developing a set of CLIPS programs that define all the classes of the target ontology. Wand and Weber [13] initiated the idea to define a formal model of an information system. Nicola Guarino[4] analyzed the ways an ontology could be used in the information system distinguishing between a temporal and structural dimension and defined the term ontology-driven information systems. Fonseca and Martin [2], Wand and Weber [12] and Hoefferer[5] relate Guarino s classification with previously stated ideas about using conceptual schemas or meta models for formally defining information system structure. In the latest entry in the Encyclopedia of Database Systems, Tom Gruber [3] gives a broader definition of ontology that validates Guarino s definition. Yildiz and Miksch[14] review the challenges that come with integrating ontologies into information systems. Some of the directions in the development of ontology-concerned information systems are conceptual modeling of the IS databases [1] and refining the communication of IS requirements through better structured ontology data [6], [10]. This paper describes a specific approach to representing ontology classes in an information system. According to Guarino s classification of ontology-driven information systems, the described IS uses the ontology in both user interface and application components [4]. No implementation details of such IS were found during the author s research. The IS presented in the paper is built by development-time dissemination of the ontology data and creating separate script files, each representing one of the ontology classes. The scripting language used is CLIPS rule based programming language. It operates in a CLIPS environment loaded by a C++ core developed by the author which principles of operation are presented in [7]. CLIPS was chosen as a widely used productive development and delivery expert system tool which provides a complete environment for the construction of rule and/or object based expert systems. CLIPS PROGRAM FOR REPRESENTING ONTOLOGY The ontology classes that define the ontology-driven information system are represented as separate files, each containing a stand-alone CLIPS program. Each file is loaded in the CLIPS interpreter either by special commands issued in the rules of another file, or loaded explicitly by the end user of the information system as described in [7]. The CLIPS definition of ontology classes contains: Facts describing the class attributes; Facts defining how the attribute values are visualized when the UI is - 128 -

generated; Rules for processing of attributes and manipulating the UI appearance. Bundling of data with the methods operating on them is a widespread design pattern which is one of the main principles of object oriented programming (OOP). Encapsulation enables the programmer to group data and the subroutines that operate on them in one place, thus hiding irrelevant details from the users of an abstraction [9]. The proposed description of ontology classes uses similar principles, but combines facts and rules operating on them. The difference from OOP classes is that ontology classes defined by CLIPS programs can interact with each other only through the instances stored in the database. The database structure is described in details in [8] and is not subject of this publication. Following are descriptions of the three CLIPS program parts. Class attributes description The basis of the ontology class description in the presented CLIPS program is a set of fact templates, defining the class attributes. The fact templates can be either simple or complex. The simple ones contain a single value either a string or a floating point number. Dates and integers are represented with floating point numbers subjected to certain restrictions according to template type. Following are example templates representing two attributes of a financial instrument class - Instrument identifier of type text and Instrument type of type selectable text: (deftemplate InstrumentId (slot type (type STRING) (default "Text")) (slot str_value (type STRING) (default " ")) (1) (slot value (type FLOAT) (default 0.000000))) (deftemplate InstrumentType (slot type (type STRING) (default "ComboText")) (slot str_value (type STRING) (default "")) (slot value (type INTEGER) (default 0)) (2) (slot list (type STRING)(default "list_ ITYPE"))) The fact template defining instrument type attribute has an additional slot named list. It has a default value that coincides with the name of a fact that determines the list of possible values: (list_itype "Fix Bond" "Floater Bond" "Stepped Bond" "Zero Bond"... ) Another feature of the fact template (2) is that its value slot is of type INTEGER. In this case, the index of the chosen text is stored in the database, instead of the text itself. This is done to enable easier translations to other languages of the combo box texts, which are mostly used for visualizing such selectable text attributes [8]. Complex attributes contain more than one value. Most commonly, these are tables of data which columns are represented by CLIPS multifields. An example of these attributes is the following table description, containing cash flow payments of a financial instrument. It has eight columns, containing payment number, type and date of payment, remaining amount, payment sum, etc. The meaning of the columns and the type of data inside them are specified in additional facts, linked to the main template through the default values of its col_names and col_types slots: (deftemplate CASHFLOW_GRID (slot type (type STRING) (default "Grid")) (slot col_num (type INTEGER) (default 8)) (slot col_names (type STRING) (default "cn_cf_grid")) (slot col_types (type STRING) (default "ct_cf_grid")) (multislot Data0 (default ))... (multislot Data7 (default ))) (3) (cn_cf_grid "No" " Type" "Date" "Rem.Am." "CF Payment" "PV" "Years" "Discount Factor") (ct_cf_grid "NUM" "STR" "TIME" "NUM" "NUM" "NUM" "NUM" "NUM" ) - 129 -

Besides the templates that define the ontology class attributes, the clips program also contains similar templates that define output data, which are most often results from calculations or user actions. They are marked as such and are not stored in the database. For example, such fields contain the present value, duration, dispersion and other analysis results of the currently input financial instrument in an Instrument ontology class. Facts describing the user interface generated for the ontology class The description of the UI contains a set of facts each containing a control identifier, control type, coordinates and size of the control as well as the name of the template fact containing the value of the visualized class attribute. They are arranged in a special way, forming a hierarchical structure of dialog boxes, containing several group boxes which in turn contain a set of user interface controls. These facts are declared in the CLIPS program with the special deffact construct and are available as soon as the file is loaded into the CLIPS environment. By manipulating connected facts inside the program's rules, the controls can be moved or hidden from view. Although the defined hierarchical structure does not allow nested group boxes, such can be achieved by specifying proper group box coordinates and sizes. The attribute InstrumentId from (1) can be visualized in a text box by defining the following fact in the CLIPS file: (dialogfield (type "edit") (x-coord 291) (y-coord 50) (4) (length 133) (height 12) (variableid "InstrumentId")) Besides the structural facts, describing dialog boxes and group boxes, the user interface definition can contain facts that do not concern the ontology class and just define static help text. For example, the following fact can be declared to show the text Instrument ID: that on mouse hover displays a bubble help specifying the purpose of the edit field following it. In this example it clarifies the edit field used for ID input from the above (4) definition. (dialogtext (type "StaticText") (name "Instrument ID:") (x-coord 215) (y-coord 50) (5) (length 69) (height 8) (explain"identifier of the object of the calculation.")) It is also possible to visualize the same class attribute in different user controls. The complex attributes can be visualized in grids, charts or tree controls, while the simple ones can be output in a wide specter of user controls like: edit fields single and multiline; combo and list boxes, also custom-drawn, allowing selection of image lists like national flags for currencies; embedded web-controls; buttons standard and check-boxes date and time pickers; scrolls and sliders; system-specific controls for editing theoretical distributions. Rules for attribute processing A simplified version of CLIPS rule syntax is: - 130 -

(defrule rule_name (Conditional Element-1) (Conditional Element-2) (6)... => (actions)) If the list of conditional elements in the rule's left hand side (LHS) is satisfied, the actions in the right hand side (RHS) are performed. The conditional elements contain wildcard elements that can be used as variables in the RHS. These can be single or multifield values of facts, fact slots or fact addresses as well as a combination of logical operations on them. Following is an example of a rule's LHS. It uses the values of several fact templates representing the simple attributes Instrument identifier, evaluation yield curve and produce amortization cash flows as well as the values stored in a complex fact template, representing a set of custom parameters. Also, the LHS of the rule contains the addresses of two facts the first one describing the amortization payments of a financial instrument and the second one a fact used as a flag, meaning that the proper evaluation yield curve is loaded from the database. It is added to the CLIPS knowledge base by a previously fired rule and ensures the proper firing order of the rules on the agenda. The address of the amortization payments table is used by the right hand side of the rule to modify the fact and fill in its multifields with calculated values. (defrule Calculate_Grids_Monte_Carlo (ProduceAmoCashflow (value?vproducecashflow )) (VALUATION_CURVE (str_value?curvenamesel )) (InstrumentId (str_value?vinstrumentid)) (AMO_PARAMETER_GRID (Data1 $?DataAP0) ) (AMO_PARAMETER_GRID (Data1 $?DataAP1) ) (AMO_PARAMETER_GRID (Data2 $?DataAP2) ) (7) (AMO_PARAMETER_GRID (Data3 $?DataAP3) )?AmoGrid<-(AMORTIZATION_GRID)?f2<-(CurveReady) => The right hand side of the rules consists of a sequence of instructions as in a standard procedural language. Using CLIPS functions, the programmer of the rule can assign new values to the slots describing the ontology class attributes or other output controls. Using the abilities of the CLIPS production system to interface with C++, a set of external functions is added to the CLIPS programming language, enabling the implementation of the builder of ontology-driven information systems first introduced in [7]. Some of the functions are used for: loading a new CLIPS file and thus defining instances of another ontology class determining the current working parameters of the information system like the logged user, the unique identifier of the currently defined instance, the current organizational entity which are reviewed in [7]; accessing the database of stored class instances; controlling certain UI elements like progress indicators and message boxes; exporting data to XML[11], MS Excel, MS Word, importing data from specific XML and text formats; performing financial calculations and setting up, running and receiving the results of a Monte Carlo Simulation. - 131 -

Fig. 1 Algorithm of the IS-builder while processing a CLIPS file program A flowchart of the algorithm used in the information system builder for processing a CLIPS program is shown on Fig. 1. When the file is loaded in the CLIPS environment, the deffact constructs, which are the default facts in the program, are added to the CLIPS knowledge base automatically. They contain data about the positions of the UI controls and the identifiers of all connected fact templates. The default facts define static texts if they have no connected identifier, like (5). If they have a fact slot VariableID like (4), they define the positions and types of UI controls for visualizing ontology class attributes. Reading of the default facts by the C++ core is the first phase of the IS-builder algorithm. The second phase of the algorithm consists of adding the values of the ontology class attributes to the CLIPS knowledge base by asserting facts describing them. If it is a first run of the system on a newly created instance of the class, default values are asserted. Such default values are specified in the fact template slot definition in the default property as shown in (1) and (2). To add facts with default values of their slots to the CLIPS knowledge base, one has to assert the template name like: (assert (InstrumentId)) Otherwise, if there are values stored in the database for the opened instance, they are used for specifying the fact slot values. And if this is not a first run, the values collected from the user interface control inputs are used: (assert (InstrumentId (value [stored or input instrument identifier] ))) CLIPS rules are activated after adding the facts describing ontology class attributes to the knowledge base. The rules process the facts in the knowledge base and assert new values to some of the facts. After the rules finish, the knowledge base is scanned by the C++ core and the new values of the facts are visualized in the corresponding user interface controls. The end user of the generated information system can modify some values and start a new calculation or store the defined ontology class instance to the database to be used by other CLIPS programs or for consecutive opening and viewing. REFERENCES [1] H. El-Ghalayini, Mohammed Odeh, Richard McClatchey and Tony Solomonides. «Reverse engineering ontology to conceptual data models,» in Proc. Databases and Applications. 2005, pp. 222-227. [2] F. Fonseca and J. Martin. «Learning the differences between ontologies and conceptual schemas through ontology-driven information systems,» Journal of the Association for Information Systems, vol. 8, 2007 [3] T. Gruber. «Ontology,» in the Encyclopedia of Database Systems, Ling Liu and M.Tamer Özsu,Ed.New York: Springer-Verlag, 2009, pp. 1963-1965 [4] N. Guarino. «Formal ontology and information systems,» in Proc. FOIS 98, 1998, pp. 3-15 [5] P. Hoefferer. «Achieving business process model interoperability using metamodels and ontologies,» In Proc. ECIS, 2007-132 -

[6] M. Jarrar, J. Demey, R. Meersman. «On using conceptual data modeling for ontology engineering,» Journal on Data Semantics, pp.185-207, Oct. 2003 [7] S. Nikolov and A. Antonov. «Framework for building ontology-based dynamic applications,» in Proc. CompSysTech, 2010, pp. 83-88 [8] S. Nikolov. Storing data of ontology-based dynamic applications, in Proc. Sixth International Scientific Conference Computer Science, 2011, pp. 134-139 [9] M. Scott. Programming language pragmatics, Morgan Kaufmann, 2006 [10] P. Spyns, R Meersman and M. Jarrar. «Data modelling versus ontology engineering,» ACM SIGMOD vol. 31, Dec. 2002, pp. 12-17 [11] S. Trifonova and S. Nikolov. XML presentation of financial instruments, in Proc. Unitech, 2010 [12] Y. Wand and R. Weber. «Research commentary: information systems and conceptual modeling-a research agenda» Info.Sys.Research, Dec.2002, pp.363-376 [13] Y. Wand and R. Weber. An ontological model of an information system, IEEE transactions on Software Engineering, vol. 16, 1990 [14] B. Yildiz and S. Miksch. «Ontology-driven information systems: challenges and requirements» in Intl. Conf. on Semantic Web and Digital Libraries, 2007 Contact information: eng. Samuil Nikolov, Department of Computer Sciences and Technologies, TU - Varna, tel.: 087-6689730, е-mail: samuil@eurorisksystems.com The paper has been reviewed. - 133 -