Package org.kigalisim.lang.program
Class ProgramValidator
java.lang.Object
org.kigalisim.lang.program.ProgramValidator
Static validator for cross-operation constraints that are only visible after a
program has been parsed into its operation model.
Runs at interpret time (see QubecTalkInterpreter.interpret) so that both
validate and run report the same errors before a simulation executes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidate(ParsedProgram program) Validate a parsed program, raising aRuntimeExceptionon the first conflict found.
-
Method Details
-
validate
Validate a parsed program, raising aRuntimeExceptionon the first conflict found.Checks each policy on its own so that policies no scenario references are still validated, then checks each scenario's stacked view (the default stanza plus the scenario's policies) so that conflicts split across stanzas are caught too.
- Parameters:
program- the parsed program to validate.
-