



























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer Theory
Typology: Study notes
1 / 35
This page cannot be seen from the preview
Don't miss anything!




























(^) It is an executable representation of some algorithm designed to solve some real world problem. (^) There are thus two elements to a computer program: (^) Logic - what we what the program to achieve. (^) Control - how we are going to achieve the end goal. ALGORITHM = LOGIC + CONTROL
(^) The computational model comprises of three sets of abstraction:
Basic Items of Computation Problem Description Model Execution Model
int nfac (int n) { int fac = 1; if (n > 0) for ( int i = 2; i <= n; i++ ) fac = fac * i; return fac; }
(^) Functional style (^) relationships are expressed using functions. (^) E.g. (square (n) ( n n))* (^) This is a function square,that express the relationship between the input n and the output value nn. (^) Logic style (^) relationships are declared using expressions known as clauses. (^) E.g. square(N, M):- M is NN (^) Clauses can be used to express both facts and rules.
(^) the problem description model states how a solution of the given problem has to described.
(^) the problem description model states how the problem itself has to be described.
(^) How to perform the computation? (^) It relates to problem description method (^) Problem description method and the interpretation of the computation mutually determines and presumes each other. (^) In Von Neumann computational model, problem description is the sequence of instructions which specify data and sequence of control instructions and the execution of the given sequence of instructions is the interpretation of the computation.
(^) A rule that prescribes how a single execution step is to be performed. (^) The rule is associated with the chosen problem description method and how the execution of the computation is interpreted.