Discuss the reasons why languages such as fortran and algol


Problem

Describe the tasks that should be carried in implementing a front end for this language and any difficulties that might be encountered. Suppose that the target virtual machine is stack-oriented and that the stack elements are integer values, and addresses can be stored as integers. Explain which other features are required in such a virtual machine.

I. Explain what is meant by a monad in a programming language, giving the two fundamental operations of a monad along with their types.

II. Consider the use of a monad for input-output. For the purposes of this question, take the IO monad as including two operations readint and writeint which respectively read integers from stdin and write integers to stdout. Give the types of these operators.

III. Assume MLreadint and MLwriteint are primitives with side effects for inputoutput and consider the ML expression add1 of type int: let val x = MLreadint() in MLwriteint(x+1); x end. Give a brief and rudimentary clarification of the standards of how the language coming about because of part (II) may be utilized to make a sentence structure analyser taking a token stream as information (by means of calls to work lex()) and giving as result.

Let rec is_even n = if n = 0 then true else is_odd (n - 1) and is_odd n = if n = 0 then false else is_even(n - 1) [8 marks] 4 CST.2016.3.5 4 Compiler Construction Consider writing a compiler for a simple language of expressions given by the following grammar, e ::= n (integer) | ? (read integer input from user) | e + e (addition) | e - e (subtraction) | e ∗ e (multiplication) | (e, e) (pair) | fst e (first projection) | snd e (second projection) theoretical language structure tree relating to. 6 CST.2016.1.7 6 Numerical Methods A picnicker brings hot black coffee and cold milk in two identical insulated flasks and then mixes them for his drink. His friend claims that the drink would have ended up the same temperature if he had mixed the two at home and brought one flask. Note: The temperature of an object is the heat energy within it divided by its heat capacity.

Estimate how many bits the algorithm would use to encode a string consisting of 2000 repetitions of the character "A". Comparative Programming Languages (i) Discuss to what extent a programmer can expect a program that conforms to a standard to generate identical results when run under different conforming compilers on different machines. Discuss the reasons why languages such as Fortran, Algol and PL/I designed in 1900s and 2000s are less widely used than languages designed in the last 20 years.

Request for Solution File

Ask an Expert for Answer!!
Software Engineering: Discuss the reasons why languages such as fortran and algol
Reference No:- TGS03229310

Expected delivery within 24 Hours