<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -15,34 +15,34 @@ describe &quot;Deontic Constraints&quot; do
   Cases = [
     # Constraints:
     [ 'each Person occurs one time (otherwise alert fraud dept) in Person is employed, Person is unemployed;',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :presence, [[&quot;Person&quot;]], [1, 1], [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;employed&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;unemployed&quot;]]], nil, [&quot;alert&quot;, &quot;fraud dept&quot;]]]]
     ],
     [ 'for each Person at most one of these holds ( otherwise email auditors ) : Person has borrowed cash, Person is a bad credit risk;',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :set, [[&quot;Person&quot;]], [nil, 1], [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;has&quot;, &quot;borrowed&quot;, &quot;cash&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;a&quot;, &quot;bad&quot;, &quot;credit&quot;, &quot;risk&quot;]]], nil, [&quot;email&quot;, &quot;auditors&quot;]]]]
     ],
     [ 'either Person has borrowed cash or Person is a bad credit risk ( otherwise email auditors );',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :set, nil, [1, nil], [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;has&quot;, &quot;borrowed&quot;, &quot;cash&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;a&quot;, &quot;bad&quot;, &quot;credit&quot;, &quot;risk&quot;]]], nil, [&quot;email&quot;, &quot;auditors&quot;]]]]
     ],
     [ 'either Person has borrowed cash or Person is a bad credit risk but not both ( otherwise email auditors );',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :set, nil, [1, 1], [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;has&quot;, &quot;borrowed&quot;, &quot;cash&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;a&quot;, &quot;bad&quot;, &quot;credit&quot;, &quot;risk&quot;]]], nil, [&quot;email&quot;, &quot;auditors&quot;]]]]
     ],
     [ 'Person is good credit risk only if Person is employed (otherwise consider foreclosure);',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :subset, [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;good&quot;, &quot;credit&quot;, &quot;risk&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;employed&quot;]]], nil, [&quot;consider&quot;, &quot;foreclosure&quot;]]]]
     ],
     [ 'Person is good credit risk if and only if Person is employed (otherwise log event);',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:constraint, :equality, [[[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;good&quot;, &quot;credit&quot;, &quot;risk&quot;]], [[{:word=&gt;&quot;Person&quot;, :term=&gt;&quot;Person&quot;}, &quot;is&quot;, &quot;employed&quot;]]], nil, [&quot;log&quot;, &quot;event&quot;]]]]
     ],
     [ 'Foo is written as Nr restricted to {1..10} (otherwise log);',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [&quot;Foo&quot;, [:value_type, &quot;Nr&quot;, [], [], [[1, 10]], [], [&quot;log&quot;, nil]]]]
     ],
     [ 'Foo is identified by its Nr restricted to {1..10} (otherwise log);',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [&quot;Foo&quot;, [:entity_type, [], {:parameters=&gt;[], :mode=&gt;&quot;Nr&quot;, :enforcement=&gt;[&quot;log&quot;, nil], :restriction=&gt;[[1, 10]]}, [], nil]]]
     ],
     [ 'Foo has at most one (otherwise notify security) Bar, Bar is of one Foo restricted to {1..10};',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:fact_type, [[:fact_clause, [], [{:word=&gt;&quot;Foo&quot;, :term=&gt;&quot;Foo&quot;}, &quot;has&quot;, {:quantifier_restriction=&gt;[&quot;notify&quot;, &quot;security&quot;], :quantifier=&gt;[nil, 1], :word=&gt;&quot;Bar&quot;, :term=&gt;&quot;Bar&quot;}], nil], [:fact_clause, [], [{:word=&gt;&quot;Bar&quot;, :term=&gt;&quot;Bar&quot;}, &quot;is&quot;, &quot;of&quot;, {:quantifier_restriction=&gt;[], :quantifier=&gt;[1, 1], :word=&gt;&quot;Foo&quot;, :restriction_enforcement=&gt;[], :restriction=&gt;[[1, 10]], :term=&gt;&quot;Foo&quot;}], nil]], []]]]
     ],
     [ 'Foo has at most one Bar, Bar is of one Foo restricted to {1..10} (otherwise log exception);',
-      nil
+      [[&quot;Person&quot;, [:value_type, &quot;Person&quot;, [], [], [], [], nil]], [nil, [:fact_type, [[:fact_clause, [], [{:word=&gt;&quot;Foo&quot;, :term=&gt;&quot;Foo&quot;}, &quot;has&quot;, {:word=&gt;&quot;Bar&quot;, :term=&gt;&quot;Bar&quot;, :quantifier_restriction=&gt;[], :quantifier=&gt;[nil, 1]}], nil], [:fact_clause, [], [{:word=&gt;&quot;Bar&quot;, :term=&gt;&quot;Bar&quot;}, &quot;is&quot;, &quot;of&quot;, {:word=&gt;&quot;Foo&quot;, :term=&gt;&quot;Foo&quot;, :quantifier_restriction=&gt;[], :quantifier=&gt;[1, 1], :restriction_enforcement=&gt;[&quot;log&quot;, &quot;exception&quot;], :restriction=&gt;[[1, 10]]}], nil]], []]]]
     ],
   ]
 
@@ -63,7 +63,7 @@ describe &quot;Deontic Constraints&quot; do
       result.should_not be_nil
       result.map{|d| d.value}.should == ast if ast
       # Uncomment this to see what should replace &quot;nil&quot; in the cases above:
-      #puts result.map{|d| d.value}.inspect unless ast
+      puts result.map{|d| d.value}.inspect unless ast
     end
   end
 end</diff>
      <filename>spec/cql/deontic_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>234cb0e1fdef4d98aa6f3daccf174fb17005a5c1</id>
    </parent>
  </parents>
  <author>
    <name>Clifford Heath</name>
    <email>clifford.heath@gmail.com</email>
  </author>
  <url>http://github.com/cjheath/activefacts/commit/553513cc6e3f4d3d3fcea7584421ef619b10965d</url>
  <id>553513cc6e3f4d3d3fcea7584421ef619b10965d</id>
  <committed-date>2009-11-01T19:47:56-08:00</committed-date>
  <authored-date>2009-11-01T19:47:56-08:00</authored-date>
  <message>Added parse tree expectations for deontic constraints</message>
  <tree>b6d82ab1dd9135eabc4700d71c83cf8e3def5f95</tree>
  <committer>
    <name>Clifford Heath</name>
    <email>clifford.heath@gmail.com</email>
  </committer>
</commit>
