/type-theory

Practical homework from type theory course

Primary LanguageOCaml

Type Theory

This repository contains practical homework from type theory course.

Task 1

Given an arbitrary untyped lambda expression — build expression tree and then print the expression with all parentheses in-place.

Task 2

Given an arbitrary untyped lambda expression which has normal form — find it's beta normal form and print it alongside with all beta-reduction steps.

Task 3

Given an arbitrary untyped lambda expression — find the most general type using unification algorithm (light version of algorithm W which is used in Hindley-Milner's type system) and print all the steps of achieving the needed type. Also, inform the user if the expression has no type.