1 / 8

An ide for teaching and learning prolog

An ide for teaching and learning prolog. Using Prolog Development Tools ( ProDT ). Installation. Need Eclipse (Works on Windows, Linux, and Mac OS) Download the plug-in from: http://prodevtools.sourceforge.net Follow the installation and configuration instructions from the website

drew
Télécharger la présentation

An ide for teaching and learning prolog

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. An ide for teaching and learning prolog Using Prolog Development Tools (ProDT)

  2. Installation • Need Eclipse (Works on Windows, Linux, and Mac OS) • Download the plug-in from: http://prodevtools.sourceforge.net • Follow the installation and configuration instructions from the website • Need a Prolog interpreter to complete the plug in configuration (SWI, B, or XSB) • Check the features section for screenshotsand additional help

  3. Implementation • Create new Prolog project in Eclipse • Ensure that an interpreter is selected • Add a file to the project source and name it filename.pl • Add source code such as: • abs(X,X) :- X >= 0, !. • abs(-X,Y) :- Y is X * -1. • To run the file, right click and select ProDT ->Consult in Console

  4. Console

  5. Errors • Errors are underlined and found automatically after saving the file • Hovering the mouse over the error gives a tip on the problem • Good learning tool for becoming familiar with the language and the syntax

  6. Trace • Trace can be used in the console to show how Prolog computes the code. • Good for teaching • Shows the process Prolog runs to get answers • Use command: trace. • Run function • Progress by hitting the enter key • Good for bug squashing

  7. Trace in Action First function fails, second function runs and computes the correct answer.

  8. Conclusion • Eclipse is a good solution • Platform independent • Consult in Console • Error Tracking • Trace/Debugging • Graphical User Interface • Easy to use • Questions? brett.hattaway@gmail.com

More Related