{"action":"closed","issue":{"url":"https://api.github.com/repos/osate/ErrorModelV2/issues/93","repository_url":"https://api.github.com/repos/osate/ErrorModelV2","labels_url":"https://api.github.com/repos/osate/ErrorModelV2/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/osate/ErrorModelV2/issues/93/comments","events_url":"https://api.github.com/repos/osate/ErrorModelV2/issues/93/events","html_url":"https://github.com/osate/ErrorModelV2/issues/93","id":133793404,"number":93,"title":"Internal events are not usable as error detection effects","user":{"login":"sprocter","id":1319948,"avatar_url":"https://avatars.githubusercontent.com/u/1319948?v=3","gravatar_id":"","url":"https://api.github.com/users/sprocter","html_url":"https://github.com/sprocter","followers_url":"https://api.github.com/users/sprocter/followers","following_url":"https://api.github.com/users/sprocter/following{/other_user}","gists_url":"https://api.github.com/users/sprocter/gists{/gist_id}","starred_url":"https://api.github.com/users/sprocter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprocter/subscriptions","organizations_url":"https://api.github.com/users/sprocter/orgs","repos_url":"https://api.github.com/users/sprocter/repos","events_url":"https://api.github.com/users/sprocter/events{/privacy}","received_events_url":"https://api.github.com/users/sprocter/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T19:04:13Z","updated_at":"2016-02-15T20:54:11Z","closed_at":"2016-02-15T20:54:11Z","body":"## Overview\r\n\r\nThe version of the EMV2 standard I have specifies that internal events can be used as error detection effects, but the xtext grammar seems to not allow this.\r\n\r\n### Details\r\n\r\nThe version of the EMV2 Standard I have says that:\r\n\r\n```\r\nerror_detection ::=\r\n  [ defining_error_detection_identifier : ]\r\n  ( error_source_state | all )\r\n    -[ [ error_condition ] ]->\r\n    error_detection_effect ;\r\n\r\nerror_detection_effect ::=\r\n    ( outgoing_port_reference | internal_event_reference ) !\r\n    [ ( error_code_value ) ]\r\n```\r\n\r\nBut the XText grammar specification of an ErrorDetection is:\r\n\r\n```ANTLR\r\nErrorDetection returns ErrorDetection: \r\n    (name = ID ':' )?\r\n    ((state=[ErrorBehaviorState|ID] (typeTokenConstraint=TypeTokenConstraint)?)|\r\n    \tallStates?='all'\r\n    )\r\n\t'-[' (condition=ConditionExpression)? ']->' \r\n\t( detectionReportingPort=[aadl2::TriggerPort|ID] ) '!'\r\n\t('('errorCode=ErrorCodeValue')')?\r\n\t';' \r\n;\r\n```\r\n\r\nI was wondering which of these two sources was in error.\r\n\r\n## Minimal working example\r\n\r\n```aadl\r\npackage ErrorDetectionExample\r\npublic\r\n\r\n    system ErrorDetectionExample\r\n    end ErrorDetectionExample;\r\n\r\n    system implementation ErrorDetectionExample.imp\r\n    annex EMV2 {**\r\n\t\tcomponent error behavior\r\n\t\t\tevents\r\n\t\t\t\t ExampleEvent : error event;\r\n\t\t\tdetections\r\n\t\t\t\ttest : all -[ ]-> ExampleEvent!;\r\n\t\tend component;\r\n        **};\r\n    end ErrorDetectionExample.imp;\r\n\r\nend ErrorDetectionExample;\r\n```\r\n\r\n### Expected result\r\n\r\nThe code parses successfully without any errors\r\n\r\n### Actual result\r\n\r\nThe following error is generated:\r\n\r\nDescription | Resource | Path | Location | Type\r\n----------- | -------- | ---- | -------- | ----\r\nCouldn't resolve reference to TriggerPort 'ExampleEvent'. | ErrorDetectionExample.aadl | /Sandbox | line: 6 /Sandbox/ErrorDetectionExample.aadl | Xtext Check (fast)\r\n\r\n"}}