Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Purity-Information (former @pure-Annotation) #6

@lukarade

Description

@lukarade

Is your feature request related to a problem?

When working with notebooks, some functions are very resource-intensive and time-consuming to compute.
On the other hand, if you are doing exploratory work, it is necessary to calculate them many times.

Desired solution

To reduce computational cost and errors in development, functions that do not affect a global state should not be recomputed, and their results should be stored.

This is only possible if a function satisfies this criterion:
If a function has neither an influenceable read access nor an observable write access - the function is pure.

A function with at least one observable write access has side effects and is therefore impure.
Since a function with side effects must be re-executed each time, it would be useful to know the reason for these effects.

The information about whether a function is pure or has side effects is called Purity-Information.
The Purity-Information, as well as possible reasons for impurity, propagate from a called function to the calling function.

This makes manual inspection very difficult and prone to error - therefore Purity-Information should be inferred statically.

  • Statically infer the Purity-Information of Python functions
  • For impure Python functions, infer why they are impure
  • Present the statically inferred Purity-Information to the user

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

Subsumes the following issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement 💡New feature or requestepicAn issue that groups several related issues togetherpurityInferring the purity of functions

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions