Sungkeun Cho
8c4be65754
[inferbo] Ondemand value generation of vector as function parameter
...
Summary:
It generates vector value ondemand when it is given as a parameter.
Depends on D16645589
Reviewed By: ezgicicek
Differential Revision: D16645624
fbshipit-source-id: 7498c8ab2
6 years ago
Sungkeun Cho
f066776b17
[inferbo] Add model: vector size
...
Summary: It adds vector model of the size function
Reviewed By: ezgicicek
Differential Revision: D16645589
fbshipit-source-id: 6518fa228
6 years ago
Sungkeun Cho
7a8e7d13e9
[inferbo] Add model: vector constructor
...
Summary: It adds vector model of constructor.
Reviewed By: ezgicicek
Differential Revision: D16645564
fbshipit-source-id: 92241a068
6 years ago
Ezgi Çiçek
b8d25d1301
[inferbo] Fix the model of Collections.emptySet
...
Summary: Models of Java's Collection mistakenly assumed that there was an argument for empty set whereas `Collections.emptySet()` doesn't have any actuals. This diff fixes that an also removes the type argument from the corresponding model definition.
Reviewed By: skcho
Differential Revision: D16582314
fbshipit-source-id: d4304dc60
6 years ago
Ezgi Çiçek
0682ccc1e9
[cost][inferbo] Add models for indexOf
...
Reviewed By: skcho
Differential Revision: D16089480
fbshipit-source-id: 1065a1830
6 years ago
Ezgi Çiçek
2db1a3b8e3
[cost,inferBo] Add models for Collections.unmodifiable* getters
...
Reviewed By: ngorogiannis
Differential Revision: D15901108
fbshipit-source-id: fa399412a
6 years ago
Josh Berdine
cfc1c8be36
[copyright] Remove years
...
Reviewed By: jvillard
Differential Revision: D15771884
fbshipit-source-id: e2997e3a3
6 years ago
Ezgi Çiçek
99eda7e3a8
[inferbo,cost] Fix java arrays
...
Reviewed By: mbouaziz, ddino
Differential Revision: D15602327
fbshipit-source-id: d17253a15
6 years ago
Ezgi Çiçek
5b2a36409c
[inferbo] Add models for org.json.JSONArray
...
Reviewed By: jvillard
Differential Revision: D15577727
fbshipit-source-id: 829a93fc0
6 years ago
Ezgi Çiçek
98ecc13a5e
[inferbo,cost] Add models for java.util.Arrays and java.util.List
...
Reviewed By: jvillard
Differential Revision: D15577408
fbshipit-source-id: f9e94dc35
6 years ago
Ezgi Çiçek
da13e52b27
[inferbo] Generalize String.length to CharSequence.length
...
Reviewed By: mbouaziz
Differential Revision: D14951988
fbshipit-source-id: 6c8906d2a
6 years ago
Ezgi Çiçek
c85563d606
[inferbo,cost] Add cost models for java.util.Collections
...
Reviewed By: mbouaziz
Differential Revision: D15080211
fbshipit-source-id: 91c9b6dba
6 years ago
Ezgi Çiçek
6d25b0990d
[cost,purity] Model java's Map as Collections
...
Reviewed By: jeremydubreil, mbouaziz
Differential Revision: D14935325
fbshipit-source-id: 798feb68e
6 years ago
Ezgi Çiçek
105e50d432
[inferbo,cost] Add models for SparseArray
...
Reviewed By: mbouaziz
Differential Revision: D14936048
fbshipit-source-id: f07b74c38
6 years ago
Jules Villard
686231ec6e
[SIL] change `variable_initialization()` builtin to a new auxiliary instruction
...
Summary:
Instead of emitting an ad-hoc builtin on variable declaration emit a new
metadata instruction. This allows us to remove the code matching on that
ad-hoc builtin that had to be inserted in several checkers.
Inferbo & pulse used that information meaningfully and had to undergo
some minor changes to cope with the new metada instruction.
Reviewed By: ezgicicek
Differential Revision: D14833100
fbshipit-source-id: 9b3009d22
6 years ago
Ezgi Çiçek
b802620bc8
[cost] Add cost models for loop invariant functions
...
Reviewed By: jvillard
Differential Revision: D14832961
fbshipit-source-id: 0d1b3353d
6 years ago
Ezgi Çiçek
ba42e3fa46
[inferbo] Add models for CF
...
Reviewed By: jvillard
Differential Revision: D14616101
fbshipit-source-id: e938737a9
6 years ago
Ezgi Çiçek
857c59e022
[inferbo] Add model for Java's cast
...
Reviewed By: mbouaziz
Differential Revision: D14599837
fbshipit-source-id: 379301463
6 years ago
Ezgi Çiçek
ce0ccc10ec
[inferbo,cost] Add models for Java Strings
...
Reviewed By: mbouaziz, skcho
Differential Revision: D14522624
fbshipit-source-id: 1ec2e0389
6 years ago
Ezgi Çiçek
713c308fc7
[inferbo] Generalize models for Java iterators
...
Reviewed By: skcho
Differential Revision: D14539894
fbshipit-source-id: b225aa7de
6 years ago
Sungkeun Cho
22aea43f76
[inferbo] Assign unknown value for unknown functions
...
Reviewed By: mbouaziz
Differential Revision: D14363188
fbshipit-source-id: 5e7216dc1
6 years ago
Sungkeun Cho
8ea92c51e0
[inferbo] Suppress ALLOC_IS_ZERO for C++'s array object
...
Reviewed By: mbouaziz
Differential Revision: D14122889
fbshipit-source-id: d0c99a5e6
6 years ago
Ezgi Çiçek
cab28a9461
[inferbo] Check collection constructor size
...
Reviewed By: mbouaziz
Differential Revision: D14122995
fbshipit-source-id: eeb2fceab
6 years ago
Ezgi Çiçek
11af20ef86
[inferbo] Model list constructors with arguments
...
Reviewed By: mbouaziz, ddino
Differential Revision: D14083727
fbshipit-source-id: 13219330f
6 years ago
Sungkeun Cho
ad08184d3b
[inferbo] Keep alias of simple plus/minus arithmetic
...
Summary: It keeps alias of simple plus/minus arithmetic in order to pruning the value of "++i" expression.
Reviewed By: mbouaziz
Differential Revision: D14080230
fbshipit-source-id: d3af32a32
6 years ago
Sungkeun Cho
bd136ac24e
[inferbo] Prune string length at "if(fgets(s, ...))"
...
Summary:
If the result of `fgets` is not-null, the length of `s` should be
bigger than or equal to 1.
Reviewed By: mbouaziz
Differential Revision: D13939994
fbshipit-source-id: 298fe33f4
6 years ago
Sungkeun Cho
5a5f83a492
[inferbo] Add strcat model
...
Reviewed By: mbouaziz
Differential Revision: D13915381
fbshipit-source-id: e385130f3
6 years ago
Sungkeun Cho
7b7e6990e4
[inferbo] Add models for basic array iterator
...
Reviewed By: mbouaziz
Differential Revision: D13858898
fbshipit-source-id: 4518dad05
6 years ago
Sungkeun Cho
7a4862b994
[inferbo] Revise std::array::at model
...
Reviewed By: mbouaziz
Differential Revision: D13814848
fbshipit-source-id: c03153927
6 years ago
Sungkeun Cho
ca463d17c1
[inferbo] Add strcpy model
...
Reviewed By: mbouaziz
Differential Revision: D13800678
fbshipit-source-id: 7816ecc4b
6 years ago
Sungkeun Cho
371dc2060f
[inferbo] Add strndup model
...
Reviewed By: mbouaziz
Differential Revision: D13668557
fbshipit-source-id: e6d3d4161
6 years ago
Sungkeun Cho
7fda4f1cc2
[inferbo] Revise strncpy model
...
Summary:
`strncpy` should update the `c_strlen` value.
Depends on D13668505
Reviewed By: mbouaziz
Differential Revision: D13668536
fbshipit-source-id: 64e09c734
6 years ago
Sungkeun Cho
bc6829344f
[inferbo] Change RiskyLibCall trace to non-final
...
Reviewed By: mbouaziz
Differential Revision: D13709906
fbshipit-source-id: 146ee0e08
6 years ago
Sungkeun Cho
0d07a240ea
[inferbo] Literal string on stack location
...
Summary:
It adds semantics of assignment of literal string to stack locations, e.g., `char s[] = "hello";`.
Depends on D13668414
Reviewed By: ezgicicek, mbouaziz
Differential Revision: D13668505
fbshipit-source-id: 72caf35c3
6 years ago
Sungkeun Cho
6e04a9469b
[inferbo] Revise memcpy model
...
Summary:
`memcpy` should copy the contents of the source to the destination.
Depends on D13634754
Reviewed By: ezgicicek, mbouaziz
Differential Revision: D13668414
fbshipit-source-id: cb0ff2010
6 years ago
Sungkeun Cho
9bd1191669
[inferbo] Add fgets model
...
Summary: It adds the fgets model.
Reviewed By: mbouaziz
Differential Revision: D13634754
fbshipit-source-id: 147745483
6 years ago
Sungkeun Cho
58cdefc118
[inferbo] Add strlen model
...
Summary: It extends the abstract location for C string length, i.e., the first index of the null character in character array.
Reviewed By: mbouaziz
Differential Revision: D13634241
fbshipit-source-id: d2727d5f5
6 years ago
Sungkeun Cho
5aa26dc32e
[inferbo] Add an allocsite type for literal strings
...
Reviewed By: mbouaziz
Differential Revision: D13689870
fbshipit-source-id: 658884b9c
6 years ago
Sungkeun Cho
f4b4f68e6f
[inferbo] Move decl_local to BufferOverrunUtils
...
Reviewed By: mbouaziz
Differential Revision: D13690953
fbshipit-source-id: 85cd11b2f
6 years ago
Sungkeun Cho
d5faf2de52
[inferbo] Ignore encoding error in the snprintf model
...
Reviewed By: mbouaziz
Differential Revision: D13588979
fbshipit-source-id: 4cd9de71d
6 years ago
Sungkeun Cho
05ceaebb7d
[inferbo] Add model of String::operator==
...
Reviewed By: jvillard
Differential Revision: D13552213
fbshipit-source-id: a74460e87
6 years ago
Sungkeun Cho
0e5a902ac6
[inferbo] Add model of String::length
...
Reviewed By: mbouaziz
Differential Revision: D13547914
fbshipit-source-id: 7d496d11a
6 years ago
Sungkeun Cho
b84c519070
[inferbo] Add model of String::empty
...
Reviewed By: mbouaziz
Differential Revision: D13547863
fbshipit-source-id: 9e3497873
6 years ago
Sungkeun Cho
196a602c25
[inferbo] Add model of basic_string
...
Reviewed By: mbouaziz, jvillard
Differential Revision: D13527054
fbshipit-source-id: 97915e462
6 years ago
Sungkeun Cho
a48421aa0a
[inferbo] XML escape in L.d_printfln
...
Reviewed By: mbouaziz
Differential Revision: D13527168
fbshipit-source-id: 0ae420cbb
6 years ago
Mehdi Bouaziz
33aa07357f
[inferbo] Model Java collections using arrays
...
Reviewed By: ezgicicek, skcho
Differential Revision: D13190960
fbshipit-source-id: fba435f34
6 years ago
Mehdi Bouaziz
8f060939d6
[inferbo] Java pointers, arrays and collections
...
Reviewed By: ezgicicek
Differential Revision: D13128600
fbshipit-source-id: 0dd876692
6 years ago
Sungkeun Cho
e52b1e077e
[inferbo] Conditional proof obligation
...
Summary:
In order to avoid FPs due to lack of relational info, we apply a heuristic: proof obligations has a latest pruned values,
then it is instantiated at Call statements. If there is a bottom value in the instantiated pruned values, we can say the
program point where the proof obligation is introduced is unreachable with the given parameters of the function.
Depends on D13414441
Reviewed By: mbouaziz
Differential Revision: D13414483
fbshipit-source-id: 61bd34ebb
6 years ago
Mehdi Bouaziz
b8fb4b5abc
[inferbo] Separate Java from C arrays
...
Reviewed By: skcho, jvillard
Differential Revision: D13190942
fbshipit-source-id: 6b7f4225b
6 years ago
Mehdi Bouaziz
e5e7237d9d
[inferbo] Move type models to their own file
...
Reviewed By: ezgicicek
Differential Revision: D13449611
fbshipit-source-id: 6b6170f56
6 years ago