CS4250, Spring 2006, Test 1

CS4250, Spring 2006, Test 1
Chapters 1-6. Time 60 min. Closed books, notes, except your minds only. Use extra paper as needed, but make sure to identify each answer. All questions weight evenly. YOU MUST RETURN THIS PAGE. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. more orthogonality? Explain the most important trade-offs in compilation vs. interpretation. Imagine a language with programs like this: main() begin variable x, y; print(x); end. Suppose every program looks like this. Variable are optional. The only statements are print statements, which can print only single variable or number. There must be at least one print statement. Nothing else. Write BNF, not extended. Write a grammar for assignment statement only. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5; Make sure the grammar is unambiguous. Use the standard precedence, except that * is weaker than /, and the standard associativity except that * associates right to left. We also have () and we also have unary associative minus. Using your grammar, write, for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. Assume that we wanted to make C strongly typed, to improve reliability. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s, vs. programmer’s control as in C/C++?

3 4

5

6 7 8 9

10 Assuming automatic garbage collection as in Java, what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array, is it possible and at what cost, to process a 2dim array col-by-col?
File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250.spring\test1.fm, March 8, 2006

Write a grammar for assignment statement only. Test 1 CS4250. Spring 2006. vs. y. write. but make sure to identify each answer. end. The only statements are print statements. print(x).CS4250. All questions weight evenly.fm. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. Assume that we wanted to make C strongly typed. Spring 2006. Closed books.spring\test1. Nothing else. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. 2006 . except your minds only. March 8. to improve reliability. Use the standard precedence. We also have () and we also have unary associative minus. There must be at least one print statement. more orthogonality? Explain the most important trade-offs in compilation vs. interpretation. Test 1 Chapters 1-6. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. not extended. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. notes. Write BNF. Time 60 min. Suppose every program looks like this. YOU MUST RETURN THIS PAGE. Using your grammar. and the standard associativity except that * associates right to left. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. except that * is weaker than /. Use extra paper as needed. Variable are optional. Make sure the grammar is unambiguous. is it possible and at what cost. which can print only single variable or number. Imagine a language with programs like this: main() begin variable x. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array.

except your minds only. Imagine a language with programs like this: main() begin variable x. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. vs.fm.CS4250. Nothing else. and the standard associativity except that * associates right to left. Spring 2006. Use extra paper as needed. which can print only single variable or number. but make sure to identify each answer. interpretation. March 8. 2006 . We also have () and we also have unary associative minus. There must be at least one print statement. YOU MUST RETURN THIS PAGE. y. Test 1 Chapters 1-6. Suppose every program looks like this. Test 1 CS4250. end.spring\test1. Using your grammar. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. more orthogonality? Explain the most important trade-offs in compilation vs. Spring 2006. print(x). The only statements are print statements. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. not extended. Variable are optional. Make sure the grammar is unambiguous. Write a grammar for assignment statement only. notes. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. Closed books. All questions weight evenly. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. to improve reliability. except that * is weaker than /. Write BNF. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. is it possible and at what cost. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. Time 60 min. write. Assume that we wanted to make C strongly typed. Use the standard precedence.

which can print only single variable or number. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. Using your grammar. except your minds only. Spring 2006. but make sure to identify each answer. Test 1 CS4250.CS4250. Suppose every program looks like this. is it possible and at what cost. Assume that we wanted to make C strongly typed. Closed books. We also have () and we also have unary associative minus. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Make sure the grammar is unambiguous. notes. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language.fm. except that * is weaker than /. Write BNF. All questions weight evenly. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. to improve reliability. not extended. Time 60 min. write. Write a grammar for assignment statement only. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. end.spring\test1. 2006 . There must be at least one print statement. more orthogonality? Explain the most important trade-offs in compilation vs. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. YOU MUST RETURN THIS PAGE. Nothing else. vs. March 8. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. Spring 2006. y. and the standard associativity except that * associates right to left. Variable are optional. Use extra paper as needed. Imagine a language with programs like this: main() begin variable x. Use the standard precedence. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. Test 1 Chapters 1-6. print(x). The only statements are print statements. interpretation.

