Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
6 of 7 tasks
lukarade opened this issue Mar 6, 2023 · 0 comments
Open
6 of 7 tasks

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

lukarade opened this issue Mar 6, 2023 · 0 comments
Labels
enhancement 💡 New feature or request epic An issue that groups several related issues together purity Inferring the purity of functions

Comments

@lukarade
Copy link
Contributor

lukarade commented Mar 6, 2023

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:

@lukarade lukarade changed the title Purity-Information Purity-Information (former @pure-Annotation) Mar 6, 2023
@lukarade lukarade added the enhancement 💡 New feature or request label Mar 6, 2023
@lars-reimann lars-reimann transferred this issue from Safe-DS/API-Editor Mar 19, 2023
@lars-reimann lars-reimann added the purity Inferring the purity of functions label Mar 19, 2023
@lukarade lukarade added the epic An issue that groups several related issues together label Mar 30, 2023
@lukarade lukarade removed their assignment Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request epic An issue that groups several related issues together purity Inferring the purity of functions
Projects
Status: In Progress
Development

No branches or pull requests

2 participants