209
209
public static boolean trySetup() {
211
String verifydtapn = null;
213
//If env is set, it overwrites the value
214
verifydtapn = System.getenv("verifydtapn");
215
if (verifydtapn != null && !verifydtapn.isEmpty()) {
216
if (new File(verifydtapn).exists()){
212
String verifydtapn = null;
214
//If env is set, it overwrites the value
215
verifydtapn = System.getenv("verifydtapn");
216
if (verifydtapn != null && !verifydtapn.isEmpty()) {
217
if (new File(verifydtapn).exists()){
218
verifydtapnpath = verifydtapn;
219
VerifyTAPNDiscreteVerification v = new VerifyTAPNDiscreteVerification(new FileFinder(), new MessengerImpl());
220
if(v.isCorrectVersion()){
224
verifydtapnpath = null;
230
verifydtapn = Preferences.getInstance().getVerifydtapnLocation();
231
if (verifydtapn != null && !verifydtapn.isEmpty()) {
217
232
verifydtapnpath = verifydtapn;
218
VerifyTAPNDiscreteVerification v = new VerifyTAPNDiscreteVerification(new FileFinder(), new MessengerImpl());
219
if(v.isCorrectVersion()){
223
verifydtapnpath = null;
229
verifydtapn = Preferences.getInstance().getVerifydtapnLocation();
230
if (verifydtapn != null && !verifydtapn.isEmpty()) {
231
verifydtapnpath = verifydtapn;
235
//Search the installdir for verifytapn
236
File installdir = TAPAAL.getInstallDir();
238
String[] paths = {"/bin/verifydtapn", "/bin/verifydtapn64", "/bin/verifydtapn.exe", "/bin/verifydtapn64.exe"};
239
for (String s : paths) {
240
File verifydtapnfile = new File(installdir + s);
242
if (verifydtapnfile.exists()){
244
verifydtapnpath = verifydtapnfile.getAbsolutePath();
245
VerifyTAPNDiscreteVerification v = new VerifyTAPNDiscreteVerification(new FileFinder(), new MessengerImpl());
246
if(v.isCorrectVersion()){
250
verifydtapnpath = null;
236
//Search the installdir for verifytapn
237
File installdir = TAPAAL.getInstallDir();
239
String[] paths = {"/bin/verifydtapn", "/bin/verifydtapn64", "/bin/verifydtapn.exe", "/bin/verifydtapn64.exe"};
240
for (String s : paths) {
241
File verifydtapnfile = new File(installdir + s);
243
if (verifydtapnfile.exists()){
245
verifydtapnpath = verifydtapnfile.getAbsolutePath();
246
VerifyTAPNDiscreteVerification v = new VerifyTAPNDiscreteVerification(new FileFinder(), new MessengerImpl());
247
if(v.isCorrectVersion()){
251
verifydtapnpath = null;
259
} catch (Exception e) {
261
264
public VerificationResult<TimedArcPetriNetTrace> verify(VerificationOptions options, Tuple<TimedArcPetriNet, NameMapping> model, TAPNQuery query) throws Exception {