ApplySubstBase returns the result of applying the given substitution.
(s Subst)
| 944 | |
| 945 | // ApplySubstBase returns the result of applying the given substitution. |
| 946 | func (v Variable) ApplySubstBase(s Subst) BaseTerm { |
| 947 | if s == nil { |
| 948 | return v |
| 949 | } |
| 950 | if t := s.Get(v); t != nil { |
| 951 | return t |
| 952 | } |
| 953 | return v |
| 954 | } |
| 955 | |
| 956 | // Atom represents an atom (a predicate symbol applied to base term arguments). e.g: parent(A, B) |
| 957 | type Atom struct { |