Solving inter-procedural constraints in shape-like-dict
commit14e702fb04daca8df516a68a1235d74565f18706
authorStefan Zetzsche <zetzsche@fb.com>
Thu, 11 Aug 2022 18:04:45 +0000 (11 11:04 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 11 Aug 2022 18:04:45 +0000 (11 11:04 -0700)
treef8717518d508a611080dbf5d558c7e4a9298bef6
parent78ff7e27292cb1ca10f8b192a706aa0c1ccd85aa
Solving inter-procedural constraints in shape-like-dict

Summary:
We instantiate our generic inter-procedural constraint solver with shape-like-dict. In particular, we implement the mode `SolveConstraints` and introduce a new mode `CloseConstraints`. Their semantics is as follows:
- `CloseConstraints`: Close -> Dump
- `SolveConstraints`: Close -> Simplify -> Dump

(Close denotes closure under substitution of function call constraints.)

Reviewed By: madgen

Differential Revision: D38540691

fbshipit-source-id: de882e0c391abfc239fa6c671ae2381f640a742a
47 files changed:
hphp/hack/src/hips/hips_solver.ml
hphp/hack/src/hips/hips_types.ml
hphp/hack/src/hips/hips_types.mli
hphp/hack/src/shape_analysis/dune
hphp/hack/src/shape_analysis/shape_analysis.ml
hphp/hack/src/shape_analysis/shape_analysis.mli
hphp/hack/src/shape_analysis/shape_analysis_hips.ml
hphp/hack/src/shape_analysis/shape_analysis_hips.mli
hphp/hack/src/shape_analysis/shape_analysis_options.ml
hphp/hack/src/shape_analysis/shape_analysis_pretty_printer.ml
hphp/hack/src/shape_analysis/shape_analysis_solver.ml
hphp/hack/src/shape_analysis/shape_analysis_types.ml
hphp/hack/src/shape_analysis/shape_analysis_types.mli
hphp/hack/src/shape_analysis/shape_analysis_walker.ml
hphp/hack/src/shape_analysis/shape_analysis_walker.mli
hphp/hack/src/typing/tast_check/shape_analysis_logger.ml
hphp/hack/test/shape_analysis/close_constraints/HH_FLAGS [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_assign.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_assign.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_assign_2.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_assign_2.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_simple.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/call_simple.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/dune [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/dynamic.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/dynamic.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/recursion.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/close_constraints/recursion.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/dump_constraints/call.php.exp
hphp/hack/test/shape_analysis/dump_constraints/idx.php.exp
hphp/hack/test/shape_analysis/dump_constraints/idx2.php.exp
hphp/hack/test/shape_analysis/simplify_constraints/dynamic_access3.php.exp
hphp/hack/test/shape_analysis/solve_constraints/HH_FLAGS [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_assign.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_assign.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_assign_2.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_assign_2.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_simple.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/call_simple.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/dune [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/dynamic.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/dynamic.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/recursion.php [new file with mode: 0644]
hphp/hack/test/shape_analysis/solve_constraints/recursion.php.exp [new file with mode: 0644]
hphp/hack/test/shape_analysis/tast_check/argument_as_dynamic.php.exp
hphp/hack/test/shape_analysis/tast_check/incomplete.php.exp
hphp/hack/test/shape_analysis/tast_check/parameter_as_dynamic.php.exp