Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views13 pages

Logic

The document outlines the course details for 'Logic in Computer Science' (CS/IS F214) for the first semester of 2014-2015, including objectives, instructor information, and a course website. It covers topics such as propositional and predicate logic, natural deduction, program verification, and temporal logic, with a focus on applications in modeling and reasoning about programs. The course plan includes a detailed lecture schedule and learning outcomes for each module.

Uploaded by

Yash Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views13 pages

Logic

The document outlines the course details for 'Logic in Computer Science' (CS/IS F214) for the first semester of 2014-2015, including objectives, instructor information, and a course website. It covers topics such as propositional and predicate logic, natural deduction, program verification, and temporal logic, with a focus on applications in modeling and reasoning about programs. The course plan includes a detailed lecture schedule and learning outcomes for each module.

Uploaded by

Yash Verma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

INSTRUCTION DIVISION

FIRST SEMESTER 2014-2015


Course Handout Part II

In addition to part-I (General Handout for all courses appended to the time table) this portion gives
further specific details regarding the course

Course No. : CS / IS F214


Course Title : Logic in Computer Science

Instructor-in-Charge: Shan Sundar Balasubramaniam (email: sundarb)


Instructors:
Vishal Gupta (email: vishalgupta) – Tut. Sections 1 & 3
Sundaresan Raman (email: sundaresan.raman) – Tut. Sections 2 & 4

Course Website: http://csis/faculty/sundarb/courses/lics

1. Scope and Objective:

The objective of this course is to introduce the formal study of Logic for Computer Science
undergraduates. Within this context the course covers first order propositional and predicate
logics and briefly touches upon temporal logics. Natural Deduction as a proof system for
propositional and predicate logics is covered. Soundness and Correctness proofs are also covered
but only for propositional logic. It also covers some applications in modeling and reasoning about
programs - in particular, model checking based on LTL and program verification using Floyd-Hoare
logic. The relationship between formal logic and pragmatics of computing is highlighted via a few
specialized topics: the satisfiability problem in propositional logic and Horn-clause problem
solving.

2. Text Book:
T1: Michael Huth and Mark Ryan. Logic in Computer Science – Modelling and Reasoning
about Systems. Cambridge University Press. 2nd Edition. 2004.

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
3. Course Plan:

3.a. Modules

Module Topics
#

I Introduction to Logics and Proofs. Overview of the interplay of Logic and Computing.

II Propositional Logic: Natural Deduction, Syntax and Semantics, Soundness and


Completeness, Satisfiability.

III Predicate Logic: Syntax and Semantics, Logic Programming, Natural Deduction

IV Program Verification: Floyd-Hoare Logic – Pre-conditions, Post-conditions, and Loop


Invariants.

V Temporal Logic: LTL and Model Checking

3. b. Lecture Schedule:

Lecture Module Topic Learning Outcome(s) Reading


#
#
[The student will be able to: ]

L1 I.a Why study Logic?  state a few reasons to study logics -


