PLAST seminar

February 2016

Download as .zip Download as .tar.gz View on GitHub

Videos of our Program Analysis with Datalog seminar have been uploaded on PLAST-lab's YouTube channel.

Slides

Repos

Graph Example

If you are not using the project file, issue the following commands:

bloxbatch -db graph-db -create -overwrite -blocks base
                     bloxbatch -db graph-db -addBlock -file graph-decls.logic
                     bloxbatch -db graph-db -execute -file graph-facts.logic
                     bloxbatch -db graph-db -addBlock -file graph.logic

Otherwise, issue the following commands:

bloxcompiler compileProject graph.project -outDir build
                        bloxbatch -script graph.lb

Aggregation

The example we tried with aggregation on the results of an analysis from Doop.

bloxbatch -db last-analysis -query \
                              '_a(h,v) <- VarPointsTo(_, h, _, v).
                              _b[v] = cnt <- agg<<cnt = count()>> _a(_, v).
                              _c[] = m <- agg<<m = max(cnt)>> _b[_] = cnt.
                              _d(v, cnt) <- _b[v] = cnt, _c[] = cnt.' \
                              -print _d