ITM 207 Lecture Notes - Prolog, Modeling Language, Functional Programming
Document Summary
Control structure: those that control the flow of processes(logical operators or relational operators) Language (notation ,syntax, semantics) used to write computer program instructions towards the specification of some algorithm or computation. So far we specified algorithms using flowcharts (graphical modelling language). Programming languagesm such as java, c#, and vb. Net are needed to develop a computer executable specification. Declarative programming languages: (ex: lisp, prolog: an algorithm is specified in terms of the results expected from the processing. Imperative programming languages (ex: fortan, java : an algoritm is. Declarative programming language: defines what the result should be. ( the what) Functional programming: lisp (list processing) (defun factorial (n) (if (<= n 1: 1 (* n (factorial (- n 1) )))) Logical programming: prolog: factorial (0,1), factorial (n,f) :- Imprative programming langauges: tells step by step instructions to do certain steps (the how) Fact=1: do 10 j=2, n, fact = fact *j, 10 continue, return, end.