How is logic used in computer science




















All men are mortal. Socrates is a man. Therefore, Socrates is mortal. Logical arguments like this one have been studied since antiquity. In the last few decades, however, logic research has changed considerably: the computer sciences were born. The success of informatics would have been impossible without the groundwork provided by logicians — and, in turn, computer sciences keep posing new interesting questions, which can only be answered by formal logic.

Informatics is not the modern-day successor of logic, both fields keep moving forward, hand in hand. Calculating Logical Statements.

Simple logical conclusions such as the famous syllogism about Socrates' mortality appear clear and simple to us. But logic is not just about formalizing the obvious.

Just like in mathematics, logic allows us to construct arbitrarily complex equations, to do sophisticated calculations, to analyse the world. Even before the first electronic calculating devices were built, research on the hypothetical possibilities of computers was done: in the s, the mathematicians Alan Turing and Alonzo Church characterized the class of mathematical problems which can in principle be tackled.

Turing put forward an intriguingly simple model for a calculating machine — the Turing machine: It moves on an infinitely long ribbon, reads numbers and changes it according to a given set of rules. Such a machine can be built with mechanical gears or lego bricks. Although in practice such a machine is highly inefficient, one can show that in principle any conceivable computer calculation can be carried out by such a simple device.

With the Turing machine it became possible to clearly define what "doing mathematical calculations" even means. Using this concept, Turing could show that some questions can never be answered by a computer: a computer program which reads other programs and then decides whether its calculations would ever come to a halt or go on forever is logically impossible. Logic in computer science has to fulfil several tasks. First of all, it is a tool with which computer programs can describe the world.

Logic is used for databases or for creating artificial intelligence. But logic does not only help a computer to view the world, it also offers the possibility of introspection: computer codes can check other computer codes and look for logical errors.

Logic-based quality checks of computer codes verification, model checking play an important role for industry and the economy. When a user tests a program and finds that it works, this does not by all means guarantee that the program is free of errors.

The crucial question is: does the code react correctly to any conceivable input, in any logically possible situation? This can only be determined by an automated program. Such a reliable check is particularly important for security relevant code such as airplane controls.

Logical checks are essential for the production of computer chips as well. Today, chips start out as a computer program, long before they are physically built. No human being could ever determine by hand whether the chip does indeed react correctly to any given situation.

Computer programs carry out this task. As a bonus, the book uses a system of mechanized logic that allows readers to experiment with formal methods.

Page and Gamboa take you on a wondrous journey through how Computer Science works based on logic. Discover how and why data structures, digital circuits, sorting, sharding, and MapReduce work and discover how mechanized logic is used to prove that they correctly work.

This is essential knowledge for all citizens of the Information Age. This book is the whole package: the content is well motivated, backed by software to help students work the multitude of exercises, and covers a wide range of topics. Offering a course on this text is a fantastic service to your students. Search Search.

Search Advanced Search close Close. Essential Logic for Computer Science By Rex Page and Ruben Gamboa An introduction to applying predicate logic to testing and verification of software and digital circuits that focuses on applications rather than theory. With such analyses, a person can prove the accuracy of procedures and approximate the number of steps needed to execute a specified program.

You are commenting using your WordPress. You are commenting using your Google account. You are commenting using your Twitter account. You are commenting using your Facebook account. Notify me of new comments via email. Notify me of new posts via email. Skip to content. Share this: Twitter Facebook. Like this: Like Loading Leave a Reply Cancel reply Enter your comment here



0コメント

  • 1000 / 1000