NewQuery is a convenience constructor for constructing a goal atom.
(predicate PredicateSym)
| 1045 | |
| 1046 | // NewQuery is a convenience constructor for constructing a goal atom. |
| 1047 | func NewQuery(predicate PredicateSym) Atom { |
| 1048 | vars := make([]BaseTerm, predicate.Arity) |
| 1049 | for i := 0; i < predicate.Arity; i++ { |
| 1050 | vars[i] = Variable{fmt.Sprintf("X%d", i)} |
| 1051 | } |
| 1052 | return Atom{predicate, vars} |
| 1053 | } |
| 1054 | |
| 1055 | // NegAtom represents a negated atom. |
| 1056 | type NegAtom struct { |
no outgoing calls