and proofs
L1 I.b A broad and selective history of Logic  state typical issues and debates in -
and Proofs in the last century: Hilbert’s formalizing proofs (and
Program and the Formalization mathematical arguments in general)
problem, Russell’s efforts in  distinguish between a constructive
formalization and Russel’s paradox, proof and a non-constructive proof
and Brouwer’s intuitionism.
L2 I.c Logic and Computing: Godel’s  state soundness and completeness -
Incompleteness Result and its impact requirements of proof systems and
on the formalization of mathematics  explain – at a high level – the
implications of Godel’s
incompleteness results

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
L2 I.d Godel, Church, and Turing:  Informally define the notion of -
Computability – Systems for defining “computability”
computability; Church-Turing Thesis.  state the equivalence of schemes /
mechanisms for computability
L2 I.e Time Complexity, Complexity Classes,  define complexity classes P and NP -
Is P = NP?  state what it means to say that P=NP
or P!=NP
L3 I.f Boolean Satisfiability (SAT) and Horn-  (by hand) verify satisfiability of -
Clause Satisfiability problems; their Boolean expressions and Horn-style
relationship to the classes NP and P; expressions.
L3 I.g Logic and Programming: Logic  state the relation between logic and -
Programming and Prolog. programming at a high level
L4 II.a Propositional Logic: Natural Deduction  state the notational conventions T1 Sec.
as a Proof System. used in Natural Deduction 1.2.1
L4 II. b Propositional Logic: Natural Deduction:  apply proof rules involving T1 Sec.
Conjunction Rules conjunction 1.2.1
L4 II.c Propositional Logic: Natural Deduction:  apply proof rules involving T1 Sec.
Implication Rules implication 1.2.1
L5 II.d Propositional Logic: Natural Deduction:  apply proof rules involving T1 Sec.
Disjunction Rules disjunction 1.2.1
L5 II.e Propositional Logic: Natural Deduction:  apply proof rules involving negation T1 Sec.
Negation Rules 1.2.1
L5 II.f Propositional Logic: Natural Deduction:  apply proof rules involving double T1 Sec.
Double Negation Rules negation 1.2.1
L5 II.g Propositional Logic: Natural Deduction:  apply modus tollens, LEM, and PbC in T1 Sec.
Derived Rules: Modus Tollens, Law of proofs 1.2.2
Excluded Middle (LEM), Proof by  derive modus tollens, LEM, and PbC
Contradictio (PbC). from basic proof rules
L6 II.h Syntax: Context Free Grammars (CFG):  define CFGs for simple constructs T1 Sec.
Notation and Examples 1.3
L6 II.i Context Free Grammars: Parse Trees:  illustrate and explain the internal T1 Sec.
Examples structure of context-free constructs 1.3
L7 II.j Propositional Logic: Syntax: Well-  state the formal syntax of T1 Sec.
formed-formulas and grammar. propositional logic as a CFG 1.3
L7 II.k Propositional Logic: Syntax: Different  write grammar rules to define the T1 Sec.

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
forms of grammar: Precedence and syntax of propositional logic with a 1.3
Order of evaluation: Rules to handle specific order of evaluation
precedence and over-ride precedence
L8 II.l Grammars, Parse Trees and Structural  illustrate the relation between T1 Sec.
Induction – Approach languages and inductive proofs 1.4.2
 explain structural induction as a
proof technique
L8 II.m Structural Induction - Examples  write proofs using structural T1 Sec.
induction 1.4.2
L9 II.p Propositional Logic: Semantics: Truth  interpret sentences in propositional T1 Sec.
Tables, Soundness and Completeness logic 1.4.1
 state the soundness and
completeness results w.r.t.
propositional logic
L9 II.q Propositional Logic: Semantics:  argue or verify the equivalence (or T1 Sec.
Equivalence and Normal Forms the lack of it) of given propositional 1.4.1
formulas
L9 II.q Propositional Logic : Soundness  state soundness arguments in T1 Sec.
general and soundness arguments 1.4.3
for logics in particular
L9 II.r Propositional Logic: Soundness Proof  argue that proofs in propositional T1 Sec.
logic are sound 1.4.3
L10 II.s Propositional Logic: Completeness  state completeness arguments in T1 Sec.
general and completeness 1.4.4
arguments for logics in particular
L10 II.t Propositional Logic: Completeness  state completeness arguments for T1 Sec.
Proof Overview propositional logic 1.4.4
L10 II.u Propositional Logic: Completeness  argue that propositional logic is T1 Sec.
Proof complete using structural induction 1.4.4

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
L11 II.v Propositional Logic: Conjunctive  recognize propositional formulas T1 Sec.
Normal Form (CNF) and in CNF / DNF 1.5.2
Disjunctive Normal Form (DNF)  rewrite propositional formulas in
CNF / DNF
L11 II.w Propositional Logic: Validity  verify whether a propositional T1 Sec.
formula is valid or not 1.5.1

L11 II.x Propositional Logic: Validity of  verify validity of a formula in CNF T1 Sec.
specific forms, Algorithm(s) for  write a program to verify validity 1.5.1
validity of a formula in CNF

L12 II.y Propositional Logic: Validity and  verify whether a propositional T1 Sec.
Satisifiability formula is satisfiable or not 1.5.1
 state the relation between validity
and satisifiability of propositional
formulas
L12 II.z Propositional Logic: Horn Clauses  distinguish Horn formulas from T1 Sec.
and Horn Formulas general formulas in propositional 1.5.3
logic
 identify when a propositional
