Now assume that sequential composition is wrongly interprete…
Now assume that sequential composition is wrongly interpreted by the code let rec commExec: commC -> environment -> runTimeState -> runTimeState = fun cmd env state -> match state with (sto,inp,outp) -> match cmd with … | SeqC([]) -> state | SeqC(cmd1 :: cmds) -> commExec cmd1 env (commExec (SeqC cmds) env state) Write the list that is then the result of interpreting (on an empty input list) the program var x; x = 1; write x; x = 3; write x; x = 5
Read DetailsConsider the first-order functional program f x = x + 8 g…
Consider the first-order functional program f x = x + 8 g w = w * 5 h y = y – 2where we want to evaluate h (g (f 7)) using substitutions. Show the result of the first evaluation step for Call-By-Value, and also the result of the first evaluation step for Call-By-Name.
Read Details