title: Why does SWI-Prolog fail when mentioning a predicate without any facts in a rule?
body: <p>Here is my Prolog program:</p>
  <pre><code>:- set_prolog_flag(verbose, silent).
  :- initialization(main).
  
  :- use_module(library(tabling)).
  
  :- table reachable/1.
  
  reachable(X) :- start(X).
  reachable(X) :- reachable(Y), link(Y, X).
  
  start(london).
  
  % link(london, paris).
  % link(paris, london).
  % link(london, frankfurt).
  % link(paris, frankfurt).
  % link(frankfurt, paris).
  
  main :-
    forall(reachable(X), writeln(X)),
    halt.
  main :-
    halt(1).
  </code></pre>
  <p>Running it gives this error:</p>
  <pre class="lang-sh prettyprint-override"><code>swipl links.pl
  Initialization goal raised exception:
  ERROR: 'reachable tabled'/1: Undefined procedure: link/2
  </code></pre>
  <p>However this works:</p>
  <pre><code>:- set_prolog_flag(verbose, silent).
  :- initialization(main).
  
  :- use_module(library(tabling)).
  
  :- table reachable/1.
  
  reachable(X) :- start(X).
  reachable(X) :- reachable(Y), link(Y, X).
  
  start(london).
  
  link(tokyo, hongkong).
  
  main :-
    forall(reachable(X), writeln(X)),
    halt.
  main :-
    halt(1).
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>swipl links.pl
  london
  </code></pre>
  <p>How can I make my program work with and without and <code>link</code> facts?</p>
  <hr />
  <pre class="lang-sh prettyprint-override"><code>swipl --version
  SWI-Prolog version 7.6.4 for amd64
  </code></pre>