Write a grammar for assignment statement only. 2006 . Nothing else. not extended.CS4250. Use extra paper as needed. There must be at least one print statement. Suppose every program looks like this. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples.spring\test1. Make sure the grammar is unambiguous. Assume that we wanted to make C strongly typed. March 8. Use the standard precedence. Time 60 min. and the standard associativity except that * associates right to left. Write BNF. We also have () and we also have unary associative minus. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. print(x). Spring 2006. but make sure to identify each answer. Spring 2006. end. YOU MUST RETURN THIS PAGE. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. interpretation. Imagine a language with programs like this: main() begin variable x. is it possible and at what cost. more orthogonality? Explain the most important trade-offs in compilation vs. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. vs. Closed books. Test 1 CS4250. except that * is weaker than /. Test 1 Chapters 1-6.fm. notes. Variable are optional. All questions weight evenly. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. y. except your minds only. which can print only single variable or number. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. to improve reliability. Using your grammar. write. The only statements are print statements.

Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. Make sure the grammar is unambiguous. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. print(x). Spring 2006. Imagine a language with programs like this: main() begin variable x. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. Test 1 CS4250. All questions weight evenly. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. more orthogonality? Explain the most important trade-offs in compilation vs. interpretation. Use extra paper as needed. Write BNF. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. y. Nothing else. Suppose every program looks like this. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. There must be at least one print statement. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs.spring\test1. Closed books. We also have () and we also have unary associative minus. to improve reliability.CS4250. not extended. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. is it possible and at what cost. Use the standard precedence. except your minds only. vs. notes. except that * is weaker than /. end. Variable are optional. Assume that we wanted to make C strongly typed. Test 1 Chapters 1-6. and the standard associativity except that * associates right to left. Write a grammar for assignment statement only. Using your grammar. Spring 2006. The only statements are print statements. Time 60 min. which can print only single variable or number. write.fm. 2006 . March 8. YOU MUST RETURN THIS PAGE. but make sure to identify each answer.

end. Write a grammar for assignment statement only. is it possible and at what cost. Using your grammar. The only statements are print statements. Test 1 CS4250. Test 1 Chapters 1-6. Make sure the grammar is unambiguous. Spring 2006. but make sure to identify each answer. We also have () and we also have unary associative minus. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. and the standard associativity except that * associates right to left. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250.CS4250. notes. Suppose every program looks like this. vs. interpretation. except that * is weaker than /. not extended. Use extra paper as needed. which can print only single variable or number. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. more orthogonality? Explain the most important trade-offs in compilation vs. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples.fm. All questions weight evenly. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Closed books. Variable are optional. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. 2006 . Use the standard precedence. Nothing else. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. except your minds only.spring\test1. print(x). Write BNF. write. Spring 2006. YOU MUST RETURN THIS PAGE. There must be at least one print statement. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. to improve reliability. Assume that we wanted to make C strongly typed. Imagine a language with programs like this: main() begin variable x. March 8. y. Time 60 min.

Spring 2006. Write BNF.CS4250. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. print(x). There must be at least one print statement. more orthogonality? Explain the most important trade-offs in compilation vs. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. Closed books. Variable are optional. Make sure the grammar is unambiguous. Suppose every program looks like this. y. Using your grammar. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. end. All questions weight evenly. is it possible and at what cost. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. We also have () and we also have unary associative minus. Write a grammar for assignment statement only. Imagine a language with programs like this: main() begin variable x. vs. Use the standard precedence. Nothing else. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. not extended. except your minds only. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. and the standard associativity except that * associates right to left. March 8. to improve reliability. but make sure to identify each answer. Assume that we wanted to make C strongly typed. Test 1 Chapters 1-6. Time 60 min. which can print only single variable or number. except that * is weaker than /. Spring 2006. notes.spring\test1. Use extra paper as needed. write. The only statements are print statements. Test 1 CS4250. YOU MUST RETURN THIS PAGE.fm. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. 2006 . interpretation.

