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
2
Q
What do counter programs have?
A
variables of type int
labelled statements of the form L:unlabelled_statement
possibly unlabelled statements
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