prismmodelchecker / prism

The main development version of the PRISM model checker.
http://www.prismmodelchecker.org/
GNU General Public License v2.0
151 stars 69 forks source link

Handling for huge integers in the parser #70

Open kleinj opened 6 years ago

kleinj commented 6 years ago

When parsing something like

const double p = 2867940088951973/288230376151711744;

we get a parsing error as the numerator and denominator are treated as integer literals, which are only allowed to be in the range of Java ints.

Clearly, evaluation using the normal integer arithmetic in Java would not work. However, in the exact and parametric engines, such large constants can be handled. We might look into how to handle this better.

(from the mailing list)

merkste commented 6 years ago

A mitigating change could be to use long in the parser for integer literals. But how about using BigInteger in the parser in general and postponing type/range-checks to a later point?