Lecture 12: Working with Files

Lecture 12: Working with Files PowerPoint PPT Presentation


  • 66 Views
  • Uploaded on
  • Presentation posted in: General

Patrick Blackburn, Johan Bos

Download Presentation

Lecture 12: Working with Files

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


1. © Patrick Blackburn, Johan Bos & Kristina Striegnitz Lecture 12: Working with Files This lecture is concerned with various aspects of file handling and modularity We will learn three things: How predicate definitions can be spread across different files How to write modular software systems How to write results to files and how read input from files

2. © Patrick Blackburn, Johan Bos & Kristina Striegnitz Splitting programs over files Many Prolog predicates make use of the same basic predicates For instance: member/2, append/3 Of course you do not want to redefine it each time you need it Prolog offers several way of doing this

3. © Patrick Blackburn, Johan Bos & Kristina Striegnitz Reading in Programs The simplest way of telling Prolog to read in predicate definitions that are stored in a file is using the square brackets

  • Login