{"action":"closed","issue":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/156","repository_url":"https://api.github.com/repos/tbeu/ModelicaSpecification","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/156/comments","events_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/issues/156/events","html_url":"https://github.com/tbeu/ModelicaSpecification/issues/156","id":372156129,"node_id":"MDU6SXNzdWUzNzIxNTYxMjk=","number":156,"title":"Inconsistency regarding generating events","user":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"labels":[{"id":1097433286,"node_id":"MDU6TGFiZWwxMDk3NDMzMjg2","url":"https://api.github.com/repos/tbeu/ModelicaSpecification/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"closed","locked":false,"assignee":{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false},"assignees":[{"login":"tbeu","id":5444067,"node_id":"MDQ6VXNlcjU0NDQwNjc=","avatar_url":"https://avatars0.githubusercontent.com/u/5444067?v=4","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/43","html_url":"https://github.com/tbeu/ModelicaSpecification/milestone/43","labels_url":"https://api.github.com/repos/tbeu/ModelicaSpecification/milestones/43/labels","id":3752876,"node_id":"MDk6TWlsZXN0b25lMzc1Mjg3Ng==","number":43,"title":"ModelicaSpec3.3","description":"","creator":{"login":"modelica-trac-importer","id":22202507,"node_id":"MDQ6VXNlcjIyMjAyNTA3","avatar_url":"https://avatars1.githubusercontent.com/u/22202507?v=4","gravatar_id":"","url":"https://api.github.com/users/modelica-trac-importer","html_url":"https://github.com/modelica-trac-importer","followers_url":"https://api.github.com/users/modelica-trac-importer/followers","following_url":"https://api.github.com/users/modelica-trac-importer/following{/other_user}","gists_url":"https://api.github.com/users/modelica-trac-importer/gists{/gist_id}","starred_url":"https://api.github.com/users/modelica-trac-importer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/modelica-trac-importer/subscriptions","organizations_url":"https://api.github.com/users/modelica-trac-importer/orgs","repos_url":"https://api.github.com/users/modelica-trac-importer/repos","events_url":"https://api.github.com/users/modelica-trac-importer/events{/privacy}","received_events_url":"https://api.github.com/users/modelica-trac-importer/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":35,"state":"closed","created_at":"2018-10-19T18:41:16Z","updated_at":"2018-10-20T00:48:36Z","due_on":"2012-05-09T07:00:00Z","closed_at":"2018-10-19T18:41:16Z"},"comments":2,"created_at":"2018-10-20T00:47:44Z","updated_at":"2018-10-20T00:48:36Z","closed_at":"2018-10-20T00:48:36Z","author_association":"COLLABORATOR","body":"**Reported by HansOlsson on 11 Apr 2011 09:56 UTC**\nIt is not well-defined how non-discrete time non-reals generate events. It is not used much (if at all) but still need to be defined.\n\nBasically the question is how to handle cases like:  \n```\nmodel M\n  Boolean b=noEvent(time>1) > false;\nend M;\n```\n\nBackground: 3.8.3 state that \"a>b\" (unless inside noEvent) is a discrete-time expression and will generate events if at least one subexpression is not a discrete-time expression.\n\nThe event generation from real elementary relation (see 3.5) is defined in 8.5 and states that at least one operand must be a sub-type of real. There is nothing defined about how other relations generate events.\n[Note: Comparison between booleans is defined in 3.5.]\n\nSo for\n```\n  Boolean b=noEvent(time>1) > false;\n```\nthis would imply an event, but unspecified how it is generated.\n\nPossible solutions:\n1. Clarify that events are generated also for non-real elementary relations and leave it to tools to do it efficiently (it will be less efficient since no crossing functions can be generated in general). To me it looks odd to first avoid events with noEvent and then automatically get it back later.\n\n2. Change 3.8.3 so that a>b is only discrete if operands are discrete or if it is a real elementary relation generating events as in 3.8.3. This would make \n```\nBoolean b=noEvent(time>1) > false;\n```\nincorrect, since the right-hand side would not be a discrete-time expression.\n\n3. Require that a>b not inside noEvent must be one of: real elementary relation, or comparison between discrete expressions. This would make \n```\n noEvent(time>1) > false\n```\nincorrect, regardless of where it is used.\n\nWhen and why was this problem introduced?\nIn Modelica 1.4, I believe the basic idea was that very early we had\n```\n  nondiscrete Boolean nb=noEvent(time>1);\n  Boolean b=nb > false;\n```\nin Modelica 1.4 we focused on removing nondiscrete and did not consider the non-discrete boolean expressions in the change. The text in Modelica 1.2/1.3 was close to proposal 2 (but was poorly written in other ways).\n\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/524"}}
{"actor":{"display_login":"modelica-trac-importer"}}