Skip to content

Cleaner separation of native code#275

Open
davexparker wants to merge 4 commits intoprismmodelchecker:masterfrom
davexparker:purejava
Open

Cleaner separation of native code#275
davexparker wants to merge 4 commits intoprismmodelchecker:masterfrom
davexparker:purejava

Conversation

@davexparker
Copy link
Member

  • Clean up interface to native code, especially in prism.Prism
  • Only load native code when actually needed
    • Also default to Java PrismFileLog implementation initially
    • This means explicit engine can be used without shared libraries present

Calls to JDD.xx() and PrismNative.xx() are pushed into separate libraries.
Currently those libraries are always created but will later be optional.

Prism also also now stores a (static) workingDirectory, as set by the -dir
switch or when running PRISM in Nailgun mode. There are methods to resolve
filenames with respect to this. Currently unused. In fact, setting the
working directory currently only works via the native call to change cwd.
PrismFileLog now defaults to using non-native code, i.e., PrintStreams,
but can be switched cleanly to a native implementation using useNative().

Code using native libraries (mainly symbolic engines) implement new
interface PrismNativeComponent, which triggers the switch on creation.
Native shared libraries can be absent when using the explicit engine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant