1. Programming
languages
• Goal:
– Need
a
way
to
describe
algorithmic
steps
such
that
computer
can
use
them
to
execute
process
– Programming
language
defines
syntax
and
seman;cs
needed
to
translate
our
computa;onal
ideas
into
mechanical
steps
2. Op;ons
for
programming
languages
Compiler
Object
code
Source
code
Output
Interpreter
Checker
3. Op;ons
for
programming
languages
• Low
level
language
uses
instruc;ons
similar
to
internal
control
unit:
– Move
data
from
one
loca;on
to
another
– Execute
a
simple
ALU
opera;on
– Jump
to
new
point
in
sequence
based
on
test
• Checker
confirms
syntax,
sta;c
seman;cs
correct
• Interpreter
just
follows
sequence
of
simple
instruc;ons
Source
code
Low
level
Output
Interpreter
Checker
4. Op;ons
for
programming
languages
• A
high
level
language
uses
more
abstract
terms
–
invert
a
matrix,
compute
a
func;on
• In
a
compiled
language,
those
abstrac;ons
are
converted
back
into
low
level
instruc;ons,
then
executed
Compiler
Object
code
Source
code
High
level
Output
Interpreter
Checker
5. Op;ons
for
programming
languages
• In
an
interpreted
language,
special
program
converts
source
code
to
internal
data
structure,
then
interpreter
sequen;ally
converts
each
step
into
low
level
machine
instruc;on
and
executes
• We
are
going
to
use
Python,
which
belongs
to
this
class
of
programming
languages
Source
code
High
level
Output
Interpreter
Checker