Title of Invention

APPARATUS AND METHOD FOR SPECIFYING AND IMPLEMENTING A DECLARATIVE WAY TO WRITE RULES ON OBJECTS, ATTRIBUTES AND ASSOCIATIONS

Abstract Apparatus for validating a model for conformity with a set of rules of a meta model consisting of a conversion means for converting the meta model into a case data interchange format [CDI format], inputting means for inputting the meta model in CDI format into the RAM of a CPU; a specification converter means adapted to be stored in the memory of a CPU for converting the meta model in the CDI format into a set of specifications; an object oriented format translator means comprising receiving means to receive the said specifications, parsing means to parse the received specifications, analyzing means to analyze the specifications, feedback means to receive the analyzed specification and flag errors in the specifications and display means to display the flagged errors on a display means for meta model rectification and translator means to translate error free specifications into an object oriented format, storage means for storing the meta model specifications in object oriented format; inputting means for inputting the set of rules into a central processing unit; a rule engine for receiving the set of rules having a converter means to convert the set of rules into object oriented format; storage means for storing the set of rules in the object oriented format; processing means for receiving the said set of rules and set of specifications in object oriented format; merging means for merging the set of rules and the set of specifications in object oriented format in a binary format; storage means for storing the merged set of specifications and rules in binary format which form a model validating engine; inputting means for validating an application model including its attributes, object and associations in case data interchange format into a processing means in which the said validating engine is resident in the RAM; analyzing means for analyzing the application model for conformity in the validating engine to produce non conformance issues, if any and display the said issues in a display means for rectification of the application model in a feed back loop for generating a conformity report to obtain validated model.
Full Text FORM-2
THE PATENTS ACT, 1970
COMPLETE SPECIFICATION
SECTION 10
TITLE : APPARATUS AND METHOD FOR SPECIFYING AND IMPLEMENTING A DECLARATIVE WAY TO WRITE RULES ON OBJECTS, ATTRIBUTES AND ASSOCIATIONS
APPLICANTS : TATA CONSULTANCY SERVICES,
OF BOMBAY HOUSE, SIR HOMI MODY STREET, MUMBAI400 023, MAHARASHTRA, INDIA, AN INDIAN COMPANY.
The following Specification particularly describes the nature of this invention and the manner
in which it is to be performed :-

3. Another application area is the ability to define rules on objects, their attributes and associations between objects.
4. Objects can be created dynamically based on some conditions. Operations can then be performed on them.
5. Derivations can be made on the model by defining rules on the objects. This means that based on a set of conditions, logical inferences can be derived on the objects.
According to this invention there is provided apparatus for validating a model for conformity with a set of rules of a meta model consisting of
a conversion means for converting the meta model into a case data interchange format [CDI format], inputting means for inputting the meta model in CDI format into the RAM of a CPU; a specification converter means adapted to be stored in the memory of a CPU for converting the meta model in the CDI format into a set of specifications; an object oriented format translator means comprising receiving means to receive the said specifications, parsing means to parse the received specifications, analyzing means to analyze the specifications, feedback means to receive the analyzed specification and flag errors in the specifications and display means to display the flagged errors on a display means for meta model rectification and translator means to translate error free specifications into an object oriented format, storage means for storing the meta model specifications in object oriented format; inputting means for inputting the set of rules into a central processing unit; a rule engine for receiving the set of rules having a


This invention relates to apparatus for validating a model for conformity with a set of rules of a meta model.
In particular, this invention relates to a method and apparatus for specifying and implementing a declarative way to write rules on objects, attributes and associations with respect to models.
The invention also provides apparatus and method to create objects and associations, during the runtime of an application. Still particularly, this invention provides a method and apparatus for specifying validation rules on object entities.
In the prior art, real-world objects are best modeled as self-contained entities that contain both data and functionality. In the object-oriented methodology, this is expressed as objects with attributes and operations. For modeling the application, there are various standards like Unified Modeling Language (UML), Extended Markup Language (XML). However, no mechanism exists to express rules on an object, attributes and associations in a declarative way.
On of the principal objects of this invention is to present a declarative way to enable an application developer to specify rules on objects, attributes and associations.
There are various tools for creating an application model. These tools are used for modeling application meta models and user models. These tools allow constraints to be specified on object entities. Constraints are logical

