This book describes some basic principles that allow developers of computer programs (computer scientists, software engineers, programmers) to clearly think about the artifacts they deal with in their daily work: data types, programming languages, programs written in these languages that compute from given inputs wanted outputs, and programs that describe continuously executing systems. The core message is that clear thinking about programs can be expressed in a single universal language, the formal language of logic. Apart from its universal elegance and expressiveness, this "logical" approach to the formal modeling of and reasoning about computer programs has another advantage: due to advances in computational logic (automated theorem proving, satisfiability solving, model checking), nowadays much of this process can be supported by software. This book therefore accompanies its theoretical elaborations by practical demonstrations of various systems and tools thatare based on respectively make use of the presented logical underpinnings.