OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: link contract logic tree: $and, $or, $true, $false


With regard to the rapidly evolving OpenXDI discussion of link contract policy expression, currently Mike has proposed a $if context (as a child of a $do context, which is the link contract root), which in turn contains a $condition context. The $condition context may then optionally contain $and and $or contexts, or directly contain condition expressions.

In thinking about this on my vacation (for at least in a few idle moments ;-), I worked out a simpler and more flexible way for this "logic tree" to be constructed. It still starts with the root policy expression root node of $if. But rather than a $condition node, we just have four possible child context nodes:
The beauty is that these can be used in any combination, to any depth, with any condition expressions, to form a policy expression. The logic rules are always the same.

In the following examples, I've used nesting to indicate XDI parent/child contexts, and parens to indicate condition expressions (which are just written in pseudocode, not actual XDI expressions).

1)
$if
   $true
      (age > "21")

2)
$if
   $true
      $and
         (age > "21")
         (driver's license)

3)
$if
  $and
      $true
         $and
            (age > "21")
            (driver's license)
      $false
         (outstanding-ticket)

4)
$if
  $and
      $true
         $and
            (age > "21")
            (driver's license)
      $or
         $false
            (outstanding-ticket)
         $true
            (insurance-policy)

=Drummond



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]