expressions and evaluate to either true or false, in the process acting like guards. They do not specify actions to be carried out in case the expressions are satisfied. Constraints also do not derive new states from existing states.
Modeling tools and methodologies support the software development process. Most modeling tools and methodologies are based on fixed, explicitly stated models such as the UML model, E-R models. Other tools exist to attach rules with methods present in the model. The aim of this invention is to have a mechanism by which tools could also provide constructs to specify rules on the entities such as objects, attributes and associations.
The apparatus and method of this invention will allow rules on the object, attributes and associations and hence will provide checking conditions and also carrying out some actions. New states can be derived from existing states and this new state can be used for further processing.
Rules are can be used to specify semantic checks based on object properties and associations. Application developer will be able to write rules to create objects, instantiate associations based upon some conditions, define rules on classes and their attributes. Application Developers will find it useful for modeling integrity constraints on the application model, derive new attribute values and specify rules to instantiate an association based on the evaluation of a rule. Thus one can model strategies in the business components. In this contribution, rules are added as a declarative modeling technique for behavior.

In accordance with one embodiment of the invention there is provided an apparatus and method to allow writing declarative rules on an object, its attributes and associations.
In accordance with a preferred embodiment of the invention a meta model is created by the application developer describing the entire system. The information system model or the user model, is an instance of a meta model.
Object Meta Model
The Object Meta Model is an object-oriented representation of the Domain for which the software application is envisaged. Typically it consists of entities of the domain categorized as 'Objects' with 'attributes'. These entities are identified by the Domain Analyst and created in an object-modeling tool. Objects may be related to each other through 'associations'. The Meta-model is exported from the object-modeling tool to the software application in order that the application can use the entities of the domain model to create the actual model of the domain at run-time.
User or application Model
The User Model consists of the 'Object' entities and their associations that are specified in the Meta model of the domain. These Object entities are treated as 'Classes of objects' that are instantiated into real-world objects at run-time. Thus the User Model is an instance of the Meta Model at run-time.

Rulebase
Rulebase is the collection of all rules that are possible on the object entities and their associations in the Meta model. These consist of conditional statements of the form "if then ". The conditions consist of the object entities combined with other entities through mathematical relations. The actions are specific computational instructions that can be performed on the object entities when the conditions are met.
Declarative object-model-enabled Rule Engine is a translator for translating a set of rules into object oriented format
The declarative object-model-enabled rule engine is an inference engine that can read, parse, interpret, translate and execute rules in the Rulebase. The engine has the ability to perform operations on a User Model and can treat objects as Facts and as Parameters for Logical Predicates. The Rule Engine has the declarative power of logic programs, such as Unification and Binding of logical variables. Assertion and Retraction of facts, Resolution, Backtracking, Freeing of bound variables, Existential and Universal quantifiers etc.
In accordance with this invention a meta model is created by the application developer describing the entire system. The information system model or the user model, is an instance of a meta model. The information in the user model is the runtime information.
Thus, for an application with two classes. Customer and Account and an association, HasAccount between them, a meta model can be created in CDI format using any modeling tool.


