title: No permission to access private_procedure `var/1'
body: <p>I have written a simple unification algorithm (with occurs check) in Prolog, using meta-programming techniques. I am using SWI-Prolog 7.4.2.</p>
  
  <p>I want to use it inside a meta-interpreter, such as the classic <em>vanilla meta-interpreter:</em></p>
  
  <pre><code>solve(true) :- !.
  solve((A,B)) :- solve(A), solve(B).
  solve(A) :- clause(A,B), solve(B).
  </code></pre>
  
  <p>If I try for example <code>solve(odd(X))</code> it works, giving as the first solution <code>X = s(0)</code>. (Where the clauses are <code>odd(s(0)).</code> and <code>odd(s(s(X))) :- odd(X).</code>)</p>
  
  <p>But if I try to execute the unification algorithm using <code>solve</code>, it doesn't work any more. Since I use meta-predicates like <code>var/1</code> inside my unification algorithm, I tried with simpler goals.</p>
  
  <p>The problem is this one: if I input <code>solve(var(X))</code>, it says <code>No permission to access private_procedure 'var/1'</code>.
  I can't find useful information about this, can someone help? Thanks.</p>