All questions weight evenly. Time 60 min. Imagine a language with programs like this: main() begin variable x. end. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs.CS4250. Closed books. Using your grammar. Spring 2006.spring\test1. We also have () and we also have unary associative minus. YOU MUST RETURN THIS PAGE. Make sure the grammar is unambiguous. Nothing else.fm. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. which can print only single variable or number. Spring 2006. vs. March 8. The only statements are print statements. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. y. is it possible and at what cost. more orthogonality? Explain the most important trade-offs in compilation vs. to improve reliability. but make sure to identify each answer. Suppose every program looks like this. print(x). to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. Assume that we wanted to make C strongly typed. Variable are optional. notes. and the standard associativity except that * associates right to left. not extended. There must be at least one print statement. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Test 1 Chapters 1-6. Use the standard precedence. 2006 . except that * is weaker than /. Write BNF. except your minds only. Test 1 CS4250. interpretation. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. write. Write a grammar for assignment statement only. Use extra paper as needed.

Suppose every program looks like this. March 8. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. Time 60 min. to improve reliability. Imagine a language with programs like this: main() begin variable x. interpretation.fm. Assume that we wanted to make C strongly typed. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Spring 2006. which can print only single variable or number. All questions weight evenly. y. notes. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. end. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. but make sure to identify each answer. vs. Make sure the grammar is unambiguous. is it possible and at what cost. 2006 . The only statements are print statements. except that * is weaker than /. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. Write a grammar for assignment statement only. not extended. and the standard associativity except that * associates right to left. write. Using your grammar. Use the standard precedence. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250.spring\test1. We also have () and we also have unary associative minus. print(x). Closed books. except your minds only. Variable are optional. Test 1 Chapters 1-6. Nothing else. Spring 2006.CS4250. Use extra paper as needed. There must be at least one print statement. more orthogonality? Explain the most important trade-offs in compilation vs. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. Write BNF. YOU MUST RETURN THIS PAGE. Test 1 CS4250. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language.

Test 1 CS4250. 2006 . for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. There must be at least one print statement. Using your grammar. y. We also have () and we also have unary associative minus. Assume that we wanted to make C strongly typed. interpretation. Suppose every program looks like this. Time 60 min. which can print only single variable or number. write. end. not extended. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. to improve reliability. All questions weight evenly. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. and the standard associativity except that * associates right to left. notes. Test 1 Chapters 1-6. print(x). Closed books. The only statements are print statements. except that * is weaker than /. is it possible and at what cost. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. more orthogonality? Explain the most important trade-offs in compilation vs. Write BNF. Spring 2006.spring\test1. Make sure the grammar is unambiguous. Nothing else. Variable are optional. Write a grammar for assignment statement only. Use extra paper as needed.fm. except your minds only.CS4250. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Use the standard precedence. YOU MUST RETURN THIS PAGE. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. Spring 2006. vs. but make sure to identify each answer. Imagine a language with programs like this: main() begin variable x. March 8.

programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. YOU MUST RETURN THIS PAGE. but make sure to identify each answer. March 8. Imagine a language with programs like this: main() begin variable x. which can print only single variable or number. Write a grammar for assignment statement only. Write BNF. Suppose every program looks like this. Make sure the grammar is unambiguous. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. to improve reliability. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. is it possible and at what cost. Variable are optional. 2006 . Spring 2006.spring\test1. Use the standard precedence. vs. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array.CS4250. Closed books. Using your grammar. except your minds only. Use extra paper as needed. The only statements are print statements. y. All questions weight evenly.fm. and the standard associativity except that * associates right to left. print(x). NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. Time 60 min. write. We also have () and we also have unary associative minus. Nothing else. Test 1 Chapters 1-6. end. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. interpretation. Test 1 CS4250. notes. not extended. There must be at least one print statement. more orthogonality? Explain the most important trade-offs in compilation vs. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. except that * is weaker than /. Assume that we wanted to make C strongly typed. Spring 2006.