Once the model is created, rules will be written. A rulebase is a set of specific rules written directly on the model. These rules can work on the existing objects in the model. Also, new objects (i.e. runtime instances) can be added to the model based upon some conditions. An association can be instantiated between these objects via rules. Validation rules can also be written.
The invention demonstrates a mechanism by which tools could provide constructs to specify rules on the entities such as the objects, attributes and associations. The invention envisages in a preferred embodiment the use of MasterCraft Component Modeller modeling tool to create the model and Infrex Rule Engine to write the rules on the objects, attributes and associations although it is envisaged that other modelling tools and rule engiens can be used to essentially perform the same task. The rule engine will work on the user model.
Description of the tools
An example of a tool is the The MasterCraft Component Modeller is an object-modeling tool that allows creation of an application domain's Meta-model and the user model. It supports standard modeling techniques like UML and ER Modeling. Another example of such a tool is Rationale Rose.
MasterCraft Component has a model editor to navigate through the model and view the relationships between the objects. It also provides a facility to export/import data in an industry-standard CDIF format.

Another tool is the Infrex Rule Engine which is a tool for incorporating business logic in an application in the form of rules. The Rule Base Engine is a mechanism, which allows the user to separate the business logic from the main application. This business logic is expressed in terms of Rulebase. The Rulebase is made of two files, the interface file (ESfl file) and the rulebase file (RB file). While the INI file contains declaration of various components used in rules, the RB file has the definitions of the rules.
Thus, the INI file will contain the list of all the application classes, their attributes, application variables, application functions and declaration of rules and groups that need to be called from the application. The developer of the application has to generate or make an appropriate INI file for integration of the rules with the application.
The RB file is source of all the rules, which need to be defined and modified by the application user.
The end-user of Infrex should understand the INI file to the extent that he knows what rules/groups he has to write and what class attributes and functions he will use in the rules. The rules can be written using a Rule Editor.
The Infrex Rule Translator translates the Rulebase (set of INI & RB file) into equivalent C/C++/JAVA code. The language for conversion will depend on the language in which the application is written. This generated code is then linked with the application.

The translator which translates the set of rules into object oriented format such Infrex, Blaze, I LOG, and the like provides user with a Rule Base Language (RBL) mechanism to write flexible rules. RBL allows Prolog-like features. This includes
• Declaring logical variables
• Declaring predicates
• Defining predicate rules
• Assertion of facts
• Retraction of facts
• Binding of facts
• Backtracking rules for single-solution
• Backtracking rules for multiple-solution
Using the Prolog-like features of the translator, we can treat classes and associations as predicates and class instances as facts. These predicates can have class objects as parameters. This feature of Infrex is used to demonstrate the concept of rules on objects, attributes and associations.
Writing the rules
INI file writing rules, information about the application classes, their attributes and associations should come in the INI file. The INI file can be automatically generated from the model, as the information is available in the model.
Thus, for the example shown above, declaration of the classes. Customer and Account and their attributes will be in the INI file.

Also, declaration of the rules that that are to be written on the model will appear in the ESfl file.
RBfile
Once the meta model is created, Rules will be written in the rulebase file. A Rulebase is a set of specific rules written directly on the meta Model. Also, the classes and associations present in the model are treated as predicates in the Rulebase. Thus, these declarations will appear in the rulebase file.
After the predicate definitions, the rules can be written which work on the existing objects in the model, like the validation rules or the traversal rules. Also, new objects (i.e. runtime instances) can be added to the model based upon some conditions. An association can be instantiated between these objects via rules.
Executing Rules
Once the rules are written, the Translator parses the Rulebase into object
oriented format. The meta model is exported in the form of the CDIF (CASE
Data Interchange Format) file. This exported file is read and an Internal
Representation of the model entities is created.
Facilities are provided for traversing the meta model at runtime. Using
Prolog-kind of features of the rulebase, assertions of new objects and
instances of associations can be created, list of objects can be formed,
binding of variable class instances can be done and new facts can be derived
from existing facts.

Once the rules are written on the entities in the model, the following steps will create the validating engine
With the Meta model and the rulebase file as input, Translator will parse the rules according to the model and generate code. The model should be provided in the CDIF format. Most modeling tools have a facility to export the model in CDIF, which is a standard format.
A converter tool is used to create object oriented format from for the classes created in the meta model. The Translator generated code should then be linked with the standard libraries like the OMGEN library and TCS class library to create the validating engine.
The model to be validated will be given as input to the validating engine. The rules will get executed on the model and output is generated.
Advantages of the apparatus and the method proposed in accordance with this invention.
1. One application area is model validation. A model can be made complete and 'well-formed' with addition of constraints and rules. These rules and constraints would be checked to determine if there is any violation.
2. Run-time instantiations of associations based on conditions specified in the rules is possible. This is a major advantage over existing methods.

converter means to convert the set of rules into object oriented format; storage means for storing the set of rules in the object oriented format; processing means for receiving the said set of rules and set of specifications in object oriented format; merging means for merging the set of rules and the set of specifications in object oriented format in a binary format; storage means for storing the merged set of specifications and rules in binary format which form a model validating engine; inputting means for validating an application model including its attributes, object and associations in case data interchange forniat into a processing means in which the said validating engine is resident in the RAM; analyzing means for analyzing the application model for conformity in the validating engine to produce non conformance issues, if any and display the said issues in a display means for rectification of the application model in a feed back loop for generating a conformity report to obtain validated model.
Typically, the conversion means for converting a meta model into a case data interchange format [CDI format] consists of a parser adapted to read the meta model, an analyzer which analyzes the parsed meta model for eliminating errors and a CDI format converter which converts the meta model into CDI format.
Typically, the specification converter means consists of a parser adapted to read the meta model in CDI format, an analyzer which analyzes the parsed meta model for eliminating errors and a specification converter which converts the meta model in CDI format into a set of specifications.

Typically, the object oriented format translator consists of a parser adapted to read the set of specifications, an analyzer which analyzes the parsed specifications for eliminating errors, a feed back mechanism for flagging errors and an object oriented format converter which converts the error free set of specifications into object oriented format.
Typically, the storage means for storing the set of specifications in object oriented format is located remote to the memory of the CPU.
Typically, the inputting means for inputting the set of rules into the CPU consists of a reader for reading the set of rules, a storage means for storing the read rules into the Ram of the CPU.
Typically, the rule engine consists of a parser to parse the set of rules in the memory of the CPU, an analyzer which is adapted to analyze the set of rules and flagging errors and a converter adapted to convert the set of rules into object oriented format.
Typically, the storage means for storing the set off error free rules in object oriented format is remote to the memory of the CPU.
Typically, the processing means consists of receiving means to receive the rules and specifications in object oriented format simultaneously, merging means adapted to merge the set of rules and the set of specifications in object oriented format, and a binary format converting means adapted to receive the merged rules and specifications and convert them into a binary format model validating engine.

Typically, the storage means for storing the model validating engine is remote to the CPU.
Typically, the inputting means for inputting a model to be validated in CDI format into the validating engine consists of a reading means for reading the model in CDI format.
Typically, the processing means in the validating engine for validating a model consists of a reading means adapted to read the model, an analyzing means for analyzing the model for conformity with set of rules and specifications forming the validating engine to generate a non conformity report.
Typically, the storage means for receiving and storing a non conformity report is remote to the CPU.
The invention will now be described with reference to the accompanying drawings,.
Figure 1 of the accompanying drawings, shows a block diagram of the apparatus of this invention and the way individual components of the apparatus interact with each other to validated a model for conformity with a set of rules.
In the said figure 1 Block S is a converter means adapted to convert converts a model in CDF (Case Data interchange Format) to a set of specifications.


