If, after model building with hybrid or sparse engine, we detect that the
configured engine can definitely not handle the model (i.e., if number of states
is larger than Integer.MAX_VALUE), we auto-switch to the MTBDD engine.
As currently there is no support for Rmin/max[C] computations using hybrid engine, and hybrid is the default engine, automatically switch to the sparse engine, similar to what is done for other computations.
When constructing a model using the explicit engine, the set of
reachable states is always sorted. This is done purely for aesthetic
reasons and is potentially time-consuming for large models, so make it
optional (although enable it by default for backwards-compatibility, and
explicitly enable state sorting in the test cases that use
ConstructModel in case this default changes at a later time).
When the model has to be transformed (Pmax-quotienting) to apply interval iteration, we currently don't support strategy generation and thus have to properly deallocate the strategy array that has been prepared.
When converting an MTBDD to an integer vector (as is done to prepare the storage for the computed strategy for Pmax-Until using the sparse engine), the MTBDD has to be zero for non-reachable states, as that could lead to out-of-bounds writes to the array during conversion.
This commit adds the required restriction to reach in prism.NondetModelChecker.
+ test case
+ fixes deref of 'yes' during initialization
For the evaluation of integer math operations, use the ...Exact methods from
java.lang.Math to catch integer under-/overflows and throw PrismLangExceptions.
(adapted by Joachim Klein from https://github.com/prismmodelchecker/prism/pull/91)
Tag: performance
The oraclejdk10 target offered by travis is sometimes unstable due to
JDK download brittleness. We thus switch to the openjdk10
target. Additionally, add openjdk11 as a target.
During the evaluate calls, the code previously used 'new Boolean' and 'new
Integer' constructors for the result values. By removing these allocations
and simply letting Java take care of boxing the resulting primitive
values, the integrated caching of Java can avoid creating objects in a
lot of cases (always for Boolean, and often for Integers in a certain
range).
(adapted by Joachim Klein from https://github.com/prismmodelchecker/prism/pull/91)
Tag: performance
When DOT graphs of a model are exported, their maximum permitted size is
hardcoded to 8 inches wide by 5 inches high, which is too small for the
rendered drawing to be useful (e.g. during debugging) for all but the
simplest of models. Remove the maximum size restriction, allowing tools
to render the drawing with its natural dimensions.
When starting the Nailgun server via 'prism -ng', we now allow the main class to be served
to be configured via the NG_MAINCLASS environment variable. If not set, defaults to prism.PrismCL, as before.
This allows to use nailgun also with other test main methods, e.g., those in the LTL-to-automata classes.
Previously, when converting from boolean to BigRational, a fresh object was allocated. However,
as BigRationals are immutable, we can just return BigRational.ONE or .ZERO, respectively.
Tag: performance?
(1) In general, for user actions (a_...), ensure that setComputing(false)
is called even if the underlying computing resulted in an exception.
This ensures that the buttons/menu items of the simulator are properly
enabled again and we don't get into a deadlock situation where we
can't even start a new path.
(2) For the automatic step actions, ensure that the path display is
updated even if there is an exception, as there may have been
intermediate steps that had succeeded before the error occurred.
Previously, the resulting distance was considered as a time value,
not a step value. For discrete time models, this coincidently does
the right thing, but for continuous time models this does not work as expected.
Technically, as engine.getPathSize() is a long and the value from the text box
is an int, the result is a long and that leads Java to prefer the a_backTrack(double)
and a_autoStep(double) variants of these methods. We cast to an int to ensure
that the int-parameter variants are taken.
Use enum fields to store the delimiters instead of the map.
Add some more comments to alert the user that proper quoting (for HTML labels) might be necessary.
Graphviz implements a subset of HTML that can be used in node and edge
labels (see https://graphviz.gitlab.io/_pages/doc/info/shapes.html#html
for a description of the subset) as an alternative to the plain-text
default style. The HTML-like style uses different attribute value
delimiters (<>) to the plain text style (""), but the latter is
hardcoded in explicit.graphviz.Decoration. The line delimiters also
differ (<br/> and \n respectively).
Provide support for both plain text and HTML-like labels in Decorator;
the label type can be changed by calling setLabelType() before appending
any label content via labelAddBelow() or labelAddAbove().
Move release building automation from top-level Makefile to main
PRISM Makefile and delete the top-level one: after switching to git,
the required top-level directories (prism-examples, cudd, etc.) are
always present and there is no need for the separation.
Source releases will now be direct copies of the whole git repo. The Makefile
targets for building binary releases have been simplified and updates. They
are now triggered by "make release" or "make release VERSION=4.5".
There is also a new makefile target "doc" that currently pulls down a copy of
the online manual and stores it in the "manual" directory.