Nothing else. end. Spring 2006. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. 2006 . NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. Make sure the grammar is unambiguous. Time 60 min. but make sure to identify each answer. to improve reliability. Closed books. Variable are optional. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. more orthogonality? Explain the most important trade-offs in compilation vs. notes. except that * is weaker than /. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. and the standard associativity except that * associates right to left. vs. Use the standard precedence. Write a grammar for assignment statement only. YOU MUST RETURN THIS PAGE. Test 1 CS4250. Use extra paper as needed. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. Test 1 Chapters 1-6. Write BNF. There must be at least one print statement.fm. March 8. Spring 2006.spring\test1. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. print(x).CS4250. Imagine a language with programs like this: main() begin variable x. not extended. Using your grammar. The only statements are print statements. except your minds only. which can print only single variable or number. Assume that we wanted to make C strongly typed. All questions weight evenly. is it possible and at what cost. Suppose every program looks like this. interpretation. y. write. We also have () and we also have unary associative minus. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java.

Spring 2006. which can print only single variable or number. Test 1 Chapters 1-6. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. Imagine a language with programs like this: main() begin variable x. Write BNF. Variable are optional. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5.spring\test1. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s. interpretation. There must be at least one print statement. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. Using your grammar. Write a grammar for assignment statement only. All questions weight evenly. more orthogonality? Explain the most important trade-offs in compilation vs. y. YOU MUST RETURN THIS PAGE. but make sure to identify each answer.CS4250. 2006 . except that * is weaker than /. not extended. and the standard associativity except that * associates right to left. Time 60 min. write.fm. print(x). Assume that we wanted to make C strongly typed. vs. notes. a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. is it possible and at what cost. Use the standard precedence. Make sure the grammar is unambiguous. We also have () and we also have unary associative minus. except your minds only. The only statements are print statements. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. Spring 2006. end. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. Closed books. Suppose every program looks like this. March 8. Test 1 CS4250. to improve reliability. Nothing else. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. Use extra paper as needed.

a) what does it mean? b) what was one of the most orthogonal languages? c) what are the trade-offs in less vs. except your minds only.fm. Use extra paper as needed. Test 1 Chapters 1-6. y. NAME___________________________ 1 2 What are the three main language evaluation criteria? Explain the concept of orthogonality of a language. to process a 2dim array col-by-col? File: \steamboat\janikowc\My Documents\Work\Classes\Semesters006\cs4250. Assume that we wanted to make C strongly typed. Spring 2006. but make sure to identify each answer. what are the trade-offs between lazy and immediate memory reclamation? 11 Problem 5/14 use both static and dynamic binding separatelypart (a) b) 12 In row-major array. vs. notes. Use the standard precedence. print(x). end.CS4250. Suppose every program looks like this. Imagine a language with programs like this: main() begin variable x. Write a grammar for assignment statement only. for the example above a) leftmost derivation b) parse tree Why C/C++ are not strongly typed? Give a few reasons/examples. not extended. 2006 . Time 60 min. Spring 2006. more orthogonality? Explain the most important trade-offs in compilation vs. Nothing else. Make sure the grammar is unambiguous. Assignment has a variable on the left and any expression on the right as in the example: x=x+2*5. YOU MUST RETURN THIS PAGE. Test 1 CS4250. and the standard associativity except that * associates right to left. Closed books. There must be at least one print statement. interpretation. Variable are optional. March 8. What would we sacrifice if any? What are the trade-offs in automatic garbage collection such as Java’s.spring\test1. which can print only single variable or number. All questions weight evenly. The only statements are print statements. except that * is weaker than /. is it possible and at what cost. programmer’s control as in C/C++? 3 4 5 6 7 8 9 10 Assuming automatic garbage collection as in Java. Write BNF. Using your grammar. write. We also have () and we also have unary associative minus. to improve reliability.