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

treatment of call/n in static analysis #29

Open
Anniepoo opened this issue Jul 20, 2017 · 1 comment
Open

treatment of call/n in static analysis #29

Anniepoo opened this issue Jul 20, 2017 · 1 comment

Comments

@Anniepoo
Copy link
Member

Anniepoo commented Jul 20, 2017

In swish

  1. Query
    ?-call(member, Y, [a,b]).
    EXPECTED AND OBSERVED: shows a, waits

  2. query
    ?- X=member,call(X, Y, [a,b]).
    EXPECTED: same behavior
    OBSERVED:
    X=member,call(X, Y, [a,b]).
    Arguments are not sufficiently instantiated
    Reachable from:
    '$swish wrapper'(A,B)

This is apparently a failure of the static analyzer to realize that X must be member by the time the call occurs.

Thanks to our official QA department, Vladislav Zorov, for this.

@JanWielemaker
Copy link
Member

If I recall correctly, it used to do this. However, when introducing disjunctions this easily leads to exponential blowup of the analysis. Static analysis can only do so much. If we want full support of (notably) meta-calling we will need runtime sandboxing. I'm not sure whether and how this can be realised without runtime overhead for not sandboxed execution and without complicating the VM too much.

Thinking about a proper explanation why some code cannot be proved safe might be achievable.

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

No branches or pull requests

2 participants