Shared Flashcard Set

Details

Programming Languages - M2
Midterm 2 definitions for programming languages
6
Computer Science
Undergraduate 3
04/13/2009

Additional Computer Science Flashcards

 


 

Cards

Term
What are some differences between FORTRAN IV and Algol-60 (in terms of arrays?)
Definition
Algol has n-dimensional arrays, while FORTRAN 4 only has arrays up to 3 dimensions
Term
What is the zero-one-infinity principle of programming languages? How can Algol be said to follow this principle
Definition
The zero-one infinity principle pretty much states that you have either 0, 1, or an infinite amount of something. Algol is said to follow this principle because of its arrays for example; arrays in Algol are n-dimensional, in FORTRAN 4 however, you can only have arrays that are up to 3 dimensions.
Term
did FORTRAN IV permit recursive procedures? did Algol-60?
Definition
FORTRAN 4 did not permit recursive procedures, while Algol-60 did allow these
Term
what is the dangling else problem? how does Algol address this problem?
Definition
* a dangling else problem is where you are uncertain as to where an else attaches to.
* algol addressed this problem by requiring a begin … end
Term
when is a grammar said to be ambiguous? how can you prove that a grammar is ambiguous?
Definition
a grammer is said to be ambiguous when there exists more than one derivation tree for a specific string, you can then prove that a grammar is ambiguous by creating a derivation tree of a specific string and checking to see if that may result in more than one derivation tree
Term
what is a leftmost derivation? what is a rightmost derivation?
Definition
~ the leftmost derivation is what is most to the left of a parse tree, the rightmost is what is most to the right. Also, as you perform your derivation, you either work from the left to the right or from the right to the left depending upon whether you want to do rightmost or leftmost derivation
Supporting users have an ad free experience!