{"action":"created","issue":{"url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/47","repository_url":"https://api.github.com/repos/opprop/checker-framework-inference","labels_url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/47/comments","events_url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/47/events","html_url":"https://github.com/opprop/checker-framework-inference/pull/47","id":233005650,"number":47,"title":"Fixed wrong usage of qualifierHierarchy in ConstraintManager.","user":{"login":"CharlesZ-Chen","id":7701109,"avatar_url":"https://avatars1.githubusercontent.com/u/7701109?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesZ-Chen","html_url":"https://github.com/CharlesZ-Chen","followers_url":"https://api.github.com/users/CharlesZ-Chen/followers","following_url":"https://api.github.com/users/CharlesZ-Chen/following{/other_user}","gists_url":"https://api.github.com/users/CharlesZ-Chen/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesZ-Chen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesZ-Chen/subscriptions","organizations_url":"https://api.github.com/users/CharlesZ-Chen/orgs","repos_url":"https://api.github.com/users/CharlesZ-Chen/repos","events_url":"https://api.github.com/users/CharlesZ-Chen/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesZ-Chen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wmdietl","id":6699136,"avatar_url":"https://avatars2.githubusercontent.com/u/6699136?v=3","gravatar_id":"","url":"https://api.github.com/users/wmdietl","html_url":"https://github.com/wmdietl","followers_url":"https://api.github.com/users/wmdietl/followers","following_url":"https://api.github.com/users/wmdietl/following{/other_user}","gists_url":"https://api.github.com/users/wmdietl/gists{/gist_id}","starred_url":"https://api.github.com/users/wmdietl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmdietl/subscriptions","organizations_url":"https://api.github.com/users/wmdietl/orgs","repos_url":"https://api.github.com/users/wmdietl/repos","events_url":"https://api.github.com/users/wmdietl/events{/privacy}","received_events_url":"https://api.github.com/users/wmdietl/received_events","type":"User","site_admin":false},"assignees":[{"login":"wmdietl","id":6699136,"avatar_url":"https://avatars2.githubusercontent.com/u/6699136?v=3","gravatar_id":"","url":"https://api.github.com/users/wmdietl","html_url":"https://github.com/wmdietl","followers_url":"https://api.github.com/users/wmdietl/followers","following_url":"https://api.github.com/users/wmdietl/following{/other_user}","gists_url":"https://api.github.com/users/wmdietl/gists{/gist_id}","starred_url":"https://api.github.com/users/wmdietl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmdietl/subscriptions","organizations_url":"https://api.github.com/users/wmdietl/orgs","repos_url":"https://api.github.com/users/wmdietl/repos","events_url":"https://api.github.com/users/wmdietl/events{/privacy}","received_events_url":"https://api.github.com/users/wmdietl/received_events","type":"User","site_admin":false},{"login":"topnessman","id":15336177,"avatar_url":"https://avatars3.githubusercontent.com/u/15336177?v=3","gravatar_id":"","url":"https://api.github.com/users/topnessman","html_url":"https://github.com/topnessman","followers_url":"https://api.github.com/users/topnessman/followers","following_url":"https://api.github.com/users/topnessman/following{/other_user}","gists_url":"https://api.github.com/users/topnessman/gists{/gist_id}","starred_url":"https://api.github.com/users/topnessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topnessman/subscriptions","organizations_url":"https://api.github.com/users/topnessman/orgs","repos_url":"https://api.github.com/users/topnessman/repos","events_url":"https://api.github.com/users/topnessman/events{/privacy}","received_events_url":"https://api.github.com/users/topnessman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-06-01T20:47:48Z","updated_at":"2017-06-01T22:56:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opprop/checker-framework-inference/pulls/47","html_url":"https://github.com/opprop/checker-framework-inference/pull/47","diff_url":"https://github.com/opprop/checker-framework-inference/pull/47.diff","patch_url":"https://github.com/opprop/checker-framework-inference/pull/47.patch"},"body":"In `ConstraintManager`, it use `qualifierHierarchy` to make some type checking (e.g. validating type relationship before adding a subtypeConstraint) and optimizations(e.g. creating EqualityConstraint instead of SubtypeConstraint when sub is top or super is bot). However, it used the `InferenceQualifierHierarchy` to check qualifier orders, which is wrong because `InferenceQualifierHierarchy` isn't for maintaining the real qualifier hierarchy.\r\n\r\nIn this PR, I changed the reference to `qualifierHierarchy` in `ConstraintManager` to be the realQualifierHierarchy. In order to achieve this, following changes has been made:\r\n\r\n- Passed `RealTypeFactory` reference when initializing `constraintManager` in `InferenceMain`.\r\n\r\n- Changed `qualifierHierarchy` refer to the real qualifier hierarchy in `constraintManager.\r\n\r\n- Add two overrides in `SimpleFlowAnnotatedTypeFactory$FlowQualifierHierarchy`: #getBottomAnnotation and #getBottomAnnotations: similar to existing #getTopAnnotation(s), `FlowQualifierHierarchy` should explicitly encoding what is it's bottom annotation."},"comment":{"url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/comments/305643281","html_url":"https://github.com/opprop/checker-framework-inference/pull/47#issuecomment-305643281","issue_url":"https://api.github.com/repos/opprop/checker-framework-inference/issues/47","id":305643281,"user":{"login":"topnessman","id":15336177,"avatar_url":"https://avatars3.githubusercontent.com/u/15336177?v=3","gravatar_id":"","url":"https://api.github.com/users/topnessman","html_url":"https://github.com/topnessman","followers_url":"https://api.github.com/users/topnessman/followers","following_url":"https://api.github.com/users/topnessman/following{/other_user}","gists_url":"https://api.github.com/users/topnessman/gists{/gist_id}","starred_url":"https://api.github.com/users/topnessman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topnessman/subscriptions","organizations_url":"https://api.github.com/users/topnessman/orgs","repos_url":"https://api.github.com/users/topnessman/repos","events_url":"https://api.github.com/users/topnessman/events{/privacy}","received_events_url":"https://api.github.com/users/topnessman/received_events","type":"User","site_admin":false},"created_at":"2017-06-01T22:56:51Z","updated_at":"2017-06-01T22:56:51Z","body":"Here we can find that commit history is already cluttered with too many small trivial commits. We could have actually amend the last commit in this scenario. It's much easier to track who introduces which commit on which file with a single commit for a single feature."}}
{"actor":{"display_login":"topnessman"}}