{"action":"created","issue":{"url":"https://api.github.com/repos/klee/klee/issues/387","repository_url":"https://api.github.com/repos/klee/klee","labels_url":"https://api.github.com/repos/klee/klee/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/klee/klee/issues/387/comments","events_url":"https://api.github.com/repos/klee/klee/issues/387/events","html_url":"https://github.com/klee/klee/pull/387","id":154448627,"number":387,"title":"Modified -debug-print-instructions to write directly on log file.","user":{"login":"andreamattavelli","id":5530090,"avatar_url":"https://avatars.githubusercontent.com/u/5530090?v=3","gravatar_id":"","url":"https://api.github.com/users/andreamattavelli","html_url":"https://github.com/andreamattavelli","followers_url":"https://api.github.com/users/andreamattavelli/followers","following_url":"https://api.github.com/users/andreamattavelli/following{/other_user}","gists_url":"https://api.github.com/users/andreamattavelli/gists{/gist_id}","starred_url":"https://api.github.com/users/andreamattavelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreamattavelli/subscriptions","organizations_url":"https://api.github.com/users/andreamattavelli/orgs","repos_url":"https://api.github.com/users/andreamattavelli/repos","events_url":"https://api.github.com/users/andreamattavelli/events{/privacy}","received_events_url":"https://api.github.com/users/andreamattavelli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-12T10:26:32Z","updated_at":"2016-05-13T18:17:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/klee/klee/pulls/387","html_url":"https://github.com/klee/klee/pull/387","diff_url":"https://github.com/klee/klee/pull/387.diff","patch_url":"https://github.com/klee/klee/pull/387.patch"},"body":"-debug-print-instructions can now be invoked with 4 different values:\r\n1) all:stderr,   which logs all instructions to stderr;\r\n2) all:file,     which logs all instructions to file in format [src, inst_cntr, inst_id, llvm_inst];\r\n3) src:file,     which logs all instructions to file in format [src, inst_cntr, inst_id];\r\n4) compact:file, which logs all instructions to file in format [inst_cntr, inst_id];\r\nWriting to file gives a speedup of ~50x.\r\n\r\nChanges made mainly by @MartinNowack."},"comment":{"url":"https://api.github.com/repos/klee/klee/issues/comments/219120307","html_url":"https://github.com/klee/klee/pull/387#issuecomment-219120307","issue_url":"https://api.github.com/repos/klee/klee/issues/387","id":219120307,"user":{"login":"delcypher","id":511795,"avatar_url":"https://avatars.githubusercontent.com/u/511795?v=3","gravatar_id":"","url":"https://api.github.com/users/delcypher","html_url":"https://github.com/delcypher","followers_url":"https://api.github.com/users/delcypher/followers","following_url":"https://api.github.com/users/delcypher/following{/other_user}","gists_url":"https://api.github.com/users/delcypher/gists{/gist_id}","starred_url":"https://api.github.com/users/delcypher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delcypher/subscriptions","organizations_url":"https://api.github.com/users/delcypher/orgs","repos_url":"https://api.github.com/users/delcypher/repos","events_url":"https://api.github.com/users/delcypher/events{/privacy}","received_events_url":"https://api.github.com/users/delcypher/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T18:17:18Z","updated_at":"2016-05-13T18:17:18Z","body":"@andreamattavelli \r\n> @delcypher It is a good idea for future modification indeed.\r\n\r\nI think you should just do it now. It requires very minimal effort to do it right now and it will mean that the parser for these files are written on a good foundation and will save us work later. The format certainly isn't final (we can cut some redundancy later) but I would suggest you emit instead\r\n\r\n## For what is currently ``[src, inst_id, llvm_inst]``\r\n\r\ninstead emit a list of lists of where the lists in the top level list have the following form\r\n\r\n``[\"src\", inst_id, \"llvm_inst\"]``\r\n\r\nexample:\r\n\r\n```\r\n[[\"src_file.c\",0,\"add %1, %2\"],\r\n[\"src_file.c\",1,\"add %4, %5\"],\r\n[\"src_file.c\",2,\"sub %6, %8\"],\r\n]\r\n```\r\n\r\n## For what is currently ``[src, inst_id]``\r\n\r\ninstead emit a list of lists of where the lists in the top level list have the following form\r\n\r\n``[\"src\", inst_id]``\r\n\r\nexample:\r\n\r\n```\r\n[[\"src_file.c\",0],\r\n[\"src_file.c\",1],\r\n[\"src_file.c\",2],\r\n]\r\n```\r\n\r\n## For what is currently ``[inst_id]``\r\n\r\nEmit a list of instruction ids\r\n\r\nexample\r\n```\r\n[0,1,2,3,4,5,6]\r\n```\r\n\r\nyou may want to insert new lines every so often so the yaml file will be readable in a text editor when the file becomes large.\r\n\r\nYou can try dumping your output into http://www.yamllint.com/ to quickly check if it parses correctly. It's also pretty trivial to write some python code to parse the output using pyyaml."}}