The first part of the converter parses (reads) the model and analyzes which includes flagging of errors and displaying such errors on the screen. Second step involves translation into set of set of error free specifications. When the errors are flagged which indicates errors in the model. Those have to be removed from the model by specific set of iterations.
Block I: this block reads (parses) set of specifications, analyzes it, translates the set of specifications into set of intermediate representation and store them into designated regions of memory (RAM). The second step involves conversion into final representation which is an Object oriented format.
Block Ml: It represents a Meta Model. Tools like MasterCraft Component
Modeller from TCS, or any other tools like Rational Rose from Rational
Inc. can be used. This Ml is represented using Case Data Interchange
format.
Block M2 represents user model which can again modelled with the help of
above mentioned modelling tools.
T this accepts input of a set of rules and converts the rules into object oriented format
Block R: Represents Set of Declarative Rules written on Objects, Attributes and Association. These Rules are applied on the Model.
STl is storage for storing the rules in object oriented format
ST2 is storage which stores a validating engine in binary format


ST3 is storage which stores the application model in GDI format
PU is the processing unit which accepts the set of specifications and converts the specification into object oriented format. It consists of a parsing means, analyzing means and a translation means.
Block RE represents a Rule Engine block. Rule Engines like Infrex from TCS, Fair Isaac Blaze Advisor provide facility of writing declarative Rules. Infrex Rule Engine provides facility of writing declarative Rules on Objects, attributes and Association.
Object Constraint Lansua2e (OCL) is a formal language used to express constraints. Instead of Rule Engine, OCL can be used to but Infrex has many advantages over OCL as:
• INFREX is a Rule Base Engine using which rules on object models can directly written on Association, Constraints, Consistency, Attributes. Application Developer can write these rules.
• INFREX take object model input in CDIF format, which is easily developed.
• OCL is restricted to UML diagram only. It may not be possible to write rule on Meta Model other than UML. But INFREX allows writing rules on any Meta Models and on Application models.
• Thus, in INFREX it is possible to write rules at any level, i.e. at Meta, User or Application level.
• One application area of INFREX rulebase is model validation. A model can be made complete and 'well-formed' with addition of constraints and


rules. These rules and constraints would be checked to determine if there is any violation.
• Run-time instantiations of associations based on conditions specified in the rules is possible. This is a major advantage over OCL.
• Objects can be created dynamically based on some conditions. Operations can then be performed on them. Such things are not possible in OCL.
Derivations can be made on the model by defining rules on the objects. This means that based on a set of conditions, logical inferences can be derived on the object model.
17

We Claim:
1] Apparatus for validating a model for conformity with a set of rules of a meta model consisting of
a conversion means for converting the meta model into a case data interchange format [CDI format], inputting means for inputting the meta model in CDI format into the RAM of a CPU; a specification converter means adapted to be stored in the memory of a CPU for converting the meta model in the CDI format into a set of specifications; an object oriented format translator means comprising receiving means to receive the said specifications, parsing means to parse the received specifications, analyzing means to analyze the specifications, feedback means to receive the analyzed specification and flag errors in the specifications and display means to display the flagged errors on a display means for meta model rectification and translator means to translate error free specifications into an object oriented format, storage means for storing the meta model specifications in object oriented format; inputting means for inputting the set of rules into a central processing unit; a rule engine for receiving the set of rules having a converter means to convert the set of rules into object oriented format; storage means for storing the set of rules in the object oriented format; processing means for receiving the said set of rules and set of specifications in object oriented format; merging means for merging the set of rules and the set of specifications in object oriented format in a binary format; storage means for storing the merged set of specifications and rules in binary format which form a model validating engine; inputting means for validating an application model including its attributes, object and associations in case data interchange format into a processing means in which the said validating

engine is resident in the RAM; analyzing means for analyzing the application model for conformity in the validating engine to produce non conformance issues, if any and display the said issues in a display means for rectification of the application model in a feed back loop for generating a conformity report to obtain validated model.
2] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the conversion means for converting a meta model into a case data interchange format [CDI format] consists of a parser adapted to read the meta model, an analyzer which analyzes the parsed meta model for eliminating errors and a CDI format converter which converts the meta model into CDI format.
3] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the specification converter means consists of a parser adapted to read the meta model in CDI format, an analyzer which analyzes the parsed meta model for eliminating errors and a specification converter which converts the meta model in CDI format into a set of specifications.
4] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the object oriented format translator consists of a parser adapted to read the set of specifications, an analyzer which analyzes the parsed specifications for eliminating errors, a feed back mechanism for flagging errors and an object oriented format converter which converts the error free set of specifications into object oriented format.

5] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the storage means for storing the set of specifications in object oriented format is located remote to the memory of the CPU.
6] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the inputting means for inputting the set of rules into the CPU consists of a reader for reading the set of rules, a storage means for stor"-^g the read rules into the Ram of the CPU.
7] Apparatus for validating a model for confomiity with a set of rules as claimed in claim 1, in which the rule engine consists of a parser to parse the set of rules in the memory of the CPU, an analyzer which is adapted to analyze the set of rules and flagging errors and a converter adapted to convert the set of rules into object oriented format.
8] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the storage means for storing the set off error free rules in object oriented format is remote to the memory of the CPU.
9] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the processing means consists of receiving means to receive the rules and specifications in object oriented format simultaneously, merging means adapted to merge the set of rules and the set of specifications in object oriented format, and a binary format converting means adapted to receive the merged rules and specifications and convert them into a binary format model validating engine.


10] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the storage means for storing the model validating engine is remote to the CPU.
11] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the inputting means for inputting a model to be validated in CDI format into the validating engine consists of a reading means for reading the model in CDI format.
12] Apparatus for validating a model for conformity with a set of rules as claimed in claim 1, in which the processing means in the validating engine for validating a model consists of a reading means adapted to read the model, an analyzing means for analyzing the model for conformity with set of rules and specifications forming the validating engine to generate a non conformity report.
13] Apparatus for validating a model for conformity with a set of rules as claimed in claim 12, in which the storage means for receiving and storing a non conformity report is remote to the CPU.

14] Apparatus for validating a model for conformity with a set of rules as described herein with reference to the accompanying drawing. Dated this 18* day of September, 2003

Documents:

760-mum-2002-cancelled pages(18-9-2003).pdf

760-mum-2002-claims(granted)-(18-9-2003).doc

760-mum-2002-claims(granted)-(18-9-2003).pdf

760-mum-2002-correspondence(1-9-2004).pdf

760-mum-2002-correspondence(ipo)-(6-7-2004).pdf

760-mum-2002-drawing(16-2-2004).pdf

760-mum-2002-form 1(21-8-2002).pdf

760-mum-2002-form 2(granted)-(18-9-2003).doc

760-mum-2002-form 2(granted)-(18-9-2003).pdf

760-mum-2002-form 3(21-8-2002).pdf

760-mum-2002-form 4(18-9-2003).pdf

760-mum-2002-form 5(16-2-2004).pdf

760-mum-2002-form 6(1-9-2004).pdf

760-mum-2002-power of attorney(21-8-2002).pdf

abstract1.jpg


Patent Number 206064
Indian Patent Application Number 760/MUM/2002
PG Journal Number 28/2007
Publication Date 13-Jul-2007
Grant Date 17-Apr-2007
Date of Filing 21-Aug-2002
Name of Patentee TATA CONSULTANCY SERVICES LIMITED
Applicant Address BOMBAY HOUSE, SIR HOMI MODY STREET, MUMBAI
Inventors:
# Inventor's Name Inventor's Address
1 CHANDRASEKHAR ANANTRAM TATA CONSULTANEY SERVICES, HADAPSAR INDUSTRIAL ESTATE, PUNE 411 013,
2 BHATT JYOTHI KIRAN TATA CONSULTANCY SERVICES, HADAPSAR INDUSTRIAL ESTATE, PUNE 411 013
3 DESHPANDE CHINTAMANI TATA CONSULTANCY SERVICES, HADAPSAR INDUSTRIAL ESTATE, PUNE 411 013
PCT International Classification Number G06F 1/00
PCT International Application Number N/A
PCT International Filing date
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 NA