Logo
  • Home
  • Classes
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
  • Problem Sets
  • Syllabus

Class 3: Rules of Evaluation

Assignments Due

  • Monday, 5 September (11:01am): Problem Set 1 (both on-line submission and paper)
  • Wednesday, 7 September (in class): Quiz 1

Reading

  • Now: should have finished Chapters 1-3 of the course book
  • By Friday: Chapter 4 of course book, Chapters 1-3 of James Gleick’s The Information

Upcoming Help Schedule

  • Right after class today (Monday, noon-1:30pm): Kristina, Rice Hall, first floor
  • Monday, 1-2pm: Dave, Rice 507 (almost last chance to pick up a book)
  • Tuesday, 5-8pm: Jonathan, Valerie, Rice Hall, first floor

BNF Scheme Grammar with Rules of Evaluation

Expression ::= PrimitiveExpression

PrimitiveExpression ::= Number | true | false | Primitive Procedure

Evaluation Rule 1: Primitives. A primitive, evaluates to __________________________________________.



Expression ::= NameExpression

NameExpression ::= Name

Evaluation Rule 2: Names. A name expression evaluates to __________________________________________.

Expression ::= ApplicationExpression

ApplicationExpression ::= (Expression MoreExpressions)


MoreExpressions ::=


MoreExpressions ::= Expression MoreExpressions

Evaluation Rule 3: Application. To evaluate an application:
    (a) Evaluate all the subexpressions (in any order)
    (b) Apply the value of the first subexpression to the values of all the other subexpressions.

Application Rule 1: Primitives. If the procedure to apply is a primitive, __________________.

Application Rule 2: Constructed Procedures. If the procedure is a constructed procedure, ___________________ the body of the procedure with each formal parameter replaced by the corresponding actual argument expression value.

“Somehow it seems to fill my head with ideas – only I don’t exactly know what they are!”
Alice, in Alice and Wonderland by Lewis Carroll after hearing The Jaberwocky.
Print Friendly Print Get a PDF version of this webpage PDF

Leave a Reply Cancel reply

You must be logged in to post a comment.


Fall 2011

Register
Login

Help Schedule

(all in Davis Commons, except Dave's office hours in Rice 507)
Sundays, 1-6pm (Valerie/Joseph/Kristina)
Mondays, noon-1:30pm (Kristina)
Mondays, 1:15-2:00pm (Dave, Rice 507)
Tuesdays, 11am-noon (Dave, Rice 507)
Tuesdays, 5-8pm (Valerie/Jonathan)
Wednesdays, 5-6:30pm (Jiamin)
Thursdays, 9:45-11am (Dave, Rice 507)
Thursdays, 1-2:30pm (Joseph)
Thursdays, 4:30-7:30pm (Jonathan/Jiamin)
Fridays, noon-1:30pm (Peter)

Recent Posts

  • Course Wrap-Up
  • Class 41: The Cake of Computing
  • PS8 Submissions
  • Class 40: GuardRails, Big Data, and Secure Computation
  • Exam 2 Solutions

Recent Comments

  • David Evans on Problem Sets
  • jacob777 on Problem Sets
  • Prof. K.R. Chowdhary on Class 41: The Cake of Computing
  • Anon on Exams
  • Anon on Exams

Index

  • Classes
    • Class 1: Computing
    • Class 2: Language
    • Class 3: Rules of Evaluation
    • Class 4: Constructing Procedures
    • Class 5: Procedures Practice
    • Class 6: Programming with Data
    • Class 7: Programming with Lists
    • Class 8: Recursive List Procedures
    • Class 9: Consistent Hashing
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
    • DrRacket Guide
    • Schemer’s Guide to Python
  • Problem Sets
    • Problem Set 0: Course Registration, Racket
    • Problem Set 1: Making Mosaics
      • PS1 Comments
    • Problem Set 2: Sequence Alignment
      • PS2 Comments
    • Problem Set 3: Limning L-System Fractals
      • PS3 – Comments
    • Problem Set 4: Constructing Colossi
      • PS4 – Comments
    • Problem Set 5: Wahoo! Auctions
      • PS5 Comments
    • Problem Set 6: Adventures in Charlottansville
      • PS6 Comments
    • Problem Set 7: Charming Snakes with Mesmerizing Memoizers
      • PS7 Comments
      • PS7 Responses
    • Problem Set 8 (Part 2): Typed Aazda
    • Problem Set 8: From Aazda to aaZda (Part 1)
      • PS8 Part 1 Comments
  • Syllabus
    • Course Pledge
  • Using These Materials

RSS BA Computer Science

RSS Jefferson’s Wheel

  • Dissecting Distribution Inference
  • Cray Distinguished Speaker: On Leaky Models and Unintended Inferences
  • Attribute Inference attacks are really Imputation
  • Congratulations, Dr. Jayaraman!

RSS Hacker News

  • Russhian Roulette: 1/6 chance of posting your SSH private key on pastebin
  • Diff Models – A New Way to Edit Code
  • Detect ChatGPT Generated Content
  • Kotlin Data Classes 101: Understanding Syntax, Usage and Inheritance
  • 30k lines of SwiftUI in production later

RSS Babbage

  • And it’s goodnight from us
  • Why 10, not 9, is better than 8
  • Future, imperfect and tense
  • The paperless dilemma
  • How to judge a ’bot; why it’s covered
cs1120 | RSS | Comments RSS | Book | Using These Materials | Login | Admin | Powered by Wordpress