Issue 18464: Inconsistent inclusion of source in closure results (ocl2-rtf) Source: Model Driven Solutions (Dr. Edward Willink, ed(at)willink.me.uk) Nature: Clarification Severity: Minor Summary: "The returned collection of the closure iteration is an accumulation of the source, and the collections resulting from ..." incorrectly includes the source. The algorithm in 11.9.1 correctly includes the source only if the source is reached by some traversal from the source. Resolution: No. The algorithm in 11.9.1 only adds the source to the result if the source was not already present. Since the anonRecurse starts with an empty result all sources are accumulated. Just need to polish the words to avoid similar misunderstandings in the future Revised Text: In 7.7.5 replace iteration is an accumulation of the source, and the collections resulting by iteration is an accumulation of the sources, and the collections resulting and The result satisfies the postcondition: post: let sourceAndResult : Set(Type) = source->asSet()->union(result) in sourceAndResult = sourceAndResult->collect(expression) by The result satisfies the postconditions: post: result->includesAll(source) post: result->asSet() = result->collect(expression)->asSet() and computes the set of parents.children, parents.children.children, parents.children.children.children etc. by computes the set of parents, parents.children, parents.children.children etc. In 11.9.1 replace The closure of applying body transitively to every distinct element of the source collection. by The closure of the source elements and all elements reached by applying body transitively to every distinct element of the source collection. Actions taken: February 20, 2013: received issue December 23, 2013: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 20 Feb 2013 07:01:32 -0500 To: Subject: Issue/Bug Report ******************************************************************************* Name: Edward Willink Employer: mailFrom: ed@willink.me.uk Terms_Agreement: I agree Specification: OCL Section: 7.7.5 FormalNumber: 12-01-01 Version: 2.3.1 Doc_Year: Year Doc_Month: Month Doc_Day: Day Page: 30 Title: Inconsistent inclusion of source in closure results Nature: Clarification Severity: Minor CODE: 3TMw8 B1: Report Issue Description: "The returned collection of the closure iteration is an accumulation of the source, and the collections resulting from ..." incorrectly includes the source. The algorithm in 11.9.1 correctly includes the source only if the source is reached by some traversal from the source.