Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Commit

Permalink
* README.md: misc
Browse files Browse the repository at this point in the history
  • Loading branch information
pad committed Nov 13, 2013
1 parent 6dbcc03 commit f1423c6
Showing 1 changed file with 19 additions and 30 deletions.
49 changes: 19 additions & 30 deletions README.md
Expand Up @@ -6,8 +6,8 @@ pfff is a set of tools and APIs to perform some static analysis, dynamic
analysis, code visualizations, code navigations, or style-preserving
source-to-source transformations such as refactorings on source code.
For now the effort is focused on PHP but there is preliminary support
for Javascript, C++, Erlang and other languages. There is also
preliminary support for OCaml code so that the framework can be used
for Javascript, C, C++, Java, and other languages. There is also
good support for OCaml code so that the framework can be used
on the code of pfff itself.

For each languages there are mainly 2 libraries, for instance
Expand All @@ -20,21 +20,20 @@ more documentation on how to use or extend pfff.
pfff is also made of few tools:
- pfff, which allows to test the different parsers on a single file
- pfff_db, which does some global analysis on a set of source files and
store the data in a marshalled form in a file somewhere (e.g. ```/tmp/db.json```)
- pfff_db_heavy, which does some heavy language specific global analysis
on a set of source files and store the data in a database somewhere
(e.g. ```/tmp/pfff_db/```)
- codemap, which is a gtk and cairo based source code
visualizer/navigator/searcher leveraging
the information computed previously by pfff_db
store the data in a marshalled form in a file somewhere
(e.g. ```/tmp/db.json```)
- sgrep, a syntactical grep
- spatch, a syntactical patch
- scheck, a bug finder
- scheck_heavy, a bug finder leveraging the information computed previously
by pfff_db_heavy
- stags, an Emacs tag generator
- codequery, an SQL-like code search engine
- codemap, which is a gtk and cairo based source code
visualizer/navigator/searcher leveraging the information computed
previously by pfff_db
- codegraph, also a gtk and cairo based tool, but focused on visualizing
code dependencies

For more information, look at the pfff wiki here:
For more information, look at the pfff wiki:
http://github.com/facebook/pfff/wiki/Main
as well as the ```docs/manual/``` directory.

Expand All @@ -54,8 +53,8 @@ Usage for pfff_db:

```$ ./pfff_db -lang ml -o /tmp/pfff.json ~/pfff```

to analyze all the ```.ml``` and ```.mli``` files under ```~/pfff``` and store metadata
information (the database) in ```/tmp/pfff.json```
to analyze all the ```.ml``` and ```.mli``` files under ```~/pfff``` and store
metadata information (the database) in ```/tmp/pfff.json```

Usage for codemap:
------------------------
Expand All @@ -65,24 +64,14 @@ Usage for codemap:
This should launch a gtk-based GUI that allows you to visualize
source code and perform some code search.

Usage for codegraph:
------------------------

```$ ./codegraph -lang cmt -build ~/pfff```
```$ ./codegraph ~/pfff```

Usage for pfff_db_heavy:
-----------------------------

For now only PHP is supported for the heavy analysis. To build
the heavy database do:

```$ ./pfff_db_heavy -metapath /tmp/pfff_db/ ~/www/```

to analyze all the ```.php``` and ```.phpt``` files under ~/www and store metadata
information (the database) in ```/tmp/pfff_db/```. It may takes some time,
for instance 20 minutes for a PHP codebase with many million lines of code.

Once this is done you can use some of the flags of pfff_db_heavy to
do some analysis as in:

```$ ./pfff_db_heavy -deadcode_analysis /tmp/pfff_db/```
This should launch a gtk-based GUI that allows you to visualize
source code dependencies.

More information
----------------------
Expand Down

0 comments on commit f1423c6

Please sign in to comment.