Semantics will play an important role in the future development of software systems and domain-specific languages. This book provides a needed introductory presentation of the fundamental ideas behind these approaches, stresses their relationship by formulating and proving the relevant theorems, and illustrates the applications of semantics in computer science. Historically important application areas are presented together with some exciting potential applications. The text investigates the relationship between various methods and describes some of the main ideas used, illustrating these by means of interesting applications. The book provides a rigorous introduction to the main approaches to formal semantics of programming languages.
Part I of this book is a practical introduction to working with the Isabelle proof assistant. It teaches you how to write functional programs and inductive definitions and how to prove properties about them in Isabelle’s structured proof language. Part II is an introduction to the semantics of imperative languages with an emphasis on applications like compilers and program analysers. The distinguishing feature is that all the mathematics has been formalised in Isabelle and much of it is executable. Part I focusses on the details of proofs in Isabelle; Part II can be read even without familiarity with Isabelle’s proof language, all proofs are described in detail but informally. The book teaches the reader the art of precise logical reasoning and the practical use of a proof assistant as a surgical tool for formal proofs about computer science artefacts. In this sense it represents a formal approach to computer science, not just semantics. The Isabelle formalisation, including the proofs and accompanying slides, are freely available online, and the book is suitable for graduate students, advanced undergraduate students, and researchers in theoretical computer science and logic.
This textbook is an introduction to the use of formal methods ranging from semantics of key programming constructs to techniques for the analysis and verification of programs. The authors use program graphs as the mechanism for representing the control structure of programs in order to find a balance between generality and conceptual complexity. The early chapters on program graphs and the Guarded Commands language are sufficient introduction for most readers to then enjoy a plug-and-play approach to the remaining chapters. These explain formal methods for analysing the behaviour of programs in various ways ranging from verification, via program analysis and language-based security, to model checking. The remaining chapters present language extensions with procedures and concurrency and cover their semantics. The book is suitable for advanced undergraduate and graduate courses in software development, and the text is supported throughout with exercises of varying grades of difficulty. The authors have developed an online learning environment that allows students to create examples beyond those covered in the main text, and in the book appendices they present programming projects aimed at implementing central parts of the development using the functional language F#.
This book identifies, defines and illustrates the fundamental concepts and engineering techniques relevant to applications of software languages in software development. It presents software languages primarily from a software engineering perspective, i.e., it addresses how to parse, analyze, transform, generate, format, and otherwise process software artifacts in different software languages, as they appear in software development. To this end, it covers a wide range of software languages – most notably programming languages, domain-specific languages, modeling languages, exchange formats, and specifically also language definition languages. Further, different languages are leveraged to illustrate software language engineering concepts and techniques. The functional programming language Haskell dominates the book, while the mainstream programming languages Python and Java are additionally used for illustration. By doing this, the book collects and organizes scattered knowledge from software language engineering, focusing on application areas such as software analysis (software reverse engineering), software transformation (software re-engineering), software composition (modularity), and domain-specific languages. It is designed as a textbook for independent study as well as for bachelor’s (advanced level) or master’s university courses in Computer Science. An additional website provides complementary material, for example, lecture slides and videos. This book is a valuable resource for anyone wanting to understand the fundamental concepts and important engineering principles underlying software languages, allowing them to acquire much of the operational intelligence needed for dealing with software languages in software development practice. This is an important skill set for software engineers, as languages are increasingly permeating software development.
An introductory course on Software Engineering remains one of the hardest subjects to teach largely because of the wide range of topics the area enc- passes. I have believed for some time that we often tend to teach too many concepts and topics in an introductory course resulting in shallow knowledge and little insight on application of these concepts. And Software Engineering is ?nally about application of concepts to e?ciently engineer good software solutions. Goals I believe that an introductory course on Software Engineering should focus on imparting to students the knowledge and skills that are needed to successfully execute a commercial project of a few person-months e?ort while employing proper practices and techniques. It is worth pointing out that a vast majority of the projects executed in the industry today fall in this scope—executed by a small team over a few months. I also believe that by carefully selecting the concepts and topics, we can, in the course of a semester, achieve this. This is the motivation of this book. The goal of this book is to introduce to the students a limited number of concepts and practices which will achieve the following two objectives: – Teach the student the skills needed to execute a smallish commercial project.
Structural operational semantics is a simple, yet powerful mathematical theory for describing the behaviour of programs in an implementation-independent manner. This book provides a self-contained introduction to structural operational semantics, featuring semantic definitions using big-step and small-step semantics of many standard programming language constructs, including control structures, structured declarations and objects, parameter mechanisms and procedural abstraction, concurrency, nondeterminism and the features of functional programming languages. Along the way, the text introduces and applies the relevant proof techniques, including forms of induction and notions of semantic equivalence (including bisimilarity). Thoroughly class-tested, this book has evolved from lecture notes used by the author over a 10-year period at Aalborg University to teach undergraduate and graduate students. The result is a thorough introduction that makes the subject clear to students and computing professionals without sacrificing its rigour. No experience with any specific programming language is required.
This book is an introduction to the design and implementation of operating systems using OSP 2, the next generation of the highly popular OSP courseware for undergraduate operating system courses. Coverage details process and thread management; memory, resource and I/0 device management; and interprocess communication. The book allows students to practice these skills in a realistic operating systems programming environment. An Instructors Manual details how to use the OSP Project Generator and sample assignments. Even in one semester, students can learn a host of issues in operating system design.
This invaluable textbook presents a comprehensive introduction to modern competitive programming. The text highlights how competitive programming has proven to be an excellent way to learn algorithms, by encouraging the design of algorithms that actually work, stimulating the improvement of programming and debugging skills, and reinforcing the type of thinking required to solve problems in a competitive setting. The book contains many “folklore” algorithm design tricks that are known by experienced competitive programmers, yet which have previously only been formally discussed in online forums and blog posts. Topics and features: reviews the features of the C++ programming language, and describes how to create efficient algorithms that can quickly process large data sets; discusses sorting algorithms and binary search, and examines a selection of data structures of the C++ standard library; introduces the algorithm design technique of dynamic programming, and investigates elementary graph algorithms; covers such advanced algorithm design topics as bit-parallelism and amortized analysis, and presents a focus on efficiently processing array range queries; surveys specialized algorithms for trees, and discusses the mathematical topics that are relevant in competitive programming; examines advanced graph techniques, geometric algorithms, and string techniques; describes a selection of more advanced topics, including square root algorithms and dynamic programming optimization. This easy-to-follow guide is an ideal reference for all students wishing to learn algorithms, and practice for programming contests. Knowledge of the basics of programming is assumed, but previous background in algorithm design or programming contests is not necessary. Due to the broad range of topics covered at various levels of difficulty, this book is suitable for both beginners and more experienced readers.
This book is an essential tool for second-year undergraduate students and above, providing clear and concise explanations of the basic concepts of computer graphics, and enabling the reader to immediately implement these concepts in Java 2D and/or 3D with only elementary knowledge of the programming language. Features: provides an ideal, self-contained introduction to computer graphics, with theory and practice presented in integrated combination; presents a practical guide to basic computer graphics programming using Java 2D and 3D; includes new and expanded content on the integration of text in 3D, particle systems, billboard behaviours, dynamic surfaces, the concept of level of detail, and the use of functions of two variables for surface modelling; contains many pedagogical tools, including numerous easy-to-understand example programs and end-of-chapter exercises; supplies useful supplementary material, including additional exercises, solutions, and program examples, at an associated website.
This is a book about the meanings of words and how they can combine to form larger meaningful units, as well as how they can fail to combine when the amalgamation of a predicate and argument would produce what the philosopher Gilbert Ryle called a 'category mistake'. It argues for a theory in which words get assigned both an intension and a type. The book develops a rich system of types and investigates its philosophical and formal implications, for example the abandonment of the classic Church analysis of types that has been used by linguists since Montague. The author integrates fascinating and puzzling observations about lexical meaning into a compositional semantic framework. Adjustments in types are a feature of the compositional process and account for various phenomena including coercion and copredication. This book will be of interest to semanticists, philosophers, logicians and computer scientists alike.