jagomart
digital resources
picture1_Logic Programming Pdf 197766 | Prog3 Item Download 2023-02-07 22-00-08


 102x       Filetype PDF       File size 0.15 MB       Source: www.inf.ed.ac.uk


File: Logic Programming Pdf 197766 | Prog3 Item Download 2023-02-07 22-00-08
n i v e r u s h e i t y t o f h e g d u r i n b logic programming recursion lists data structures ...

icon picture PDF Filetype PDF | Posted on 07 Feb 2023 | 2 years ago
Partial capture of text on file.
                                                                                                                                                                        N I V E R
                                                                                                                                                                       U    S
                                                                                                                                                                     H E     I T
                                                                                                                                                                              Y
                                                                                                                                                                     T
                                                                                                                                                                    O F       H
                                                                                                                                                                      E       G
                                                                                                                                                                       D    U R
                                                                                                                                                                        I N B
                                                                Logic Programming:
                                               Recursion, lists, data structures
                                                                                 Alan Smaill
                                                                                Sep 28 2015
      Alan Smaill                                        Logic Programming: Recursion, lists, data structures                                              Sep 28 2015           1/28
                                                                                                                                                                        N I V E R
                                                                                                                                                                       U    S
                    Today                                                                                                                                            H E     I T
                                                                                                                                                                              Y
                                                                                                                                                                     T
                                                                                                                                                                    O F       H
                                                                                                                                                                      E       G
                                                                                                                                                                       D    U R
                                                                                                                                                                        I N B
                          Recursion
                                      proof search
                                      practical concerns
                          List processing
                          Programming with terms as data structures.
      Alan Smaill                                        Logic Programming: Recursion, lists, data structures                                              Sep 28 2015           2/28
                                                                                                                                                                        N I V E R
                                                                                                                                                                       U    S
                    Recursion                                                                                                                                        H E     I T
                                                                                                                                                                              Y
                                                                                                                                                                     T
                                                                                                                                                                    O F       H
                                                                                                                                                                      E       G
                                                                                                                                                                       D    U R
                                                                                                                                                                        I N B
               So far the rules we have seen have been (mostly) non-recursive.
               This is a limit on what can be expressed.
               Without recursion, we cannot define transitive closure
               eg define ancestor/2 in terms of parent/2.
      Alan Smaill                                        Logic Programming: Recursion, lists, data structures                                              Sep 28 2015           3/28
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           This is a fine declarative description of what it is to be an ancestor.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       But watch out for the traps!!!
                                                                                                                                                                        N I V E R
                                                                                                                                                                       U    S
                    Recursion ctd                                                                                                                                    H E     I T
                                                                                                                                                                              Y
                                                                                                                                                                     T
                                                                                                                                                                    O F       H
                                                                                                                                                                      E       G
                                                                                                                                                                       D    U R
                                                                                                                                                                        I N B
               In recursive use, the same predicate is used in the head (lhs) of the
               rule as in the body (rhs)
               (in the second clause below):
                     ancestor(X,Y) :- parent(X,Y).
                     ancestor(X,Y) :- parent(X,Z),
                                                                        ancestor(Z,Y).
      Alan Smaill                                        Logic Programming: Recursion, lists, data structures                                              Sep 28 2015           4/28
The words contained in this file might help you see if this file matches what you are looking for:

...N i v e r u s h t y o f g d b logic programming recursion lists data structures alan smaill sep today proof search practical concerns list processing with terms as so far the rules we have seen been mostly non recursive this is a limit on what can be expressed without cannot dene transitive closure eg ancestor in of parent ne declarative description it to an but watch out for traps ctd...

no reviews yet
Please Login to review.