esa / opengeode

OpenGEODE - a free SDL editor
https://opengeode.net
GNU Lesser General Public License v3.0
69 stars 20 forks source link

Unexpected error - Answers of decision could overlap #64

Closed Ansaya closed 4 years ago

Ansaya commented 4 years ago

Hello, I would like to implement a value check as reported in the following image, but during the model verification OpenGEODE still complains about the fact that [ERROR] Answers of decision "val" could overlap, while it can not happen because of the first check performed, which clearly states "high > low". image

Here there is the example file along with the asn types definition. issue.zip

maxime-esa commented 4 years ago

Hi Michele,

It is possible to use this construct only with ASN.1 constants, as the tool is not capable to ensure in the general case the current range of the variable.

If you declare high and low as ASN.1 constants like this in the ASN.1 model:

image

And declare a variable like this: image

Then you can safely use high and low in decision answers:

image