formula can be rewritten in Horn
form
L13 II.aa Propositional Logic: Satisifiability  verify whether a Horn formula is T1 Sec.
of Horn Formulas satisfiable or not 1.5.3

L13 II.ab Propositional Logic: Algorithm for  write a program to verify validity T1 Sec.
Satisfiability of Horn Formulas of a Horn formula 1.5.3

L14 III.a Expressiveness of Propositional  illustrate statements and T1 Sec.


Logic – Limitations: Need for arguments that cannot be 2.1
predicates expressed in propositional logic
 explain why predicates are more
expressive than propositions
L14 III.b Expressiveness of Propositional  illustrate statements that cannot T1 Sec.
Logic – Limitations: Need for be expressed in propositional logic 2.1
variables and quantification  explain how variables and
quantification add expressive
power

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
L14 III.c Introduction to Predicate Logic:  distinguish between predicates T1 Sec.
Predicates vs. Functions and and functions 2.1
Need for Function Terms  explain when function terms are
more expressive than predicates
L15 III.d Predicate Logic: Features  write formulas in predicate logic T1 Sec.
2.2

L15 III.e Predicate Logic: Theorem  explain how proofs in predicate -


Proving: Proof Steps; Automating logic can be approached.
the proof steps.  state issues in automating proofs
steps
L16 III.f Horn Clause Programming:  identify Horn Clauses -
Theorem Proving and Logic  explain the relation between
Programming, Programming with Theorem Proving and Logic
Horn Clauses Programming
 state how Horn Clauses can be
used for programming
L16 III.g Logic Programming and Prolog  perform unification of terms -
Programming: Proof Steps and
Term Unification.

L17 III.h Logic Programming and Prolog  apply search to execute a Prolog -
Programming: Proof Search, program and
Backtracking  explain the use of backtracking in
search
L17 III.i Prolog Programming: Simple  write programs that use search -
Examples and backtracking in Prolog

L18 III.j Prolog Programming: Inductive /  write programs using recursion in -


Recursive definitions Prolog

L18 III.k Prolog Programming: Problem  write reasonably large programs -


Solving in Prolog to solve complex problems using
Prolog
L19 III.l Predicate Logic: Syntax:  write grammar rules for defining T1 Sec.
Grammar terms 2.2.1
 write grammar rules for defining to
formulas in Predicate Logic 2.2.2
 use the grammar rules to parse
formulas in Predicate Logic

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
L19 III.m Predicate Logic: Syntax: Free and  identify and distinguish between T1 Sec.
Bound Variables free and bound variables in 2.2.3
Predicate Logic formulas
L19 III.n Predicate Logic: Proofs and Proof  explain / illustrate the need for a T1 Sec.
Rules: Introduction: Need for a substitution operation in applying 2.2
Substitution Operation proof rules of Predicate Logic

L19 III.o Predicate Logic: Substitution:  apply substitution Predicate Logic T1 Sec.
Definition and Examples formulas 2.2.4

L20 III.p Predicate Logic: Proof Rules:  explain the need for rules for T1
Equality equality 2.3.1
 use the rules for equality
L20 III.q Predicate Logic: Natural  apply rules for universal T1 Sec.
Deduction: Rules for Universal quantification in proofs of 2.3.1
Quantification predicate logic formulas

L20 III.r Predicate Logic: Natural  apply rules for existential T1 Sec.
Deduction: Rules for Existential quantification in proofs of 2.3.1
Quantification predicate logic formulas

L21 III.s Predicate Logic: Natural  illustrate and explain the structure T1 Sec.
Deduction: Proofs of natural deduction proofs of 2.3.1
predicate logic formulas

L21 III.t Predicate Logic: Syntactic  deduce equivalences of formulas T1 Sec.


Equivalence in predicate logic 2.3.2

L22 III.u Predicate Logic: Semantics and  describe the semantics of T1 Sec.
Models predicate logic formulas 2.4
 describe what models are
L23 III.v Predicate Logic: Semantics:  Define models for different T1 Sec.
Defining Models – Examples. (example) theories 2.4.1

L24 III.w Predicate Logic: Semantics:  describe the role of models in T1 Sec.
Model Checking proofs 2.4.1

