Hindley-Milner type inference engine for C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
command/cxxopts
data-structures
frontend
generator
plugin-api
solver
static-analysis
testing
tools
utility
.gitignore
3rdParty.txt
CMakeLists.txt
CompileTests.sh
CreateTestCase.sh
FixExpected.py
LICENSE
Main.cpp
README.md
Reconstruct.py
popl18.pdf

README.md

PsycheC

PsycheC is a Hindley/Milner unification-based type inference engine for C. You can try it online here.

Prerequisites

  • Cmake
  • C++14 compiler
  • Haskell Stack
  • Python

Installing and running

cmake CMakeLists.txt  
make  
cd solver  
stack setup  
stack build  
cd ..  
python Reconstruct.py path/to/file.c

How it works

The science behind our type inference is explained in the following paper:

  • Inference of Static Semantics for Incomplete C Programs

This paper has been accepted for publication in POPL 2018.

About

This is a research project. While we strive to keep the code clean and to make the tool easily accessible, this is an academic effort. Neverless, feel free to provide feedback or to report bugs.

For a wrapper around PsycheC that integrates with your host C compiler, check Cnippet.