An external predicate P(i1, ..., ik) -> {False, True} External predicates do not make the closed world assumption
| 185 | # return any(r.value for r in results) |
| 186 | |
| 187 | class Predicate(Function): |
| 188 | """ |
| 189 | An external predicate P(i1, ..., ik) -> {False, True} |
| 190 | External predicates do not make the closed world assumption |
| 191 | """ |
| 192 | _Instance = PredicateInstance |
| 193 | codomain = bool |
| 194 | #def is_negative(self): |
| 195 | # return self._Instance._opt_value is False |
| 196 | def __init__(self, head, fn, domain, info): |
| 197 | if info is None: |
| 198 | info = PredicateInfo() |
| 199 | super(Predicate, self).__init__(head, fn, domain, info) |
| 200 | assert(self.info.opt_fn is None) |
| 201 | self.blocked_predicate = self.name |
| 202 | @property |
| 203 | def predicate(self): |
| 204 | return self.function |
| 205 | @property |
| 206 | def is_negated(self): |
| 207 | return True |
| 208 | @property |
| 209 | def is_cost(self): |
| 210 | return False |
| 211 | |
| 212 | ################################################## |
| 213 |