Sam Blackshear
462bf68f46
killing is_bottom
...
Reviewed By: jberdine
Differential Revision: D3719406
fbshipit-source-id: fdc97f9
8 years ago
Sam Blackshear
f99b30c4cd
abstracting passthroughs more aggressively
...
Reviewed By: jberdine
Differential Revision: D3706040
fbshipit-source-id: 9d0f305
8 years ago
Lázaro Clapp Jiménez Labora
175efddc2b
Make stacktrace and stacktree line number an int option.
...
Reviewed By: sblackshear
Differential Revision: D3718014
fbshipit-source-id: 1c93757
8 years ago
Lázaro Clapp Jiménez Labora
616e8fddd4
Make stacktrace parsing work when line number info is not available.
...
Reviewed By: sblackshear
Differential Revision: D3715702
fbshipit-source-id: cb52f9a
8 years ago
Sam Blackshear
034d2e3c81
adding accessTree.fold
...
Reviewed By: mbouaziz
Differential Revision: D3692539
fbshipit-source-id: 99fbe61
8 years ago
Josh Berdine
25a52c7bbc
Refactor operations on Exp.t in Sil to Exp
...
Summary: No functional change.
Reviewed By: cristianoc
Differential Revision: D3669404
fbshipit-source-id: 1d1f11a
8 years ago
Josh Berdine
701eb20f83
Refactor Sil.exp to Exp.t
...
Summary: Create Exp module and refactor Sil.exp to Exp.t
Reviewed By: cristianoc
Differential Revision: D3669394
fbshipit-source-id: 1f52a90
8 years ago
Lázaro Clapp Jiménez Labora
d23c99a4ea
Add blame_range to crashcontext analysis.
...
Reviewed By: jberdine
Differential Revision: D3674674
fbshipit-source-id: 8d2cc25
8 years ago
Sam Blackshear
33b417c280
generalizing `add_trace` to `add_node`
...
Reviewed By: mbouaziz
Differential Revision: D3616281
fbshipit-source-id: 14fff92
8 years ago
Sam Blackshear
706acdfd9e
generalizing get_trace to get_node
...
Reviewed By: mbouaziz
Differential Revision: D3614509
fbshipit-source-id: b1dc5dd
8 years ago
Sam Blackshear
e9aecd0afe
widen for access trees
...
Reviewed By: jberdine
Differential Revision: D3605415
fbshipit-source-id: 26f1eec
8 years ago
Sam Blackshear
6a1a0d68da
create access paths from expressions
...
Reviewed By: jvillard
Differential Revision: D3605422
fbshipit-source-id: 1ccd9f8
8 years ago
Sam Blackshear
e95ebca786
factoring out some utility methods for testing access-based stuff
...
Reviewed By: jvillard
Differential Revision: D3584798
fbshipit-source-id: cd24e77
8 years ago
Lázaro Clapp Jiménez Labora
9f7cb87bb0
Add stacktrace extras to BoundedCallTree checker.
...
Reviewed By: sblackshear
Differential Revision: D3589871
fbshipit-source-id: 93c3df9
8 years ago
Sam Blackshear
0ca19da3cf
allowing custom procname in analyzerTester
...
Reviewed By: lazaroclapp
Differential Revision: D3590116
fbshipit-source-id: 7fe052f
8 years ago
Sam Blackshear
a33e047377
allow access path base to be an ident as well
...
Reviewed By: dkgi
Differential Revision: D3584658
fbshipit-source-id: ec77b3f
8 years ago
Lázaro Clapp Jiménez Labora
d4a9a6cde1
Add initial stack trace parsing code for semantic blame
...
Reviewed By: sblackshear
Differential Revision: D3585008
fbshipit-source-id: 64a0bda
8 years ago
Sam Blackshear
16b31acfc9
add_trace function for access tree + tests
...
Reviewed By: mbouaziz
Differential Revision: D3565533
fbshipit-source-id: 8d08d52
8 years ago
Lázaro Clapp Jiménez Labora
b9a5a3b5ad
Add initial version (k=1, undirected) of the bounder calltree analysis checker for the Semantic Blame project
...
Reviewed By: sblackshear
Differential Revision: D3568420
fbshipit-source-id: cc58a93
9 years ago
Sam Blackshear
09e45710d3
join for access trees and tests
...
Reviewed By: mbouaziz
Differential Revision: D3555411
fbshipit-source-id: 3dc8276
9 years ago
Josh Berdine
ccd32690d7
Refactor Sil.call_flags into separate CallFlags module
...
Summary:
Move Sil.call_flags type and operations into separate CallFlags
module.
Reviewed By: dulmarod
Differential Revision: D3548086
fbshipit-source-id: 6d264e9
9 years ago
Josh Berdine
2154c2c483
Refactor Sil.unop into separate Unop module
...
Summary: Move Sil.unop type and operations into separate Unop module.
Reviewed By: dulmarod
Differential Revision: D3548077
fbshipit-source-id: 49d3d83
9 years ago
Josh Berdine
9487cab145
Refactor Sil.const into separate Const module
...
Summary: Move Sil.const type and operations into separate Const module.
Reviewed By: dulmarod
Differential Revision: D3548073
fbshipit-source-id: 388d03e
9 years ago
Josh Berdine
32d09545e2
Closure values are not constants
...
Summary:
Move closure values from const to exp. They are not constants, and
this reduces interdependence between Sil types.
Reviewed By: sblackshear
Differential Revision: D3541364
fbshipit-source-id: 1a2f998
9 years ago
Sam Blackshear
b2c422827a
adding <=, tests to access tree domain
...
Reviewed By: mbouaziz
Differential Revision: D3546470
fbshipit-source-id: a31045f
9 years ago
Sam Blackshear
05505b55fd
beginnings of access tree domain, tests
...
Reviewed By: mbouaziz
Differential Revision: D3544575
fbshipit-source-id: 17fa411
9 years ago
Sam Blackshear
9df3b8f653
eliminating dead stores created by copy-propagation
...
Reviewed By: jberdine
Differential Revision: D3471323
fbshipit-source-id: 10431be
9 years ago
Sam Blackshear
314d022e38
add abstraction of access path, use in access path set domain
...
Reviewed By: dkgi
Differential Revision: D3521054
fbshipit-source-id: 3ff515b
9 years ago
Sam Blackshear
b9fefe9d9b
better unit tests for procCfg
...
Reviewed By: jberdine
Differential Revision: D3470096
fbshipit-source-id: 331e54c
9 years ago
Sam Blackshear
cf5871e76f
fixing broken backward/per-instr cfg by taking a different approach
...
Reviewed By: jeremydubreil
Differential Revision: D3461619
fbshipit-source-id: 491b28b
9 years ago
Sam Blackshear
7544e500bf
adding finite access paths, tests, and basic utilities
...
Reviewed By: dkgi
Differential Revision: D3502236
fbshipit-source-id: b49bb32
9 years ago
Sam Blackshear
c1b5a4b03e
don't treat `x = &y` as a copy
...
Reviewed By: jberdine
Differential Revision: D3424198
fbshipit-source-id: 5c0ef58
9 years ago
Josh Berdine
bbec166174
Refactor Sil.typ into separate Typ module
...
Summary:
Now that array types record only static - and therefore constant -
lengths, Sil typ and exp no longer need to be mutually recursive.
This diff:
- splits the recursion in the type definitions of typ and exp,
- splits the recursion in the comparison and pretty-printing
functions,
- and then refactors typ into a separate module.
Reviewed By: cristianoc
Differential Revision: D3423575
fbshipit-source-id: 6130630
9 years ago
Josh Berdine
a6a766b5f5
Refactor Sil.Int into separate IntLit module
...
Summary:
This diff refactors Sil.Int, which represents integer literals, into a
separate module IntLit. There are no dependencies forcing Sil.Int to
be a submodule of Sil, and it is also no simpler as a submodule.
Reviewed By: cristianoc
Differential Revision: D3422910
fbshipit-source-id: 63013f2
9 years ago
Sam Blackshear
49136a187b
fixing bug in exceptional preds/succs in per-instr procCfg
...
Reviewed By: jeremydubreil
Differential Revision: D3346275
fbshipit-source-id: 0db7cb0
9 years ago
Sam Blackshear
25578de26d
redesigning abstract interpreter to allow easy composition of analyses
...
Reviewed By: jberdine
Differential Revision: D3327656
fbshipit-source-id: a5e429f
9 years ago
Sam Blackshear
c92bbf362b
removing need to pass around lists of temporary id's in the frontend
...
Reviewed By: jberdine
Differential Revision: D3245746
fbshipit-source-id: 3594a46
9 years ago
Sam Blackshear
ef1b76d27b
new procCfg type with each node containing at most one instruction
...
Reviewed By: jberdine
Differential Revision: D3273366
fbshipit-source-id: af46536
9 years ago
Sam Blackshear
0becc32a88
factoring Node module out of CFG
...
Reviewed By: jberdine
Differential Revision: D3273314
fbshipit-source-id: fe32f82
9 years ago
Sam Blackshear
f60b17d8b9
correctly handling Sil.Letderef(Var, Var) Sil.Set(Var, _) in copy propagation
...
Reviewed By: jvillard
Differential Revision: D3265032
fb-gh-sync-id: 73d81fa
fbshipit-source-id: 73d81fa
9 years ago
Sam Blackshear
b20ef20644
Allowing custom procCfg node types
...
Reviewed By: jberdine
Differential Revision: D3261163
fb-gh-sync-id: 6971a69
fbshipit-source-id: 6971a69
9 years ago
Sam Blackshear
ebcfae388a
handling Set(Var, _,) as read of var in liveness analysis
...
Reviewed By: jvillard
Differential Revision: D3264597
fb-gh-sync-id: efe1982
fbshipit-source-id: efe1982
9 years ago
Sam Blackshear
49d32859cb
adding optional postprocessing step to transfer functions
...
Reviewed By: jeremydubreil
Differential Revision: D3237864
fb-gh-sync-id: e6e5f92
fbshipit-source-id: e6e5f92
9 years ago
Sam Blackshear
90a5a5912f
allowing extra data to be packaged along with procCfg
...
Reviewed By: jeremydubreil
Differential Revision: D3234490
fb-gh-sync-id: fefeafb
fbshipit-source-id: fefeafb
9 years ago
Sam Blackshear
f3fe199a25
Forcing node ids of procCfg's to be Cfg.Node.id
...
Summary:
Results of AbsInt checkers are node id -> abstract state maps.
It's hard to compare/combine the results of multiple analyses if the node id types are different.
Needed for the upcoming improvements of the preanalysis.
Reviewed By: jvillard
Differential Revision: D3235669
fb-gh-sync-id: c5251cf
fbshipit-source-id: c5251cf
9 years ago
Sam Blackshear
596d8338ee
dealing with exceptional control-flow in abstract interpreter
...
Reviewed By: cristianoc
Differential Revision: D3178139
fb-gh-sync-id: e1f9364
fbshipit-source-id: e1f9364
9 years ago
Sam Blackshear
6aca1cdfef
exceptional procCfg
...
Reviewed By: cristianoc, jeremydubreil
Differential Revision: D3177625
fb-gh-sync-id: 4123d37
fbshipit-source-id: 4123d37
9 years ago
Sam Blackshear
988ceafbf0
adding try/catch/finally instruction to structured SIL
...
Reviewed By: cristianoc
Differential Revision: D3176951
fb-gh-sync-id: 140e0ae
fbshipit-source-id: 140e0ae
9 years ago
Cristiano Calcagno
054ad223a8
Fix control-flow graph shape when conditional is last instruction.
...
Summary:public
When a conditional is the last instruction, there will be a join node leading directly to the exit node.
Some instructions, such as nullification of dead variables, and abstraction, are added to the control flow graph automatically. But, join nodes cannot contain instructions. So when a procedure ends with a conditional, there might be no place to store these instructions.
This diff adds one extra node between the join and the exit node in that situation.
Reviewed By: jvillard
Differential Revision: D3179056
fb-gh-sync-id: 2b9cd7e
fbshipit-source-id: 2b9cd7e
9 years ago
Josh Berdine
e1020c8ebe
Remove -open(Utils) compile flag hack
...
Summary:public
Eliminate the use of the -open Utils command line option passed to the compiler in favor of `open! Utils` in each source file. While slightly convenient, this option causes more headaches than it is worth with other tools e.g. merlin.
Reviewed By: jvillard
Differential Revision: D3168193
fb-gh-sync-id: 4285ef6
fbshipit-source-id: 4285ef6
9 years ago
Sam Blackshear
e54db73bab
pass tenv to the transfer functions
...
Reviewed By: cristianoc
Differential Revision: D3153716
fb-gh-sync-id: 855fc41
fbshipit-source-id: 855fc41
9 years ago
Sam Blackshear
c499645f6f
better names in AbstractDomain and TransferFunctions modules
...
Reviewed By: jeremydubreil
Differential Revision: D3140288
fb-gh-sync-id: 0bc08a4
fbshipit-source-id: 0bc08a4
9 years ago
Sam Blackshear
967dcec7f1
liveness analysis and unit tests
...
Reviewed By: cristianoc
Differential Revision: D3080119
fb-gh-sync-id: a11a6ea
fbshipit-source-id: a11a6ea
9 years ago
Sam Blackshear
c8b87ed0c8
passing caller pdesc into the transfer functions
...
Summary:public It's useful for the transfer functions to understand what the current procedure is. Applications include debugging, implementing context-sensitivity, asking which program variables are parameters, and the list goes on.
In the future, we'll almost certainly want to pass the tenv to the transfer functions as well.
Reviewed By: jberdine
Differential Revision: D3104997
fb-gh-sync-id: 1c0df8f
fbshipit-source-id: 1c0df8f
9 years ago
Cristiano Calcagno
509a666ee0
Refactor Sil.pvar into a separate module.
...
Reviewed By: sblackshear
Differential Revision: D3103575
fb-gh-sync-id: 8e3a786
fbshipit-source-id: 8e3a786
9 years ago
Sam Blackshear
c03f39f20c
Fixing some issues with Obj-C blocks
...
Reviewed By: ddino
Differential Revision: D3074078
fb-gh-sync-id: 4a5c524
fbshipit-source-id: 4a5c524
9 years ago
Sam Blackshear
a71caccc80
address-taken analysis and tests
...
Reviewed By: jeremydubreil
Differential Revision: D3066722
fb-gh-sync-id: 0239cc7
shipit-source-id: 0239cc7
9 years ago
Cristiano Calcagno
c198d76631
Clean up the Procname module, and remove remaining assert false
...
Reviewed By: sblackshear
Differential Revision: D3063888
fb-gh-sync-id: baf4102
shipit-source-id: baf4102
9 years ago
Sam Blackshear
dec843f5f5
copy-propagation analysis + tests
...
Reviewed By: cristianoc
Differential Revision: D3014280
fb-gh-sync-id: ce60320
shipit-source-id: ce60320
9 years ago
Sam Blackshear
8913e38dbd
getting rid of bottom
...
Differential Revision: D3042821
fb-gh-sync-id: 838d948
shipit-source-id: 838d948
9 years ago
Sam Blackshear
730a2afaaf
more consistency with abbreviated functions names in abstract domain signature
...
Reviewed By: dkgi
Differential Revision: D3012533
fb-gh-sync-id: 89d749c
shipit-source-id: 89d749c
9 years ago
Sam Blackshear
ddfd35107c
unit tests for abstract interpreter
...
Reviewed By: dkgi
Differential Revision: D2997610
fb-gh-sync-id: 733b45e
shipit-source-id: 733b45e
9 years ago
Sam Blackshear
2f44f3faa8
adding generic abstract interpreter
...
Reviewed By: dkgi
Differential Revision: D2997068
fb-gh-sync-id: 265c0b9
shipit-source-id: 265c0b9
9 years ago
Sam Blackshear
b62bdc46b6
adding scheduler abstraction and reverse postorder scheduler
...
Reviewed By: dkgi
Differential Revision: D2975916
fb-gh-sync-id: 0b9a8bf
shipit-source-id: 0b9a8bf
9 years ago
Sam Blackshear
85747084b5
adding dependency on ounit
...
Reviewed By: cristianoc
Differential Revision: D2979151
fb-gh-sync-id: d68b2c4
shipit-source-id: d68b2c4
9 years ago
Sam Blackshear
62965e8051
adding runner for OCaml unit tests
...
Reviewed By: cristianoc
Differential Revision: D2977765
fb-gh-sync-id: abb1b8b
shipit-source-id: abb1b8b
9 years ago