Skip to content

Instantly share code, notes, and snippets.

import javax.annotation.Nonnull;
import java.util.Iterator;
import java.util.Set;
import com.ibm.wala.cast.java.ipa.callgraph.JavaSourceAnalysisScope;
import com.ibm.wala.cast.java.loader.JavaSourceLoaderImpl;
import com.ibm.wala.classLoader.IClass;
import com.ibm.wala.ipa.cha.ClassHierarchyException;
import com.ibm.wala.ipa.cha.ClassHierarchyFactory;
@martinschaef
martinschaef / jayhorn_bnf.bnfc
Last active February 17, 2017 11:11
BNF for JayHorn intermediate language
{-
The JayHorn Grammar.
A first attempt.
You have to install cabal (a Haskell thingy) with apt-get or brew.
Then you have to do:
cabal install alex
cabal install happy
cabal install bnfc
@martinschaef
martinschaef / Maun.java
Created January 17, 2017 17:08
Example from Sec 2
public class Maun {
public static class Node {
final Node next;
final int data;
public Node(Node next, int data) {
this.next = next;
this.data = data;
}
import com.google.common.base.Verify;
/**
* @author schaef
* Examples of how to use library stubs
* to find more bugs with Python.
*/
public class BixieStubTest {
public void guavaContracts01(int x) {
@martinschaef
martinschaef / SatBranches_copyprop.cfg
Created January 1, 2017 01:34
Copy Propagator issue
$StaticFields_SatBranches $Global_SatBranches;
int $float37;
int $double40;
Method <A: void <init>()>($in_0)
Return types: java.lang.Throwable, int
Returns: java.lang.Throwable $ex_, int $co_1
locals:
r0: A
Hello World