L24 III.x Predicate Logic: Semantics:  illustrate and explain semantic T1 Sec.

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
Semantic Entailment entailment in predicate logic 2.4.2

L24 III.y Predicate Logic: Semantics:  state and explain validity and T1 Sec.
Validity and Satisifiability satisfiability in Predicate Logic 2.4.3
 explain and illustrate issues in
verifying satisfiability and validity
of formulas in Predicate Logic
L24 III.z Predicate Logic: Soundness and  state and explain claims regarding -
Completeness Soundness and Completeness of
Predicate Logic

L25 III.aa Predicate Logic: Validity of  state the requirements for -


Formulas; Computing Validity; computing (i.e. verifying) validity
Definition of Computability of a formula in Predicate Logic
 identify issues and the complexity
in verifying validity in Predicate
Logic
L25 III.ab Undecidability and the Halting  state and explain the notion of -
Problem undecidability
 state and explain the Halting
problem.
 Provide a diagonalization proof of
the Halting problem
L26 III.ac Predicate Logic: Validity is  provide an explanation for why T1 Sec.
Undecidable: Proof approach Validity in Predicate Logic is 2.5
using Reduction undecidable using the idea of a
reduction to a known undecidable
problem

L26 III.ad Predicate Logic: Validity is  provide an proof argument for T1 Sec.
Undecidable: Proof sketch using why Validity in Predicate Logic is 2.5
Diagonalization undecidable using diagonalization

L27 III.ae State Machines and Graphs  write state machines for simple T1 Sec.
problems / computations 2.7.1
 define a graph and illustrate
 state the relation between a state
machine and a graph
L27 III.af Predicate Logic: Expressiveness:  provide examples of statements T1 Sec.
that cannot be expressed in First

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
Inexpressible Properties: Order Predicate Logic 2.6
Example and Proof.  provide an intuitive argument as
to why such statements are
inexpressible in First Order
Predicate Logic
 provide a rigorous argument as to
why reachability in graphs is
inexpressible in First Order
Predicate Logic
L28 III.ag Existential Second Order Logic:  provide examples of statements T1 Sec.
Expressiveness: Examples(s) that require existential 2.6.1
quantification over predicates

L28 III.ah Universal Second Order Logic:  provide examples of statements T1 Sec.
Expressiveness: Example(s) that require universal 2.6.2
quantification over predicates

L29 IV.a Program Verification: Floyd-  describe what pre-conditions and T1 Sec.
Hoare Logic: Pre-conditions and post-conditions are 4.2.2
Post-Conditions

L29 IV.b Program Verification: Floyd-  write pre-conditions and post- T1 Sec.
Hoare Logic: Assignment conditions for assignment 4.2.2 &
Statements and Sequencing statements 4.3.1
 compose pre-conditions and post-
conditions over sequential
statements
L30 IV.c Program Verification: Floyd-  compose pre-conditions and post- T1 Sec.
Hoare Logic: Conditional conditions over conditional 4.2.2 &
Statements statements 4.3.1

L30 IV.d Program Verification: Floyd-  identify and distinguish between T1 Sec.
Hoare Logic: Program Variables Program Variables and Logical 4.3.1
and Logical Variables Variables in verification using
Floyd-Hoare Logic
 illustrate the need for Logical
Variables with examples
L31 IV.e Program Verification: Verification  apply rules of Floyd-Hoare to T1 Sec.
of Straight-Line programs - verify properties of straight line 4.3.1

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
Examples programs

L31 IV.f Program Verification: Partial  distinguish between partial T1 Sec.


Correctness and Total correctness arguments and total 4.3.1
Correctness correctness arguments

L32 IV.g Program Verification: Floyd-  illustrate and explain what loop T1 Sec.
Hoare Logic: Loop Invariants invariants are 4.2.2 &
4.3.1

L32 IV.h Program Verification: Floyd-  write loop invariants given simple T1 Sec.
Hoare Logic: Verifying loops 4.2.2 &
correctness of Loops: Partial  provide correctness arguments 4.3.1
Correctness using Invariants - using loop invariants
Examples

L33 IV.i Program Verification: Floyd-  provide partial correctness proofs T1 Sec.
Hoare Logic: Proof Rules and for small programs 4.3.1 &
Verification Examples 4.3.2

