COMPSCI 1JC3 Lecture Notes - Lecture 4: Software Development Process, Boolean Function, Boolean Expression
Document Summary
Logic: the branch of mathematics underlying mathematical reasoning, a reasoning system with. It is the study of the principles underlying sound reasoning: formal syntax and precise semantics, concepts of truth and logical consequence, proof system for establishing that statements in the language are true, propositional, first-order, higher-order. Uses of logic: theoretical, computation, programming language, software design, practical use, to write precise documentation, to reason about software, to provide reasoning facilities, software artifacts are by-products of the software development process. Logic in haskell: quantifier-free first-order logic is embedded into haskell, this includes, bool, boolean function, predicates, conditional expressions, guarded function definitions. In haskell, the type bool consists of true and false: boolean expressions are used to make decisions, a boolean function is a function of a type of the following. Bool -> -> bool -> bool: haskell has 3 predefined boolean function, negation: not (not, conjunction: and (&&, disjunction: or (||) Predicate: a function of a type of the following form: