Formalizing object models using predicate logic

I am using ORM for fuzzy conceptual query languages, i.e., languages that can deal with fuzzy terms such as "young", "most", "similar to", etc.

I have read formalization of ORM diagrams using the KL language.

Since I am working with an OODBMS, I have to face with the problem of convertion between ORM/KL and ODL. Hence, I was looking for some papers discussing the interpretation of predicate logic into object models.

Re: Formalizing object models using predicate logic

Hi Antonio,I'm no expert in fuzzy logic but I have a hard time in conceptualising the idea of using ORM for fuzzy stuff.Note that on this site the acronym ORM means "Object-Role Modeling" not "Object Relational Mapping"

One of the strengths of ORM is that ORM is for specifying things in a precise way that is very hard to do in natural language.

I'm intrigued by your statement " I have read formalization of ORM diagrams using the KL language."Can you provide a reference for this? (By the "KL language" do you mean "KL-ONE" ?)

Re: Formalizing object models using predicate logic

Like Ken, I'm not up to speed on some of the aspects of your question - but thanks for posting it here. One feature of the nORMa tool that may interest you is the ability to work with LINQ. Only the version of the tool for MS Visual Studio 2008 supports LINQ to SQL name generation. You might also gleen something from the intermediate language renderings of the tool. Matt Curland would be the person to contact about PLiX. The fact that the tool itself must bridge the FOL, set theory, and OO divide in order to function, ought to mean a lot of work on that has already been addressed.

I'll give some thought to the Fuzzy Logic approach; but it seems reasonable to assume ORM can deal with it. For a fuzzy term like "young" I see that as a matter of the accepted definition in the particular UofD. "Person(.name) is young" as a unary Fact Type. It's really no different than "Car(.vin) is red." You can define "red" in the UofD as narrowly or as broadly as you wish, a particular wave length or assume that people (in the UofD) know red when they see it. As long as you are not after a "universal" Universe of Discourse, the problem of linking Object Types to predicate implications should be manageable. This is off the top of my head stuff; but if it's off track, please point out the problem.

You may want to do a search on the library articles and the forum posts here. In any event, good luck.

Re: Formalizing object models using predicate logic

I just finished a paper on 'interpretation' of ORM models (e.g. to/from KL or 'other' formal theories). If it's accepted (for this years conference), it'll be one place to start (beyond Brian's points, which I believe are spot-on and right to the point).

One heads up on 'interpretation' is this. 'Interpretation' of any formal theory/structured information is up to you (within logical limits). e.g. If you could look at the binary data of a 'Microsoft Word' document (i.e. computer based 'file' with a '.doc' extention) and consistently interpret verses of the Koran from that binary stream of data....then not only would that be remarkable, but it would be a valid 'interpretation' of a '.doc' file (binary stream of data). The fact that that is probably very unlikely to happen, is probably a good thing for Microsoft, the Koran and our belief system in general (i.e. it confirms what we believe to be true, in that '.doc' files are best interpreted as 'documents' by software such as 'MS Word' and can be printed out on paper and read). It is only incidental that some of those documents may be verses of the Koran.

Does that answer your question? Specifically, what Brian said is true...nORMa interprets the ORM meta schema as 'objects' and displays them as an ORM diagram (interestingly....those 'objects' have 'methods'...but they are predefined, are not in the ORM model, and are restricted to ORM diagramming in nORMa). In the 'relational view' of the ORM diagram (in nORMa), you start to see what looks like 'objects'.

Attributes of Objects------------------------------

To interpret an ORM meta-schema as 'Objects with Attributes' (like ODL)...you'd need to go through the 'relational transfomation' steps (as well documented in Terry's books and/or doctoral thesis), or as supplied in the open source of the nORMa tool. Sounds like you have read Terry's thesis...but you can find it at www.orm.net just the same. If you are lucky...all the source code is supplied for you within nORMa.

Methods on Objects-----------------------------

As you most likely know, Object Role Modeling (ORM) does not support 'methods' or 'functions' (as at ORMv2.0) on Entity Types/Nested Fact Types.

Or, there are ways to interpret Fact Type Readings as 'function headers'..by way of isomorphic interpretation of ORM models/Fact Type Readings....but that may be beyond your immediate needs.

If you only want the attributes of your objects...then certainly, the relational transformation steps documented by Terry Halpin (and works by Nijssen and Leung) will be good enough.

I hope this is helpful information.

Best regdsVictor

P.S. I have read, on other sites/forums, that there is contention as to the fact that the ORM methodology has little to do with modelling 'Objects' (in the OO sense of the word, with the inclusion of 'methods'). On the whole, I think that is a fair criticism of the 'name', but not the methodology. At any rate, if you have chosen ORM, then I don't think that is going to worry you.

Re: Formalizing object models using predicate logic

Hence, I was not talking about "Object-Relational mapping". In fact, I used (I must renew the licence) the Object Store OODBMS. Hence, I was talking about "ORM-ODL (Object Definition Language) mapping".

Also, I have read chapters 3-5 of Terry Halpin's PhD Thesis, in which he formalized ORM diagrams using the formal language KL (explained in chapter 3). It is from 1989, so if you know more recent papers on the subject, I will appreciate very much.

Therefore, I was thinking in formalizing object models using predicate logic in order to map from ORM into ODL and process KL queries on the derived object model.

Re: Formalizing object models using predicate logic

We've done a lot of work on formalizing ORM since my doctoral thesis, and the NORMA tool current maps to object models (expresed in .NET languages such as C# or VB .NET) but I don't have any papers in the public domain in this regard that I can point you to. There are general discussions in the "Big Brown Book" on how to map from ORM to UML class models (see section 9.8), and you can find some brief discussion of an earlier approach to formalizing ORM-based conceptual queries in some published papers (e.g. see the Conceptual Queries section on www.orm.net).

When I formailzed ORM in my PhD, I used unsorted predicate calculus. Nowadays I use sorted predicate logic for the underlying basis, which tends to make things more readable as well as being closer to our surface syntax. As a trivial example, the constraint that each person was born on at most one date formalizes in sorted logic as

"x:Person $0..1y:Date x was born on y

instead of the unsorted

"x[Person x →$0..1y(Date y & x was born on y)]

In our surface syntax of course, we can render this simply as

Each Person was born on at most one Date

I expect this doesn't answer your original question, but hopefully once we finish implementing some high priority features in NORMA we will have time to publish more papers that will address your needs.

Re: Formalizing object models using predicate logic

I noticed that the existential and universal quantifiers did
not show correctly, when the post was viewed in Firefox. Switching to the
Internet Explorer rendering engine resolved that issue. I haven't had a chance
to see if the issue is with my FF settings, or is due to the FF rendering engine
itself.

Re: Formalizing object models using predicate logic

In addition
to Victor’s and Terry’s suggestions, one could look at description logics (DL) for
the formalization [1], which has an advantage that there are also closely
related fuzzy DLs and automated reasoners for it [2].

Choosing this route is not with trade-offs, however, primarily in that "full" ORM or ORM2 is not feasible. It then depends on what your end goal is with what tools you want to use and/or adapt etc., so as to decide which formalization will most useful.