-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Tier 2 optimizer's abstract interpreter #114058
Comments
We need a lattice of values that embodies type information, The lattice should look something like this: graph BT;
t("True");
f("False");
bl("bool");
nnull(not NULL);
nnone(not None);
ot(other types);
oc(other constants);
b("bottom(unknown)");
b-->NULL;
b-->nnull;
nnull-->nnone;
nnull-->None;
nnone-->ot;
nnone-->bl;
ot-->oc;
oc-->top;
None-->top;
NULL-->top;
bl-->t;
bl-->f;
t-->top;
f-->top;
|
There should be edges from all the nodes (except |
--------- Co-authored-by: Mark Shannon <[email protected]> Co-authored-by: Jules <[email protected]> Co-authored-by: Guido van Rossum <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
…onGH-115085) --------- Co-authored-by: Mark Shannon <[email protected]> Co-authored-by: Jules <[email protected]> Co-authored-by: Guido van Rossum <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Maybe |
According to Wikipedia, in type theory, Bottom (⊥) is the type that has no values, whereas Top (⊤) is the type that encompasses all values. Maybe we should switch to this terminology, and swap |
graph TB;
t("True");
f("False");
bl("bool");
nnull(not NULL);
nnone(not None);
ot(other types);
oc(other constants);
top("top (unknown)");
bottom("bottom (contradiction)");
top-->NULL;
top-->nnull;
nnull-->nnone;
nnull-->None;
nnone-->ot;
nnone-->bl;
ot-->oc;
oc-->bottom;
None-->bottom;
NULL-->bottom;
bl-->t;
bl-->f;
t-->bottom;
f-->bottom;
|
Offline we agreed that Top is the universal type and Bottom is the empty type, like in my latest diagram. I will update diagrams and text where these terms are used. |
Linked PRs
The text was updated successfully, but these errors were encountered: