title: How can I compile prolog code in ubuntu?
body: <p>How can I compile or run below these two files under gprolog or swi-prolog?</p>
  
  <p>I have two files:</p>
  
  <p>sample.pl:</p>
  
  <pre><code>foo ( arg1, arg2 ) :- !, a ( arg1 ).
  </code></pre>
  
  <p>test.pl:</p>
  
  <pre><code>a(1).
  a(2).
  a(3).
  a(4).
  a(5).
  </code></pre>