Download presentation
Presentation is loading. Please wait.
Published byClinton Evans Modified over 9 years ago
1
1
2
Software Crisis Describe the impact of rapid increases in computer power and the complexity of the problems that could be tackled. it refers to the Difficulty of writing correct, understandable, and verifiable computer programs. The roots of the software crisis are complexity, expectations, and change. 2
3
Software Crisis….. Software crisis is characterized by inability to develop the desired Software Project because of such problems: Projects running over-budget. Projects running over-time. Software is inefficient. Software is of low quality. Software does not meet requirements. Project is unmanageable/ Code difficult to maintain. 3
4
Software development Phases 4
5
What is a project? Some dictionary definitions: “A specific plan or design” “A planned undertaking” “A large undertaking e.g. a public works scheme” Longmans dictionary Key points above are planning and size of task 5
6
Jobs versus projects ‘Jobs’ – repetition of very well-defined and well understood tasks with very little uncertainty ‘Exploration’ – e.g. finding a cure for cancer: the outcome is very uncertain ‘Projects’ – in the middle! 6
7
Characteristics of projects A task is more ‘project-like’ if it is: Non-routine Planned Aiming at a specific target Work carried out for a customer Involving several specialisms Made up of several different phases Constrained by time and resources Large and/or complex 7
8
Are software projects really different from other projects? Not really! …but… Invisibility Complexity Conformity Flexibility make software more problematic to build than other engineered artefacts. 8
9
What is management? This involves the following activities: Planning – deciding what is to be done Organizing – making arrangements Staffing – selecting the right people for the job Directing – giving instructions continued… 9
10
What is management? (continued) Monitoring – checking on progress Controlling – taking action to remedy hold-ups Innovating – coming up with solutions when problems emerge Representing – liaising with clients, users, developers and other stakeholders 10
11
Setting objectives Answering the question ‘What do we have to do to have a success?’ Need for a project authority Sets the project scope Allocates/approves costs Could be one person - or a group Project Board Project Management Board Steering committee 11
12
Objectives Informally, the objective of a project can be defined by completing the statement: The project will be regarded as a success if……………………………….. Rather like post-conditions for the project Focus on what will be put in place, rather than how activities will be carried out 12
13
Objectives should be SMART S – specific, that is, concrete and well-defined M – measurable, that is, satisfaction of the objective can be objectively judged A – achievable, that is, it is within the power of the individual or group concerned to meet the target R – relevant, the objective must relevant to the true purpose of the project T – time constrained: there is defined point in time by which the objective should be achieved 13
14
Goals/sub-objectives These are steps along the way to achieving the objective. Informally, these can be defined by completing the sentence… Objective X will be achieved IF the following goals are all achieved A…………… B…………… C…………… etc 14
15
Goals/sub-objectives continued Often a goal can be allocated to an individual. Individual may have the capability of achieving goal, but not the objective on their own e.g. Objective – user satisfaction with software product Analyst goal – accurate requirements Developer goal – software that is reliable 15
16
Measures of effectiveness How do we know that the goal or objective has been achieved? By a practical test, that can be objectively assessed. e.g. for user satisfaction with software product: Repeat business – they buy further products from us Number of complaints – if low etc etc 16
17
Project Planning 17
18
Planning Project Planning is an aspect of Project Management that focuses a lot on Project Integration. The project plan reflects the current status of all project activities and is used to monitor and control the project. The Project Planning tasks ensure that various elements of the Project are coordinated and therefore guide the project execution. Project Planning helps in - Facilitating communication - Monitoring/measuring the project progress, and - Provides overall documentation of assumptions/planning decisions The Project Planning Phases can be broadly classified as follows: - Development of the Project Plan - Execution of the Project Plan - Change Control and Corrective Actions Project Planning is an ongoing effort throughout the Project Lifecycle. 18
19
Why is it important? “If you fail to plan, you plan to fail.” Project planning is crucial to the success of the Project. Careful planning right from the beginning of the project can help to avoid costly mistakes. It provides an assurance that the project execution will accomplish its goals on schedule and within budget. 19
20
Major issues of Software Project Management 1. Requirements Managements 2. Resource management 3. Risk Management 4. Critical Path Management 5. Progress Management 6. Progress Management 7. Quality Management 8. Matrix Management 20
21
Requirements Managements Goal: features, functions Failure Points: Incomplete and/or ambiguious requirements Impact 21
22
Formal Methods Every Software engineering methodology is based on a recommended development process proceeding through several phases: Analysis,Specification,Design,Coding,Unit Testing, Integration and System Testing, Maintenance n Formal methods can: Be a foundation for describing complex systems Be a foundation for reasoning about systems Provide support for program development Complimentary approach to methodology! 22
23
Testing: Static vs Dynamic Analysis Static analysis of code Does not require execution of code Lexical analysis of the program syntax and investigates and checks the structure and usage of individual statements; often automated Dynamic Analysis of code Involves running the system (testing) Program run formally under controlled conditions with specific results expected Path and Branch Testing 23
24
What are Formal Methods? Techniques and tools based on mathematics and formal logic Can assume various forms and levels of rigor 24
25
Why Consider Formal Methods? Systems are increasingly dependent on software components Complexity of systems with embedded software has increased rapidly Maintaining reliability in software-intensive systems is very difficult 25
26
Formal Methods Concepts Formal Specification Methods Formal Specifications Formal Proofs Model Checking Abstraction 26
27
Formal Specifications Translation of a non-mathematical description (diagrams, tables, English text) into a formal specification language Concise description of high-level behavior and properties of a system Well-defined language semantics support formal deduction about specification 27
28
Types of Specifications I Informal Free form, natural language Ambiguity and lack of organization can lead to incompleteness, inconsistency, and misunderstandings Formatted Standardized Syntax Basic consistency and completeness checks Imprecise semantics implies other sources of error may still be present 28
29
Formal Specifications… Formal Syntax and semantics rigorously defined Precise form, perhaps mathematical Eliminate imprecision and ambiguity Provide basis for mathematically verifying equivalence between specification and implementation May be hard to read without training 29
30
Formal Specifications Goal: Describe external behavior without describing or constraining implementation Formal Method has 2 parts: Logical Theory: Means by which one reasons about specifications, properties and programs First order predicate calculus (quantification over variables) Second order predicate calculus (quantification over relations) Temporal logic Structuring Theory: Defines elements being reasoned about 30
31
Types of Formal Specifications Property Oriented: State desired properties in a purely declarative way Algebraic: Data type viewed as an algebra, axioms state properties of data type’s operations Axiomatic: Uses first order predicate logic, pre and post conditions Operational Specification: Describe desired behavior by providing model of system Model Oriented: Provide direct way of describing system behavior (sets, sequences, tuples, maps) : Abstract Model (in terms previously defined mathematical objects eg. sets, sequences, functions, mappings) State machines 31
32
Property Oriented: Algebraic Specifications Uses Input-Output Assertions Sets of operations Axioms specifying behaviour of operations Two parts to a specification syntax axioms 32
33
Model Oriented: Abstract Model Specifications Build an abstract model of required software behaviour using mathematically defined types (sets, relations) Define operations by showing effects of that operation on the model Specification includes: Model Type Invariant properties of model For each operation Name, parameters, return values 33
34
Formal Proofs Complete and convincing argument for validity of some property of the system description Constructed as a series of steps, each of which is justified from a small set of rules Eliminates ambiguity and subjectivity inherent when drawing informal conclusions May be manual but usually constructed with automated assistance 34
35
Model Checking Operational rather than analytic State machine model of a system is expressed in a suitable language Model checker determines if the given finite state machine model satisfies requirements expressed as formulas in a given logic Basic method is to explore all reachable paths in a computational tree derived from the state machine model 35
36
Abstraction Simplify and ignore irrelevant details Focus on and generalize important central properties and characteristics Avoid premature commitment to design and implementation choices 36
37
Benefits of Formal Specifications Higher level of rigor enables a better understanding of the problem Defects are uncovered that would likely go unnoticed with traditional specification methods Identify defects earlier in life cycle Can guarantee the absence of certain defects Formal specification language semantics allow checks for self- consistency of a problem specification Formal specifications enable formal proofs which can establish fundamental system properties and invariants Repeatable analysis means reasoning and conclusions can be checked by colleagues Abstract formal view helps separate specification from design 37
38
Conclusion FM are no panacea FM can detect defects earlier in life cycle FM can be applied at various levels of resource investment FM can be integrated within existing project process models FM can improve quality assurance when applied judiciously to appropriate projects 38
39
39
40
Logic A propositional calculus or logic ( also called sentential calculus or sentential logic ) is a formal system in which formulas of a formal language may be interpreted as representing propositions. The term proposition refers to either the "content" or "meaning" of a meaningful declarative sentence or the pattern of symbols, marks. You will be familiar with the following notions. IF p THEN q TRUE, FALSE For all, There exists 40
41
Logic consists of A language which tells us how to build up sentences in the language (i.e., syntax), and and what the sentences mean (i.e., semantics) An inference procedure which tells us which sentences are valid inferences from other sentences 41
42
Propositional logic The symbols of propositional calculus are the propositional symbols: P, Q, R, S, … the truth symbols: true, false and connectives: , , , , 42
43
Propositional Calculus Sentences Every propositional symbol and truth symbol is a sentence. Examples: true, P, Q, R. The negation of a sentence is a sentence. Examples: P, false. The conjunction, or and, of two sentences is a sentence. Example: P P 43
44
Propositional calculus semantics An interpretation of a set of propositions is the assignment of a truth value, either T or F to each propositional symbol. The symbol true is always assigned T, and the symbol false is assigned F. The truth assignment of negation, P, where P is any propositional symbol, if F is the assignment to P is T, and if T is the assignment to P is F. The truth assignment of conjunction, , is T only when both conjuncts have truth value T; otherwise it is F. 44
45
Propositional calculus semantics (cont’d) The truth assignment of disjunction, , is F only when both disjuncts have truth value F; otherwise it is T. The truth assignment of implication, , is F only when the premise or symbol before the implication is T and the truth value of the consequent or symbol after the implication F; otherwise it is T. The truth assignment of equivalence, , is T only when both expressions have the same truth assignment for all possible interpretations; otherwise it is F. 45
46
For propositional expressions P, Q, R 46
47
Fig. 2.1: Truth table for the operator 47
48
Predicate calculus symbols The set of letters (both uppercase and lowercase): A … Z, a … Z. The set of digits: 0 … 9 The underscore: _ Needs to start with a letter. 48
49
Symbols and terms 1. Truth symbols true and false (these are reserved symbols) 2. Constant symbols are symbol expressions having the first character lowercase. E.g., today, fisher 3. Variable symbols are symbol expressions beginning with an uppercase character. E.g., X, Y, Z, Building 4. Function symbols are symbol expressions having the first character lowercase. Arity: number of elements in the domain E.g., mother-of (bill); maximum-of (7,8) 49
50
Predicates and atomic sentences Predicate symbols are symbols beginning with a lowercase letter. Predicates are special functions with true/false as the range. Arity: number of arguments An atomic sentence is a predicate constant of arity n, followed by n terms, t 1,t 2,…, t n, enclosed in parentheses and separated by commas. The truth values, true and false, are also atomic sentences. 50
51
Predicate calculus sentences Every atomic sentence is a sentence. 1. If s is a sentence, then so is its negation, s. If s 1 and s 2 are sentences, then so is their 2. Conjunction, s 1 s 2. 3. Disjunction, s 1 s 2. 4. Implication, s 1 s 2. 5. Equivalence, s 1 s 2. 51
52
Predicate calculus sentences (cont’d) If X is a variable and s is a sentence, then so are 6. X s. 7. X s. 52
53
Can also use functions A person’s mother is that person’s parent. X person (X) parent(mother-of(X),X) There are people who think this class is cool. X person (X) T (X) Some computers have mouses connected on the USB. X computer (X) USB_conn (X, mouse_of(X)) 53
54
First-order predicate calculus First-order predicate calculus allows quantified variables to refer to objects in the domain of discourse and not to predicates or functions. John likes to eat everything. X food(X) likes (john,X) John likes at least one dish Jane likes. F food(F) likes (jane, F) likes (john, F) John “does” everything Jane does. P P(Jane) P(john) This is not first-order. 54
55
Order of quantifiers matters Everybody likes some food. There is a food that everyone likes. Whenever someone likes at least one spicy dish, they’re happy. 55
56
Order of quantifiers matters Everybody likes some food. X F food(F) likes (X,F) There is a food that everyone likes. F X food(F) likes (X,F) Whenever someone eats a spicy dish, they’re happy. X F food(F) spicy(F) eats (X,F) happy(X) 56
57
Examples John’s meals are spicy. Every city has a dogcatcher who has been bitten by every dog in town. For every set x, there is a set y, such that the cardinality of y is greater than the cardinality of x. 57
58
Examples John’s meals are spicy. X meal-of(John,X) spicy(X) Every city has a dogcatcher who has been bitten by every dog in town. T C D city(C) ( dogcatcher(C,T) (dog(D) lives-in (D, T) bit (D, C)) ) 58
59
Second Order Predicate calculus second-order logic is an extension of first-order logic, Second- order logic is in turn extended by higher-order logic and type theory. First-order logic uses only variables that range over individuals (elements of the domain of discourse); second-order logic has these variables as well as additional variables that range over sets of individuals. For example, the second-order sentence P x (x є P V x € P)says that for every set P of individuals and every individual x, either x is in P or it is not. Both first-order and second-order logic use the idea of a domain of discourse (often called simply the "domain" or the "universe"). The domain is a set of individual elements which can be quantified over. 59
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.