This can be used to get the current solution binding of the Variable instance. So we are calling when the goal is in a solution This method returns nothing but modifies the argument mappings, by filling them with the current solution binding of the Variable instance. If Variable instance is anon
(Map<String, Term> varnames_to_Terms, Map<term_t, Variable> vars_to_Vars)
| 153 | * A Map from Prolog variables to JPL Variables. |
| 154 | */ |
| 155 | protected final void getSubst(Map<String, Term> varnames_to_Terms, Map<term_t, Variable> vars_to_Vars) { |
| 156 | // NB a Variable.name cannot be "" i.e. of 0 length |
| 157 | // if (!(this.name.charAt(0) == '_') && varnames_to_Terms.get(this.name) |
| 158 | // == null) { |
| 159 | if (tellThem() && varnames_to_Terms.get(this.name) == null) { |
| 160 | varnames_to_Terms.put(this.name, Term.getTerm(vars_to_Vars, this.term_)); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | /* (non-Javadoc) |
| 165 | * @see org.jpl7.Term#hasFunctor(java.math.BigInteger, int) |