Lecture 8 - Counter Programs Flashcards

1
Q

fact about general purpose programming languages?

A

they all have the same computational power

also program written in one language can be translated into a functionally equivalent program in another

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do counter programs have?

A

variables of type int
labelled statements of the form L:unlabelled_statement
possibly unlabelled statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What unlabelled statements can we have in counter programs?

A

x = 0
x = y+1
x = y - 1
if x ==0 goto L
halt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly