You are on page 1of 12

Lecture 2

Models of Computation &


Language Attributes
Model Of Computation
• A model of computation is a model which
describes how an output of a
mathematical function is computed given
an input.

• A model describes how units of


computations, memories, and
communications are organized.

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-2


Categories (Sequential Model)

• A sequential computational model is one in


which instructions are executed one after
another.
• There may be branches in the program, but
the general principle is that each
instruction follows on from the previous
one.
• Sequential models
- FSM
- PDA
- TM

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-3


Categories (Functional Model)
• A function model or functional model is a
structured representation of the functions
(activities, actions, processes, operations)
within the modeled system or subject area.
• Functional models
- Lambda calculus
- Abstract rewriting systems
- Combinatory logic

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-4


Lambda Calculus

• Lambda calculus is a formal system in


mathematical logic for expressing
computation based on function abstraction
and application using variable binding and
substitution.
• It is a universal model of computation that
can be used to simulate any Turing
machine. It was introduced by the
mathematician Alonzo Church in the 1930s
as part of his research into the foundations
of mathematics.

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-5


Lambda Calculus

• Lambda calculus consists of constructing


lambda terms and performing reduction
operations on them. In the simplest form of
lambda calculus, terms are built using only
the following rules:

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-6


Categories (Concurrent Model)

• Concurrent computing describes a process


where multiple programs or threads are
managed by one computing system
through the process of alternating
timeshared slices.

• Concurrent models
- Actor model
- Cellular automaton
- Kahn process networks

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-7


Lambda Calculus

Some Math's ???


Not Today!!
😇
Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-8
Actor Model

• The actor model in computer science is a


mathematical model of concurrent computation
that treats actor as the universal primitive of
concurrent computation.
• In response to a message it receives, an actor can:
make local decisions, create more actors, send
more messages, and determine how to respond to
the next message received.
• Actors may modify their own private state, but can
only affect each other indirectly through
messaging

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-9


Actor Model

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-10


General attributes of a good
Language
• Clarity, simplicity, and unity - provides both a
framework for thinking about algorithms and a
means of expressing those algorithms

• Orthogonality -every combination of features is


meaningful

• Naturalness for the application - program structure


reflects the logical structure of algorithm

• Support for abstraction - program data reflects


problem being solved
Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-11
General attributes of a good
Language
• Ease of program verification - verifying that program
correctly performs its required function

• Programming environment - external support for the


language

• Portability of programs - transportability of the resulting


programs from the computer on which they are developed to
other computer systems

• Cost of use - program execution, program translation,


program creation, and program maintenance

Copyright © 2017 Pearson Education, Ltd. All rights reserved. 1-12

You might also like