Interface ProgramValidationLogic
-
- All Known Implementing Classes:
BaseValidationLogic
public interface ProgramValidationLogic
A logic for validatingProgram
s. Depending on the language, different requirements on inheritance hierarchies or code members' signatures can be required: those are to be implemented inside thevalidateAndFinalize(Program)
method, that should throw aProgramValidationException
whenever such requirements are not met.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
validateAndFinalize(Program program)
Validates the givenProgram
, ensuring its consistency.
-
-
-
Method Detail
-
validateAndFinalize
void validateAndFinalize(Program program) throws ProgramValidationException
Validates the givenProgram
, ensuring its consistency. This identifies erroneous situations (e.g., code members with the same signature) that can crash the analysis. During validation, the program is also finalized by populating additional data structures (e.g., computing the instances of allCompilationUnit
s defined in the program).- Parameters:
program
- the program to validate- Throws:
ProgramValidationException
- if the program has an invalid structure
-
-