1 / 17

A Simple Logic For Contexts

A Simple Logic For Contexts. Anthony B. Coates, Miley Watts LLP, abcoates@mileywatts.com 13 th December 2007 Contributed to the UN/CEFACT Context Methodology project. Assumptions. Context model made up of individually identifiable context nodes

etana
Download Presentation

A Simple Logic For Contexts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Simple Logic For Contexts Anthony B. Coates, Miley Watts LLP, abcoates@mileywatts.com 13th December 2007 Contributed to the UN/CEFACT Context Methodology project

  2. Assumptions • Context model made up of individually identifiable context nodes • Contexts can have broader/narrower associations with each other • No circular references allowed • Also allow unions of contexts – each item in the union is narrower than the union • Also allow intersections of contexts – each item in the intersection is broader than the intersection

  3. Notation • “A and B” is the intersection of contexts A and B • “A or B” is the union of contexts A and B • We will write “A > B” if context A is broader than context B • “A < B” if context A is narrower than context B • “A = B” if contexts A and B are the same context (or have a “same as” association), or if they are “identical” contexts (explained later)‏ • Similarly “A <= B”, “A >= B”

  4. Comparison • Two union contexts are identical if they are composed identical contexts (flattening any unions which are items in the union)‏ • (A or B) or (C or D)= A or B or C or D

  5. Comparison • Two intersection contexts are identical if they are composed of identical contexts (flattening any intersections which are items in the intersection)‏ • (A and B) and (C and D)= A and B and C and D

  6. Comparison • Two contexts A and B are disjoint if • not “A = B” • they do not have any “narrower” contexts in common • This means that contexts are treated as disjoint by default, and only a common narrower context (not an intersection context nor via an intersection context) can establish that two contexts are not disjoint

  7. Comparison • Two unions are disjoint if they do not contain any of the same items (once flattening of union items is applied)‏ • “A or B” is disjoint from “C or D” • Two intersections are disjoint unless they contain all of the same items (once flattening of intersection items is applied)‏ • “A and B” disjoint from “A and C”

  8. Comparison • Comparison of intersections: • “A and B” <= “C and D” if and only if • “A <= C” and “B <= D”, or • “A <= D” and “B <= C” • “A and B” >= “C and D” if and only if • “A >= C” and “B >= D”, or • “A >= D” and “B >= C” • Reverse these for “>” and “<” respectively

  9. Assumptions • Also allow exclusions – each exclusion includes 1 context and excludes 1 context • This is a slight change from the definition in the current proposal, but not a significant change • Makes it easier to express these rules • The exclusion is disjoint with the excluded context, and disjoint with each context that is narrower than the excluded context • Otherwise, perform comparisons with the included context

  10. Examples • These are the rules • Short and sweet • Let's look at some examples of how this works in practice • In each example, there is a message which contains some BIEs • Each BIE has been associated with a context • A context is also applied to the message

  11. Examples • If the BIE's context and the message's context are disjoint, then the BIE is suppressed from the message • If the BIE's context is narrower than the message's context, then the BIE is suppressed from the message • Otherwise, the BIE is included in the message • Note: a BBIE or ASBIE context must not be broader than the parent ABIE's context

  12. Example #1 • BIE #1: All • BIE #2: North America and Automotive • BIE #3: USA and Marine • Message: North America • BIE #1 is broader – included • BIE #2 is narrower (message not automotive) – excluded • BIE #3 is disjoint (Automotive not = Marine) – excluded

  13. Example #2 • BIE #1: All • BIE #2: North America and Automotive • BIE #3: USA and Marine • Message: North America and Automotive • BIE #1 is broader – included • BIE #2 is identical – included • BIE #3 is disjoint (Automotive not = Marine) – excluded

  14. Example #3 • BIE #1: All • BIE #2: North America and Automotive • BIE #3: USA and Marine • Message: USA and Automotive • BIE #1 is broader – included • BIE #2 is broader – included • BIE #3 is disjoint (Automotive not = Marine) – excluded

  15. Example #4 • BIE #1: All • BIE #2: North America and Automotive • BIE #3: USA and Marine • Message: USA and Marine • BIE #1 is broader – included • BIE #2 is disjoint (Automotive not = Marine) – excluded • BIE #3 is identical – included

  16. Example #5 • BIE #1: All • BIE #2: North America excluding USA • BIE #3: USA and Marine • Message: North America and Marine • BIE #1 is broader – included • BIE #2 is (effectively) broader – included • BIE #3 is narrower – excluded

  17. Example #6 • BIE #1: All • BIE #2: North America excluding USA • BIE #3: USA and Marine • Message: USA and Marine • BIE #1 is broader – included • BIE #2 is excluded by “USA” • BIE #3 is identical – excluded

More Related