Homework # 1
due Monday, September 11, 2:00 PM

Controversies

On the web, find a debate between the proponents of two different languages. Print out an argument (not the whole posting!) from one side and an answer from the other side. Make sure the rebuttal addresses the point(s) argued by the first.

Then, as well as you can, evaluate whether the one argument is still valid, or whether the rebuttal demolished the argument, or something in between. I don't want your opinion; I want reasoned evaluation.

Natural Language Grammars

A simple grammar for English may include the following rules:

<S> ::= <NP> <VP>
<NP> ::= <Det> <N>
<Det> ::= a | the
<N> ::= dog | cat | rat
<VP> ::= <V> <NP>
<V> ::= eats | loves | hates

Show the parse tree using the grammar for the following sentences: (WARNING: see below)

Warning: one of the sentences cannot be parsed; don't draw a parse tree for that one. Instead explain why it doesn't work.

Programming Language Grammars

The syntax diagrams in the textbook use arrows. More traditionally, ``railroad diagrams'' use curves to show which direcion is permitted: a train can never take a sharp corner. The following example shows a true ``railroad diagram.''

Consider a hypothetical programming language with the following definition for a ``block'':

Nonterminals are lowercase words in rectangular boxes. Terminals are either UPPERCASE words in boxes, or literal (quoted) characters in ovals.

Submitting Your Work

This homework is done on paper only. Please put your name and PantherID (email) on the top. Turn the homework in at the beginning of lecture. If you cannot get to lecture ahead of time, please turn it in to my office, EMS 925.


About this document



John Tang Boyland 2017-09-07