3 Pages

chapter09

Course: COP 4020, Fall 2009
School: Iowa State
Rating:
 
 
 
 
 

Word Count: 693

Document Preview

4020 COP Lecture -*- Outline -*- * Relational Programming (Ch 9) Based on Peter van Roy and Seif Haridi's book, "Concepts, Techniques, and Models of Computer Programming" (MIT Press, 2004), where all references that are not otherwise attributed are found. ** self-test ------------------------------------------ SELF-TEST FOR CHAPTER 9 Motivation [Concepts]...

Register Now

Unformatted Document Excerpt

Coursehero >> Iowa >> Iowa State >> COP 4020

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
4020 COP Lecture -*- Outline -*- * Relational Programming (Ch 9) Based on Peter van Roy and Seif Haridi's book, "Concepts, Techniques, and Models of Computer Programming" (MIT Press, 2004), where all references that are not otherwise attributed are found. ** self-test ------------------------------------------ SELF-TEST FOR CHAPTER 9 Motivation [Concepts] [EvaluateModels] [MapToLanguages] Why is programming so hard? What approaches might solve this problem? What is rapid prototyping? How does it help? What are the costs we care about in rapid prototyping? Goals [Concepts] [EvaluateModels] What are the goals of declarative programming? Ideas [Concepts] What are the key ideas of logic programming? Application [EvaluateModels] When is logic programming useful? Model [Concepts] [UseModels] What features are added to the declarative model in the relational model? What does choice do? How does it execute? What does fail do? How does it execute? What does Solve do? How does it execute? In what order are choices used? Does a fail statement have to occur nested within the execution of a choice statement? What happens when there are no more choices and a fail occurs? Is there a difference between unification failure and fail? What happens to variable bindings after a failure? Semantics [Concepts] [UseModels] Given fun {Vowel} choice a [] e [] i [] o [] u end end Draw a search tree for the query: {Solve proc {$ V} V={Vowel} V=i end} Encapsulated Search [Concepts] [UseModels] [MapToLanguages] In what sense does Solve give encapsulated search? How does encapsulating search help reasoning? Relational programming [UseModels] Write the procedure {Reverse L1 L2}, such that L2 is the reverse of L1 Write addition, multiplication on natural numbers. Generate and Test [UseModels] [MapToLanguages] What features of the relational model are used in generate and test? Solve a problem, such as the VCR problem in the notes, using generate and test. When is it appropriate to use generate and test? How would you program sorting, using generate and test? How efficient would that be? Constructive logic [Concepts] What is a constructive proof? Does constructive logic allow "proof by contradiction"? Correspondence Oz between and logical formulas [Concepts] [UseModels] What does sequencing mean, in the logical translation of Oz? What does a choice statement mean, in logic? How do you state an existential property in Oz? How do you state a universal property (rule) in Oz? What's the logical semantics of: case Ls of nil then skip [] _|nil then skip [] X|Y|Zs then (X =< Y)=true {Ordered Y|Zs} end What's the logical semantics of: choice Ls=nil [] Ls=_|nil [] local X Y Zs in X|Y|Zs=Ls (X =< Y)=true {Ordered Y|Zs} end end What's the operational difference between the above two statements? What does a choice mean in a rule? Logical semantics [Concepts] [UseModels] How do you write a query for a fact? What is the closed world assumption? Can the closed world assumption ever be wrong? How do you write a query to join two pieces of information? What syntax is used to represent conjunction in queries? Modeling in Oz [UseModels] Write Oz rules that encode your class schedule. Write a query to ask if you are in class Monday at 11:45. Write a query to find all the classes you are taking. Comparison to other models [EvaluateModels] [MapToLanguages] Can we do logic programming in the declarative model? What happens if we add concurrency to the relational model? Can we use logic programming ideas in the statefu...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Iowa State - COP - 4020
COP 4020 Lecture -*- Outline -*-* Message-Passing Concurrency (Ch 5) Based on Peter van Roy and Seif Haridi's book, &quot;Concepts, Techniques, and Models of Computer Programming&quot; (MIT Press, 2004), where all references that are not otherwise attributed a
Iowa State - COP - 4020
COP 4020 Lecture -*- Outline -*-* Declarative Computation Model (Ch 2) Based on Peter van Roy and Seif Haridi's book, &quot;Concepts, Techniques, and Models of Computer Programming&quot; (MIT Press, 2004), where all references that are not otherwise attributed
Iowa State - COP - 4020
COP 4020 Lecture -*- Outline -*-* The Data-Driven Concurrent Model (Ch 4) Based on Peter van Roy and Seif Haridi's book, &quot;Concepts, Techniques, and Models of Computer Programming&quot; (MIT Press, 2004), where all references that are not otherwise attribu
Iowa State - COP - 4020
COP 4020 Lecture -*- Outline -*-* Introduction to Programming Concepts (Chapter 1) Based on Peter van Roy and Seif Haridi's book, &quot;Concepts, Techniques, and Models of Computer Programming&quot; (MIT Press, 2004), where all references that are not otherwis
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 9.4Section 9.4 Connectivity We extent the notion of a path to undirected graphs. An informal definition (see the text for a formal definition): There is a path v0, v1, v
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 9.3Section 9.3 Representing Graphs and Graph Isomorphism We wish to be able to determine when two graphs are identical except perhaps for the labeling of the vertices. W
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 9.2Section 9.2 Graph Terminology and Special Types of Graphs Undirected Graphs Definition: Two vertices u, v in V are adjacent or neighbors if there is an edge e between
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 7.4Section 7.4 Generating Functions Generating functions are useful for manipulating sequences and therefore for solving counting problems. _ Definition: Let S = cfw_a0,
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 9.1Section 9.1 Graphs and Graph Models Undirected Graphs A simple graph (V,E) consists of vertices, V, and edges, E, connecting distinct elements of V. - no arrows - no
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 7.3Section 7.3 Divide-and-Conquer Algorithms and Recurrence Relations The form: The sequence: cfw_am ,am ,am ,., am ,.0 1 2 kan = an/ m + f (n)_ n = mk for some k. -
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 7.2Section 7.2 Solving Linear Recurrence Relations If ag(n) = f (ag(0) ,ag(1) ,., ag(n1) ) find a closed form or an expression for ag(n). Recall: nth degree polynomials
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSection 7.1Section 7.1 Recurrence Relations Definition: Given a sequence cfw_ag(0) ,ag(1) ,ag(2) ,., a recurrence relation (sometimes called a difference equation) is an equatio
Iowa State - CPRE - 310
Transparencies to accompany Rosen, Discrete Mathematics and Its ApplicationsSections 4.1 &amp; 4.2Section 4.1 - Mathematical Induction and Section 4.2 - Strong Induction and Well-Ordering A very special rule of inference! Definition: A set S is well ordered
Iowa State - CPRE - 588
SpecC Modeling GuidelinesAndreas GerstlauerTechnical Report CECS-02-16 (revision of ICS-TR-00-48) April 12, 2002 Center for Embedded Computer Systems University of California, Irvine Irvine, CA 92697-3425, USA (949) 824-8919 gerstl@cecs.uci.edu http:/ww
Dallas - DXA - 081000
Linux Kernel Internals The File Subsystem- Gerlof Langeveld gerlof@ATComputing.nlNijmegen, The NetherlandsVersion: april 20032Linux Kernel Internals - The File SubsystemPrefaceThis document describes how the Linux-kernel keeps track of the administ
Iowa State - CPRE - 588
k &amp; u twsxpv(h pyVhb&quot;rx mpv1hphwehut)dqseqVVr%purh )th sqrvVi s thhq VDVhrequtpxi @h)v x vx)ssqhsx 1fi x&amp; s x y q s i q rQwsvVhVrhrpfphs pVhb pppr ehieqbhVDv bdvxk)ssqhs1fq utx(ybm1hwut Vh%p 1h)1xVgwvs u 1fx Vxrxx iVhkrq equsi tpxx b Vx1if vVus VruvGVsx
Caltech - CH - 111
Supplemental Material can be found at: http:/www.jbc.org/cgi/content/full/M806668200/DC1 THE JOURNAL OF BIOLOGICAL CHEMISTRY VOL. 283, NO. 49, pp. 34129 34140, December 5, 2008 Printed in the U.S.A.Flexibility of Eukaryotic Okazaki Fragment Maturation th
Stanford - ILPUBS - 621
Adaptive Ordering of Pipelined Stream FiltersShivnath Babu Stanford University Rajeev Motwani Stanford University Kamesh Munagala Stanford UniversityItaru Nishizawa Jennifer Widom Hitachi, Ltd. Stanford University cfw_shivnath,rajeev,kamesh,widom@cs.sta
Lewis-Clark - HW - 106
Homework Assignment 3Perform the following conversions (HINT: use the iside cover of the back of your textbook for the relationships . . .): a.) 45.0 kcal to kJ b.) 1.00 g/cm3 to kg/dm3 c.) 9.81 m/s2 to miles/hr2 d.) 2.9979 x 108 m/s to miles/hr e.) 179
Cornell - WEB - 191
Math 191FINAL EXAMFall 2000SHOW ALL WORK. CIRCLE YOUR ANSWERS. CLOSED BOOK. NO CALCULATORS. 1. (25 pts) Let f (x) = xx = ex ln x , x &gt; 0 (a) Compute lim f (x) if it exists. +x0(b) Locate and identify the critical points of f (x) in x &gt; 0. (c) Find th
Cornell - WEB - 191
Math 191FINAL EXAM SOLUTIONSFall 20001. (a) Using l'Hopital's rule, the limit is 1. (b) The only critical point is x = e-1 . (f (x) = (1 + ln x)ex ln x ) (c) The absolute minimum occurs when x = e-1 where the value is e-1/e . There is no absolute maxim
Purdue - LISTS - 20030304
A10K 1 KFITC10K 1KB10K 1KPE10K 1KPE100A-633100PE100A-6331001 01010101 1 1011 1 10 1001 1 10FITC1001K10K10K10KPE1K10KFITC1001K10K11 010K10KPE1001K10K1 K1K1K1KA-633100A-680100A-633100A-6801001 01010
Oakland University - ME - 463
Table Top
Oakland University - ME - 463
Table Middle Level
Oakland University - ME - 463
Table (Bottom Level)
Oakland University - ME - 463
Table Top Legs
Oakland University - ME - 463
Steel Plate
Oakland University - ME - 463
Spring Cover
Oakland University - ME - 463
Spring Top Washer
Oakland University - ME - 463
Split Lock Washer
Oakland University - ME - 463
Pipe Clamp
Oakland University - ME - 463
Bike Pedal Surface
Oakland University - ME - 463
Bike Pedal Crank
Oakland University - ME - 463
Hex Washer Head Screw
Oakland University - ME - 463
Hex Nut
Oakland University - ME - 463
Hex Lock Nut
Oakland University - ME - 463
- 20 x 2 Hex Cap Screw
Oakland University - ME - 463
- 20 x 1 Hex Cap Screw
Oakland University - ME - 463
- 20 x 1 Hex Cap Screw
Oakland University - ME - 463
- 20 x 3/4 Hex Cap Screw
Oakland University - ME - 463
- 20 x Hex Cap Screw
Oakland University - ME - 463
Glass Clamp
Oakland University - ME - 463
Glass Clamp Rod
Oakland University - ME - 463
Floor Mount
Oakland University - ME - 463
Flat Washer
Oakland University - ME - 463
Fender Washer
Oakland University - ME - 463
Condensing Coil
Oakland University - ME - 463
Brake Pad Clamp
Oakland University - ME - 463
Boiling Flask
Oakland University - ME - 463
Brake Pad
Oakland University - ME - 463
Bike Seat Pipe
Oakland University - ME - 463
Bike Gear
Oakland University - ME - 463
Angle Iron with Holes
Oakland University - ME - 463
Angle Brace
Oakland University - ME - 463
Angle BraceAngle Iron with HolesAxleBike FrameBike GearBike Seat PipeBoiling FlaskBracketBrake PadBrake Pad ClampCapChainCollecting FlaskCondensing CoilConnectorFender WasherFlat WasherFloor MountGaroliteGlass ClampGlass Clamp RodHex
Oakland University - ME - 463
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;Key&gt;1b409cd3253c88cbaf4432f4efe20eedd9424d37.ppt&lt;/Key&gt;&lt;RequestId&gt;B 4E2BE5F296FA358&lt;/RequestId&gt;&lt;HostId&gt;yde53XSmIihPPulKuFo/xFPFl78sMCT6
UNC - READ - 5361767
TECHNICAL MEMORANDUM No. TM-80-02SELECTION OF THE INDEPENDENT AUDITORTWO PART REQUEST FOR PROPOSAL FOR AUDITING SERVICES BY -COUNTIES-MUNICIPALITIESPUBLIC AUTHORITIES-SCHOOL ADMINISTRATIVE UNITSOF NORTH CAROLINAState and Local Government Finance Divisi
Stanford - CS - 147
stanford hci group / cs147Design Tools31 October 2005introduction to human-computer interactionhttp:/cs147.stanford.eduWhy Tools?The quality of the interfaces will be higher. This is because:Designs can be rapidly prototyped and implemented, possib
illinoisstate.edu - PSYCH - 340
SyllabusContact Information Name: Email: Office hours: Phone: Teaching assistants: Course title: Course number: Course discipline: Course description: Dr. J. Cooper Cutting jccutti@ilstu.edu Mon 11-12, Tu 9-10, &amp; by appointment 438-2999 Kate HudsonOffic
USC - EE - 459
DS75491 MOS-to-LED Quad Segment Driver DS75492 MOS-to-LED Hex Digit DriverFebruary 1995DS75491 MOS-to-LED Quad Segment Driver DS75492 MOS-to-LED Hex Digit DriverGeneral DescriptionThe DS75491 and DS75492 are interface circuits designed to be used in c
Fayetteville State University - MAD - 5932
Stochastic Calculus Notes, Lecture 7Last modied November 7, 20021Ito Stochastic Dierential Equations1.1. Notation: We switch back to the notation Wt for Brownian motion. We use Xt to denote the solution of the stochastic dierential equation (SDE). Whe