6 \frametitle{\textsc{SPLC
}}
7 \begin{block
}{Features
}
9 \item Implementation language:
10 Clean (
{\tiny\url{http://clean.cs.ru.nl
}})
11 \item Type checking and type inference
12 % \item No multiple recursion\ldots\pause\ yet\ldots\pause%
13 \item Higher order functions
19 \frametitle{Progress since previous presentation
}
21 \item Completely redid typechecking and inference
22 \item Extended semantic analysis with
24 \item Complain when unknown functions are used
25 \item Complain when there is no main
26 \item Complain when
\CI{Void
} is used as a non terminal type
27 \item Complain when duplicate functions are used
28 \item Complain when the main is not of the correct form
30 \item Higher order functions
31 \item Code generation for expressions
32 \item A lot needs to be done
\ldots
36 \begin{frame
}[fragile
]
37 \frametitle{Type checking
}
38 \begin{block
}{Two pass
}
40 \item Constraint collecting
41 \item Constraint satisfaction
45 \begin{block
}{\CI{RWST
}}
47 :: Scheme = Forall
[TVar
] Type
48 :: Gamma :== Map String Scheme
49 :: Typing a :== StateT (Gamma,
[TVar
]) (Either SemError) a
50 :: Substitution :== `Map'.Map TVar Type
51 :: Constraints :==
[(Type, Type)
]
57 \begin{frame
}[fragile
]
58 \frametitle{Code generation
}
61 :: SSMProgram :==
[Instr
]
62 :: Instr = Instr String
[Arg
] String
65 :: Arg = L Label | Lit Int | Raw String
66 :: GenError = Error String
67 :: GenMap :== Map String LoadPlace
68 :: LoadPlace = LDA Int | LDC Int | LDH Int | LDL Int
74 \begin{block
}{\CI{RWST
} we meet again
}
76 :: Gen a :== RWST () SSMProgram (GenMap,
[Label
]) (Either GenError) a
81 \begin{frame
}[fragile
]
83 \begin{block
}{Higher order functions
}
84 Read up on how to implement higher order functions
87 \begin{block
}{Hand in hand with code generation
}
88 To get a fully working compiler and
report before the deadline