Eric C.R. Hehner's A Practical Theory of Programming PDF

By Eric C.R. Hehner

ISBN-10: 0387941061

ISBN-13: 9780387941066

Figuring out programming and programming languages calls for wisdom of the underlying theoretical version. This publication explores elements of programming which are amenable to mathematical facts. the writer describes a programming concept that's a lot easier and extra entire than the present theories up to now. within the theoretical version, a specification is simply a boolean expression and refinement is simply a standard implication. the writer develops a pragmatic and extensive process for writing distinctive requirements and designing courses whose executions most likely fulfill the requirements. starting with preparatory fabric in good judgment, numbers, units, lists, services and family members, the ebook advances extra into software thought, the center of the e-book. next chapters could be chosen or passed over in response to path emphasis. The textual content should be valuable to scholars in classes on programming technique or verification on the complicated undergraduate or starting graduate point, in addition to for software program engineers within the box. All technical phrases are defined after which proven within the e-book anywhere attainable. No complicated mathematical wisdom or programming language is believed. The publication includes quite a few routines and worked-out strategies for particular routines. Transparency masters and ideas for the rest routines can be found from the writer.

Show description

Read Online or Download A Practical Theory of Programming PDF

Best children's ebooks books

Download e-book for kindle: Manga Math Mysteries 7: The Book Bandit: A Mystery with by Melinda Thielbar, Jennifer A. Lee, Candice Chow

The technology membership has created a massive "book bandit" sculpture within the public library. yet how did they get the sculpture in in the course of the tiny library window? The librarians supply a prize to whoever can determine the puzzle. the youngsters from Sifu Faiza's Kung Fu tuition understand they could win, however it will take all in their geometry abilities plus a few unforeseen cooperation to measurement up.

Download PDF by Susan Muaddi Darraj: Amy Tan (Asian Americans of Achievement)

In 1987, Amy Tan had already outfitted a winning occupation as a contract author for famous businesses and companies. although, notwithstanding her paintings used to be profitable, she nonetheless felt unhappy - till she attempted to jot down fiction. Tan learned that she had to exhibit the issues that mattered to her. years later, the enjoyment success membership hit bookstores, and Amy Tan, the daughter of immigrant mom and dad from China, turned a loved ones identify.

Download e-book for kindle: Virtual Reality Specialist by Kelly Milner Halls

Describes the necessities, schooling, and tasks linked to changing into a digital truth expert comprises profiles of sought after pioneers within the

Read e-book online Discovering the Arctic. The Story of John Rae PDF

Short-listed for the 2004 Canadian kid's publication Centre Norma Fleck Award and recommended for the 2004 top Books for children and teenagers gaining knowledge of the Arctic is an exhilarating recounting of the lifetime of a nineteenth century health practitioner and explorer who labored for the Hudson's Bay corporation and spread out gigantic tracts of land within the Canadian Arctic and will were the real discoverer of the Northwest Passage.

Extra resources for A Practical Theory of Programming

Example text

If A ⇐ B and C ⇐ D are theorems, then A∧C ⇐ B∧D is a theorem. When we add to our repertoire of programming operators in later chapters, the new operators must obey similar Refinement by Steps and Refinement by Parts laws. Our final refinement law is Refinement by Cases P ⇐ if b then Q else R is a theorem if and only if P ⇐ b ∧ Q and P ⇐ ¬b ∧ R are theorems. 1 List Summation As an example of program development, let us do Exercise 142: write a program to find the sum of a list of numbers. Let L be the list of numbers, and let s be a number variable whose final value will be the sum of the items in L .

Suppose there are two state variables x and y each with domain int . Then x′ = x+1 ∧ y′ = y specifies the behavior of a computer that increases the value of x by 1 and leaves y unchanged. Let us check that it is implementable. We replace ∀σ by either ∀x, y or ∀y, x and we replace ∃σ′ by either ∃x′, y′ or ∃y′, x′ ; according to the Commutative Laws, the order does not matter. We find One-Point Law twice ∀x, y· ∃x′, y′· x′ = x+1 ∧ y′ = y = ∀x, y· T Identity Law twice = T The specification is implementable.

Y:= 7 You can reduce the number of refinements by applying the Stepwise Refinement Law. A ⇐ if x=0 then (y:= 1. x:= 3) else (x:= x–1. y:= 7. A. y:= 2×y. x:= 5) You can translate this into a programming language that is available on a computer near you. For example, in C it becomes int x, y; void A (void) {if (x==0) {y = 1; x = 3;} else {x = x–1; y = 7; A ( ); y = 2*y; x = 5;}} You can then test it on a variety of x values. For example, execution of x = 5; A ( ); printf ("%i", y); will print 32 .

Download PDF sample

A Practical Theory of Programming by Eric C.R. Hehner

by Anthony

Rated 4.62 of 5 – based on 48 votes