USE BOOK TYPES AND PROGRAMMING LANGUAGES AS REFERENCE What are the roles of pickfreshname operation and the condition ct
Posted: Sun May 15, 2022 12:30 pm
USE BOOK TYPES AND PROGRAMMING LANGUAGES AS REFERENCE
What are the roles of pickfreshname operation and the condition
ctxlength ctx = n of the printing routine printtm?
7.2 Shifting and Substitution 85 = The printing routine itself looks like this: let rec printtm ctx t = match t with TmAbs (fi,x,t1) let (ctx',x'). pickfreshname ctx x in pr "(lambda "; pr x'; pr "."; printtm ctx' t1; pr ")" | TmApp(fi, ti, t2) pr "("; printtm ctx tl; pr ; printtm ctx t2; pr ")" | TmVar(fi,x,n) if ctxlength ctx = n then pr (index2name fi ctx x) else pr "[bad index]" 1
What are the roles of pickfreshname operation and the condition
ctxlength ctx = n of the printing routine printtm?
7.2 Shifting and Substitution 85 = The printing routine itself looks like this: let rec printtm ctx t = match t with TmAbs (fi,x,t1) let (ctx',x'). pickfreshname ctx x in pr "(lambda "; pr x'; pr "."; printtm ctx' t1; pr ")" | TmApp(fi, ti, t2) pr "("; printtm ctx tl; pr ; printtm ctx t2; pr ")" | TmVar(fi,x,n) if ctxlength ctx = n then pr (index2name fi ctx x) else pr "[bad index]" 1