Module Code - Title:
CS4182
-
FOUNDATIONS OF COMPUTER SCIENCE 2
Year Last Offered:
2025/6
Hours Per Week:
Grading Type:
N
Prerequisite Modules:
Rationale and Purpose of the Module:
To introduce students to formal ways of thinking about programs, in terms of their terms of their syntactic structure, their design, and formal assertions about the progress of a computations.
Syllabus:
- Review of set theory. Union and intersection of sets, Cartesian, product functions as sets of ordered pairs. Review of logic propositions and logical connectives
- Review of difference between variables in mathematics, and in imperative Programming Languages. Constructing mathematical/assertions about individual statements, and program fragments. Preconditions and Post conditions Proof by induction of assertions about simple while programs.
- A semi-formal approach to structural induction, as a generalisation of induction over the natural numbers, together with its use in describing syntax of arithmetic and Boolean expressions.
- Using Grammars to describe formal languages or notations, regular grammars and context free grammars. BNF and EBNF, Syntax charts. Detailed application to specifying syntax of selected Programming language.
- Introducing static-semantic constraints into programming languages.
- Data Type Constructors, enumerated type, record, tagged and untagged variants, arrays, and sequential files, and their underlying sets of values as finite sets, Cartesian products, disjoint and normal Union, finite maps. Type completeness Copy semantics. Parameter-passing mechanisms and reference variables.
- Formal basis of some commonly-used simple design patterns such as extending a binary operation to an n-ary operation, composing a function with another function, including a function whose domain has been restricted, and grouping functions defined over the same domain into a single function.
Learning Outcomes:
Cognitive (Knowledge, Understanding, Application, Analysis, Evaluation, Synthesis)
On successful completion of this module, students should be able to:
1. Classify mathematical sets and functions according to the specific properties they satisfy.
2. Relate computer programs to mathematical functions and program variables to mathematical variables.
3. Construct assertions about computer programs and combine these assertions into proofs relating to the program's behaviour.
4. Formulate recursive definitions of sets given an informal definition.
5. Compose recursive and iterative implementations of inductive definitions of functions, illustrating the correspondence between the definition and implementation.
6. Parse strings of text to determine if the strings are syntactically correct and the rules are unambiguous for a given language.
Affective (Attitudes and Values)
On successful completion of this module, students should be able to:
1. Acknowledge the links between computer programming and mathematics.
2. Defend the role of mathematics in computer science.
Psychomotor (Physical Skills)
N/A
How the Module will be Taught and what will be the Learning Experiences of the Students:
Research Findings Incorporated in to the Syllabus (If Relevant):
Prime Texts:
W. K. Grassman and Jean-Paul Tremblay (1996)
Logic and Discrete Mathematics A Computer Science Perspective
, Prentice Hall
Eric Lehman, F. T. Leighton, A. R. Meyer (2018)
Mathematics for computer science
, MIT press
Java: A Beginner's Guide, Tenth Edition (2024)
Herbert Schildt, Danny Coward
, Mc Graw Hill
Other Relevant Texts:
Programme(s) in which this Module is Offered:
Semester(s) Module is Offered:
Spring
Module Leader:
Ehsan.Namjoo@ul.ie