CS 541 Lecture -*- Outline -*- * Logical Computing goal: get them to see that some logics correspond to logic programming languages, and what properties a language needs to be like that ** What this is about ------------------------------------------ QUESTIONS FOR DESIGNING A LOGIC PROGRAMMING LANGUAGE 1. What should the language talk about? 2. What logical connectives work for describing things and relationships? 3. What logical connectives work for describing queries? ------------------------------------------ ** What should the language talk about? ------------------------------------------ WHAT TO DESCRIBE/SPECIFY? What? Syntax: ------------------------------------------ Q: What should the language talk about? ... named entities unknown entities relationships Give the (lambda) Prolog syntax for these. ... ::= * ::= * ::= | | ... ::= | ( ) | ... see the lambda Prolog grammar for more details. ** What logical connectives work for describing relationships? motivating question: what kinds of logical connectives would work for compuation? ------------------------------------------ CONNECTIVES FOR EFFECTIVE SPECIFICATION Effectively describe L2? - (ordered L2) and (permutation L1 L2) - (ordered L2) or (empty L2) Effectively describe a relationship? - (sorted L1 L2) if ((ordered L2) and (permutation L1 L2)) - (less X Y) if not (greater X Y) ------------------------------------------ the key is effectiveness (compuatbility and efficiency of it) nondeterminism is ok (define it if needed) give real syntax after: and = "," or = ";" or is written using separate "clauses". implies = "=>" and ":-" in the other direction. Q: What about universal quantification? Existential quantification? ** What logical connectives work for describing conjectures or queries? ------------------------------------------ CONNECTIVES FOR EFFECTIVE QUERYING Effectively ask for L2? - (ordered L2) and (permutation L1 L2) - (ordered L2) or (empty L2) ------------------------------------------ I'll let you think about the other connectives and queries in homework.