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

Avoid calling pure methods in client code #83

Open
mernst opened this issue Mar 24, 2017 · 0 comments
Open

Avoid calling pure methods in client code #83

mernst opened this issue Mar 24, 2017 · 0 comments

Comments

@mernst
Copy link
Member

mernst commented Mar 24, 2017

Chicory adds calls to pure methods to a program. Chicory assumes that calling a pure method does not affect the program's behavior. However, sometimes there is a method that ought to be pure but is not; when Chicory adds a call to such a method, Chicory changes the program's behavior.

Issue #82 shows a test that fails when an allegedly pure method is called. This can be viewed as the test assuming that no pure methods are called, or as the implementation being non-pure. Either way, this test is not compatible with Daikon's standard data observation, which adds calls to pure methods.

If this issue arises again, then we could add a new argument to Daikon that disables calling any methods in the client code. This would degrade Daikon's output, because Daikon would be given less information to generalize from. However, it would enable Daikon to be run over brittle code like the test cases in issue #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant