Users can currently create multiple-argument templates by navigating through
relations from
a single root. However some desirable patterns would require multiple usages of
a bound
second variable.
In sensible templates there must be some relationship between the original root
variable and
the second variable. Rather than embedding this relationship arbitrarily in the
clause itself
we will make it more explicit by using it in the introduction of this second
variable.
Possible syntax:
Forany2[Person,Person] { p => p.respects } { (p1, p2) => !p1.smokes ^ p2.smokes
} * 0.5
This expresses the preference:
For any person1, for any person2 respected by person1, consider the case in
which person1
does not smoke and person2 does smoke; each occurence of this case makes the
possible
world less likely by a factor of two.
Original issue reported on code.google.com by andrew.k.mccallum on 27 Nov 2009 at 8:42
Original issue reported on code.google.com by
andrew.k.mccallum
on 27 Nov 2009 at 8:42