Skip to content

Order of rewrites in logprob submodule is not respected #6353

Closed
@ricardoV94

Description

@ricardoV94

Description

I could be wrong, but when working on #6072, it seemed that the order of the rewrites in the database is only respected when using the kwarg position. Otherwise it seems to be ignored, and only the order of definition matters.

So:

logprob_rewrites_db.register("measurable_ir_rewrites", measurable_ir_rewrites_db, -10, "basic")

Should be:

logprob_rewrites_db.register( 
     "measurable_ir_rewrites", measurable_ir_rewrites_db, "basic", position=-10, 
 )

We should probably also leave an offset between pre-canonicalize and measurable_ir_rewrites (both are supposed to be at -10) in case anyone wants to introduce rewrites between those two phases.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions