public void checkTypeDeclaration ( Decl . Type decl ) { Environment environment = new Environment ( ) ; // Check type is contractive checkContractive ( decl ) ; // Check variable declaration is not empty checkVariableDeclaration ( decl . getVariableDeclaration ( ) , environment ) ; // Check the type invariant checkConditions ( decl . getInvariant ( ) , true , environment ) ; }
Resolve types for a given type declaration . If an invariant expression is given then we have to check and resolve types throughout the expression .