{"action":"created","issue":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/1886","repository_url":"https://api.github.com/repos/tbeu/Modelica","labels_url":"https://api.github.com/repos/tbeu/Modelica/issues/1886/labels{/name}","comments_url":"https://api.github.com/repos/tbeu/Modelica/issues/1886/comments","events_url":"https://api.github.com/repos/tbeu/Modelica/issues/1886/events","html_url":"https://github.com/tbeu/Modelica/issues/1886","id":197302126,"number":1886,"title":"Modelica.Utilities.Files.exist does't work if considered as a pure function","user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","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":[],"state":"open","locked":false,"assignee":{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false},"assignees":[{"login":"beutlich","id":14896695,"avatar_url":"https://avatars.githubusercontent.com/u/14896695?v=3","gravatar_id":"","url":"https://api.github.com/users/beutlich","html_url":"https://github.com/beutlich","followers_url":"https://api.github.com/users/beutlich/followers","following_url":"https://api.github.com/users/beutlich/following{/other_user}","gists_url":"https://api.github.com/users/beutlich/gists{/gist_id}","starred_url":"https://api.github.com/users/beutlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beutlich/subscriptions","organizations_url":"https://api.github.com/users/beutlich/orgs","repos_url":"https://api.github.com/users/beutlich/repos","events_url":"https://api.github.com/users/beutlich/events{/privacy}","received_events_url":"https://api.github.com/users/beutlich/received_events","type":"User","site_admin":false}],"milestone":null,"comments":21,"created_at":"2016-12-23T02:07:59Z","updated_at":"2016-12-23T02:12:12Z","closed_at":null,"body":"**Reported by fcasella on 22 Jan 2016 11:02 UTC**\nThe Modelica.Utilities.Files.exist is an impure function, because it returns a different result depending on the state of the file system.\n\nHowever, lacking the `impure` specifier, OpenModelica considers it as a pure function and, as long as the string input is a constant literal, moves its evaluation to the initialization phase, yielding wrong results in general.\n\nThe proper fix to this problem is to mark the function as impure. However, this is not allowed in Modelica 3.2.\n\nCan we agree on a common strategy for all tool vendors for MSL 3.2.2?\n\n----\n\nMigrated-From: https://trac.modelica.org/Modelica/ticket/1886"},"comment":{"url":"https://api.github.com/repos/tbeu/Modelica/issues/comments/268929817","html_url":"https://github.com/tbeu/Modelica/issues/1886#issuecomment-268929817","issue_url":"https://api.github.com/repos/tbeu/Modelica/issues/1886","id":268929817,"user":{"login":"modelica-trac-importer","id":22202507,"avatar_url":"https://avatars.githubusercontent.com/u/22202507?v=3","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},"created_at":"2016-12-23T02:12:12Z","updated_at":"2016-12-23T02:12:12Z","body":"**Comment by jmattsson on 26 Jan 2016 16:08 UTC**\nReplying to [comment:11 otter]:\n> After re-thinking, the only realistic solution seems to be to introduce vendor annotations. Since SimulationX recognizes the \\__OpenModelica_Impure=true annotation, the following annotation needs to be added to impure functions (other vendors should report their needed annotations also):\n\nSorry for the delay, we had to make some quick design decisions. Please also use `__Modelon_Impure=true`."}}
{"actor":{"display_login":"modelica-trac-importer"}}