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

By Eric C.R. Hehner

There are numerous theories of programming. the 1st usable thought, referred to as ''Hoare's Logic'', continues to be essentially the most well known. In it, a specification is a couple of predicates: a precondition and postcondition (these and all technical phrases may be outlined in due course). one other renowned and heavily comparable concept through Dijkstra makes use of the weakest precondition predicate transformer, that is a functionality from courses and postconditions to preconditions. lones's Vienna improvement strategy has been used to virtue in a few industries; in it, a specification is a couple of predicates (as in Hoare's Logic), however the moment predicate is a relation. Temporal good judgment is another formalism that introduces a few distinct operators and quantifiers to explain a few points of computation. the idea during this ebook is less complicated than any of these simply pointed out. In it, a specification is simply a boolean expression. Refinement is simply traditional implication. This idea is usually extra normal than these simply pointed out, utilizing to either terminating and nonterminating computation, to either sequential and parallel computation, to either stand-alone and interactive computation. And it comprises time bounds, either for set of rules class and for tightly limited real-time purposes

**Read or Download A Practical Theory of Programming PDF**

**Best programming languages books**

**TCP/IP Tutorial and Technical Overview**

The TCP/IP protocol suite has turn into the de facto regular for desktop communications in modern networked international. the ever present implementation of a particular networking typical has ended in a massive dependence at the functions enabled via it. this day, we use the TCP/IP protocols and the net not just for leisure and data, yet to behavior our enterprise by way of appearing transactions, trading items, and offering companies to consumers.

**Sams teach yourself Cobol in 24 hours**

Sams educate your self COBOL in 24 Hours teaches the fundamentals of COBOL programming in 24 step by step classes. every one lesson builds at the past one offering an effective starting place in COBOL programming suggestions and strategies. Coupled with the resource code and the compiler to be had from Fujitsu, this hands-on consultant is the best, quickest method to start growing ordinary COBOL compliant code.

CMMI® for improvement (CMMI-DEV) describes most sensible practices for the advance and upkeep of goods and prone throughout their lifecycle. through integrating crucial our bodies of data, CMMI-DEV offers a unmarried, accomplished framework for firms to evaluate their improvement and upkeep procedures and enhance functionality.

- Lazy Functional Languages: Abstract Interpretation and Compilation
- Developing Real World Software
- Advanced algorithms
- Ruby: Visual QuickStart Guide
- C++ Programming: Program Design Including Data Structures (6th Edition)
- Software engineering for students : a programming approach

**Extra resources for A Practical Theory of Programming**

**Example text**

The next refinement makes y′=2x in two steps: first y′=2x–1 and then double y . The antecedent x>0 ensures that 2x–1 will be natural. The last two refinements again contain superfluous assignments. Without the theory of programming, we would be very worried that these superfluous assignments might in some way make the result wrong. With the theory, we only need to prove these six refinements, and we are confident that execution will not give us a wrong answer. 4 Program Theory 46 This solution has been constructed to make it difficult to follow the execution.

The limit of the function (limit of the sequence) is expressed as LIM f . 718281828459 . We define the LIM quantifier by the following Limit Axiom: (MAX m· MIN n· f(m+n)) ≤ (LIM f) ≤ (MIN m· MAX n· f(m+n)) 33 3 Function Theory with all domains being nat . This axiom gives a lower bound and an upper bound for LIM f . When those bounds are equal, the Limit Axiom tells us LIM f exactly. For example, LIM n· 1/(n+1) = 0 For some functions, the Limit Axiom tells us a little less. For example, –1 ≤ (LIM n→(–1)n) ≤ 1 In general, (MIN f) ≤ (LIM f) ≤ (MAX f) For monotonic (nondecreasing) f , LIM f = MAX f .

If y>1 then x:= 2 else x:=y (k) x:= 1. x′>x. x′ = x+1 We can use the Substitution Law on the first two pieces of this dependent composition to obtain = x′>1. x′ = x+1 Now we have to use the axiom for dependent composition to get a further simplification. = ∃x′′, y′′· x′′>1 ∧ x′ = x′′+1 = x′>2 The error we avoided in the first step is to replace x with 1 in the last part of the composition x′ = x+1 . 2 Refinement Two specifications P and Q are equal if and only if each is satisfied whenever the other is.