Skip to content

Pre-test rules before running a simulation #238

@rafaqz

Description

@rafaqz

Before running any simulation we should run all rules once in a contained environment and give sensible errors/warnings for any problems with them. Instead of having them buried in the middle of a complicated optimisations of the simulation as they are currently.

  1. make sure rules have the correct output types if they have output.
  2. make sure rules only access existing Aux and Grid data. Probably we can do this with AST analysis of the applyrule function.
  3. Check anonymous functions for boxed variables and warn/error
  4. we can run rules on the max and min values present in their init grids, and stencils from the locations of these values for neighborhoods.
  5. test type stability and inference by default, but only throw a warning if it is lacking.

We also need a flag to turn this off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions