The 'YAP Prolog System' provides a great solution to your prolog programming needs in Ubuntu.Available in the Synaptic , simply search for 'yap and install.
To launch a prolog session , launch the terminal and enter 'yap' at the command line. This would take you right to the prompt where you could ask questions. But where's the database of rules and facts?
There are actually two ways of providing the relevant database to the compiler.In one of the modes , you can create a simple text file consisting of facts and rules and save it in your home directory. To let the compiler compile this file simply type '[file_name]' after the '?' prompt.Then you could ask relevant questions and get results.