-
-
Save anonymous/c04f2f505667786dda0b13da3bcba26c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open3' | |
require 'yaml' | |
class LeakDetection | |
def parseAppList filename | |
File.foreach(filename).with_index do |line, line_num| | |
bob = line | |
bob.encode("UTF-8") | |
cho = YAML.load(bob) | |
puts cho.inspect | |
end | |
end | |
# Need to return and store tye errors. then later process to get all reachable paths | |
def detect_leak inp | |
Open3.popen3("./droidinfer.sh ../#{inp}", :chdir=>"/home/aliarslan/paper93/artifact/binary") {|i,o,e,t| | |
result = o.read.chomp #=> "/" | |
} | |
# Check if successful exec | |
if !(result.include? "Total running") | |
puts "Failed to analyze app...skipping" | |
end | |
app = App.new "inp" | |
# Now read result from file and parse it... | |
File.open("/home/aliarslan/paper93/artifact/#{inp}/type_errors.txt", "r") do |f| | |
f.each_line do |line| | |
# te = TypeError.new() # parse this and store types one at a time | |
# perform cf explain here and store - CHECK IF BFS COMPLETE! | |
end | |
end | |
end | |
end | |
lD = LeakDetection.new | |
lD.parseAppList 'eoeappDetails.txt' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment