Due Friday, February 12, 2016 at 1pm
Purpose The goal of this problem set is to demonstrate additional competence in programming. In addition, the problem set requires some first Redex modeling skills.
Problem 1 Fix your memo from problem set 1 in response to the editorial criticism.
Problem 2 Develop a Redex model of FSL’s grammar.
Design the metafunction findflights, which finds a flight plan from origin to destination for an FSL configuration. See problem set 1 for a specification of a flight plan.
Problem 3 Most programming languages, including DSLs, impose conditions on programs that go beyond those of the context-free grammars. Checking these conditions is often called type checking, even if the properties checked do not look like regular types.
the origin is not the same as the destination
the origin and destination are actual airports
all airports have unique airport codes
no airport has a flight to itself
no airport specifies two flights with identical airline and flight numbers (to the same airport or different airports)
the airports are properly connected to each other, that is, if airport PQR has a flight on airline AL to airport XYZ, then the latter must have a flight on airline AL going to PQR.
<flightsearch origin="LAX" destination="ORD"
<airport code="BOS" name="Boston Logan">
<flight airline="UA" flightnum="139" to="ORD" />
<flight airline="DL" flightnum="211" to="PDX" />
<flight airline="DL" flightnum="211" to="ORD" />
<flight airline="AA" flightnum="409" to="BOS" />
<airport code="ORD" name="Chicago O'Hare">
<flight airline="AA" flightnum="138" to="BOS" />
<flight airline="DL" flightnum="440" to="BOS" />
<airport code="BOS" name="Boston Something">
<flight airline="DL" flightnum="212" to="BOS" />
Deliverable Email a tar.gz bundle to my CCS email address whose name
combines the last names of the pair in alphabetical order. The tar bundle
must contain a single directory—
;; NameOfPartner1, NameOfPartner2
;; firstname.lastname@example.org, email@example.com
$ ./3.xyz < 3-example1.xml | diff - 3-output1.txt