Lifting deduce from intra_constraint to any_constraint
commita3d47df8d0199d76fc5bae00f9cf5a3a0fe0c6a4
authorStefan Zetzsche <zetzsche@fb.com>
Thu, 4 Aug 2022 16:52:53 +0000 (4 09:52 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 4 Aug 2022 16:52:53 +0000 (4 09:52 -0700)
tree9ee4f5036ad12afb81d2f8d05c72ef58d311093f
parent51b6c573cabd2c07cd137b17090a0efcbe36ea37
Lifting deduce from intra_constraint to any_constraint

Summary:
In D38357535 (https://github.com/facebook/hhvm/commit/507ab1bedbc4c22085cfa1f18e1e7dad620d0702) we assumed a generic `deduce` function with type `val deduce : any_constraint list -> any_constraint list` that we then post-composed with substitution.

In this diff, we weaken the assumption: we only assume a function of type `val deduce : intra_constraint list -> intra_constraint list`, and provide a lifting to `any_constraint list -> any_constraint list`.

The lifting follows the following construction:
`any_constraint list`
`-> {destruct}`
`intra_constraint list * inter_constraint_list`
`-> {deduce x identity}`
`intra_constraint list * inter_constraint_list`
`-> {construct}`
`any_constraint list`

Reviewed By: madgen

Differential Revision: D38392310

fbshipit-source-id: aac05099497f7bb859c0a6b014cdc6189ea37caa
hphp/hack/src/hips/hips_solver.ml
hphp/hack/src/hips/hips_solver.mli
hphp/hack/src/hips/hips_types.ml
hphp/hack/src/hips/hips_types.mli