Part 1 : type-checker and interpreter
Requisitos de finalización
MAIN TASK
Extend the interpreter and the type-checker to take into account:- the additional unary and binary operators
- the pairs and projections
- the constructors and pattern matching
BONUS TASKS
- check whether pattern matching is exhaustive
- allow nested patterns
- (hard) check whether pattern matching with nested patterns is exhaustive
- check that no variable is introduced twice in a pattern
- switch to type inference
- switch to type inference with parametric polymorphism
SKELETON
Archive file with a project skeletonThe directory contains
- lexer.mll, parser.mly : description of the concrete syntax, generating a parser using ocamllex and menhir
- miniml.ml : description of the abstract syntax trees (types, expressions, declarations and programs)
- typechecker.ml (to be completed) : type-checking functions, to be completed
- interpreter.ml (to be completed): computing the value of a program
- minimli.ml : the main program for the interpreter : reads a file given as an argument, performs parsing, type-checking and evaluation, prints the value if successful.
Última modificación: domingo, 28 de septiembre de 2025, 11:36