Runtime Verification of Computer Programs and its Application in Programming Education

Size: px
Start display at page:

Download "Runtime Verification of Computer Programs and its Application in Programming Education"

Transcription

1 Runtime Verification of Computer Programs its Application in Programming Education Magdalina V. Todorova, Petar R. Armyanov Abstract The paper presents a technique for runtime program verification its application in computer programming education. This approach is experimentally introduced in computer science curricula at Faculty of Mathematics Informatics, Sofia University "St. Kliment Ohridski". Runtime verification combines formal verification methods with program execution. The proposed formal verification method is based on axiomatic semantics, enriched with techniques such as design by contract class invariant. Specification of pre- postconditions, the invariants, the loop termination functions are implemented by assertions. The presented approach is illustrated by examples for runtime verification for both traditional procedural programs, object-oriented programs in C++ programming language. Index Terms computer science education, formal verification, runtime, software design, software engineering A I. INTRODUCTION mongst the most important requirements for qualities of a programming system are: correctness, security, stability, efficiency in usage of time memory, adaptability, portability. For a system to be correct, it needs to correspond to its initial purpose. The latter is often ensured by tests visual analysis. The testing of a programming system consists of analysis of its processing a given set of input data. Practice shows that each of the different stages of a testing provides less than 50% of the found errors [1]. In a study [2], which is widely cited as classical, Myers asked a group of experienced programmers to test a program, which contained 15 known errors. The average number of found errors was 5, the best programmer found only 9 errors. Thus, testing might help to find some errors, but throughout as it may be, it never guaranties the absence of errors. In various programming systems, the evidence of even minor errors is strongly prohibited. For example, an error occurring in systems such as: space apparatuses, systems for managing nuclear powerstations, systems for managing secret data bases, systems for electronic trade, others, may lead to economic losses or loss of human lives. Systems like these, where the cost of any error is very high, motivate using a principally different method from testing on the programs. Such a method is the formal verification. Formal verification of a program in respect to an input/output specification means proving that the program is partially correct according the input/output specification, that it completes its execution in respect to the input specification. It is also said that the program has total correctness according to the input/output specification. T he program is partly correct in respect to input/output specification when the program execution starts with input data, satisfies given preconditions terminates with the output specification correct. T here are many ways of performing verification. For educational purposes in the field of programming, a method combining elements of formal verification program execution has been applied on the courses Introduction in Programming, Object-Oriented Programming Data Structures for students of Informatics in Sofia University. The method is based on associating certain statements with the program (or with parts of it), which must be valid through execution. This approach is often preferred to pure formal methods of verification, which are expensive difficult to implement. II. DESCRIPTION OF THE APPROACH The approach integrates axiomatic semantic with the techniques of design by contract invariant of class. It focuses on the change of variables values during the program execution, so it can be considered as a dynamic approach. A non-formal description of this approach suitable for educational purposes is given in [3]. The inclusion of preconditions postconditions, as well as invariants (for cycles classes) loop termination functions is done through assertions. The syntax of the latter is in accordance with the programming language C++, which the students' courses are based on. A. Axiomatic semantics There are two ways of defining axiomatic semantic defined by Robert Floyd C.A.R. Hoare. For this research we use Hoare s [4] definitions transforming predicates defined by D. Gries [5]. The axiomatic semantics of a program is most often connected with the proof that the program is total correct (or only correct) when a plain static analysis of its text is performed. It is based on a condition, called a predicate, describing the program state (programming fragment or operator) in a moment of its execution. An axiomatic specification is connected with a program S: {PRE S {POST, called also Hoare's triple. Here PRE POST are predicates describing respectively the precondition GSTF

