Clone this wiki locally
Welcome to the pfff Wiki!
Here are the pfff tools:
pfff, a small command line program to test the different programming language parsers
scheck, a lint-like bugs finder
stags, a more precise Emacs tag generator
sgrep, a syntactical grep, to make it easy to find precise code patterns
spatch, a syntactical patch, to make it easy to refactor code
codemap, a semantic source code visualizer/navigator/searcher which can also leverage the information computed by
codegraph. See Examples and Examples2 for screenshots of the tool applied to many different open source projects.
codegraph, a package/module/class dependency visualizer as well as a source code indexer (a.k.a grapher)
codequery, an interactive tool a la SQL to query information about the structure of a codebase using Prolog as the query engine
pfff_db, which does some simple global analysis on a set of source files and store the data in a marshalled or JSON form in a file somewhere (e.g.
Presentation of codemap and codegraph at the OCaml workshop 2013. Slides available at http://ocaml.org/meetings/ocaml/2013/program.html Notes http://www.syslog.cl.cam.ac.uk/2013/09/24/liveblogging-ocaml-workshop-2013/
Look in Changes.
Click on the "Download Source" button in the top right of this window. If you have git installed on your machine you can also do:
$ git clone https://github.com/facebook/pfff.git --depth=1
Then follow the instructions in
essentially tell you to do:
$ ./configure $ make depend $ make; make opt
Here is a screenshot of Codemap when applied on the early source of the Linux kernel.
- Entry points: Vision, Features, Roadmap, work in progress: Pfff manual
- The visualizer: see Codemap, the Linux Plumbers slides and the work in progress: Visualizer manual
- sgrep/spatch: see Sgrep and Spatch
- scheck: see Scheck
- Language specifics analysis and tools: see Matrix
- Internals: see Internals
Look in Internals.
Email to pad at fb dot com or click on "Issues" in the github project bar above.
pfff is a continuation of the work I've done on coccinelle, an advanced refactoring tool for C http://coccinelle.lip6.fr/ I co-designed with Julia Lawall.
Related research work:
- http://research.microsoft.com/en-us/groups/hip/ and especially http://research.microsoft.com/en-us/projects/spatialcode/default.aspx
Related old-school Unix tools:
- Source Insight
- lxr http://lxr.sourceforge.net/en/index.shtml
- a recent polyglot analysis library https://srclib.org/ (aka sourcegraph.com)
- a recent similar effort by Google for C++ and Java: http://www.kythe.io/
- the understand tool https://scitools.com/support/complete-overview-video/