Issue 19548: invalid in QVT (qvt-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Clarification Severity: Minor Summary: OCL defines invalid as the result of a failed evaluation. The QVT specification is almost totally silent on invalid, except for a few library operations that may generate it. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTo causes a to-be-specifued exception to be raised in the problem statement. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTc/QVTr inhibits the detection of matches. Resolution: invalid in QVT OCL defines invalid as the result of a failed evaluation. The QVT specification is almost totally silent on invalid, except for a few library operations that may generate it. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTo causes a to-be-specifued exception to be raised in the problem statement. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTc/QVTr inhibits the detection of matches. Discussion But invalid may be temporarily caught by a let variable of QVTo var. It is the use that is a problem. Revised Text: After 8.1.17 Null add 8.1.18 Invalid When an OCL evaluation fails it does not raise an Exception, rather it returns the invalid value. The invalid may be the result of a hard error such as divide-by-zero, or an ordered-collection-index-out-of-bounds or a programming problem such as navigation of a null object. Every use of a source value by an ImperativeExpression has an implicit assertion that the source value is not invalid, therefore using invalid is an assertion failure. Initialization of, or assignment to, a variable stores rather than uses the value. invalid may be stored in a variable, however subsequent access of the variable will probably use it and encounter an assertion failure. An invalid value may be tested by the oclIsInvalid() operation without causing a failure. Actions taken: July 28, 2014: received issue December 22, 2015: Resolved March 29, 2016: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 28 Jul 2014 04:52:43 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Edward Willink Employer: mailFrom: ed@willink.me.uk Terms_Agreement: I agree Specification: QVT 1.2 Section: 8 FormalNumber: ptc/2014-03-38 Version: 1.2 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: n/a Title: invalid in QVT Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: edwillink.plus.com Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.0; rv:30.0) Gecko/20100101 Firefox/30.0 Time: 04:52 AM Description: OCL defines invalid as the result of a failed evaluation. The QVT specification is almost totally silent on invalid, except for a few library operations that may generate it. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTo causes a to-be-specifued exception to be raised in the problem statement. Presumably an invalid not 'caught' by oclIsInvalid/oclIsUndefined in QVTc/QVTr inhibits the detection of matches.