{"action":"created","comment":{"url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/comments/105184587","pull_request_review_id":26051483,"id":105184587,"diff_hunk":"@@ -176,20 +176,27 @@ algorithm\n     then (eqn, (equationArray, vars, eqns, index, ht));\n \n     // removed algorithm\n-    case (BackendDAE.ALGORITHM(size=0, alg=alg_, source=source, expand=crefExpand, attr=attr), (equationArray, vars, eqns, index, ht)) equation\n-      DAE.ALGORITHM_STMTS(statementLst=stmts) = alg_;\n-      size = -index;\n-      (stmts, preStmts, index) = encapsulateWhenConditions_Algorithms(stmts, vars, index);\n-      sizePre = listLength(preStmts);\n-      size = size+index-sizePre;\n-\n-      alg_ = DAE.ALGORITHM_STMTS(stmts);\n-      eqn = BackendDAE.ALGORITHM(size, alg_, source, crefExpand, attr);\n-      equationArray = BackendEquation.addEquation(eqn, equationArray);\n+    case (BackendDAE.ALGORITHM(size=0, alg=alg_, source=source, expand=crefExpand, attr=attr), (equationArray, vars, eqns, index, ht)) algorithm\n+      DAE.ALGORITHM_STMTS(statementLst=stmts) := alg_;\n+      size := -index;\n+      allPreStmts := {};\n+      allStmts := {};\n+      for stmt in stmts loop\n+        (stmts, preStmts, index) := encapsulateWhenConditions_Algorithms({stmt}, vars, index);","path":"Compiler/BackEnd/FindZeroCrossings.mo","position":29,"original_position":29,"commit_id":"7df6cd8c99e10f4f1cf984949370132abe46182a","original_commit_id":"7df6cd8c99e10f4f1cf984949370132abe46182a","user":{"login":"vwaurich","id":12234403,"avatar_url":"https://avatars0.githubusercontent.com/u/12234403?v=3","gravatar_id":"","url":"https://api.github.com/users/vwaurich","html_url":"https://github.com/vwaurich","followers_url":"https://api.github.com/users/vwaurich/followers","following_url":"https://api.github.com/users/vwaurich/following{/other_user}","gists_url":"https://api.github.com/users/vwaurich/gists{/gist_id}","starred_url":"https://api.github.com/users/vwaurich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwaurich/subscriptions","organizations_url":"https://api.github.com/users/vwaurich/orgs","repos_url":"https://api.github.com/users/vwaurich/repos","events_url":"https://api.github.com/users/vwaurich/events{/privacy}","received_events_url":"https://api.github.com/users/vwaurich/received_events","type":"User","site_admin":false},"body":"If coverage is fine, I will check if I can simplify encapsulateWhenConditions_Algorithms furthermore","created_at":"2017-03-09T15:07:53Z","updated_at":"2017-03-09T15:07:53Z","html_url":"https://github.com/OpenModelica/OMCompiler/pull/1534#discussion_r105184587","pull_request_url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534","_links":{"self":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/comments/105184587"},"html":{"href":"https://github.com/OpenModelica/OMCompiler/pull/1534#discussion_r105184587"},"pull_request":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534"}}},"pull_request":{"url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534","id":109927457,"html_url":"https://github.com/OpenModelica/OMCompiler/pull/1534","diff_url":"https://github.com/OpenModelica/OMCompiler/pull/1534.diff","patch_url":"https://github.com/OpenModelica/OMCompiler/pull/1534.patch","issue_url":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/1534","number":1534,"state":"closed","locked":false,"title":"fix for when in algorithms","user":{"login":"vwaurich","id":12234403,"avatar_url":"https://avatars0.githubusercontent.com/u/12234403?v=3","gravatar_id":"","url":"https://api.github.com/users/vwaurich","html_url":"https://github.com/vwaurich","followers_url":"https://api.github.com/users/vwaurich/followers","following_url":"https://api.github.com/users/vwaurich/following{/other_user}","gists_url":"https://api.github.com/users/vwaurich/gists{/gist_id}","starred_url":"https://api.github.com/users/vwaurich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwaurich/subscriptions","organizations_url":"https://api.github.com/users/vwaurich/orgs","repos_url":"https://api.github.com/users/vwaurich/repos","events_url":"https://api.github.com/users/vwaurich/events{/privacy}","received_events_url":"https://api.github.com/users/vwaurich/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-09T14:42:29Z","updated_at":"2017-03-09T15:07:53Z","closed_at":"2017-03-09T14:57:43Z","merged_at":null,"merge_commit_sha":"50f44995a20aad0dcb3ac6c5a81b8ad65ea65c20","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534/commits","review_comments_url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534/comments","review_comment_url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/1534/comments","statuses_url":"https://api.github.com/repos/OpenModelica/OMCompiler/statuses/7df6cd8c99e10f4f1cf984949370132abe46182a","head":{"label":"vwaurich:zeroCrossings","ref":"zeroCrossings","sha":"7df6cd8c99e10f4f1cf984949370132abe46182a","user":{"login":"vwaurich","id":12234403,"avatar_url":"https://avatars0.githubusercontent.com/u/12234403?v=3","gravatar_id":"","url":"https://api.github.com/users/vwaurich","html_url":"https://github.com/vwaurich","followers_url":"https://api.github.com/users/vwaurich/followers","following_url":"https://api.github.com/users/vwaurich/following{/other_user}","gists_url":"https://api.github.com/users/vwaurich/gists{/gist_id}","starred_url":"https://api.github.com/users/vwaurich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwaurich/subscriptions","organizations_url":"https://api.github.com/users/vwaurich/orgs","repos_url":"https://api.github.com/users/vwaurich/repos","events_url":"https://api.github.com/users/vwaurich/events{/privacy}","received_events_url":"https://api.github.com/users/vwaurich/received_events","type":"User","site_admin":false},"repo":{"id":36438280,"name":"OMCompiler","full_name":"vwaurich/OMCompiler","owner":{"login":"vwaurich","id":12234403,"avatar_url":"https://avatars0.githubusercontent.com/u/12234403?v=3","gravatar_id":"","url":"https://api.github.com/users/vwaurich","html_url":"https://github.com/vwaurich","followers_url":"https://api.github.com/users/vwaurich/followers","following_url":"https://api.github.com/users/vwaurich/following{/other_user}","gists_url":"https://api.github.com/users/vwaurich/gists{/gist_id}","starred_url":"https://api.github.com/users/vwaurich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vwaurich/subscriptions","organizations_url":"https://api.github.com/users/vwaurich/orgs","repos_url":"https://api.github.com/users/vwaurich/repos","events_url":"https://api.github.com/users/vwaurich/events{/privacy}","received_events_url":"https://api.github.com/users/vwaurich/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vwaurich/OMCompiler","description":"The OpenModelica Compiler is the core of the OpenModelica project, which is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.","fork":true,"url":"https://api.github.com/repos/vwaurich/OMCompiler","forks_url":"https://api.github.com/repos/vwaurich/OMCompiler/forks","keys_url":"https://api.github.com/repos/vwaurich/OMCompiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vwaurich/OMCompiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vwaurich/OMCompiler/teams","hooks_url":"https://api.github.com/repos/vwaurich/OMCompiler/hooks","issue_events_url":"https://api.github.com/repos/vwaurich/OMCompiler/issues/events{/number}","events_url":"https://api.github.com/repos/vwaurich/OMCompiler/events","assignees_url":"https://api.github.com/repos/vwaurich/OMCompiler/assignees{/user}","branches_url":"https://api.github.com/repos/vwaurich/OMCompiler/branches{/branch}","tags_url":"https://api.github.com/repos/vwaurich/OMCompiler/tags","blobs_url":"https://api.github.com/repos/vwaurich/OMCompiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vwaurich/OMCompiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vwaurich/OMCompiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/vwaurich/OMCompiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vwaurich/OMCompiler/statuses/{sha}","languages_url":"https://api.github.com/repos/vwaurich/OMCompiler/languages","stargazers_url":"https://api.github.com/repos/vwaurich/OMCompiler/stargazers","contributors_url":"https://api.github.com/repos/vwaurich/OMCompiler/contributors","subscribers_url":"https://api.github.com/repos/vwaurich/OMCompiler/subscribers","subscription_url":"https://api.github.com/repos/vwaurich/OMCompiler/subscription","commits_url":"https://api.github.com/repos/vwaurich/OMCompiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/vwaurich/OMCompiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/vwaurich/OMCompiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/vwaurich/OMCompiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/vwaurich/OMCompiler/contents/{+path}","compare_url":"https://api.github.com/repos/vwaurich/OMCompiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vwaurich/OMCompiler/merges","archive_url":"https://api.github.com/repos/vwaurich/OMCompiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vwaurich/OMCompiler/downloads","issues_url":"https://api.github.com/repos/vwaurich/OMCompiler/issues{/number}","pulls_url":"https://api.github.com/repos/vwaurich/OMCompiler/pulls{/number}","milestones_url":"https://api.github.com/repos/vwaurich/OMCompiler/milestones{/number}","notifications_url":"https://api.github.com/repos/vwaurich/OMCompiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vwaurich/OMCompiler/labels{/name}","releases_url":"https://api.github.com/repos/vwaurich/OMCompiler/releases{/id}","deployments_url":"https://api.github.com/repos/vwaurich/OMCompiler/deployments","created_at":"2015-05-28T12:55:40Z","updated_at":"2016-01-12T11:14:07Z","pushed_at":"2017-03-09T14:16:37Z","git_url":"git://github.com/vwaurich/OMCompiler.git","ssh_url":"git@github.com:vwaurich/OMCompiler.git","clone_url":"https://github.com/vwaurich/OMCompiler.git","svn_url":"https://github.com/vwaurich/OMCompiler","homepage":"https://trac.openmodelica.org/OpenModelica","size":66275,"stargazers_count":0,"watchers_count":0,"language":"Modelica","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"OpenModelica:master","ref":"master","sha":"62633fb1681520ee892d61d4d9163fc11d28414a","user":{"login":"OpenModelica","id":4006504,"avatar_url":"https://avatars2.githubusercontent.com/u/4006504?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenModelica","html_url":"https://github.com/OpenModelica","followers_url":"https://api.github.com/users/OpenModelica/followers","following_url":"https://api.github.com/users/OpenModelica/following{/other_user}","gists_url":"https://api.github.com/users/OpenModelica/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenModelica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenModelica/subscriptions","organizations_url":"https://api.github.com/users/OpenModelica/orgs","repos_url":"https://api.github.com/users/OpenModelica/repos","events_url":"https://api.github.com/users/OpenModelica/events{/privacy}","received_events_url":"https://api.github.com/users/OpenModelica/received_events","type":"Organization","site_admin":false},"repo":{"id":35014743,"name":"OMCompiler","full_name":"OpenModelica/OMCompiler","owner":{"login":"OpenModelica","id":4006504,"avatar_url":"https://avatars2.githubusercontent.com/u/4006504?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenModelica","html_url":"https://github.com/OpenModelica","followers_url":"https://api.github.com/users/OpenModelica/followers","following_url":"https://api.github.com/users/OpenModelica/following{/other_user}","gists_url":"https://api.github.com/users/OpenModelica/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenModelica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenModelica/subscriptions","organizations_url":"https://api.github.com/users/OpenModelica/orgs","repos_url":"https://api.github.com/users/OpenModelica/repos","events_url":"https://api.github.com/users/OpenModelica/events{/privacy}","received_events_url":"https://api.github.com/users/OpenModelica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenModelica/OMCompiler","description":"The OpenModelica Compiler is the core of the OpenModelica project, which is an open-source Modelica-based modeling and simulation environment intended for industrial and academic usage.","fork":false,"url":"https://api.github.com/repos/OpenModelica/OMCompiler","forks_url":"https://api.github.com/repos/OpenModelica/OMCompiler/forks","keys_url":"https://api.github.com/repos/OpenModelica/OMCompiler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenModelica/OMCompiler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenModelica/OMCompiler/teams","hooks_url":"https://api.github.com/repos/OpenModelica/OMCompiler/hooks","issue_events_url":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/events{/number}","events_url":"https://api.github.com/repos/OpenModelica/OMCompiler/events","assignees_url":"https://api.github.com/repos/OpenModelica/OMCompiler/assignees{/user}","branches_url":"https://api.github.com/repos/OpenModelica/OMCompiler/branches{/branch}","tags_url":"https://api.github.com/repos/OpenModelica/OMCompiler/tags","blobs_url":"https://api.github.com/repos/OpenModelica/OMCompiler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenModelica/OMCompiler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenModelica/OMCompiler/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenModelica/OMCompiler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenModelica/OMCompiler/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenModelica/OMCompiler/languages","stargazers_url":"https://api.github.com/repos/OpenModelica/OMCompiler/stargazers","contributors_url":"https://api.github.com/repos/OpenModelica/OMCompiler/contributors","subscribers_url":"https://api.github.com/repos/OpenModelica/OMCompiler/subscribers","subscription_url":"https://api.github.com/repos/OpenModelica/OMCompiler/subscription","commits_url":"https://api.github.com/repos/OpenModelica/OMCompiler/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenModelica/OMCompiler/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenModelica/OMCompiler/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenModelica/OMCompiler/contents/{+path}","compare_url":"https://api.github.com/repos/OpenModelica/OMCompiler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenModelica/OMCompiler/merges","archive_url":"https://api.github.com/repos/OpenModelica/OMCompiler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenModelica/OMCompiler/downloads","issues_url":"https://api.github.com/repos/OpenModelica/OMCompiler/issues{/number}","pulls_url":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenModelica/OMCompiler/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenModelica/OMCompiler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenModelica/OMCompiler/labels{/name}","releases_url":"https://api.github.com/repos/OpenModelica/OMCompiler/releases{/id}","deployments_url":"https://api.github.com/repos/OpenModelica/OMCompiler/deployments","created_at":"2015-05-04T04:53:52Z","updated_at":"2017-02-28T10:09:16Z","pushed_at":"2017-03-09T14:57:42Z","git_url":"git://github.com/OpenModelica/OMCompiler.git","ssh_url":"git@github.com:OpenModelica/OMCompiler.git","clone_url":"https://github.com/OpenModelica/OMCompiler.git","svn_url":"https://github.com/OpenModelica/OMCompiler","homepage":"https://trac.openmodelica.org/OpenModelica","size":66288,"stargazers_count":17,"watchers_count":17,"language":"Modelica","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":11,"forks":48,"open_issues":11,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534"},"html":{"href":"https://github.com/OpenModelica/OMCompiler/pull/1534"},"issue":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/1534"},"comments":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/issues/1534/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/pulls/1534/commits"},"statuses":{"href":"https://api.github.com/repos/OpenModelica/OMCompiler/statuses/7df6cd8c99e10f4f1cf984949370132abe46182a"}}}}
{"actor":{"display_login":"vwaurich"}}