Bug 213886 - Use resolved operation name to determine OperationCallExp.opcode
Summary: Use resolved operation name to determine OperationCallExp.opcode
Status: CLOSED FIXED
Alias: None
Product: OCL
Classification: Modeling
Component: Core (show other bugs)
Version: 1.2.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: M2   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard: Extensibility
Keywords: contributed, plan
Depends on:
Blocks:
 
Reported: 2007-12-26 10:54 EST by Ed Willink CLA
Modified: 2011-05-27 02:41 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2007-12-26 10:54:31 EST
QVT defines String::+ as a synonym for String::concat, therefore a lookup for + yields the concat function. Unfortunately AbstractOCLAnalyzer.genOperationCall fails to support synonyms.

If after a successful:

  O oper = lookupOperation(operationCallExpCS, env, ownerType, operName, args);

the actual name is either enforced using:

  operName = uml.getName(oper);

or at least used in 

  opcode = OCLStandardLibraryUtil.getOperationCode(uml.getName(oper));
...
  opcode = OCLStandardLibraryUtil.getOclAnyOperationCode(uml.getName(oper));

the inconsitent selection of opcode would be avoided.
Comment 1 Christian Damus CLA 2008-09-21 17:38:13 EDT
Suggested fix committed to HEAD.
Comment 2 Christian Damus CLA 2008-09-24 16:32:27 EDT
Fix is available in the 1.3 M2 build.
Comment 3 Ed Willink CLA 2011-05-27 02:40:37 EDT
Closing after over a year in verified state.
Comment 4 Ed Willink CLA 2011-05-27 02:41:58 EDT
Closing after over a year in verified state.