Skip to content

Quantification expressions should have their own name scope #10

@sadboy

Description

@sadboy

Currently, a quantification expression does not introduce a name scope, which means any variables bound by the expression is "pass through" to the parent scope. The original consideration was to simplify witness binding. For example,

class P(process):
    def setup():
        self.n = 1

    def run():
        some(n in [1, 2], q in [2, 3])
        output(n, q)

the existential quantification in P.run() will bind q in the local scope of run, but will also bind the process-level `n``. The latter behavior which would be counter-intuitive, and runs contrary to Python's binding rules for comprehensions.

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