Bug 521952 - [moka] Division by zero in fUML is not an error
Summary: [moka] Division by zero in fUML is not an error
Status: UNCONFIRMED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Moka (show other bugs)
Version: 3.0.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Arnaud Cuccuru CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-06 13:31 EDT by Ed Seidewitz CLA
Modified: 2017-09-06 13:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Seidewitz CLA 2017-09-06 13:31:48 EDT
The implementation of the primitive behavior IntegerFunctions::Div (org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Div) logs an error if there is a division by zero an returns no output ParameterValues. This is not quite correct. According to the fUML specification (9.3.2), division by zero should provide a "null" result. Per fUML semantics that means that, in this case, the implementation should return a single output ParameterValue, but that this ParameterValue should have an empty list of values.

The implementation of Div should explicitly check for a zero second argument and generate the correct output in this case.