Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Loop Invariants-Methods of Software Engineering-Lecture Slides, Slides of Software Engineering

This course includes software-- development process, process models, project planning, quality assurance, configuration management, process and project metrics, change, re-engineering, risk analysis and management and project management. This lecture includes: Loop, Invariants, Elements, Incremented, Weakest, Precondition, Condition, Termination, True

Typology: Slides

2011/2012

Uploaded on 08/06/2012

angarika
angarika 🇮🇳

4.4

(55)

102 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Loop Invariants-Methods of Software Engineering-Lecture Slides and more Slides Software Engineering in PDF only on Docsity! Loop Invariants s = 0; for i := 1 to n do s = s + a[i]; What is the ‘loop invariant’? s is the sum of elements from a[1] to a[i] immediately before i is incremented! docsity.com Weakest Precondition for While Statement {P} while B do S {Q} • Let W be while B do S • condition for termination of the loop P0  (not B) P1  B and wp(S,P0)  wp(S, not B) Pk  B and wp(S, Pk-1) • wp(W, true)  wp(W, not B)  (k: k  0: Pk) docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved