-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ondemand] more deterministic mutual recursion
Summary: The main source of non-determinism in infer comes from mutual recursion: the analysis will start from somewhere in the cycle and produce different results depending on where it started. This is (worse) because we stop at the first recursive call and return an empty summary for that one, which makes the place where we start in the cycle all the more important. Restart the analysis from a predictable place (the smallest procedure) when a mutual recursion cycle is detected so that we always(?) get the same result. If the recursive structure is complex it may restart a bunch of times but it should always eventually terminate since we must pick a smaller procedure each time (assuming analysing a procedure will always generate the same recursive ondemand requests every time, *cough* that might be a problem...). Reviewed By: skcho Differential Revision: D63633971 Privacy Context Container: L1208441 fbshipit-source-id: b4cae047d0275907bcdf0ac2c626828bd9aa80dc
- Loading branch information
1 parent
2435e8b
commit 8575596
Showing
9 changed files
with
147 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
(* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*) | ||
open! IStd | ||
|
||
exception RecursiveCycle of {recursive: SpecializedProcname.t; ttl: int} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters