Class ProgramValidator

java.lang.Object
org.kigalisim.lang.program.ProgramValidator

public final class ProgramValidator extends Object
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 Details

    • validate

      public static void validate(ParsedProgram program)
      Validate a parsed program, raising a RuntimeException on 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.