# Register now to access 7 million high quality study materials (What's Course Hero?) Course Hero is the premier provider of high quality online educational resources. With millions of study documents, online tutors, digital flashcards and free courseware, Course Hero is helping students learn more efficiently and effectively. Whether you're interested in exploring new subjects or mastering key topics for your next exam, Course Hero has the tools you need to achieve your goals.

2 Pages

### hw6-example

Course: UI 181, Fall 2009
School: Iowa State
Rating:

Word Count: 411

#### Document Preview

181 CS Formal Methods in Software Engineering Example for Homework 6 \$Date: 2001/04/17 22:13:31 \$ Here's an example of the kind of solution we're asking for in homework 6 for the loop problems. It's based on Cohen's section 10.2 (thanks to Kevin Lillis for suggesting this). (Step 0) We calculate P /\ !B ==&gt; R as follows. Recall that P is P0 /\ P1. Assume !(n != #b), i.e., n == #b. P0...

Register Now

#### Unformatted Document Excerpt

Coursehero >> Iowa >> Iowa State >> UI 181

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.
181 CS Formal Methods in Software Engineering Example for Homework 6 \$Date: 2001/04/17 22:13:31 \$ Here's an example of the kind of solution we're asking for in homework 6 for the loop problems. It's based on Cohen's section 10.2 (thanks to Kevin Lillis for suggesting this). (Step 0) We calculate P /\ !B ==> R as follows. Recall that P is P0 /\ P1. Assume !(n != #b), i.e., n == #b. P0 /\ P1 <==> <def of P0 and P1> x == (\min i : 0 <= i /\ i < n : b.i) /\ 0 <= n /\ n <= #b <==> <predicate calculus> x == (\min i : 0 <= i /\ i < n : b.i) /\ 0 <= n /\ n <= #b <==> <assumption that n == #b> x == (\min i : 0 <= i /\ i < #b : b.i) /\ 0 <= #b /\ #b <= #b ==> <X /\ Y ==> X> x == (\min i : 0 <= i /\ i < #b : b.i) <==> <def of R> R (Step 1) We calculate S0 so that {Q} S0 {P} as folows. Assume (Q: #b >= 0). wp.(n,x := NV, XV).(P0 /\ P1) <==> <definition of assignment> (P0 /\ P1)(n,x := NV, XV) <==> <definition of P0 and P1> XV == (\min i : 0 <= i /\ i < NV : b.i) /\ 0 <= NV /\ NV <= #b <==> <choose NV := 0, since counting up, and to truthify 0 <= NV, etc.> XV == (\min i : 0 <= i /\ i < 0 : b.i) /\ 0 <= 0 /\ 0 <= #b <==> <arithmetic and definition of #b> XV == (\min i : 0 <= i /\ i < 0 : b.i) /\ true <==> <empty range rule for \min> XV +inf <==> == <choose XV := +inf> true so S0 is n,x := 0, +inf (Step 2) We calculate P /\ t <= 0 ==> !B as follows. P0 /\ P1 /\ t <= 0 <==> <definition of P1, and t> P0 /\ 0 <= n /\ n <= #b /\ (#b - n) <= 0 ==> <X /\ Y ==> Y> 0 <= n /\ n <= #b /\ (#b - n) <= 0 <==> <arithmetic> 0 <= n /\ n <= #b /\ #b <= n <==> <antisymmetry> 0 <= n /\ n == #b ==> <X /\ Y ==> Y> n == #b <==> <idempotence of negation> !(n != b) <==> <definition of B> !B (Step 3a) The calculation of S so that {P /\ B} S {P} is on pages 156-157. (Step 3b) We calculate {P /\ B /\ t == T} S {t < T} as follows. Assume P0 /\ P1 /\ n != #b /\ (#b -n) == T. wp.(n, x := n+1, x min b.n).(#b - n < T) <==> <definition of assignment>...

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 - UI - 181
CS 181 Formal Methods in Software Engineering Homework 5 \$Date: 2001/03/28 18:25:53 \$Due: Problems 1,3-6, Tuesday, March 27, 2001; Problem 9 Thursday, March 29, 2001.Readings: Chapters 8 and 9 of Cohen's Programming in the 1990s.The aim of this
Iowa State - UI - 181
Notes on Homework 3 by Gary T. Leavens \$Date: 2001/03/07 04:54:37 \$ Lemma: To prove equality of statements, it is necessary and sufficient to prove that they have the same Hoare triple annotations. That is, for all statements, S, T, (\forall P
Iowa State - UI - 181
CS 181 Formal Methods in Software Engineering Homework: 3 \$Date: 2001/02/27 18:03:35 \$Due: Problems 1-5, Tuesday, February 27, 2001; Problems 8-12, 14-15 Tuesday, March 6, 2001Readings: Chapters 4 and 5 of Cohen's Programming in the 1990s.The ai
Iowa State - UI - 181
CS 181 Formal Methods in Software Engineering Homework: 1 \$Date: 2001/02/01 20:08:26 \$Due: problems 1,2 on Tuesday, February 6, 2001; problems 3-5 on Thursday, February 8, 2001.Readings: E. Cohen. Programming in the 1990s. Springer-Verlag, 1990.
Iowa State - UI - 181
CS 181 Formal Methods in Software Engineering Homework 0 \$Date: 2001/01/15 18:10:42 \$Due: problems 1-4, Tuesday January 23, 2001; problem 5, January 30, 2001.Readings for this homework: - Michael G. Hinchey and Jonathan P. Bowen. Applications of
Iowa State - UI - 181
meeting -*- Outline -*-* not excluding miracles Ref: Wim Hesselink. Programs, Recursion and Unbounded Choice. Cambridge, 1992.* excluded miracle and excluded middle X \/ !X (excluded middle) wp.S.false = false (excluded miracle) Excluded middle r
Iowa State - UI - 181
meeting -*- Outline -*-* What Are Formal Methods? Three intersecting circles: mathematics, computing, engineering* main terms formal = unambiguous, rigorous =&gt; capable of automation specification = mathematical description of program behavior not ne
Iowa State - UI - 181
CS 181 Formal Methods in Software Engineering Study Problems for Exam 2 \$Date: 2001/03/29 23:21:49 \$Note: it's easy to come up with problems when I don't have to worryabout how hard they might be; if some of these seem too hard, skipthem and go o
Iowa State - UI - 181
PreSup =&gt; (PreSub =&gt; PostSub) =&gt; PostSup)&lt;=&gt; &lt;uncurrying&gt; PreSup /\ (PreSub =&gt; PostSub) =&gt; PostSup&lt;=&gt; &lt;symmetry&gt; (PreSub =&gt; PostSub) /\ PreSup =&gt; PostSup&lt;=&gt; &lt;currying&gt; (PreSub =&gt; PostSub) =&gt; (PreSup =&gt; PostSup)
Iowa State - UI - 181
meeting -*- Outline -*-* JML method specifications* preliminaries- ANNOTATIONSJML is an annotation language for JavaIn .java files,annotations start with /@ and end with a newline or start with /*@ and end with @*/ or start with /*+@ and end with
Penn State - IST - 220
IST 220 Sample Test 3 - Answer Name: _ 1. For each question (3 points), there are multiple choices, but only one is correct1.1) The IP address 191.192.193.194 belongs to class _ (a) A (b) B (c) C Answer: [b] 1.2) The job of a router is to store and forwa
Iowa State - UI - 181
meeting -*- Outline -*-* JML ADT specifications* background- ADTsabstract data type = data + operationsAbstract (public) view: model fields + method specsConcrete (private) view: fields + method codeConnection is made by (private) represents claus
Utah - ARCH - 6570
ARCH-6570 Historic Preservation TechnologyBuilding Systems: Lighting, Electrical, Mechanical
Utah - ARCH - 6570
ARCH-6570 Historic Preservation TechnologyWindowsCrown GlassCylinder or Muff GlassPlate Glass
Utah - ARCH - 6570
ARCH-6570 Historic Preservation TechnologyLog and TimberSingle-Pen Log Cabins and BuildingsDouble-Pen CabinsAttachedDog TrotLog HousesCrown ReplacementSection ReplacementStabilize and ProtectSplits and Checks can be repaired with fillerRepair,
Utah - ARCH - 6570
ARCH-6570 Historic Preservation TechnologyHistoric Construction Methods/ Structural SystemsStructural Systems Failure and Remediation
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 391
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 2000 Midterm #2Namepage 1 of 51.) A plant has the response, y(t), to a unit step, x(t) = u(t) as shown below.5 4 3 2x(t)1 0Planty(t)024681012Time (sec.)(15 pts) a) Estimate the system's time constant
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 1996 Midterm #2Namepage 1 of 4(A)1.) A plant has the response, y(t), to a unit step, x(t) = u(t) as shown below.3 2.5amplitude, y(t)2 1.5 1 0.5 0 0 10 20 30 40 50x(t)Planty(t)Time, t (sec)(15 pts) a) Esti
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 1992 Midterm #2Namepage 1 of 51.) Given a system with the response, c(t), to a unit step, u(t) shown in the graph below,4 3.5 3 Amplitude 2.5 2 1.5 1 0.5 0 0 0.2 0.4 0.6 0.8 Time (secs) 1 1.2 1.4(5pts)a) Find t
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 2000 Midterm #1Namepage 1 of 41. Given the non-linear differential equation for production line speed &amp; v = 200u + 10vu - 10v 2 v = v(t) is production line speed in meters/minute and where u = u(t) is the input dr
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Spring 1998 Midterm #1Namepage 1 of 4(5 pts)1. Given the non-linear differential equation for automobile velocity &amp; 1000v = 100 + v - 0.1v 2 v = v(t) is automobile velocity (m/sec) and where = (t) is the throttle angl
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 1995 Midterm #1Namepage 1 of 5(5 pts)1. Given the non-linear differential equation for cutter displacement x =1.5u2 -3.5 -3x - x2 where x = x(t) is the cutter displacement in meters and u = u(t) is the drive volt
Michigan State University - ME - 451
ME451: Control Theory (Radcliffe) Fall 1994 Midterm #1 1.For the vibratory system shown, (12 pts) a) Derive the differential equations needed to model the mechanical system response to force, f (t). Assume x1 and x2 are measured from the equilibrium posit
Michigan State University - ME - 391
EXERCISE 1.1 4. Second order; nonlinear because of cos(r + u) 8. Second order; nonlinear because of x 2 10. Writing the differential equation in the form u(dv/du) + (1 + u)v = ueu we see that it is linear in v. However, writing it in the form (v + uv - ue
Michigan State University - ME - 451
Name: _Lecture Section (Radcliffe or Ermer): _ME 451 - Spring 1994Midterm Examination #12/16/94Score: 1) _ 2) _ 3) _ 4) _ Total:_page 2 of 5 1. a. (15 pts) Derive the ordinary differential equation model of the following mechanical system (assume x1
Michigan State University - ME - 417
Fuel Cells: Introduction and Current StatusAndre Benard Department of Mechanical Engineering Michigan State University East Lansing, MI 48824Why all this excitement about fuel cells? Can have zero emissions Are highly efficient Can be used as long dura
UCSB - ECE - 218
Lab 3 project checkout sheet 145APerformance parameters Frequency Measurement data Spec Min NF @ 400 +/- 30 MHz &gt;12 dB @ min NF &lt; 2 dB &lt; -10 dB @ min NF No spurs No sidebands Meets specGain Noise Figure |S22| Wideband stability demo on spectrum analyzer
Georgia Tech - GROUPS - 2030
Mixed LogicIntroductionMixed logic is a gate-level design methodology used in industry. It allows a digital logic circuit designer to separate the functional description of the circuit from its physical implementation. For example, consider the function
FIU - MCB - 3020
2/25/2009Bacterial DiversityChapter 18Its a Rod ?, a Coccus ?, or a.Bumpy BacteriumVerrucomicrobium spinosum sugar utilizer in soil, water and the human gut.Changes in a babys gut microbiota12/25/2009A Little Review and Update on Peptidoglycanm-A
Cal Poly - MA - 2312
Polytechnic UniversityMA 2312 FINALPrint Name: Signature: ID #: Instructor/Section:June 23, 2003Directions: You have 90 minutes to answer the following questions. Unless otherwiseindicated, you MUST show all your work to receive credit. Please put a
Allan Hancock College - COM - 5195
IEEE Std 802.16TM-2004(Revision of IEEE Std 802.16-2001)IEEE Standards802.16TMIEEE Standard for Local and metropolitan area networksPart 16: Air Interface for Fixed Broadband Wireless Access SystemsIEEE Computer Societyand theIEEE Microwave Theory
Wright State - CHM - 211
BrCl CH3 CH 2CH CH2 CH3 O N 2 Cl C C Br CH 3 CH CHCH CH 31-butene 3-bromo-3-chlorocyclohexeneF F H CH 2(Z)-1-bromo-1-chloro-2-nitropropeneCHCHCH CH 23-fluoro-1,4-pentadiene5-fluoro-1,3-cyclopentadieneCN1-cyclobutyl-3-methyl-1-buteneC 2H 5 CH 3 C
University of Scranton - CMPS - 144
GraphsChapter 12Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph ADT and different implementations of the Graph ADT To learn the breadth-first and depth-first search traversal algorithms To
University of Scranton - CMPS - 144
TreesChapter 8Chapter Objectives To learn how to use a tree to represent a hierarchical organization of information To learn how to use recursion to process trees To understand the different ways of traversing a tree To understand the difference betwee
University of Scranton - CMPS - 144
Lists and the Collection InterfaceChapter 4Chapter Objectives To become familiar with the List interface To understand how to write an array-based implementation of the List interface To study the difference between single-, double-, and circular linke
University of Scranton - CMPS - 144
Program Correctness and EfficiencyChapter 2Chapter Objectives To understand the differences between the three categories of program errors To understand the effect of an uncaught exception and why you should catch exceptions To become familiar with the
ASU - MAT - 343
A Matlab Cheat-sheet (MIT 18.06, Fall 2007)Basics:save 'file.mat' save variables to file.mat load 'file.mat' load variables from file.mat diary on record input/output to file diary diary off stop recording whos list all variables currenly defined clear
University of Scranton - CMPS - 144
Introduction to Software DesignChapter 1Chapter Objectives To become familiar with the software challenge and the software life cycle To understand what activities take place in each phase of the software life cycle To learn how to use top-down design
Glasgow Caledonian University - ECE - 26
Altera Quartus II Tutorial(For ECE 465 Students at UIC)Waseem Ahmad TA for ECE 465 Department of Electrical and Computer Engineering University of Illinois at Chicago wahmad@ece.uic.edu Quartus II by Altera is a PLD Design Software which is suitable for
Wyoming - P - 1220
VP-218 04/04 April 2004INTRODUCTION TO ERROR THEORYSante R. Scuro Visual Physics Laboratory, Texas A&amp;M University, College Station, TX 77843ABSTRACT The measurement of a physical quantity can never be made with perfect accuracy, there will always be so
Lamar - COSC - 1172
1974. A C M T u r i n g A w a r d Lecture [The Tnring Award citation read by Bernard A. Galler, chairman of the 1974 &quot;ll'~lringAward Committee, on the presentation of this lecture on November 11 at the ACM Annual Conference in San Diego.] The A.M. Turing
Lake County - ISWS - 0903
MIDWEST TEMPERATURES RECORDS MARCH 1-10, 2009March 2, 2009Record Minimum Temperatures Location JACKSON WSO (KJKL) TAHQUAMENON FALLS SP BIG BAY 2 SE DETOUR VILLAGE MELROSE BROWNS VALLEY WORTHINGTON 2 NNE (KOTG) GALENA ST GERMAIN 2 E MADELINE IS State KY