addInvariant for type references
Merge branch 'master' of github.com:UCSD-PL/RefScript