Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous sum of branch probabilities error #1643

Closed
philip-alldredge opened this issue Nov 19, 2018 · 0 comments
Closed

Erroneous sum of branch probabilities error #1643

philip-alldredge opened this issue Nov 19, 2018 · 0 comments
Assignees
Milestone

Comments

@philip-alldredge
Copy link
Collaborator

@philip-alldredge philip-alldredge commented Nov 19, 2018

Summary

Due to the use of floating point math, in certain circumstances, the EMV2 validator can produce erroneous errors or fail to produce errors. I admit this is a bit of a contrived scenario. It may not be much of a concern but it is something that could theoretically happen.

Expected and Current Behavior

When the sum of probabilities is 1.0 then an error should not occur.

Steps to Reproduce

  1. Use the model below. Due to floating point math, the sum will not be 1.0
package emv_test2
public
	annex EMV2 {**	
		error behavior state_machine
		events
			sensor_failure: error event;
		states
			normal: initial state;
			recovering: state;
			failed: state;
			failed2: state;
			failed3: state;
		transitions
			new_transition: normal -[sensor_failure]-> (recovering with 0.9, failed with 0.00000000000000005, failed2 with 0.00000000000000005, failed3 with 0.0999999999999999);
		end behavior;
	**};
end emv_test2;

Environment

  • OSATE Version:
  • Operating System:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants