Reference no: EM133024267
Consider
- the grammar
Expression e := 01succe | true | false | iszeroe | if e then e else e | x| fun (x : T) -> e | (e e) | let x = e in e
Numeric Value nv := 0 1 succ v
Value v := nv | true | false
Type T := int | bool | T -> T
Where numbers are constructed with a successor keyword called succ, i.e. 0 = 0
1 = succ 0
2 = succ (succ 0)
and so on.
and where xs are variables.
Paper 2
Write a paper of max 3 pages (notice that front + back of a paper = 2 pages) where you
1) Using the grammar above, provide an example of expression with exactly 3 free variables.
2) Explain the phenomenon of "variable capture" in the context of substitution. Using the grammar above, provide an example of variable capture that is not the example in the textbook.
3) Using the grammar above, provide a function that returns a function, and provide the derivation tree that shows that such function is well-typed.
4) Explain the difference between Static Scoping (also known as Lexical Scoping) and Dynamic Scoping. Using the grammar above, provide an example, which must be different from the example in the lecture notes, that leads to different results when let-declarations are interpreted with Static Scoping and Dynamic Scoping.
Implementation of MBTI personality assessment
: Choose a historically important figure or a character from a movie, novel, or TV show - Examine your figure or character from the perspective of Jung's
|
Compare the net operating profits of two orders
: Compare the net operating profits of two orders, both for SEK 2,000. One order is for a stocked item and the other is for a non-stocked item
|
Potential vulnerabilities or threats facing organization
: Consider the potential vulnerabilities or threats facing the organization.
|
What are challenges of incorporating social responsibility
: Question - What are the challenges of incorporating social responsibility and sustainability into project management practices
|
Explain the phenomenon of variable capture
: Explain the phenomenon of "variable capture" in the context of substitution. Using the grammar above, provide an example of variable capture
|
What is the price of a bond
: What is the price of a bond with a coupon rate of 6%, payable annually, a face value of $1000, 8 years to maturity, and a yield to maturity of 5.3%
|
What is the present value of the future cash flows
: What is the present value of the future cash flows, if you also could earn $290,000 per year rent on the property? The rent is paid at the end of each year
|
Decisions covering freedom of speech
: Explain the difference between common carriers, broadcasters, and publishers with regard to court decisions covering freedom of speech
|
Make a journal for interstelar company
: Question - On August 31, 2010 Nancy's company borrowed $2,000 from Interstelar Company. Make a Journal for interstelar company
|