{"action":"created","issue":{"url":"https://api.github.com/repos/smackers/smack/issues/339","repository_url":"https://api.github.com/repos/smackers/smack","labels_url":"https://api.github.com/repos/smackers/smack/issues/339/labels{/name}","comments_url":"https://api.github.com/repos/smackers/smack/issues/339/comments","events_url":"https://api.github.com/repos/smackers/smack/issues/339/events","html_url":"https://github.com/smackers/smack/issues/339","id":338975138,"node_id":"MDU6SXNzdWUzMzg5NzUxMzg=","number":339,"title":"devirtbounce name issues with Swift/OBJC method invocation","user":{"login":"jjgarzella","id":5098035,"node_id":"MDQ6VXNlcjUwOTgwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/5098035?v=4","gravatar_id":"","url":"https://api.github.com/users/jjgarzella","html_url":"https://github.com/jjgarzella","followers_url":"https://api.github.com/users/jjgarzella/followers","following_url":"https://api.github.com/users/jjgarzella/following{/other_user}","gists_url":"https://api.github.com/users/jjgarzella/gists{/gist_id}","starred_url":"https://api.github.com/users/jjgarzella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjgarzella/subscriptions","organizations_url":"https://api.github.com/users/jjgarzella/orgs","repos_url":"https://api.github.com/users/jjgarzella/repos","events_url":"https://api.github.com/users/jjgarzella/events{/privacy}","received_events_url":"https://api.github.com/users/jjgarzella/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-06T15:10:27Z","updated_at":"2018-07-10T12:45:12Z","closed_at":null,"author_association":"NONE","body":"Currently, SMACK cannot tell between methods in Objective-C or Swift unless they have different method signatures. Both of these languages use devirtbounce to manage method invocation. Consider the following example:\r\n\r\n```\r\n// @expect verified\r\n\r\n#import <Foundation/Foundation.h>\r\n#include \"smack.h\"\r\n\r\n@interface Car : NSObject\r\n\r\n- (int)numWheels;\r\n\r\n- (int)numHeadlights;\r\n\r\n- (int)milageLeft:(int)miles;\r\n\r\n@end\r\n\r\n@implementation Car\r\n\r\n- (int)numWheels\r\n{\r\n    return 4;\r\n}\r\n\r\n- (int)numHeadlights\r\n{\r\n    return 2;\r\n}\r\n@end\r\n\r\nint main(void) {\r\n    Car *c = [[Car alloc] init];\r\n    \r\n    assert([c numWheels] == 4);\r\n    //assert([c numHeadlights] == 2);\r\n    return 0;\r\n}\r\n```\r\n\r\nRunning SMACK on this file fails, because smack things that `[c numWheels]` could be either 4 or 2. Something about the way that devirtbounce does things doesn't keep track of naming, only method signatures. Swift has the exact same problem as Objective-C."},"comment":{"url":"https://api.github.com/repos/smackers/smack/issues/comments/403808817","html_url":"https://github.com/smackers/smack/issues/339#issuecomment-403808817","issue_url":"https://api.github.com/repos/smackers/smack/issues/339","id":403808817,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzgwODgxNw==","user":{"login":"jjgarzella","id":5098035,"node_id":"MDQ6VXNlcjUwOTgwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/5098035?v=4","gravatar_id":"","url":"https://api.github.com/users/jjgarzella","html_url":"https://github.com/jjgarzella","followers_url":"https://api.github.com/users/jjgarzella/followers","following_url":"https://api.github.com/users/jjgarzella/following{/other_user}","gists_url":"https://api.github.com/users/jjgarzella/gists{/gist_id}","starred_url":"https://api.github.com/users/jjgarzella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjgarzella/subscriptions","organizations_url":"https://api.github.com/users/jjgarzella/orgs","repos_url":"https://api.github.com/users/jjgarzella/repos","events_url":"https://api.github.com/users/jjgarzella/events{/privacy}","received_events_url":"https://api.github.com/users/jjgarzella/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T12:45:12Z","updated_at":"2018-07-10T12:45:12Z","author_association":"NONE","body":"Upon further inspection, it seems there are two issues, one for Objective-C and one for Swift. In both cases, the argument to devirtbounce is not modeled properly, and so it is nondet."}}
{"actor":{"display_login":"jjgarzella"}}