Javali compiler with global type inference