The generated action vector was stored in the 'actions' member of the
NDSparseMatrix that was the last one that was built (remembered in the
global ndsm pointer variable).
Now, we store it in the 'actions' member of the mdp_ndsm that is
passed in, as intended.
This did not result in problems before because the call to
build_nd_action_vector() was always immediately after the
corresponding NDSparseMatrix was built.
In case that no export_name is passed to one of the PM_Export..., PS_Export.... functions,
ReleaseStringUTFChars() would be called even though there was no previous call to
GetStringUTFChars(), leading to a SEGFAULT.
This is for robustness, PRISM always passes an export_name string.
As noted in #68, the javah tool has been removed in JDK10. Here, we switch to the new way of generating the JNI .h files, using the -h option of the regular javac compiler.
We have to adapt all Makefiles (not only those in directories that contain classes with native methods), as javac compiles all required classes (and generates their JNI headers) beyond the directory with the Makefile.
The .h files generated by javac -h had a different naming scheme, now there is a prefix for the package name. To avoid having to touch all the #includes, we generate the new .h files in prism/include/jni and provide legacy headers in the old location and with the old name, forwarding the the corresponding new header. In the future, at an appropriate moment, those legacy headers can be removed and replace with direct includes.
Currently, there is a post-processing step on Windows: After the .h file is generated, dos2unix is called to replace the Windows CRLF line endings. Otherwise, the generated headers show up as changed files in version control. As now there are no special targets for the generation of the .h files anymore, we move to a global post-processing step and call dos2unix on prism/include/jni/*.h at the end of building.
Due to a typo, the upper iteration uses `updateValueFromBelow` instead of `updateValueFromAbove`
to update the value vector. When the flag for monotonicity enforcement from above is active (default),
all values are thus forced to be above the upper bound, preventing convergence.
Example:
prism functionality/verify/mdps/reach/mdp_simple.nm functionality/verify/mdps/reach/mdp_simple.nm.props -sparse -intervaliter
+ test case
Currently, building PRISM with parallel building does not work,
as there are dependencies between targets that are not fully
encoded in the Makefiles. Building with -j n flag would lead to error.
Now, we add the .NOTPARALLEL target to most of the Makefiles,
which tell GNU make to ignore the -j flag. Note that this
only inhibits parallel builds for the current Makefile, we
thus have to specify it for all sub-Makefiles as well
(see https://www.gnu.org/software/make/manual/html_node/Parallel.html)
For the external libraries, CUDD and LPSolve don't seem to mind building
in parallel, so we don't inhibit there and can get some minor compile time
speed-up by using multiple cores if the -j option is specified.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12202 bbc10eb1-c90d-0410-af57-cb519fbb1720
Consistently include cstdio instead of stdio.h, etc. For MinGW,
the default underlying stdio implementation (Microsoft DLL based vs
POSIX MinGW implementation) differs between C++ and C code, so
format string warnings pop up if we include the C header...
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12192 bbc10eb1-c90d-0410-af57-cb519fbb1720
On Win32, jints are actually long ints, so printf would need %ld instead of %d.
As jints are 32bit, we simply cast to an int to silence format string compiler
warning.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12190 bbc10eb1-c90d-0410-af57-cb519fbb1720
Generates HTML file with the individual steps of the iterative procedures.
Relies on external JavaScript and CSS.
Is already prepared for exporting interval iteration steps (possibility
to export multiple vectors with type flag per iteration step)
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12073 bbc10eb1-c90d-0410-af57-cb519fbb1720
Currently, the sparse engine internally uses int (signed 32bit) index variables
So, if the number of states is larger than Integer.MAX_VALUE, there is a problem
and the code will most probably crash or do nonsensical things.
We check this before calling into the native sparse engine code and
throw a PrismNotSupportedException.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12020 bbc10eb1-c90d-0410-af57-cb519fbb1720
Technically, using 'plain' delete for deleting objects allocated with new[] is
undefined behaviour. In practice, this didn't appear to be a problem.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11786 bbc10eb1-c90d-0410-af57-cb519fbb1720