2 GSTF Journal of Mathematics, Statistics Operations Research (JMSOR) TABLE Vol.1 I No.1 AXIOMATIC SEMANTICS postcondition connected with S. A precondition is a predicate, which describes the conditions to be fulfilled at the moment before the execution of the program (the programming fragment or the operator). The postcondition is a predicate describing the calculation process in the end of the program execution. The pair <PRE, POST> is called input/output specification (or simply specification) of S. The semantics of a Hoare's triple gives the total correctness of the program (programming fragment) S with respect to the particular specification. In general, for a given program S a postcondition POST, there are numerous preconditions PRE, for which it is true that {PRE S {POST. There is one precondition, however, that is the most general or weakest assertion which satisfies {PRE S {POST. This is called the weakest precondition of the program (program fragment or statement) S the postcondition POST. It is written Wp(S, POST), where Wp is a function, called also a predicate transformer. Using these definitions, we have the property: {PRE S {POST if only if Wp(S, POST) where => means implication. The following subset of C++ statements is used for the purposes of runtime verification training: empty statement, assignment statement, compound statement (block), conditional statement loop statement. The rules for finding the transforming predicates of the statements above are given in [5]. The corollary rules defining the axiomatic semantics are described in Table I. Example: Prove the correctness of the Hoare's triple {n > 0 int S = 0; int i = 1; while (i <= n) { S = S + i; i = i + 1; {S == n*(n+1)/2 Note: The brackets of while are bold in order to differ from the brackets of the Hoare's triple. This program fragment calculates the sum n, for a positive integer n. We chose the following loop invariant I loop termination function t for the while loop statement: I: S == (i-1)*i/2 && 1 <= i && i <= n+1 t: n+1-i We will use the statement if {P S1 {Q {Q S2 {R then {P S1; S2 {R will prove: {n > 0 POST Premise Conclusion Wp(empty_statement, POST) domain(e) POST(x e) Wp(x = e, POST) Wp(S1,Wp(S2;...;Sn, POST)) domain(b) AND PRE B => Wp(S1, POST) AND PRE B => Wp(S2, POST) I AND I B => POST AND I B => Wp(Stat, I) AND I B t > 0 AND I B => Wp(t_old = t; Stat, t < t_old) Wp({S1; S2;...; Sn, POST) Wp(if (B) S1; else S2, POST) Wp(while (B) Stat, POST), where I is the loop invariant, t the loop termination function int S = 0; int i = 1; {S == (i-1)*i/2 && 1 <= i && i <= n+1 {S == (i-1)*i/2 && 1 <= i && i <= n+1 while (i <= n) { S = S + i; i = i + 1; {S == n*(n+1)/2 The correctness of the first triple follows from trueness of the implication: n>0 => Wp(S = 0; i =1, S == (i-1)*i/2 && 1 <= i && i <= n+1) which is equivalent to (n>0) => (0 = 0 && 1 <= 1 && 1 <= n+1) In order to prove the correctness of the second triple, we have to prove the axioms for the while statement (Table I): S == (i-1)*i/2 && 1 <= i && i <= n+1&&!(i <= n) => S == n*(n+1)/2 S == (i-1)*i/2 && 1 <= i && i <= n+1&& (i <= n) => Wp(S=S+i; i=i+1, S==(i-1)*i/2&& 1<=i && i<=n+1) S == (i-1)*i/2 && 1 <= i && i <= n+1&& (i <= n) => n+1-i > 0 last S == (i-1)*i/2 && 1 <= i && i <= n+1&& (i <= n) => Wp(t_old = n+1-i; S = S + i; i = i+1, n+1-i < t_old) GSTF

3 In above implications the C++ operators &&! are used instead of logical operators The first implication is true, because from i <= n+1 &&!(i<=n) follows that i == n+1. As we have Wp(S=S+i; i=i+1, S==(i-1)*i/2 && 1<=i && i<=n+1) = S + i == i*(i+1)/2 && 1 <= i+1 && i+1 <= n+1 S == (i-1)*i/2, we prove the correctness of the second implication by using simple transformations. The third implication is true because from i <= n we have that i < n+1, so n+1-i > 0. And the last implication follows from Wp(t_old = n+1-i; S = S + i; i = i+1, n+1-i < t_old) = n+1-i-1 < n+1-i Thus we prove the total correctness of the program fragment. B. Design by contract Designing by contract is a technique for identifying interface errors in programs. B. Meyer presents it through numerous publications, connected with the design of objectoriented programs [6]. The idea in the case of two functions is as follows: the calling function is a client which requests for some service, the called function is a provider, who has to deal with the service under certain conditions. While using the service, the client must comply with given rules, the provider takes a particular amount of responsibility. Therefore, a contract is formed, which defines the obligations the rights, Table II. In its simplest outlook, the contract consists of a system of preconditions postconditions. The idea of designing by contract in the case of object-oriented programming is analogical. The objects methods of a class are most often used by the methods of other classes. The recent classes are called clients. Rules (contracts) have to be defined between Client Provider Obligations To fulfill the precondition To fulfill the postcondition TABLE II CONTRACTS Rights To have the requested result To receive input data, which comply with the precondition each class its clients. According to these rules, the client has to provide correct input data the class-provider has to find give back the requested result [6]. The client has to guarantee that certain preconditions will be true before the execution of the methods. In turn, the class-provider guarantees that certain postconditions will be fulfilled after the methods execution. The realization of designing by contract in C++ can be achieved by macro assert, by using exceptions or by combining both techniques. Although combining rules exceptions is the preferred technique [7], we use assertions for training purposes. Assertions are one of the most useful techniques for finding errors in a code. In addition, they provide information for the error location. The macro assert(<predicate>) in the language C++, performs the following actions: if <predicate> is true, the execution of the program continues. Else, the execution of the program ends with an error message, which includes its exact location in the code (file name line number), as well as the text of the predicate, that was not true. In addition, assertions are often eliminated from the program release builds, so not to affect the total performance of the application. C. Invariant of a class Each object in a class possesses multiple properties, which connect it with the class. These properties are defined by a predicate, called invariant of the class. The invariant must be true after the execution of each constructor, before after the execution of each method in the class. Let PRE i POST i are the precondition postcondition of the i-th constructor C i or the i-th method M i of a class; the invariant of the class, which these methods belong to, is Class_invariant. The class is correct for the respective predicates if: - for each constructor C i it is true that {PRE i C i {POST i Class_invariant - for each method M i it is true that {PRE i Class_invariant M i {POST i Class_invariant For example, a class, representing a fraction storing integers for a numerator denominator, can have a class invariant that enforces the denominator to be different from 0. We can use additional class invariant that requires the numerator denominator of the fraction to be mutually prime integers. III. METHODOLOGY OF VERIFICATION DURING EXECUTION The runtime verification consists of the following steps: - realizing the program (imperative or object-oriented); - building a formal specification for the program; - connecting the program with the formal specification, using an assert statement, which often uses preprocessor directives for the predicates; - executing the program according to the formal specification. The formal specification of the program is given in a language which is a subset of the first-order predicate calculus according to the syntax of the programming language used. Macro assert is chosen in order to add rules. This choice is made because assertions are among the most useful automatic GSTF

4 techniques for error identification, as well as for giving information about the error. A. Runtime verification of non-recursive functions In the approach we use, certain predicates are attached to every function we want to verify. They represent the preconditions postconditions of the functions, as well as a loop invariant loop termination function for each loop in the function body. Verification in respect to that specification means: to prove correctness of these attached predicates for the current values of the function arguments on each iteration of the loop execution. Example: For a function Sum that calculates the sum of the integer numbers between 1 n (defined below) the predicates: PRE: n>0 POST: S == n*(n+1)/2 we have to execute the function in addition to executing the assertions that hold the correctness of the predicates. #define PRE (n>0) #define POST (S == n*(n+1)/2) #define I (S==(i-1)*i/2 && 1<=i \ && i<=n+1) #define B (i <= n) int Sum(int n) { assert(pre); int S = 0; int i = 1; assert (I); while(i <= n) { int t_old = n+1-i; S = S + i; i = i + 1; int t = n+1-i; assert(i); assert(!b!i (t>0 && t<t_old)); assert(post); return S; int main() { for(int i = 1; i <= 10; i++) cout << Sum(i) << endl; return 0; The assertion of invariant I at certain positions in the code corresponds to the requirement that predicate I holds before after the execution of each iteration of the while loop statement. The statement assert(!b!i (t > 0 && t < t_old)); which corresponds to the implication B I => (t > 0) Wp(t_old = t; S = S+i; i = i+1, t < t_old), (where t: n+1-i) asserts that while the loop statement is executed, the value of the loop termination function t decreases. This value is integer positive, so the body of the loop will be executed finite number of times. In this case, the assertion of I is not necessary, but it is left for completeness. The statement assert(post) at the end of the fragment is used to prove the trueness of the predicate I B => POST The main function can be seen as a client of the service, provided by the Sum function. This service is provided according to a contract where both parties have rights obligations, shown in the Table III. Client main Provider Sum TABLE III EXAMPLE FOR CONTRACTS Obligations To satisfy the precondition: n > 0 To satisfy the postcondition: S == n*(n+1)/2 Rights To receive the requested result sum of the number 1 to n To receive an input that satisfies condition n > 0 n is integer. In the example this is a number from 1 to 10. More about the methodology other examples of a runtime verification of functions are given in [3]. B. Runtime verification of classes The invariant is defined for a class for each of its methods precondition postcondition. For each class constructor only the postcondition must hold at the end of its body. A loop invariant a loop termination function are connected to each loop statement in the body of a class method. In case some methods in the class refer to other methods in the same class, contracts are designed. The predicates are defined by the C++ language syntax are embedded in the code by macro assert. The following class, realized with the C++ language, defines an abstract data type queue. The queue is represented as a non-cyclic by means of a sequence of no more than MaxQue integer numbers a front, a front+1,, a rear-1, where front rear are pointers to the first element after the last element of the queue. In case front == rear, the queue is empty, if rear == MaxQue, the queue is full. A good choice of an invariant of the class is 0 <= front && front <= MaxQue && 0 <= rear && rear <= MaxQue && front <= rear It defines the existence of the queue. Each method of the class GSTF

5 is connected to a precondition a postcondition. Invariants loop terminating functions for cycles are not defined, because the methods of the class do not contain loop statements. In order to verify a class, we need to build the specification the class invariant into each method of the class. The class invariant must be true after each execution of the constructor, before after each execution of the other methods of the class. The following code is a sample implementation of the class queue with a check for its total correctness. The rule front <= rear in some of the preconditions is omitted, because the invariant of the class contains it. const int MaxQue = 5; #define class_inv (0 <= front && \ front <= MaxQue&& \ 0 <= rear && \ rear <= MaxQue&& \ front <= rear) class queue { private: int a[maxque]; int front, rear; public: queue() { front = rear = 0; assert(front == rear && front == 0 && bool empty() const { assert( bool res = (front==rear); assert(res==(front==rear) && return res; void push(int x) { assert(!full() && int rear_old = rear; a[rear] = x; rear = rear+1; assert(!empty() && a[rear_old] == x && rear == rear_old+1 && int pop() { assert(!empty() && int x = a[front]; int front_old = front; front++; assert(x == a[front_old] && front == front_old+1 && return x; bool full() const ; { assert( bool res = rear == MaxQue; assert(res==(rear==maxque) && return res; int length() const { assert( int res = rear - front; assert(res == rear-front && return res; The most difficult part in the realization of a runtime verification is defining the invariants of the loop statements. For training purposes, the methodology suggested in [5] is applied. Furthermore, suitable invariants of the classes in object-oriented programs are difficult to be defined. They have to be clear not to impose too many restrictions on the development efficiency of the class realization. Defining them is performed on the basis of non-formal analysis of the methods of classes. IV. TRAINING APPROACH The runtime verification education in the Faculty of Mathematics Informatics starts by the course Introduction in Programming continues through Object-Oriented Programming Data Structures. Students have to take these courses during first three terms of their study of Informatics. Each of the courses has workload of 75 lecture hours has a corresponding computer practicum course with workload of 30 hours in a computer lab. In 8 lecture hours of Introduction in Programming, students study the basics of axiomatic semantic assertion technique. They have to know the basics of mathematical logic. As a result of successful learning, students can verify simple programs written in C++ programming language. The design by contract technique is studied in 4 lecture hours of the Object-Oriented Programming course. 5 hours of practical sessions are dedicated to application of this approach to verification of classes. Verification of classes implementing data structures is studied in Data Structures course, in 5 lecture hours. As a result of the course, students acquire skills to apply runtime verification for programs that use certain abstract data structure implementations. Because of the complexity the discussed thematic, the approach project-based learning [8, 9] is used. The main reason for this decision is that the project-based method is among the most appreciated by the trainees. Its focus is on stimulating student interest in a particular task, requiring a stable base knowledge in the field of the project. By the means of working on the project, practical knowledge abilities are gained demonstrated. The development of projects on runtime verification has the following stages: - formulating the project (assignment of the topic, GSTF

6 objectives tasks of the project); - forming the groups of students to work on it, introducing the task of the project dividing the sub tasks within the groups; - instructing the trainees, as well as defining the criteria of project assessment; - working on the project; - developing project presentations; - presenting the projects; - assessment. The chosen training method gives the educational process an opportunity to apply procedures, which model the stages of thinking when solving a problem. For example: formulating the problem, suggesting hypothesis, verification of the hypothesis, formulating conclusions, practical application, summarization. Through this approach, training is following a scientific research model. During the training sessions, we discovered that students gladly seek non-trivial, non-conventional original ways for solving their project tasks, especially when searching for adequate invariants. While developing their projects, they often use scientific results, connected to the topic, but not studied during the training program. The most useful interesting part of the training is the discussion held while presenting the projects. We complement examination with computer testing [10, 11, 12], which is among the most promising, effective liked by the students methods of assessment. V. CONCLUSION As a result of the training, the students learn the basics of formal program verification, the techniques: predicate transformer, design by contract assertions. They achieve practical skills for runtime verification of imperative object-oriented programs. The subject viewed in this paper is important as it is an inseparable part of the process of developing real software products, especially when the price of each error is high. Studying these verification techniques in the beginning of the educational process is a step forward towards producing highly qualified software engineering experts. The suggested approach can be successfully integrated with the use of proper e-learning environments like the popular platform Moodle extended with tools for automation of the submission checking the results of programming assignments [13], digital libraries with learning materials supporting the basic courses in Programming Data Structures [14, 15], etc. REFERENCES [1] J. Capers, Estimating Software Costs, New York, NY McGraw Hill, [2] G. J. Myers, The Art of Software Testing, New York, NY John Wiley & Sons, [3] M. Todorova, Runtime program verification, in Journal of Mathematics Informatics, Published by the Bulgarian Ministry of Education, Sofia, 2009, No. 1, pp [4] C. A. R. Hoare, Proof of Correctness of Data Representations, in Acta Informatica, 1972, Vol. 1, N 4, pp [5] D. Gries, The Science of Programming, Springer-Verlag, Berlin New York, [6] B. Meyer, Applying design by contract, in Computer 25(10), 1992, pp [7] J. Torjo, C++: Implementing Design by Contract to reduce bugs, Available: 26.html, July [8] P. Azalov D. Richards, Project Based Teaching of Intermediate Programming, International Symposium IGIP/IEEE/ASEE 2004, September 27 30, Fribourg, Switzerl, pp [9] М. Todorova, H. Hristov, E. Stefanova, N. Nikolova, How to build up contemporary software professionals (Project Based Learning in Data Structure Programming), Second International Conference on Software, Services Semantic Technologies S3T, September 11 12, 2010, Varna, Bulgaria, pp [10] I. Peneva Kr. Yordzhev, Internet Testing latest trend in research psychometric, in Trakia Journal of Sciences, Vol. 7, Suppl. 2, pp [11] I. Peneva, K. Gaidarov, Kr. Yordzhev, Computer administering of psychological tests, in Proceedings of the Third International Scientific Conference FMNS2009, 3 7 June 2009, Blagoevgrad, Bulgaria, pp [12] Kr. Yordzhev, I. Peneva, B. Kirilieva-Shivarova, A Relational Model of Personality Psychological Tests, in Proceedings of the Third International Scientific Conference FMNS2009, 3 7 June 2009, Blagoevgrad, Bulgaria, pp [13] A. Semerdzhiev, T. Trifonov, M. Nisheva, Automated Tools for Assisting the Educational Process in Informatics, in International Conference on Application of Information Communication Technology in Economy Education ICAICTEE 2011 (Sofia, Bulgaria, December 2 3, 2011), ISBN , pp (in Bulgarian). [14] P. Pavlov M. Nisheva-Pavlova, Some IT Aspects of Building Digital Libraries with Learning Materials, in Review of the National Center for Digitization, Belgrade, ISSN , Vol. 13, 2008, pp [15] M. Nisheva-Pavlova P. Pavlov, Design Principles of a Digital Library with Learning Materials, in Proceedings of the Third International Conference on Information Systems Grid Technologies (Sofia, May 28 29, 2009), Sofia, 2009, pp Magdalina Todorova is associated professor in Faculty of Mathematics Informatics in the Sofia University, Bulgaria; ( todorova_magda@ hotmail.com). ACKNOWLEDGMENT The paper is supported by Grant Software modeling theoretical, applied methodological aspects from Sofia University Research Fund, Petar Armyanov is assistant professor also a PhD student in Faculty of Mathematics Informatics in the Sofia University, Bulgaria; ( parmyanov@fmi.uni-sofia.bg) GSTF

Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers

Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers Constructing Contracts: Making Discrete Mathematics Relevant to Beginning Programmers TIMOTHY S. GEGG-HARRISON Winona State University Although computer scientists understand the importance of discrete

More information

Rigorous Software Engineering Hoare Logic and Design by Contracts

Rigorous Software Engineering Hoare Logic and Design by Contracts Rigorous Software Engineering Hoare Logic and Design by Contracts Simão Melo de Sousa RELEASE (UBI), LIACC (Porto) Computer Science Department University of Beira Interior, Portugal 2010-2011 S. Melo de

More information

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland

Software Testing & Analysis (F22ST3): Static Analysis Techniques 2. Andrew Ireland Software Testing & Analysis (F22ST3) Static Analysis Techniques Andrew Ireland School of Mathematical and Computer Science Heriot-Watt University Edinburgh Software Testing & Analysis (F22ST3): Static

More information

Rigorous Software Development CSCI-GA 3033-009

Rigorous Software Development CSCI-GA 3033-009 Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 11 Semantics of Programming Languages Denotational Semantics Meaning of a program is defined as the mathematical

More information

Verification of Imperative Programs in Theorema

Verification of Imperative Programs in Theorema Verification of Imperative Programs in Theorema Laura Ildikó Kovács, Nikolaj Popov, Tudor Jebelean 1 Research Institute for Symbolic Computation, Johannes Kepler University, A-4040 Linz, Austria Institute

More information

Lecture Notes on Linear Search

Lecture Notes on Linear Search Lecture Notes on Linear Search 15-122: Principles of Imperative Computation Frank Pfenning Lecture 5 January 29, 2013 1 Introduction One of the fundamental and recurring problems in computer science is

More information

Software Engineering Techniques

Software Engineering Techniques Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary

More information

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation PLDI 03 A Static Analyzer for Large Safety-Critical Software B. Blanchet, P. Cousot, R. Cousot, J. Feret L. Mauborgne, A. Miné, D. Monniaux,. Rival CNRS École normale supérieure École polytechnique Paris

More information

Automated Theorem Proving - summary of lecture 1

Automated Theorem Proving - summary of lecture 1 Automated Theorem Proving - summary of lecture 1 1 Introduction Automated Theorem Proving (ATP) deals with the development of computer programs that show that some statement is a logical consequence of

More information

Logistics. Software Testing. Logistics. Logistics. Plan for this week. Before we begin. Project. Final exam. Questions?

Logistics. Software Testing. Logistics. Logistics. Plan for this week. Before we begin. Project. Final exam. Questions? Logistics Project Part 3 (block) due Sunday, Oct 30 Feedback by Monday Logistics Project Part 4 (clock variant) due Sunday, Nov 13 th Individual submission Recommended: Submit by Nov 6 th Scoring Functionality

More information

Sources: On the Web: Slides will be available on:

Sources: On the Web: Slides will be available on: C programming Introduction The basics of algorithms Structure of a C code, compilation step Constant, variable type, variable scope Expression and operators: assignment, arithmetic operators, comparison,

More information

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority) Boolean Expressions, Conditions, Loops, and Enumerations Relational Operators == // true if two values are equivalent!= // true if two values are not equivalent < // true if left value is less than the

More information

Design by Contract beyond class modelling

Design by Contract beyond class modelling Design by Contract beyond class modelling Introduction Design by Contract (DbC) or Programming by Contract is an approach to designing software. It says that designers should define precise and verifiable

More information

PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE

PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE International Journal of Computer ScienceandCommunication Vol. 2, No. 1, January-June2011, pp. 153-157 PROPERTECHNIQUEOFSOFTWARE INSPECTIONUSING GUARDED COMMANDLANGUAGE Neeraj Kumar Singhania University,

More information

What's Wrong With Formal Programming Methods? Eric C.R. Hehner

What's Wrong With Formal Programming Methods? Eric C.R. Hehner What's Wrong With Formal Programming Methods? Eric C.R. Hehner Department of Computer Science, University of Toronto, Toronto M5S 1A4 Canada The January 1991 issue of Computing Research News includes the

More information

Regular Languages and Finite Automata

Regular Languages and Finite Automata Regular Languages and Finite Automata 1 Introduction Hing Leung Department of Computer Science New Mexico State University Sep 16, 2010 In 1943, McCulloch and Pitts [4] published a pioneering work on a

More information

Regression Verification: Status Report

Regression Verification: Status Report Regression Verification: Status Report Presentation by Dennis Felsing within the Projektgruppe Formale Methoden der Softwareentwicklung 2013-12-11 1/22 Introduction How to prevent regressions in software

More information

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers. MATHEMATICAL INDUCTION MIGUEL A LERMA (Last updated: February 8, 003) Mathematical Induction This is a powerful method to prove properties of positive integers Principle of Mathematical Induction Let P

More information

MAP-I Programa Doutoral em Informática. Rigorous Software Development

MAP-I Programa Doutoral em Informática. Rigorous Software Development MAP-I Programa Doutoral em Informática Rigorous Software Development Unidade Curricular em Teoria e Fundamentos Theory and Foundations (UCTF) DI-UM, DCC-FCUP May, 2012 Abstract This text presents a UCTF

More information

How To Write A Program Verification And Programming Book

How To Write A Program Verification And Programming Book Jose Bacelar Almeida Maria Joao Frade Jorge Sousa Pinto Simao Melo de Sousa Rigorous Software Development An Introduction to Program Verification & Springer Contents 1 Introduction 1 1.1 A Formal Approach

More information

Software Engineering

Software Engineering Software Engineering Lecture 04: The B Specification Method Peter Thiemann University of Freiburg, Germany SS 2013 Peter Thiemann (Univ. Freiburg) Software Engineering SWT 1 / 50 The B specification method

More information

1 Abstract Data Types Information Hiding

1 Abstract Data Types Information Hiding 1 1 Abstract Data Types Information Hiding 1.1 Data Types Data types are an integral part of every programming language. ANSI-C has int, double and char to name just a few. Programmers are rarely content

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java

StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java StaRVOOrS: A Tool for Combined Static and Runtime Verification of Java Jesús Mauricio Chimento 1, Wolfgang Ahrendt 1, Gordon J. Pace 2, and Gerardo Schneider 3 1 Chalmers University of Technology, Sweden.

More information

Introducing Formal Methods. Software Engineering and Formal Methods

Introducing Formal Methods. Software Engineering and Formal Methods Introducing Formal Methods Formal Methods for Software Specification and Analysis: An Overview 1 Software Engineering and Formal Methods Every Software engineering methodology is based on a recommended

More information

CHAPTER 7 GENERAL PROOF SYSTEMS

CHAPTER 7 GENERAL PROOF SYSTEMS CHAPTER 7 GENERAL PROOF SYSTEMS 1 Introduction Proof systems are built to prove statements. They can be thought as an inference machine with special statements, called provable statements, or sometimes

More information

Quotes from Object-Oriented Software Construction

Quotes from Object-Oriented Software Construction Quotes from Object-Oriented Software Construction Bertrand Meyer Prentice-Hall, 1988 Preface, p. xiv We study the object-oriented approach as a set of principles, methods and tools which can be instrumental

More information

Software Testing. Quality & Testing. Software Testing

Software Testing. Quality & Testing. Software Testing Software Testing Software Testing Error: mistake made by the programmer/developer Fault: a incorrect piece of code/document (i.e., bug) Failure: result of a fault Goal of software testing: Cause failures

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Introduction to Programming (in C++) Loops Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC Example Assume the following specification: Input: read a number N > 0 Output:

More information

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification: Example Introduction to Programming (in C++) Loops Assume the following specification: Input: read a number N > 0 Output: write the sequence 1 2 3 N (one number per line) Jordi Cortadella, Ricard Gavaldà,

More information

Tool-Assisted Unit-Test Generation and Selection Based on Operational Abstractions

Tool-Assisted Unit-Test Generation and Selection Based on Operational Abstractions Tool-Assisted Unit-Test Generation and Selection Based on Operational Abstractions Tao Xie 1 and David Notkin 2 (xie@csc.ncsu.edu,notkin@cs.washington.edu) 1 Department of Computer Science, North Carolina

More information

IS0020 Program Design and Software Tools Midterm, Feb 24, 2004. Instruction

IS0020 Program Design and Software Tools Midterm, Feb 24, 2004. Instruction IS0020 Program Design and Software Tools Midterm, Feb 24, 2004 Name: Instruction There are two parts in this test. The first part contains 50 questions worth 80 points. The second part constitutes 20 points

More information

Moving from CS 61A Scheme to CS 61B Java

Moving from CS 61A Scheme to CS 61B Java Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you

More information

Selbo 2 an Environment for Creating Electronic Content in Software Engineering

Selbo 2 an Environment for Creating Electronic Content in Software Engineering BULGARIAN ACADEMY OF SCIENCES CYBERNETICS AND INFORMATION TECHNOLOGIES Volume 9, No 3 Sofia 2009 Selbo 2 an Environment for Creating Electronic Content in Software Engineering Damyan Mitev 1, Stanimir

More information

A Framework for the Semantics of Behavioral Contracts

A Framework for the Semantics of Behavioral Contracts A Framework for the Semantics of Behavioral Contracts Ashley McNeile Metamaxim Ltd, 48 Brunswick Gardens, London W8 4AN, UK ashley.mcneile@metamaxim.com Abstract. Contracts have proved a powerful concept

More information

A simple algorithm with no simple verication

A simple algorithm with no simple verication A simple algorithm with no simple verication Laszlo Csirmaz Central European University Abstract The correctness of a simple sorting algorithm is resented, which algorithm is \evidently wrong" at the rst

More information

Informatica e Sistemi in Tempo Reale

Informatica e Sistemi in Tempo Reale Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)

More information

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall-2015 1 QUIZ-II Write a program that mimics a calculator. The program should take as input two integers and the operation to be performed. It should then output the numbers, the operator, and the result. (For

More information

InvGen: An Efficient Invariant Generator

InvGen: An Efficient Invariant Generator InvGen: An Efficient Invariant Generator Ashutosh Gupta and Andrey Rybalchenko Max Planck Institute for Software Systems (MPI-SWS) Abstract. In this paper we present InvGen, an automatic linear arithmetic

More information

High-Mix Low-Volume Flow Shop Manufacturing System Scheduling

High-Mix Low-Volume Flow Shop Manufacturing System Scheduling Proceedings of the 14th IAC Symposium on Information Control Problems in Manufacturing, May 23-25, 2012 High-Mix Low-Volume low Shop Manufacturing System Scheduling Juraj Svancara, Zdenka Kralova Institute

More information

Sample Induction Proofs

Sample Induction Proofs Math 3 Worksheet: Induction Proofs III, Sample Proofs A.J. Hildebrand Sample Induction Proofs Below are model solutions to some of the practice problems on the induction worksheets. The solutions given

More information

Automatic Assessment of Programming assignment

Automatic Assessment of Programming assignment Automatic Assessment of Programming assignment Surendra Gupta 1 and Shiv Kumar Dubey 2 Department of Computer Engineering Shri G. S. Institute of Technology & Science 23, Park Road Indore 452003 (MP) India

More information

Know or Go Practical Quest for Reliable Software

Know or Go Practical Quest for Reliable Software Know or Go Practical Quest for Reliable Software Dr.-Ing. Jörg Barrho Dr.-Ing. Ulrich Wünsche AVACS Project meeting 25.09.2014 2014 Rolls-Royce Power Systems AG The information in this document is the

More information

Loop Invariants and Binary Search

Loop Invariants and Binary Search Loop Invariants and Binary Search Chapter 4.3.3 and 9.3.1-1 - Outline Ø Iterative Algorithms, Assertions and Proofs of Correctness Ø Binary Search: A Case Study - 2 - Outline Ø Iterative Algorithms, Assertions

More information

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C Embedded Systems A Review of ANSI C and Considerations for Embedded C Programming Dr. Jeff Jackson Lecture 2-1 Review of ANSI C Topics Basic features of C C fundamentals Basic data types Expressions Selection

More information

About the inverse football pool problem for 9 games 1

About the inverse football pool problem for 9 games 1 Seventh International Workshop on Optimal Codes and Related Topics September 6-1, 013, Albena, Bulgaria pp. 15-133 About the inverse football pool problem for 9 games 1 Emil Kolev Tsonka Baicheva Institute

More information

Software Testing & Verification 2013/2014 Universiteit Utrecht

Software Testing & Verification 2013/2014 Universiteit Utrecht Software Testing & Verification 2013/2014 Universiteit Utrecht 2nd Jul. 2014, 13:30-16:30, BBL 001 Lecturer: Wishnu Prasetya You are allowed to bring along the Appendix of the LN. Part I [3pt (6 0.5)]

More information

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London

More information

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

More information

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Software Testing Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program. Testing can only reveal the presence of errors and not the

More information

From Program Verification to Certified Binaries

From Program Verification to Certified Binaries From Program Verification to Certified Binaries The Quest for the Holy Grail of Software Engineering Angelos Manousaridis, Michalis A. Papakyriakou, and Nikolaos S. Papaspyrou National Technical University

More information

3. Mathematical Induction

3. Mathematical Induction 3. MATHEMATICAL INDUCTION 83 3. Mathematical Induction 3.1. First Principle of Mathematical Induction. Let P (n) be a predicate with domain of discourse (over) the natural numbers N = {0, 1,,...}. If (1)

More information

Formal Verification of Software

Formal Verification of Software Formal Verification of Software Sabine Broda Department of Computer Science/FCUP 12 de Novembro de 2014 Sabine Broda (DCC-FCUP) Formal Verification of Software 12 de Novembro de 2014 1 / 26 Formal Verification

More information

Syntax Check of Embedded SQL in C++ with Proto

Syntax Check of Embedded SQL in C++ with Proto Proceedings of the 8 th International Conference on Applied Informatics Eger, Hungary, January 27 30, 2010. Vol. 2. pp. 383 390. Syntax Check of Embedded SQL in C++ with Proto Zalán Szűgyi, Zoltán Porkoláb

More information

AC 2012-4561: MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT

AC 2012-4561: MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT AC 2012-4561: MATHEMATICAL MODELING AND SIMULATION US- ING LABVIEW AND LABVIEW MATHSCRIPT Dr. Nikunja Swain, South Carolina State University Nikunja Swain is a professor in the College of Science, Mathematics,

More information

Specification and Analysis of Contracts Lecture 1 Introduction

Specification and Analysis of Contracts Lecture 1 Introduction Specification and Analysis of Contracts Lecture 1 Introduction Gerardo Schneider gerardo@ifi.uio.no http://folk.uio.no/gerardo/ Department of Informatics, University of Oslo SEFM School, Oct. 27 - Nov.

More information

New Hash Function Construction for Textual and Geometric Data Retrieval

New Hash Function Construction for Textual and Geometric Data Retrieval Latest Trends on Computers, Vol., pp.483-489, ISBN 978-96-474-3-4, ISSN 79-45, CSCC conference, Corfu, Greece, New Hash Function Construction for Textual and Geometric Data Retrieval Václav Skala, Jan

More information

Chapter One Introduction to Programming

Chapter One Introduction to Programming Chapter One Introduction to Programming 1-1 Algorithm and Flowchart Algorithm is a step-by-step procedure for calculation. More precisely, algorithm is an effective method expressed as a finite list of

More information

Chapter 1: Key Concepts of Programming and Software Engineering

Chapter 1: Key Concepts of Programming and Software Engineering Chapter 1: Key Concepts of Programming and Software Engineering Software Engineering Coding without a solution design increases debugging time - known fact! A team of programmers for a large software development

More information

The C Programming Language course syllabus associate level

The C Programming Language course syllabus associate level TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming

More information

6. Control Structures

6. Control Structures - 35 - Control Structures: 6. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may bifurcate, repeat code or take decisions. For that purpose,

More information

Boogie: A Modular Reusable Verifier for Object-Oriented Programs

Boogie: A Modular Reusable Verifier for Object-Oriented Programs Boogie: A Modular Reusable Verifier for Object-Oriented Programs M. Barnett, B.E. Chang, R. DeLine, B. Jacobs, K.R.M. Leino Lorenzo Baesso ETH Zurich Motivation Abstract Domains Modular Architecture Automatic

More information

Factoring & Primality

Factoring & Primality Factoring & Primality Lecturer: Dimitris Papadopoulos In this lecture we will discuss the problem of integer factorization and primality testing, two problems that have been the focus of a great amount

More information

Rigorous Software Development CSCI-GA 3033-009

Rigorous Software Development CSCI-GA 3033-009 Rigorous Software Development CSCI-GA 3033-009 Instructor: Thomas Wies Spring 2013 Lecture 5 Disclaimer. These notes are derived from notes originally developed by Joseph Kiniry, Gary Leavens, Erik Poll,

More information

The Role of Information Technology Studies in Software Product Quality Improvement

The Role of Information Technology Studies in Software Product Quality Improvement The Role of Information Technology Studies in Software Product Quality Improvement RUDITE CEVERE, Dr.sc.comp., Professor Faculty of Information Technologies SANDRA SPROGE, Dr.sc.ing., Head of Department

More information

Verifying Semantic of System Composition for an Aspect-Oriented Approach

Verifying Semantic of System Composition for an Aspect-Oriented Approach 2012 International Conference on System Engineering and Modeling (ICSEM 2012) IPCSIT vol. 34 (2012) (2012) IACSIT Press, Singapore Verifying Semantic of System Composition for an Aspect-Oriented Approach

More information

APPLICATION OF А FRENCH MODEL OF SOCIOCULTURAL ANIMATION AT ADOLESCENTS LEISURE TIME

APPLICATION OF А FRENCH MODEL OF SOCIOCULTURAL ANIMATION AT ADOLESCENTS LEISURE TIME Trakia Journal of Sciences, Vol. 13, Suppl. 1, pp 487-490, 2015 Copyright 2015 Trakia University Available online at: http://www.uni-sz.bg ISSN 1313-7069 (print) doi:10.15547/tjs.2015.s.01.084 ISSN 1313-3551

More information

International Journal of Information Technology, Modeling and Computing (IJITMC) Vol.1, No.3,August 2013

International Journal of Information Technology, Modeling and Computing (IJITMC) Vol.1, No.3,August 2013 FACTORING CRYPTOSYSTEM MODULI WHEN THE CO-FACTORS DIFFERENCE IS BOUNDED Omar Akchiche 1 and Omar Khadir 2 1,2 Laboratory of Mathematics, Cryptography and Mechanics, Fstm, University of Hassan II Mohammedia-Casablanca,

More information

Lecture 9 verifying temporal logic

Lecture 9 verifying temporal logic Basics of advanced software systems Lecture 9 verifying temporal logic formulae with SPIN 21/01/2013 1 Outline for today 1. Introduction: motivations for formal methods, use in industry 2. Developing models

More information

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Programming System Design. CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

Lecture 3: Finding integer solutions to systems of linear equations

Lecture 3: Finding integer solutions to systems of linear equations Lecture 3: Finding integer solutions to systems of linear equations Algorithmic Number Theory (Fall 2014) Rutgers University Swastik Kopparty Scribe: Abhishek Bhrushundi 1 Overview The goal of this lecture

More information

Conditions & Boolean Expressions

Conditions & Boolean Expressions Conditions & Boolean Expressions 1 In C++, in order to ask a question, a program makes an assertion which is evaluated to either true (nonzero) or false (zero) by the computer at run time. Example: In

More information

Continued Fractions. Darren C. Collins

Continued Fractions. Darren C. Collins Continued Fractions Darren C Collins Abstract In this paper, we discuss continued fractions First, we discuss the definition and notation Second, we discuss the development of the subject throughout history

More information

Checking Access to Protected Members in the Java Virtual Machine

Checking Access to Protected Members in the Java Virtual Machine Checking Access to Protected Members in the Java Virtual Machine Alessandro Coglio Kestrel Institute 3260 Hillview Avenue, Palo Alto, CA 94304, USA Ph. +1-650-493-6871 Fax +1-650-424-1807 http://www.kestrel.edu/

More information

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy

Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Regular Expressions with Nested Levels of Back Referencing Form a Hierarchy Kim S. Larsen Odense University Abstract For many years, regular expressions with back referencing have been used in a variety

More information

C++FA 5.1 PRACTICE MID-TERM EXAM

C++FA 5.1 PRACTICE MID-TERM EXAM C++FA 5.1 PRACTICE MID-TERM EXAM This practicemid-term exam covers sections C++FA 1.1 through C++FA 1.4 of C++ with Financial Applications by Ben Van Vliet, available at www.benvanvliet.net. 1.) A pointer

More information

Formal Methods for Software Development

Formal Methods for Software Development Formal Methods for Software Development Till Mossakowski, Lutz Schröder 03./08.11.2004 2 Monadic QuickCheck extension of QuickCheck for monadic (= imperative) programs specifications are equations between

More information

Random Testing: The Best Coverage Technique - An Empirical Proof

Random Testing: The Best Coverage Technique - An Empirical Proof , pp. 115-122 http://dx.doi.org/10.14257/ijseia.2015.9.12.10 Random Testing: The Best Coverage Technique - An Empirical Proof K Koteswara Rao 1 and Prof GSVP Raju 2 1 Asst prof, (PhD) @JNTUK, CSE Department,

More information

C Compiler Targeting the Java Virtual Machine

C Compiler Targeting the Java Virtual Machine C Compiler Targeting the Java Virtual Machine Jack Pien Senior Honors Thesis (Advisor: Javed A. Aslam) Dartmouth College Computer Science Technical Report PCS-TR98-334 May 30, 1998 Abstract One of the

More information

Algorithms are the threads that tie together most of the subfields of computer science.

Algorithms are the threads that tie together most of the subfields of computer science. Algorithms Algorithms 1 Algorithms are the threads that tie together most of the subfields of computer science. Something magically beautiful happens when a sequence of commands and decisions is able to

More information

Execution of A Requirement Model in Software Development

Execution of A Requirement Model in Software Development Execution of A Requirement Model in Software Development Wuwei Shen, Mohsen Guizani and Zijiang Yang Dept of Computer Science, Western Michigan University {wwshen,mguizani,zijiang}@cs.wmich.edu Kevin Compton

More information

Quality Management. Lecture 12 Software quality management

Quality Management. Lecture 12 Software quality management Quality Management Lecture 12 Software quality management doc.dr.sc. Marko Jurčević prof.dr.sc. Roman Malarić University of Zagreb Faculty of Electrical Engineering and Computing Department of Fundamentals

More information

Writing in the Computer Science Major

Writing in the Computer Science Major Writing in the Computer Science Major Table of Contents Introduction... 2 Statement of Purpose... 2 Revision History... 2 Writing Tasks in Computer Science... 3 Documentation... 3 Planning to Program:

More information

Automated Program Behavior Analysis

Automated Program Behavior Analysis Automated Program Behavior Analysis Stacy Prowell sprowell@cs.utk.edu March 2005 SQRL / SEI Motivation: Semantics Development: Most engineering designs are subjected to extensive analysis; software is

More information

CS 103X: Discrete Structures Homework Assignment 3 Solutions

CS 103X: Discrete Structures Homework Assignment 3 Solutions CS 103X: Discrete Structures Homework Assignment 3 s Exercise 1 (20 points). On well-ordering and induction: (a) Prove the induction principle from the well-ordering principle. (b) Prove the well-ordering

More information

The Theory of Concept Analysis and Customer Relationship Mining

The Theory of Concept Analysis and Customer Relationship Mining The Application of Association Rule Mining in CRM Based on Formal Concept Analysis HongSheng Xu * and Lan Wang College of Information Technology, Luoyang Normal University, Luoyang, 471022, China xhs_ls@sina.com

More information

Lecture 2 Notes: Flow of Control

Lecture 2 Notes: Flow of Control 6.096 Introduction to C++ January, 2011 Massachusetts Institute of Technology John Marrero Lecture 2 Notes: Flow of Control 1 Motivation Normally, a program executes statements from first to last. The

More information

Objects-First vs. Structures-First Approaches to 00 Programming Education: A Replication Study

Objects-First vs. Structures-First Approaches to 00 Programming Education: A Replication Study Journal of Business & Leadership (2005-2012) Volume 7 Number 1 Journal of Business & Leadership Article 5 1-1-2011 Objects-First vs. Structures-First Approaches to 00 Programming Education: A Replication

More information

10CS35: Data Structures Using C

10CS35: Data Structures Using C CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

More information

The Jigsaw Collaborative Method in Blended Learning Course Computer Games and Education Realization in Moodle

The Jigsaw Collaborative Method in Blended Learning Course Computer Games and Education Realization in Moodle The Jigsaw Collaborative Method in Blended Learning Course Computer Games and Education Realization in Moodle Daniela Tuparova 1, Georgi Tuparov 1,2 1 Department of Computer Science, South-West University,

More information

Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1

Course: Programming II - Abstract Data Types. The ADT Stack. A stack. The ADT Stack and Recursion Slide Number 1 Definition Course: Programming II - Abstract Data Types The ADT Stack The ADT Stack is a linear sequence of an arbitrary number of items, together with access procedures. The access procedures permit insertions

More information

Properties of Stabilizing Computations

Properties of Stabilizing Computations Theory and Applications of Mathematics & Computer Science 5 (1) (2015) 71 93 Properties of Stabilizing Computations Mark Burgin a a University of California, Los Angeles 405 Hilgard Ave. Los Angeles, CA

More information

Course Title: Software Development

Course Title: Software Development Course Title: Software Development Unit: Customer Service Content Standard(s) and Depth of 1. Analyze customer software needs and system requirements to design an information technology-based project plan.

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason)

How To Write A Test Engine For A Microsoft Microsoft Web Browser (Php) For A Web Browser For A Non-Procedural Reason) Praspel: A Specification Language for Contract-Driven Testing in PHP Ivan Enderlin Frédéric Dadeau Alain Giorgetti Abdallah Ben Othman October 27th, 2011 Meetings: LTP MTVV Ivan Enderlin, Frédéric Dadeau,

More information

CSCI 3136 Principles of Programming Languages

CSCI 3136 Principles of Programming Languages CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University Winter 2013 CSCI 3136 Principles of Programming Languages Faculty of Computer Science Dalhousie University

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

Institut für Parallele und Verteilte Systeme. Abteilung Anwendersoftware. Universität Stuttgart Universitätsstraße 38 D-70569 Stuttgart

Institut für Parallele und Verteilte Systeme. Abteilung Anwendersoftware. Universität Stuttgart Universitätsstraße 38 D-70569 Stuttgart Institut für Parallele und Verteilte Systeme Abteilung Anwendersoftware Universität Stuttgart Universitätsstraße 38 D-70569 Stuttgart Diplomarbeit Nr. 3243 Development and Evaluation of a Framework for

More information