{"action":"created","comment":{"url":"https://api.github.com/repos/seahorn/seahorn/pulls/comments/75784909","id":75784909,"diff_hunk":"@@ -0,0 +1,151 @@\n+#ifndef PREDICATE_ABSTRACTION__HH_\n+#define PREDICATE_ABSTRACTION__HH_\n+\n+#include \"llvm/Pass.h\"\n+#include \"llvm/IR/Module.h\"\n+#include \"seahorn/HornClauseDB.hh\"\n+#include \"seahorn/HornifyModule.hh\"\n+\n+#include \"ufo/Expr.hpp\"\n+#include \"ufo/Smt/Z3n.hpp\"\n+#include \"ufo/Smt/EZ3.hh\"\n+#include \"seahorn/HornClauseDBWto.hh\"\n+\n+namespace seahorn\n+{\n+\tusing namespace llvm;\n+\n+\tclass HornDbModel\n+\t{\n+\tprivate:\n+\t\tExprMap relToDefMap;\n+\t\tstd::map<Expr, ExprVector> currentCandidates;\n+\tpublic:\n+\t\tHornDbModel() {}\n+\t\tvoid initModelFromFP(HornClauseDB &db, ZFixedPoint<EZ3> &fp);\n+\t\tvoid addDef(Expr fapp, Expr def);\n+\t\tExpr getDef(Expr fapp);\n+\t\tHornDbModel(ExprMap model) : relToDefMap(model) {}\n+\t\tvirtual ~HornDbModel(){}\n+\t\tvoid setCurrentCandidates(std::map<Expr, ExprVector> currentCandidates) { this->currentCandidates = currentCandidates; }\n+//\t\tExprMap& getRelToSolutionMap() {return relToDefMap;}\n+//\t\tvoid setRelToSolutionMap(ExprMap map) {relToDefMap = map;}\n+\t};\n+\n+\tclass HornModelConverter\n+\t{\n+\tpublic:\n+\t\t// converts a model from one database to another. returns false on failure.\n+\t\tvirtual bool convert (HornDbModel &in, HornDbModel &out) = 0;\n+\t};\n+\n+\tclass PredAbsHornModelConverter : public HornModelConverter\n+\t{\n+\tprivate:\n+\t\tstd::map<Expr, ExprMap> relToBoolToTermMap;\n+\t\tstd::map<Expr, Expr> newToOldPredMap;\n+\t\tHornClauseDB* abs_db;\n+\tpublic:\n+\t\tPredAbsHornModelConverter() {}\n+\t\tbool convert (HornDbModel &in, HornDbModel &out);\n+\t\tstd::map<Expr, ExprMap>& getRelToBoolToTermMap() {return relToBoolToTermMap;}\n+\t\tvoid setNewToOldPredMap(std::map<Expr, Expr> &newToOldMap) {newToOldPredMap = newToOldMap;}\n+\t\tvoid setAbsDB(HornClauseDB &db) {abs_db = &db;}\n+\t};\n+\n+\tclass PredicateAbstractionAnalysis\n+\t{\n+\tprivate:\n+\t    std::map<Expr, Expr> oldToNewPredMap;\n+\t    std::map<Expr, Expr> newToOldPredMap;\n+\t    std::map<Expr, ExprVector> currentCandidates;\n+\n+\t    std::unique_ptr<ufo::ZFixedPoint <ufo::EZ3> >  m_fp;\n+\t    HornifyModule& m_hm;\n+\n+\tpublic:\n+\t    PredicateAbstractionAnalysis(HornifyModule &hm) : m_hm(hm) {}\n+\t    ~PredicateAbstractionAnalysis() {m_fp.reset (nullptr);}\n+\n+\t    ufo::ZFixedPoint<ufo::EZ3>& getZFixedPoint () {return *m_fp;}\n+\n+\t    void runAnalysis();\n+\t\tvoid guessCandidate(HornClauseDB &db);\n+\t\tExprVector relToCand(Expr fdecl);\n+\t\tHornClauseDB generateAbstractDB(HornClauseDB &db, PredAbsHornModelConverter &converter);","path":"include/seahorn/PredicateAbstraction.hh","position":75,"original_position":75,"commit_id":"aceda264d1b1f299fa15e87778d6f33fcccfaf4c","original_commit_id":"aceda264d1b1f299fa15e87778d6f33fcccfaf4c","user":{"login":"agurfinkel","id":6082023,"avatar_url":"https://avatars.githubusercontent.com/u/6082023?v=3","gravatar_id":"","url":"https://api.github.com/users/agurfinkel","html_url":"https://github.com/agurfinkel","followers_url":"https://api.github.com/users/agurfinkel/followers","following_url":"https://api.github.com/users/agurfinkel/following{/other_user}","gists_url":"https://api.github.com/users/agurfinkel/gists{/gist_id}","starred_url":"https://api.github.com/users/agurfinkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agurfinkel/subscriptions","organizations_url":"https://api.github.com/users/agurfinkel/orgs","repos_url":"https://api.github.com/users/agurfinkel/repos","events_url":"https://api.github.com/users/agurfinkel/events{/privacy}","received_events_url":"https://api.github.com/users/agurfinkel/received_events","type":"User","site_admin":false},"body":"most of these methods should not be public.","created_at":"2016-08-23T00:30:38Z","updated_at":"2016-08-23T00:30:38Z","html_url":"https://github.com/seahorn/seahorn/pull/40#discussion_r75784909","pull_request_url":"https://api.github.com/repos/seahorn/seahorn/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/comments/75784909"},"html":{"href":"https://github.com/seahorn/seahorn/pull/40#discussion_r75784909"},"pull_request":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/seahorn/seahorn/pulls/40","id":79764206,"html_url":"https://github.com/seahorn/seahorn/pull/40","diff_url":"https://github.com/seahorn/seahorn/pull/40.diff","patch_url":"https://github.com/seahorn/seahorn/pull/40.patch","issue_url":"https://api.github.com/repos/seahorn/seahorn/issues/40","number":40,"state":"open","locked":false,"title":"Predabs","user":{"login":"Chenguang-Zhu","id":19936324,"avatar_url":"https://avatars.githubusercontent.com/u/19936324?v=3","gravatar_id":"","url":"https://api.github.com/users/Chenguang-Zhu","html_url":"https://github.com/Chenguang-Zhu","followers_url":"https://api.github.com/users/Chenguang-Zhu/followers","following_url":"https://api.github.com/users/Chenguang-Zhu/following{/other_user}","gists_url":"https://api.github.com/users/Chenguang-Zhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Chenguang-Zhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chenguang-Zhu/subscriptions","organizations_url":"https://api.github.com/users/Chenguang-Zhu/orgs","repos_url":"https://api.github.com/users/Chenguang-Zhu/repos","events_url":"https://api.github.com/users/Chenguang-Zhu/events{/privacy}","received_events_url":"https://api.github.com/users/Chenguang-Zhu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-02T16:14:20Z","updated_at":"2016-08-23T00:30:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4cfccfe9a8f78ffde7eea48e85e60e05efda5377","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/seahorn/seahorn/pulls/40/commits","review_comments_url":"https://api.github.com/repos/seahorn/seahorn/pulls/40/comments","review_comment_url":"https://api.github.com/repos/seahorn/seahorn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/seahorn/seahorn/issues/40/comments","statuses_url":"https://api.github.com/repos/seahorn/seahorn/statuses/aceda264d1b1f299fa15e87778d6f33fcccfaf4c","head":{"label":"Chenguang-Zhu:predabs","ref":"predabs","sha":"aceda264d1b1f299fa15e87778d6f33fcccfaf4c","user":{"login":"Chenguang-Zhu","id":19936324,"avatar_url":"https://avatars.githubusercontent.com/u/19936324?v=3","gravatar_id":"","url":"https://api.github.com/users/Chenguang-Zhu","html_url":"https://github.com/Chenguang-Zhu","followers_url":"https://api.github.com/users/Chenguang-Zhu/followers","following_url":"https://api.github.com/users/Chenguang-Zhu/following{/other_user}","gists_url":"https://api.github.com/users/Chenguang-Zhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Chenguang-Zhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chenguang-Zhu/subscriptions","organizations_url":"https://api.github.com/users/Chenguang-Zhu/orgs","repos_url":"https://api.github.com/users/Chenguang-Zhu/repos","events_url":"https://api.github.com/users/Chenguang-Zhu/events{/privacy}","received_events_url":"https://api.github.com/users/Chenguang-Zhu/received_events","type":"User","site_admin":false},"repo":{"id":61146470,"name":"seahorn","full_name":"Chenguang-Zhu/seahorn","owner":{"login":"Chenguang-Zhu","id":19936324,"avatar_url":"https://avatars.githubusercontent.com/u/19936324?v=3","gravatar_id":"","url":"https://api.github.com/users/Chenguang-Zhu","html_url":"https://github.com/Chenguang-Zhu","followers_url":"https://api.github.com/users/Chenguang-Zhu/followers","following_url":"https://api.github.com/users/Chenguang-Zhu/following{/other_user}","gists_url":"https://api.github.com/users/Chenguang-Zhu/gists{/gist_id}","starred_url":"https://api.github.com/users/Chenguang-Zhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chenguang-Zhu/subscriptions","organizations_url":"https://api.github.com/users/Chenguang-Zhu/orgs","repos_url":"https://api.github.com/users/Chenguang-Zhu/repos","events_url":"https://api.github.com/users/Chenguang-Zhu/events{/privacy}","received_events_url":"https://api.github.com/users/Chenguang-Zhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Chenguang-Zhu/seahorn","description":"SeaHorn Verification Framework","fork":true,"url":"https://api.github.com/repos/Chenguang-Zhu/seahorn","forks_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/forks","keys_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/teams","hooks_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/hooks","issue_events_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/issues/events{/number}","events_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/events","assignees_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/assignees{/user}","branches_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/branches{/branch}","tags_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/tags","blobs_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/statuses/{sha}","languages_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/languages","stargazers_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/stargazers","contributors_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/contributors","subscribers_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/subscribers","subscription_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/subscription","commits_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/contents/{+path}","compare_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/merges","archive_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/downloads","issues_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/issues{/number}","pulls_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/pulls{/number}","milestones_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/milestones{/number}","notifications_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/labels{/name}","releases_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/releases{/id}","deployments_url":"https://api.github.com/repos/Chenguang-Zhu/seahorn/deployments","created_at":"2016-06-14T18:30:15Z","updated_at":"2016-06-14T18:30:17Z","pushed_at":"2016-08-20T02:12:23Z","git_url":"git://github.com/Chenguang-Zhu/seahorn.git","ssh_url":"git@github.com:Chenguang-Zhu/seahorn.git","clone_url":"https://github.com/Chenguang-Zhu/seahorn.git","svn_url":"https://github.com/Chenguang-Zhu/seahorn","homepage":null,"size":2152,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"seahorn:master","ref":"master","sha":"1c3b2b7c8ed5f280050e5171739244d7a00e8ec1","user":{"login":"seahorn","id":11098044,"avatar_url":"https://avatars.githubusercontent.com/u/11098044?v=3","gravatar_id":"","url":"https://api.github.com/users/seahorn","html_url":"https://github.com/seahorn","followers_url":"https://api.github.com/users/seahorn/followers","following_url":"https://api.github.com/users/seahorn/following{/other_user}","gists_url":"https://api.github.com/users/seahorn/gists{/gist_id}","starred_url":"https://api.github.com/users/seahorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seahorn/subscriptions","organizations_url":"https://api.github.com/users/seahorn/orgs","repos_url":"https://api.github.com/users/seahorn/repos","events_url":"https://api.github.com/users/seahorn/events{/privacy}","received_events_url":"https://api.github.com/users/seahorn/received_events","type":"Organization","site_admin":false},"repo":{"id":31487486,"name":"seahorn","full_name":"seahorn/seahorn","owner":{"login":"seahorn","id":11098044,"avatar_url":"https://avatars.githubusercontent.com/u/11098044?v=3","gravatar_id":"","url":"https://api.github.com/users/seahorn","html_url":"https://github.com/seahorn","followers_url":"https://api.github.com/users/seahorn/followers","following_url":"https://api.github.com/users/seahorn/following{/other_user}","gists_url":"https://api.github.com/users/seahorn/gists{/gist_id}","starred_url":"https://api.github.com/users/seahorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seahorn/subscriptions","organizations_url":"https://api.github.com/users/seahorn/orgs","repos_url":"https://api.github.com/users/seahorn/repos","events_url":"https://api.github.com/users/seahorn/events{/privacy}","received_events_url":"https://api.github.com/users/seahorn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/seahorn/seahorn","description":"SeaHorn Verification Framework","fork":false,"url":"https://api.github.com/repos/seahorn/seahorn","forks_url":"https://api.github.com/repos/seahorn/seahorn/forks","keys_url":"https://api.github.com/repos/seahorn/seahorn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seahorn/seahorn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seahorn/seahorn/teams","hooks_url":"https://api.github.com/repos/seahorn/seahorn/hooks","issue_events_url":"https://api.github.com/repos/seahorn/seahorn/issues/events{/number}","events_url":"https://api.github.com/repos/seahorn/seahorn/events","assignees_url":"https://api.github.com/repos/seahorn/seahorn/assignees{/user}","branches_url":"https://api.github.com/repos/seahorn/seahorn/branches{/branch}","tags_url":"https://api.github.com/repos/seahorn/seahorn/tags","blobs_url":"https://api.github.com/repos/seahorn/seahorn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seahorn/seahorn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seahorn/seahorn/git/refs{/sha}","trees_url":"https://api.github.com/repos/seahorn/seahorn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seahorn/seahorn/statuses/{sha}","languages_url":"https://api.github.com/repos/seahorn/seahorn/languages","stargazers_url":"https://api.github.com/repos/seahorn/seahorn/stargazers","contributors_url":"https://api.github.com/repos/seahorn/seahorn/contributors","subscribers_url":"https://api.github.com/repos/seahorn/seahorn/subscribers","subscription_url":"https://api.github.com/repos/seahorn/seahorn/subscription","commits_url":"https://api.github.com/repos/seahorn/seahorn/commits{/sha}","git_commits_url":"https://api.github.com/repos/seahorn/seahorn/git/commits{/sha}","comments_url":"https://api.github.com/repos/seahorn/seahorn/comments{/number}","issue_comment_url":"https://api.github.com/repos/seahorn/seahorn/issues/comments{/number}","contents_url":"https://api.github.com/repos/seahorn/seahorn/contents/{+path}","compare_url":"https://api.github.com/repos/seahorn/seahorn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seahorn/seahorn/merges","archive_url":"https://api.github.com/repos/seahorn/seahorn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seahorn/seahorn/downloads","issues_url":"https://api.github.com/repos/seahorn/seahorn/issues{/number}","pulls_url":"https://api.github.com/repos/seahorn/seahorn/pulls{/number}","milestones_url":"https://api.github.com/repos/seahorn/seahorn/milestones{/number}","notifications_url":"https://api.github.com/repos/seahorn/seahorn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seahorn/seahorn/labels{/name}","releases_url":"https://api.github.com/repos/seahorn/seahorn/releases{/id}","deployments_url":"https://api.github.com/repos/seahorn/seahorn/deployments","created_at":"2015-03-01T05:08:17Z","updated_at":"2016-08-05T06:47:02Z","pushed_at":"2016-08-23T00:16:56Z","git_url":"git://github.com/seahorn/seahorn.git","ssh_url":"git@github.com:seahorn/seahorn.git","clone_url":"https://github.com/seahorn/seahorn.git","svn_url":"https://github.com/seahorn/seahorn","homepage":null,"size":2444,"stargazers_count":29,"watchers_count":29,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":9,"forks":15,"open_issues":9,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/40"},"html":{"href":"https://github.com/seahorn/seahorn/pull/40"},"issue":{"href":"https://api.github.com/repos/seahorn/seahorn/issues/40"},"comments":{"href":"https://api.github.com/repos/seahorn/seahorn/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/seahorn/seahorn/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/seahorn/seahorn/statuses/aceda264d1b1f299fa15e87778d6f33fcccfaf4c"}}}}
{"actor":{"display_login":"agurfinkel"}}