protected void simplifyLibrary ( INode module ) { List < PDefinition > defs = null ; if ( module instanceof SClassDefinition ) { defs = ( ( SClassDefinition ) module ) . getDefinitions ( ) ; } else if ( module instanceof AModuleModules ) { defs = ( ( AModuleModules ) module ) . getDefs ( ) ; } else { // Nothing to do return ; } for ( PDefinition def : defs ) { if ( def instanceof SOperationDefinition ) { SOperationDefinition op = ( SOperationDefinition ) def ; op . setBody ( new ANotYetSpecifiedStm ( ) ) ; op . setPrecondition ( null ) ; op . setPostcondition ( null ) ; } else if ( def instanceof SFunctionDefinition ) { SFunctionDefinition func = ( SFunctionDefinition ) def ; func . setBody ( new ANotYetSpecifiedExp ( ) ) ; func . setPrecondition ( null ) ; func . setPostcondition ( null ) ; } } }
Simplifies a VDM standard library class or module by removing sub - nodes that are likely not to be of interest during the generation of the IR .