L33 IV.j Program Verification: Total  provide termination arguments -


Correctness: Termination for loops
Arguments

L34 IV.k Program Verification: Case Study  apply Floyd-Hoare logic to verify -
properties of reasonably large
programs

L34 IV.l Program Verification: Limitations  describe issues and limitations in -


proving correctness of programs

L35 V.a Software Modeling: State  illustrate and explain specification T1 Sec.
Machines using state machines 2.7.1

L35 V.b Software Modeling: Model  describe model checking T1 Sec.


Checking 2.7.1

L36 V.c Truth and Time.  provide examples where “time” T1 Sec.
needs to be specified explicitly in 3.1

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
logical formulas

L36 V.d Modeling Time – Approaches and  provide examples where different T1 Sec.
Examples notions of “time” are explicitly 3.1
used in logical formulas

L37 V.e Linear-time Temporal Logic (LTL)  describe LTL T1 Sec.


- Introduction 3.2

L37 V.f LTL: Syntax: Formulas and Parse  provide examples of formulas in T1 Sec.
Trees LTL 3.2.1
 illustrate internal structure of
formulas in LTL
L38 V.g LTL: Semantics: Transitions  interpret LTL formulas T1 Sec.
3.2.2

L38 V.h LTL: Semantics: Paths  interpret LTL formulas T1 Sec.


3.2.2

L39 V.i LTL: Specifications: Examples  write LTL specifications for T1 Sec.
complex scenarios 3.2.3

L40 V.j Model Checking: Case Study:  define the problem of model T1 Sec.
Problem Statement checking for a particular case 3.3.4 &
3.3.5

L40 IV.k Model Checking: Case Study:  explain intricacies and issues in T1 Sec.
Modeling approach and Issues model checking 3.3.4 &
3.3.5

4. Evaluation

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
4. a. Evaluation Scheme:
Component Weight Date Remarks

Quizzes (4) 4x15M=60M In Tutorial / Lecture Sessions 1 session notice


(Open Book)
Assignments (2) 40M 2 to 3 weeks one in Sep. and Take Home
(tentative one in Nov. (Teams of 2)
split 10+30)
Mid-Term Test (90 43M 11 Oct. 2014: (scheduled centrally)
minutes) 4.00pm to 5.30am (Open Book)
Comprehensive Exam 57M 11 Dec. 2014: Afternoon (scheduled centrally)
(120 minutes) (Open Book)
TOTAL 200M - -

4. b. Make-up Policy:
- No Make-up will be available for Assignments under any condition.
- Late submission of assignment will incur a penalty of 25% up to 24 hours and a penalty of 50% up to
48 hours from the deadline.
- There will be one make-up (for all four quizzes put together) i.e. a student can take a make-up for at
most one quiz out of the four quizzes. The make-up quiz will be conducted after all the regular
quizzes are done and the coverage for that will be announced later.
- Prior Permission of the Instructor-in-Charge is usually required to get a make-up for the mid-term
test.
- Prior Permission of (Associate) Dean, Instruction is usually required to get a make-up for the
comprehensive exam.
- A make-up shall be granted only in genuine cases where - in the Instructor’s / Dean’s judgment - the
student would be physically unable to appear for the test/exam. Instructor’s / Dean’s decision in this
matter would be final.
4.c. Fairness Policy:
- Student teams are expected to work on their own on assignments.
- All students are expected to contribute equally within a team. The instructor’s assessment
regarding the contributions of team members would be final.
- Any use of unfair means in quizzes, assignment, or test/exam will be reported to the Unfair
means committee and will be subject to the severest penalty possible:
o Unfair means would include copying from other students or from the Web or from
other sources of information including electronic devices.
-

5. Consultation Hours: See course website.

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in
6. Notices: All notices concerning this course will be displayed on the course website only. If there is a need
email would be used on short notice (12 hours) – only BITS Pilani mail would be used.

Instructor –In- Charge

CS F214 / SS F214

Birla Institute of Technology & Science, Pilani Tel: +91 1596 245073
Pilani Campus, Vidya Vihar Fax: +91 1596 244183
Pilani 333031, Rajasthan, India Web: www.pilani.bits-pilani.ac.in

You might also like