New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Programming Language Concepts

by: Tamia Bernhard

Programming Language Concepts 22C 111

Marketplace > University of Iowa > ComputerScienence > 22C 111 > Programming Language Concepts
Tamia Bernhard
GPA 3.87

Cesare Tinelli

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Cesare Tinelli
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 25 page Class Notes was uploaded by Tamia Bernhard on Friday October 23, 2015. The Class Notes belongs to 22C 111 at University of Iowa taught by Cesare Tinelli in Fall. Since its upload, it has received 63 views. For similar materials see /class/228044/22c-111-university-of-iowa in ComputerScienence at University of Iowa.


Reviews for Programming Language Concepts


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/23/15
22c1 1 1 Programming Language Concepts Fall 2008 Semantic Interpretation Copyright 200708 The McGraw Hill Company and Cesare TineIi These notes were originally developed by Allen Tucker Robert Noonan and modi ed by Cesare TineIi They are copyrighted materials and may not be used in other course settings outside of the University of Iowa in their current form or modi ed form without the express written permission of one of the copyright holders During this course students are prohibited from selling notes to or being paid for taking notes by any person or commercial rm without the express written permission of one of the copyright holders Contents 81 State Transformations and Partial Functions 82 Semantics of Clite 83 Semantics with Dynamic Typing 84 A Formal Treatment of Semantics t j i if ill Semantics of a PL De nes the meaning of a program Syntactically valid Static type checking valid Historical Problem Valid program had different meanings on different machines More than 6 g size of an int or oat Problem was lack of precision in de ning meaning Methods Compiler C on Machine M Ex F ortran on IBM 7097090 Ex PLI F on IBM 360 series Operational Semantics Ch 7 Axiomatic Semantics Ch 18 Denotational Semantics Ch 84 lt 3111sz 1911 I g 3111sz 2911 911313 lt l fgt lt Igt 991 zm suozzmol 440mm 129 f z 1U9UIUOJIAUH eldwexg Simple State Ignore environment Set of identi er value pairs EX lt1 13gt ltj 1gt Special value unde ned for each type 81 State Transformations Defn The denotational semantics of a language de nes the meanings of abstract language elements as a collection of statetransforming functions Defn A semantic domain is a set of values whose properties and operations are independently well understood and upon which the rules that de ne the semantics of a language can be based WilirliTUla 77 W 7 quot 22cm Meaningless Program for i 1 igt 1 i 1 Meaningless Expression Are all expressions meaningful CLite Semantics State a mapping from program variables to values A meaning function M is a mapping M Program gt State M Statement x State gt State M Expression x State gt Value CLite Semantics in OCaml type var 2 string type value of int B of bool module type StateSig Sig type state val empty state val update state gt var gt value gt state val getvalue state gt var gt value end Hquot 39 quotMEREIll Meaning Rule 81 The meaning of a Program is de ned to be the meaning of the body when given an initial state consisting of the variables of the decpart initialized to the undef value corresponding to the variable39s type let pmeaning decist statist smeaning Block statist Stateempty ill I Statements smeaning statement gt state gt state type statement Skip Block of statement list Assign of string expr X a Cond of expr statement statement if b 51 else 52 Loop of expr statement while b s Hi I Meaning Rule 82 Skip The meaning of a Skip is the identity function on the state that is the state is unchanged let rec smeaning sstatement qstate match 5 with Skip gtq Meaning Rule 83 Assignment The output state is computed from the input state by replacing the value of the target variable by the computed value of the source expression let rec smeaning sstatement qstate match 5 with Assign x e gt let v emeaning e q in Stateupdate q x v Meaning Rule 84 Conditional The meaning of a conditional is If the meaning of the test is true the meaning of the then branch Otherwise the meaning of the elsebranch Meaning Rule 84 Conditional Let rec smeaning sstatement qstate match 5 with ICond e 1 2 gt match emeaning e q with B true gt smeaning s q l l39rl l l Meaning Rule Loop let rec smeaning sstatement qstate match 5 with Loop e s gt match emeaning e q with B false gt q B true gt smeaning Block s 5 q gt failwith quotImpossible casequot Meaning Rule Block let rec smeaning sstatement qstate match 5 with Block gt q I Block s t gt let q smeaning s q in smeaning Block t q39 IT I Expression Semantics Defn A Side e ect occurs during the evaluation of an expression if in addition to returning a value the expression alters the state of the program Ignore for now Expressions emeaning expr gt state gt value type expr IntC of int BoolC of bool Var of var Unary of unaryOp expr Binary of binaryOp expr expr 77 ff lm l m 397 ain39t ifquot 323933 i Hi 1 Meaning Rule 87 The meaning of an expression in a state is a value de ned by I If a value then the value Ex 3 2 If a variable then the value of the variable in the state 3 If a Binary a Determine meaning of terml term2 in the state b Apply the operator according to rule 88 Meaning Rules Expressions let rec emeaning eexpr qstate match e with IntC n gt n BooIC b gt B b Var x gt Stategetvaue q x i l l39l l Meaning Rules Expressions let rec emeaning eexpr qstate match 5 with Binary op ei e2 gt let vi emeaning ei q in let v2 emeaning e2 q in bmeaning op vi v2


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Kyle Maynard Purdue

"When you're taking detailed notes and trying to help everyone else out in the class, it really helps you learn and understand the I made $280 on my first study guide!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.