in

The ORM Foundation

Get the facts!

ORM for a WFF?

Last post 06-10-2008 9:48 by JParrish. 12 replies.
Page 1 of 1 (13 items)
Sort Posts: Previous Next
  • 06-06-2008 11:29

    • JParrish
    • Not Ranked
      Male
    • Joined on 05-30-2008
    • Florida, USA
    • Posts 25

    ORM for a WFF?

    I wasn't sure which forum would be best to post this in. 

    I am teaching myself about formal logic.. with the catalyst being that I am creating a "Rule Engine" of sorts.. I want to approach defining a "rule" as a well formed formula.. hoping to create a relational schema to store those definitions. So I was wondering does anyone know of any ORM already done to represent the notions of truth-functions? I'm still getting some of the concepts clear in my mind so I didn't want to jump right in and create a model.. although it probably would be a good exercise.Thanks!

    Filed under: ,
  • 06-06-2008 16:44 In reply to

    Re: ORM for a WFF?

     

    Hi JP,

    Your question is a good one; and I think you put it in the right forum.

    I plan to post an article to the OF library shortly, that addresses some of the issues and concerns you mentioned.  In the mean time, a few suggestions (if others disagree with these, you'll benefit from their take on it too):

    Yes, build ORM models!  Not only are the results of a good ORM model useful; the process of creating even bad ORM models can help organize your thoughts, and give you an idea about whether you are on the right track or not.  Create models or fragments, and see if they express your intensions.  You're welcome to post them here, for comment or just to pass along something you learned.

    Don't assume semantic inferences that are not regulated by ORM.  ORM is about structure.  Two ORM Fact Types that are structurally the same (having the same constraints and the same Object Type elements, in the same pattern), are equivalent - even if the phrasing of the predicates carries assumed semantic implications.  ORM requires that the phrases not be exactly the same in two otherwise identical Fact Types, but that's all it requires.  You can have the Fact Types:

                                      Employee(.id) passes Test(.id)

                                      Employee(.id) passed Test(.id)

                     in the same model.  ORM doesn't speculate on the shared semantic inference.

    ORM should be useful for setting up the data structure to regulate the rules you wish to include as instances of Fact Types created using ORM.  You can model rules concerning the roles the Object Types that will serve as containers for your rule instances can, must or must not play.  Just don't confuse the rules you model, with the rules that will populate the Objects Types, as instances in the resulting data structure.  You can rely on the logical basis of ORM for the former, but not the latter.

    I hope you'll share the trials and successes of your plans, in these forums.  My take is that this is the reason for the ORM Foundation in the first place.  Good luck.  Hope it helps,

    BRN..

  • 06-06-2008 17:26 In reply to

    Re: ORM for a WFF?

    I found many books on Formal Logic. Unfortunately, most of them are written to support academic courses and are very hard going for the self-teaching approach.

    One book that I found helpful is 

    "A First course in Logic: An introduction to Model Theory, Proof Theory, Computability and Complexity" by Shawn Hedman, Oxford University Press 2004,

    The book begins with the sentence "A logic is a language with rules for deducing the truth of one sentence from that of another"
    Here are some other quotes:

    "Each logic has a notion of an atomic formula".
    "In propositional logic, atomic formulas are propositions"  
    "Logic is defined as the study of the principles of reasoning."

    I found this book to be well written and a very good introduction to logic in general and first order logic in particular.

    Anyway, it seems to me that a "rule engine" cannot be separated from the structure of the language that is used to express the rules.

    FWIW

    Ken

    Filed under:
  • 06-07-2008 3:50 In reply to

    • JParrish
    • Not Ranked
      Male
    • Joined on 05-30-2008
    • Florida, USA
    • Posts 25

    Re: ORM for a WFF?

    Thanks Brian and Ken.

    Brian, I will definately try to put some ORM fragments together as I begin to understand where to start.. at this point I am trying to understand based on my goals, which system of logic I should be concentrating on. I first found propositional logic, but in reading today I have drifted towards and believe that I will focus on first order logic. Which section in the library might you post your paper? I'll keep an eye out for it!

    Ken,thanks very much for the reference. I've noticed that the books on logic seem to be priced quite high. I have been spoiled with the depth and quality of books like "Information Modeling and Relational Databases" .. but I should invest as wikipedia is only giving me terse introductions. I hope to discuss with you some of the ideas as I become more fluent with them.. specifically the work I am doing in creating a rule engine.

    Filed under: ,
  • 06-07-2008 10:14 In reply to

    Re: ORM for a WFF?

    Hi JP,

    There's a text book I found that's accessible and pretty comprehensive - though you may find it light on FOL.  My preference is for readablity; this is better in that way than others I've seen.  I don't take in symbolic expression as well as many here - don't think in those terms.  The used copy I have I bought via Amazon, and spent less than $10.  I bought a 11th edition (think they are up around 14th, now - but I don't trust that new fangled logic anyway).

    "Intoduction to Logic"  Irving M Copi, Carl Cohen - Prentice Hall

    With your ORM tests, try some mundane stuff, and work it through to a physical implementation.  Pick a simple UofD you know well (that may be the most important tip I can offer).  Try to pick one that would benefit from a good information system (there likely are already; but don't copy or try to reverse engineer one).  I'll use something like baseball.  I'd opt for the perspective of a GM or league comissioner.  Having a perspective in mind helps keeps it from getting out of hand - you want to model data that will be useful to some perspective.  If you know the UofD well, it's easier to see if things don't look right.

    If you're using nORMa, using sample populations can be a problem in the current CTPs.  They can really help you get the constraints right; but if you get frustrated with the using them, skip then for now.

    Use the multi-page diagram feature.  I find it essencial to organizing a model.  For baseball, I'd have a players page, games page, trades page, schedules page, etc.... Keep asking "would a person or process (the perspecitve you choose), need to track this stuff?"  When the answer is yes, model it.  When the answer is no, skip it.

    Hit the same UofD a number of times.  There's no need to go all out in the first tries.  If you create a DB with the result, you can gauge the usefulness of the effort - the idea is not just to create an impressive diagram. 

    When the tool tells you something's wrong or missing, think about why that is - I get a better idea of the logical basis of ORM that way, than by slogging through text books or papers. 

    BTW, I still need to read through your thread on the schema-cop.  Looks like good stuff.

    BRN..

    Filed under: ,
  • 06-08-2008 3:56 In reply to

    • JParrish
    • Not Ranked
      Male
    • Joined on 05-30-2008
    • Florida, USA
    • Posts 25

    Re: ORM for a WFF?

     Brian,

     The book title "Introduction To Logic" got me digging through a series of books on mathematics that I had aquired five or six years ago.. and I found the single book I had bought on logic.. called "Introduction To Logic - And To The Methodology of Deductive Sciences". If only buying books that I wanted to learn somehow contributed to learning them.. I'd be a lot farther along! In just looking at it.. I think it might be helpful to read but the text itself is quite old and doesn't seem to have any treatment at all to FOL. I'll check out the book you mention. I most likely will also pick up the book Ken mentioned as it looks like it may talk more directly to my interests at the moment.

    I've been using ORM since I discovered it upon the release of Visio for Enterprise Architecture. I've modeled several UoD's that have seen physical models placed into production so although I am new to formal logic in general, I am not as new to ORM. I agree wholeheartedly with the points you make.. and I often use ORM as a way of validating and refining my own thoughts on a subject I am learning.. so it should prove helpful in my latest endeavors. Thanks!

     

    John


    Filed under: ,
  • 06-08-2008 5:23 In reply to

    Re: ORM for a WFF?

    John,

    You will find many well written discussions on logic and its history in Encyclopaedia Britannica DVD.
    Whilst no source has the whole story, the Encyclopaedia Britannica has an excellent article on formal logic that is peppered with hyperlinks to related subjects. For example on reading the "formal logic" article you can quickly get to grips with the chronology and contributions of the thinkers of ancient Greece. For example it took me just a few minutes to compile the following table:

      

    Scholar

    born (BC)

    died (BC)

    Pythagoras

    580

    500

    Zeno of Ela

    495

    430

    Socrates

    470

    399

    Plato

    428

    348

    Aristotle

    384

    322

    This allows you to understand the works on one scholar in terms of what has gone before - the "extant scholarly paradigm" if you will. I find it interesting to see how the ideas of one scholar were used (or refuted) by later scholars. The detailed historical aspect is usually lacking in modern texts on logic which spend more time on the mechanics and symbolisms of logical languages.

    Studying the works of these ancient thinkers makes me ask questions such as : "OK! What is the scholarly basis of (for example) ER?"   
    What I found (so far) is that the ER method seems to be based on the probably sincere but untested and unproven assertion that we "naturally think of things in terms of entities and relationships" (Chen 1976). 

    Apart from the fact that one man's entity is another man's relationship - nobody understands "how we think".
    Thus, I see one of the roles of formal logic as "externalising" the thinking process away from the vagaries of the thinking process of any particular individual.

    Ken

    Chen, P. (1976) "The entity-relationship model: toward a unified view of data." ACM Trans. Database Systems 1(1): 9-36.
    Available from http://portal.acm.org/citation.cfm?id=320440

    formal logic. (2008). Encyclopædia Britannica. Encyclopaedia Britannica 2008 Ultimate Reference Suite.  Chicago: Encyclopædia Britannica.

    Filed under: ,
  • 06-08-2008 5:42 In reply to

    Re: ORM for a WFF?

    Hi John,

    I just read you post. I agree with Ken, "A First course in Logic" is a good book. You have probably found it already, but you can read bits of the book on Amazon. I agree with Ken, it has the right style for easy reading/comprehension.

    My company is building a Rule Engine/Inference Engine as well, and in my own research I have dived heavily into Russell and Godel.
    I was visiting a friend in Canada about 4 weeks ago, and my friend said "Oh, you really want to read this book, 'Godel, Escher, Bach' (Douglas R Hofstadter)" and he bought if for me. It's 743 pages, and my copy is in tatters already. It's hard to put down.

    If you want to know a great deal about formal logic from the ground up, inside and out and in very simple language, then GEB is probably the most amazing read you'll ever have on the subject. Just Google the title, and you'll see that I'm not alone in this thought, and if you've read any of my posts...I am quite the sceptic when I need to be. I thought it (GEB) would be crud...but it really is an amazing work and obviously written with great passion. It's hard not to get excited about the subject when you read what Hofstadter has to say.

    I have an ORM model that I'm working on, and it's within a paper that I'm submitting for the conference. If it's accepted (the paper) you'll see it here. Either way I'll get a copy to you. I don't mind sharing it, because it is our precedent work so that nobody can say we didn't think of it first. Either way, be prepared for a head spin of significant proportion.

    In essence, you can just use an ORM meta-model to do what you want to do, because FactTypes 'are' relations, and simple ORM models 'are' Theorems in FirstOrderLogic (see below on SOL). You could just use nORMa's meta schema, you just need to write your own interpretter.

    Basically, Turin's 'Halting Problem', 'Isomorphism', 'Interpretation', and Godel's incompleteness theorems (outlined beautifully in GEB) are your major stumbling blocks. Once you have them/those concepts mastered, then you'll be able to nail a 'Rule Engine'/'Inference Engine'.

    NB See pages 456 to 469 of Terry's new book for information about 'Interpretation'...basically, if you are building a RuleEngine, you have to watch out for Second/HigherOrderLogical 'interpretations' of Theorems. Dr Halpin and Dr Morgan suggest some ways to avoid problems there. They acknowledge an undocumented 'debate' as to the 'interpretation' of theorems of ORM (as either FOL or SOL in their 'interpretation'), and I agree it exists. I have my strategy for dealing with this, Dr Halpin is obviously looking for ways to deal with this, and (if you are asking....)..you'll come accross that one too. My position is that isomorphic interpretations of theorems of FOL as theorems of SOL/HOL are unavoidable altogether (e.g. my post in the Philosophy section), but I don't see a problem with that (it's all in the interpretation). i.e. Dr Halpin has to worry about 'everybodies' interpretation of an ORM model....you (on the other hand) as a developer of a Inference Engine get to chose when to 'stop' (Turin's 'Halting Problem') and whether you will 'ever' interpret S/HOL. i.e. you only have to deal with your own interpretters interpretation. There's still problems...but you don't have Halpin/Morgan's dilemma of having to deal with 'unknown' interpretters at design time....you just have to deal with 'unknown models at design time'...anyway, you'll see what I mean

    Well, that's as much as I know.

    I'll race you to the finish line ;) Who knows, we may share/compare notes.

    Best regds

    Victor

  • 06-09-2008 15:04 In reply to

    • JParrish
    • Not Ranked
      Male
    • Joined on 05-30-2008
    • Florida, USA
    • Posts 25

    Re: ORM for a WFF?

    Thanks for the additional information Ken.
    Victor.. I can’t race you.. my finish line keeps moving all over the place! ;)

    The subject is overwhelming. I am moving along I think with some limited knowledge.. I have a question relating to binary predicates and sets for anyone willing to entertain it. My first stumbling block is that for a binary predicate I need the operands to be of a specific type. (Numeric, Date, TimeOfDay, String, etc.) This makes sense as we are performing operations like Equal To, Greater Than, Less Than.

    I need to implement set membership as one of the operations and I am having a hard time combining those concepts with the simpler ones. One thing I am thinking of is that the function for “Equal To” can be used to determine set membership, but I don’t know how to verbalize that in a way that works with the singular comparisons and the set membership comparisons.
    Am I making any sense? I’ll try to build a fragment in ORM to show what my current approach looks like. I might just have tunnel vision.
    Filed under: ,
  • 06-09-2008 18:19 In reply to

    Re: ORM for a WFF?

     

    Hi John,

    In an earlier post reply, I didn't realize you were an experienced ORM modeler; just trying to do something new with ORM.  Glad you thought the advice was valid, anyway.

    Am I right in thinking your current questions about inequalities are for the schema cop project?  I didn't read all the posts for that; so I'm not at all sure of the context of your question here.

    When you mention operands for arbitrary predicates, are you talking about predicates in ORM Fact Types (with the operands being the Object Types), or are these predicates being handled by an external app?

    It's probably asking you to rehash what you've posted already, but for your current question, would you mind restating what you are working on, in (very), explicit terms.  Even something seemingly as straight forward as "binary predicate" can be misinterpreted.  Binary predicate, or predicate in an ORM binary Fact Type?  Something like "of the same type" is really open-ended in a forum like this (from the context, I'm pretty sure you mean same Data Type).  Mostly, I'm not sure where/when you are talking about ORM models, or external applications; and if the later, is that manipulating model elements, or data that will be stored in a resulting data structure.

    If you do try a restatement, I may still not be able to follow - but I'll often try restatements, just to get a problem better defined in my own mind.

    Hope you get the answers you need,

    BRN..

  • 06-09-2008 19:14 In reply to

    Re: ORM for a WFF?

    Hi John,

    Imagine a paradigm shift, and the poor guys who couldn't read Egyption Hieroglyphics before the Rossetta Stone.
    Then imagine Terry Halpin's doctoral thesis.

    i.e. Dr Halpin tells us exactly how to use the 'Existential Quantification' and 'Universal Quantification' in a first order logical theory (KL), to denote 'Set Membership' within an ORM diagram.

    Basically, the 'Fact Table' (sample population set) of a FactType is providing 'Set Membership'....you already know this.
    But, the paradigm shift to go through is to imagine 'Entity Types' and 'Value Types' as the 'symbols' of your logic, and FactTypes as the relations between them.

    In essense, you could go around the world and back again, and always end up in the same place....the ORM meta-schema.
    i.e. The ORM meta-schema is the ORM model you are looking for to represent theorems in first order logic.

    When viewed 'isomophically' it'll even start to 'look' like theorems in first order logic. Or the other way around (as it does with me now...imbedded in my brain lol)...you'll start seeing theorems of first order logic as sample populations within the ORM meta-schema.

    I exit here, but if you read (I mean really 'read') Terry's paper...it all unfolds for you like a Rossetta Stone.
    In that respect, it truely is a beautiful piece of work. Terry goes to great length to demonstrate how to read/write FOL as an ORM diagram.

    Best regds
    Victor

  • 06-10-2008 6:17 In reply to

    Re: ORM for a WFF?

    Hi John,

    looking at your original post, I see you are contemplating a rules engine.  Have you visited the Buiness Rules Community site: http://www.brcommunity.com/index.php  You'll see some familiar names there.  BRN..

  • 06-10-2008 9:48 In reply to

    • JParrish
    • Not Ranked
      Male
    • Joined on 05-30-2008
    • Florida, USA
    • Posts 25

    Re: ORM for a WFF?

     Thank you everyone for the replies. I think from the suggestions I have enough reading to do for the rest of the year and then some! I will definitely be looking at the nORMa meta model and I will look at some of the papers on the brcommunity site. While my current "rule engine" project isn't endeavoring to handle all of the complexities that larger systems might, it has given me something tangible to bounce the concepts off of. I plan to obtain the book Ken recommended: "A First course in Logic: An introduction to Model Theory, Proof Theory, Computability and Complexity" ... I've also been pouring over Dr. Halpins second edition, like the first he does a great job of covering many related subjects to ORM and his discussions on logic are very good. Thanks again for the input.

    Filed under: ,
Page 1 of 1 (13 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service