{"action":"created","comment":{"url":"https://api.github.com/repos/trailofbits/echidna/pulls/comments/185621769","pull_request_review_id":117013125,"id":185621769,"diff_hunk":"@@ -106,62 +140,65 @@ instance HTraversable VMAction where\n \n \n eCommandUsing :: (MonadGen n, MonadTest m, Typeable a)\n-              => (VMAction Concrete -> m a)\n+              => n SolCall\n+              -> (VMAction Concrete -> m a)\n               -> (VM -> Bool)\n-              -> [SolSignature]\n               -> Command n m VMState\n-eCommandUsing o p ts = Command (\\_ -> pure $ Call <$> genInteractions ts) o\n+eCommandUsing gen ex p = Command (\\_ -> pure $ Call <$> gen) ex\n   [ Ensure $ \\_ (VMState v) _ _ -> assert $ p v\n   , Update $ \\(VMState v) (Call c) _ -> VMState $ execState (execCall c) v\n   ]\n   \n \n-eCommand :: (MonadGen n, MonadTest m) => (VM -> Bool) -> [SolSignature] -> Command n m VMState\n-eCommand = eCommandUsing (\\_ -> pure ())\n+eCommand :: (MonadGen n, MonadTest m) => n SolCall -> (VM -> Bool) -> Command n m VMState\n+eCommand x y = eCommandUsing x (\\_ -> pure ()) y\n \n \n eCommandCoverage :: (MonadGen n, MonadTest m, MonadState VM m, MonadReader CoverageRef m, MonadIO m)\n-                 => (VM -> Bool) -> [SolSignature] -> Command n m VMState\n-eCommandCoverage = eCommandUsing $ \\(Call c) -> execCallCoverage c\n+                 => [SolCall] -> (VM -> Bool) -> [SolSignature] -> [Command n m VMState]\n+eCommandCoverage cov p ts = case cov of\n+  [] -> [eCommandUsing (genInteractions ts) (\\(Call c) -> execCallCoverage c) p]\n+  xs -> map (\\x -> eCommandUsing (mutateCall x) (\\(Call c) -> execCallCoverage c) p) xs\n \n ePropertyUsing :: (MonadCatch m, MonadTest m)\n-             => Command Gen m VMState\n+             => [Command Gen m VMState]\n              -> (m () -> PropertyT IO ())\n              -> VM          \n              -> Int        \n              -> Property\n-ePropertyUsing c f v n = mapConfig (\\x -> x {propertyTestLimit = 10000}) . property $\n+ePropertyUsing cs f v n = mapConfig (\\x -> x {propertyTestLimit = 10000}) . property $\n   f . executeSequential (VMState v) =<< forAllWith printCallSeq\n-  (sequential (linear 1 n) (VMState v) [c]) where\n-    printCallSeq = (\"Call sequence: \" ++) . intercalate \"\\n               \" .\n-      map showCall . sequentialActions\n-    showCall (Action i _ _ _ _ _) = show i ++ \";\"\n+  (sequential (linear 1 n) (VMState v) cs)\n+  where printCallSeq = (\"Call sequence: \" ++) . intercalate \"\\n               \" .\n+          map showCall . sequentialActions\n+        showCall (Action i _ _ _ _ _) = show i ++ \";\"\n \n \n ePropertySeq :: (VM -> Bool)   -- Predicate to fuzz for violations of\n              -> [SolSignature] -- Type signatures to fuzz\n              -> VM             -- Initial state\n              -> Int            -- Max actions to execute\n              -> Property\n-ePropertySeq p ts = ePropertyUsing (eCommand p ts) id             \n+ePropertySeq p ts = ePropertyUsing [eCommand (genInteractions ts) p] id             \n \n \n-ePropertySeqCoverage :: MVar Coverage\n+ePropertySeqCoverage :: [SolCall]\n+                     -> MVar [CoverageInfo]\n                      -> (VM -> Bool)\n                      -> [SolSignature]\n                      -> VM\n                      -> Int\n                      -> Property\n-ePropertySeqCoverage globalCovRef p ts v = ePropertyUsing (eCommandCoverage p ts) writeCoverage v where\n-  writeCoverage :: MonadIO m => ReaderT CoverageRef (StateT VM m) a -> m a\n-  writeCoverage m = do\n-    threadCovRef <- liftIO $ newIORef mempty\n-    let s = runReaderT m threadCovRef\n-    a            <- evalStateT s v\n-    threadCov    <- liftIO $ readIORef threadCovRef\n-    globalCov    <- liftIO $ takeMVar globalCovRef\n-    liftIO $ putMVar globalCovRef (union threadCov globalCov)\n-    return a\n+ePropertySeqCoverage calls cov p ts v = ePropertyUsing (eCommandCoverage calls p ts) writeCoverage v\n+  where\n+    writeCoverage :: MonadIO m => ReaderT CoverageRef (StateT VM m) a -> m a\n+    writeCoverage m = do\n+      threadCovRef <- liftIO $ newIORef ((\"\",[]),empty)","path":"lib/Echidna/Exec.hs","position":198,"original_position":198,"commit_id":"660629d7e960b18f824da21959b771623f33cf97","original_commit_id":"660629d7e960b18f824da21959b771623f33cf97","user":{"login":"japesinator","id":5386869,"avatar_url":"https://avatars2.githubusercontent.com/u/5386869?v=4","gravatar_id":"","url":"https://api.github.com/users/japesinator","html_url":"https://github.com/japesinator","followers_url":"https://api.github.com/users/japesinator/followers","following_url":"https://api.github.com/users/japesinator/following{/other_user}","gists_url":"https://api.github.com/users/japesinator/gists{/gist_id}","starred_url":"https://api.github.com/users/japesinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japesinator/subscriptions","organizations_url":"https://api.github.com/users/japesinator/orgs","repos_url":"https://api.github.com/users/japesinator/repos","events_url":"https://api.github.com/users/japesinator/events{/privacy}","received_events_url":"https://api.github.com/users/japesinator/received_events","type":"User","site_admin":false},"body":"we defined this on line 56 as emptyCoverageInfo, let's either delete that or use it here","created_at":"2018-05-02T20:03:45Z","updated_at":"2018-05-02T20:38:40Z","html_url":"https://github.com/trailofbits/echidna/pull/41#discussion_r185621769","pull_request_url":"https://api.github.com/repos/trailofbits/echidna/pulls/41","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/comments/185621769"},"html":{"href":"https://github.com/trailofbits/echidna/pull/41#discussion_r185621769"},"pull_request":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/trailofbits/echidna/pulls/41","id":185269583,"html_url":"https://github.com/trailofbits/echidna/pull/41","diff_url":"https://github.com/trailofbits/echidna/pull/41.diff","patch_url":"https://github.com/trailofbits/echidna/pull/41.patch","issue_url":"https://api.github.com/repos/trailofbits/echidna/issues/41","number":41,"state":"open","locked":false,"title":"Dev good input detection","user":{"login":"blperez01","id":22142390,"avatar_url":"https://avatars0.githubusercontent.com/u/22142390?v=4","gravatar_id":"","url":"https://api.github.com/users/blperez01","html_url":"https://github.com/blperez01","followers_url":"https://api.github.com/users/blperez01/followers","following_url":"https://api.github.com/users/blperez01/following{/other_user}","gists_url":"https://api.github.com/users/blperez01/gists{/gist_id}","starred_url":"https://api.github.com/users/blperez01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blperez01/subscriptions","organizations_url":"https://api.github.com/users/blperez01/orgs","repos_url":"https://api.github.com/users/blperez01/repos","events_url":"https://api.github.com/users/blperez01/events{/privacy}","received_events_url":"https://api.github.com/users/blperez01/received_events","type":"User","site_admin":false},"body":"Uses a genetic algorithm for coverage guidance where each generation is given the approximate minimal number of inputs from the last generation that achieved maximal coverage. \r\n\r\nAlso modified the command line options as follows:\r\n`echidna-test filename n` runs echidna with coverage using `n` generations for the genetic algorithm\r\n`echidna-test filename` runs echidna without coverage","created_at":"2018-05-01T20:36:08Z","updated_at":"2018-05-02T20:38:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/trailofbits/echidna/pulls/41/commits","review_comments_url":"https://api.github.com/repos/trailofbits/echidna/pulls/41/comments","review_comment_url":"https://api.github.com/repos/trailofbits/echidna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trailofbits/echidna/issues/41/comments","statuses_url":"https://api.github.com/repos/trailofbits/echidna/statuses/660629d7e960b18f824da21959b771623f33cf97","head":{"label":"trailofbits:dev-good-input-detection","ref":"dev-good-input-detection","sha":"660629d7e960b18f824da21959b771623f33cf97","user":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars0.githubusercontent.com/u/2314423?v=4","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"repo":{"id":101585932,"name":"echidna","full_name":"trailofbits/echidna","owner":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars0.githubusercontent.com/u/2314423?v=4","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trailofbits/echidna","description":"Ethereum fuzz testing framework","fork":false,"url":"https://api.github.com/repos/trailofbits/echidna","forks_url":"https://api.github.com/repos/trailofbits/echidna/forks","keys_url":"https://api.github.com/repos/trailofbits/echidna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trailofbits/echidna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trailofbits/echidna/teams","hooks_url":"https://api.github.com/repos/trailofbits/echidna/hooks","issue_events_url":"https://api.github.com/repos/trailofbits/echidna/issues/events{/number}","events_url":"https://api.github.com/repos/trailofbits/echidna/events","assignees_url":"https://api.github.com/repos/trailofbits/echidna/assignees{/user}","branches_url":"https://api.github.com/repos/trailofbits/echidna/branches{/branch}","tags_url":"https://api.github.com/repos/trailofbits/echidna/tags","blobs_url":"https://api.github.com/repos/trailofbits/echidna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trailofbits/echidna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trailofbits/echidna/git/refs{/sha}","trees_url":"https://api.github.com/repos/trailofbits/echidna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trailofbits/echidna/statuses/{sha}","languages_url":"https://api.github.com/repos/trailofbits/echidna/languages","stargazers_url":"https://api.github.com/repos/trailofbits/echidna/stargazers","contributors_url":"https://api.github.com/repos/trailofbits/echidna/contributors","subscribers_url":"https://api.github.com/repos/trailofbits/echidna/subscribers","subscription_url":"https://api.github.com/repos/trailofbits/echidna/subscription","commits_url":"https://api.github.com/repos/trailofbits/echidna/commits{/sha}","git_commits_url":"https://api.github.com/repos/trailofbits/echidna/git/commits{/sha}","comments_url":"https://api.github.com/repos/trailofbits/echidna/comments{/number}","issue_comment_url":"https://api.github.com/repos/trailofbits/echidna/issues/comments{/number}","contents_url":"https://api.github.com/repos/trailofbits/echidna/contents/{+path}","compare_url":"https://api.github.com/repos/trailofbits/echidna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trailofbits/echidna/merges","archive_url":"https://api.github.com/repos/trailofbits/echidna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trailofbits/echidna/downloads","issues_url":"https://api.github.com/repos/trailofbits/echidna/issues{/number}","pulls_url":"https://api.github.com/repos/trailofbits/echidna/pulls{/number}","milestones_url":"https://api.github.com/repos/trailofbits/echidna/milestones{/number}","notifications_url":"https://api.github.com/repos/trailofbits/echidna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trailofbits/echidna/labels{/name}","releases_url":"https://api.github.com/repos/trailofbits/echidna/releases{/id}","deployments_url":"https://api.github.com/repos/trailofbits/echidna/deployments","created_at":"2017-08-27T23:13:10Z","updated_at":"2018-05-02T08:53:26Z","pushed_at":"2018-05-02T20:13:35Z","git_url":"git://github.com/trailofbits/echidna.git","ssh_url":"git@github.com:trailofbits/echidna.git","clone_url":"https://github.com/trailofbits/echidna.git","svn_url":"https://github.com/trailofbits/echidna","homepage":"","size":160,"stargazers_count":134,"watchers_count":134,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":16,"open_issues":11,"watchers":134,"default_branch":"master"}},"base":{"label":"trailofbits:master","ref":"master","sha":"fa68f3f0d0d7dfb85c512ef37ee0073abc638d56","user":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars0.githubusercontent.com/u/2314423?v=4","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"repo":{"id":101585932,"name":"echidna","full_name":"trailofbits/echidna","owner":{"login":"trailofbits","id":2314423,"avatar_url":"https://avatars0.githubusercontent.com/u/2314423?v=4","gravatar_id":"","url":"https://api.github.com/users/trailofbits","html_url":"https://github.com/trailofbits","followers_url":"https://api.github.com/users/trailofbits/followers","following_url":"https://api.github.com/users/trailofbits/following{/other_user}","gists_url":"https://api.github.com/users/trailofbits/gists{/gist_id}","starred_url":"https://api.github.com/users/trailofbits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trailofbits/subscriptions","organizations_url":"https://api.github.com/users/trailofbits/orgs","repos_url":"https://api.github.com/users/trailofbits/repos","events_url":"https://api.github.com/users/trailofbits/events{/privacy}","received_events_url":"https://api.github.com/users/trailofbits/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trailofbits/echidna","description":"Ethereum fuzz testing framework","fork":false,"url":"https://api.github.com/repos/trailofbits/echidna","forks_url":"https://api.github.com/repos/trailofbits/echidna/forks","keys_url":"https://api.github.com/repos/trailofbits/echidna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trailofbits/echidna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trailofbits/echidna/teams","hooks_url":"https://api.github.com/repos/trailofbits/echidna/hooks","issue_events_url":"https://api.github.com/repos/trailofbits/echidna/issues/events{/number}","events_url":"https://api.github.com/repos/trailofbits/echidna/events","assignees_url":"https://api.github.com/repos/trailofbits/echidna/assignees{/user}","branches_url":"https://api.github.com/repos/trailofbits/echidna/branches{/branch}","tags_url":"https://api.github.com/repos/trailofbits/echidna/tags","blobs_url":"https://api.github.com/repos/trailofbits/echidna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trailofbits/echidna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trailofbits/echidna/git/refs{/sha}","trees_url":"https://api.github.com/repos/trailofbits/echidna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trailofbits/echidna/statuses/{sha}","languages_url":"https://api.github.com/repos/trailofbits/echidna/languages","stargazers_url":"https://api.github.com/repos/trailofbits/echidna/stargazers","contributors_url":"https://api.github.com/repos/trailofbits/echidna/contributors","subscribers_url":"https://api.github.com/repos/trailofbits/echidna/subscribers","subscription_url":"https://api.github.com/repos/trailofbits/echidna/subscription","commits_url":"https://api.github.com/repos/trailofbits/echidna/commits{/sha}","git_commits_url":"https://api.github.com/repos/trailofbits/echidna/git/commits{/sha}","comments_url":"https://api.github.com/repos/trailofbits/echidna/comments{/number}","issue_comment_url":"https://api.github.com/repos/trailofbits/echidna/issues/comments{/number}","contents_url":"https://api.github.com/repos/trailofbits/echidna/contents/{+path}","compare_url":"https://api.github.com/repos/trailofbits/echidna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trailofbits/echidna/merges","archive_url":"https://api.github.com/repos/trailofbits/echidna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trailofbits/echidna/downloads","issues_url":"https://api.github.com/repos/trailofbits/echidna/issues{/number}","pulls_url":"https://api.github.com/repos/trailofbits/echidna/pulls{/number}","milestones_url":"https://api.github.com/repos/trailofbits/echidna/milestones{/number}","notifications_url":"https://api.github.com/repos/trailofbits/echidna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trailofbits/echidna/labels{/name}","releases_url":"https://api.github.com/repos/trailofbits/echidna/releases{/id}","deployments_url":"https://api.github.com/repos/trailofbits/echidna/deployments","created_at":"2017-08-27T23:13:10Z","updated_at":"2018-05-02T08:53:26Z","pushed_at":"2018-05-02T20:13:35Z","git_url":"git://github.com/trailofbits/echidna.git","ssh_url":"git@github.com:trailofbits/echidna.git","clone_url":"https://github.com/trailofbits/echidna.git","svn_url":"https://github.com/trailofbits/echidna","homepage":"","size":160,"stargazers_count":134,"watchers_count":134,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":16,"open_issues":11,"watchers":134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/41"},"html":{"href":"https://github.com/trailofbits/echidna/pull/41"},"issue":{"href":"https://api.github.com/repos/trailofbits/echidna/issues/41"},"comments":{"href":"https://api.github.com/repos/trailofbits/echidna/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trailofbits/echidna/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/trailofbits/echidna/statuses/660629d7e960b18f824da21959b771623f33cf97"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"japesinator"}}