Consider an ML-style language with types and type schemes ::= |…

Question Answered step-by-step Consider an ML-style language with types and type schemes ::= |… Consider an ML-style language with types and type schemes? ::= ? | bool | ? ? ? | ? list? ::= ?A (? )Give the typing rules for variables, function abstraction, function application, andlet-binding. Make the form of the typing judgement clear. [5 marks]Give terms M1 and M2 such that N1 is typable (in the empty context) and N2 isnot, whereN1def= letvalf = M1 inM2 endN2def = (fn f ? M2) M1Give all uses of ? ? required in a typing derivation for N1; prove that there doesnot exist a typing derivation for N2. [7 marks]What is a principal type scheme? Give the principal type scheme for N1, or explaininformally why it does not have one. [4 marks]8CST.99.7.913 Communicating Automata and Pi CalculusConcurrent processes are defined by the syntaxP ::= Ahb1, . . . , bni??i.PiP1 | P2newa Pwhere each process identifier A is equipped with a defining equationA(a1, . . . , an)def= PA. Give the transition rules from which transitions of the formP?? P0can be inferred, where ? is of the form a, a or ? . The rules should not usestructural congruence (?). [5 marks]Enumerate the ways in which a transition of the form P|Q?? R can be inferredfrom transitions of P and/or Q, and indicate the form of R in each case. [5 marks]Hence show that if P|Q?? R1, then there exists R2 such that Q|P?? R2 andR1 ? R2. [5 marks]Give an example of P and Q for which newa(P|Q) has a ? -transition but P|newa Qhas no ? -transition. Now suppose that newa(P|Q)?? R1; what syntactic conditionon P ensures that P|newa Q ?? R2 for some R2 with R1 ? R2? Justify youranswer. [5 marks]14 Additional TopicsList some intrinsic properties of wearable computers and how they may develop infuture. [6 marks]What is an Active Badge and how can it be used to locate personnel and equipment?[6 marks]Give four other applications of the Active Badge and write brief notes on each.[4 marks]Choose one of these four applications and explain how the underlying distributedsystem can ensure that the appropriate quality of service is available to the user. Justify each of the following statements, with the help of some formal details andexamples.”The dynamic behaviour of programs in a programming language can be definedin terms of a formal logical system, in which each sentence which can be inferredin the logic represents the evaluation of a piece of program.””The type discipline of a programming language can be defined in terms of a formallogical system, in which each sentence which can be inferred in the logic representsthe assertion that a piece of program obeys the discipline.”[15 marks]Give and explain two examples of theorems about the behaviour of Standard MLprograms which can be expressed and proved in terms of either or both of the twological systems described above.  Show how to encode a general register machine program and the initial configurationof one of its computations into a pair of natural numbers. [6 marks]Outline the design of a register machine that simulates a general register machinecomputation specified by a single natural number. Your machine should takeappropriate action for all possible inputs. [6 marks]6CST.99.3.710 Numerical Analysis IDefine absolute error, relative error and machine epsilon ?m. Although ?m is definedin terms of absolute error, why is it useful as a measurement of relative error?For a floating-point implementation with p = 4, ? = 10, explain the round to evenmethod of rounding using the half-way cases 7.3125, 7.3175 as examples. Image transcription textPython Add exception handling to thefollowing code. so that: {1}: if the data?le can’t open; a file not f… Show more… Show moreImage transcription textQ1: (Exception Handling): (30 points)Write a program calledExceptionHandling.py that … Show more… Show more  Computer Science Engineering & Technology Networking COMPUTER S 6170 Share QuestionEmailCopy link Comments (0)