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

Configurable error handling/states #29

Closed
bramvdbogaerde opened this issue Nov 18, 2021 · 3 comments
Closed

Configurable error handling/states #29

bramvdbogaerde opened this issue Nov 18, 2021 · 3 comments
Labels
Enhancement New feature or request

Comments

@bramvdbogaerde
Copy link
Member

Currently, if the analysis encounters a (semantic) error in the program under analysis, the analysis results in bottom.

It might be interesting to add an extension to MAF to support error state (for alle kinds of errors, type errors, variable lookup errors, ...) and make it configurable so that bottom can still be returned or an exception can still be thrown if desired.

@noahvanes
Copy link
Collaborator

The good news is that we already have a configurable way to ignore or include those errors in the places where they occur most (i.e., the primitives) because of the monadic abstraction with ‘MonadError’: analyses that want to ignore failures can just implement method ‘fail’ as bottom, while others can keep the information. Perhaps we can take a similar approach for the analyses themselves as well?

@noahvanes noahvanes added the Enhancement New feature or request label Nov 21, 2021
@noahvanes
Copy link
Collaborator

Also related to: #21

@noahvanes
Copy link
Collaborator

noahvanes commented Feb 9, 2022

Proposed solution has been implemented (see 9d98129). One can easily configure how to handle/model errors by providing an appropriate implementation of method fail. By default, this method now logs the error (to aid debugging) and returns bottom (which causes the analysis to halt for the program path where the error was encountered, but does not include any information about the error state in the analysis results).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants