All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jbpt.petri.behavior.LolaSoundnessChecker Maven / Gradle / Ivy

Go to download

The jBPT code library is a compendium of technologies that support research on design, execution, and evaluation of business processes.

The newest version!
package org.jbpt.petri.behavior;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.concurrent.TimeoutException;

import org.jbpt.petri.NetSystem;
import org.jbpt.petri.PetriNet;
import org.jbpt.petri.io.PNMLSerializer;
import org.jbpt.throwable.SerializationException;



public class LolaSoundnessChecker {
	private static final String LOLA_URI = "http://esla.informatik.uni-rostock.de/service-tech/.lola/lola.php";
	private static int TIMEOUT = 180000;
	private static int N = 5;
	
	/**
	 * Uses the LoLA service to check the soundness of the given {@link PetriNet}.
	 * @param petrinet to check
	 * @return true if Petri net is sound
	 * @throws IOException
	 * @throws TimeoutException 
	 * @throws SerializationException 
	 * @throws IOException 
	 */
	public static LolaSoundnessCheckerResult analyzeSoundness(NetSystem net) throws SerializationException, IOException {
		String pnml = PNMLSerializer.serializePetriNet(net, PNMLSerializer.LOLA);
		LolaSoundnessCheckerResult result = new LolaSoundnessCheckerResult();
		
		for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy