For each of the following items explain what the term


Assignment

1. Comment briefly on the role of "syntax" and "semantics" in each of the following scenarios. [NOTE: We are not looking for very deep answers here, just for evidence that you have a good understanding of the basic concepts. A couple of sentences for each scenario should be sufficient.]

a) The tenant in a recently constructed house uses a voice activated assistant to turn on the lights and to adjust the thermostat temperature in their home. (Think of systems like Amazon Alexa, Apple Siri, Google Assistant, or Microsoft Cortana.)

b) A person types the address of the Portland State University home page into a browser on a computer at their local public library.

c) The IRS allows people to submit the information for their tax returns via an online system. An advantage for taxpayers is that the system gives them a prompt notification if it finds any errors in their return, and then provides an opportunity for them to submit a corrected version.

d) An innovative start up is using artificial intelligence to generate two sentence summaries of news articles that are published on major web sites.

2. For each of the following items, explain what the term refers to and why it would be important and/or relevant in the design of a practical programming language:

a) concrete syntax
b) abstraction
c) static semantics
d) dynamic semantics

3. Recall the Prop language of propositional/digital logic whose abstract syntax is described in Haskell by the following definition:

data Prop = FALSE | TRUE | IN String | NOT Prop | OR Prop Prop | AND Prop Prop

For each of the following Boolean-valued expressions (written C/C++ syntax with capital letters denoting parameters/inputs to the circuit being represented), write the associated Haskell expression of type Prop and draw the corresponding AST:

a) !(A || A)
b) !(!A && !!B)
c) A && !B || C

4. Build a circuit using the abstract syntax for Prop to test if two inputs are equal. Justify that your circuit is correct.

5. Is it possible to construct an expression in the Prop language that could produce an infinite sequence of steps in the normalization procedure described in the lectures? Justify your answer.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: For each of the following items explain what the term
Reference No:- TGS02619961

Expected delivery within 24 Hours