-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in synchronous product and ts.copy()
- Loading branch information
1 parent
e7e13c5
commit 08634df
Showing
15 changed files
with
440 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/java/me/paultristanwagner/modelchecking/ltl/formula/LTLImplicationFormula.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/me/paultristanwagner/modelchecking/ts/TransitionSystemLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package me.paultristanwagner.modelchecking.ts; | ||
|
||
import com.google.gson.Gson; | ||
import com.google.gson.GsonBuilder; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
|
||
public class TransitionSystemLoader { | ||
|
||
private static final Gson GSON; | ||
|
||
static { | ||
GSON = | ||
new GsonBuilder() | ||
.registerTypeAdapter(TSTransition.class, new TSTransition.TSTransitionAdapter()) | ||
.setPrettyPrinting() | ||
.create(); | ||
} | ||
|
||
public static TransitionSystem load(String path) throws IOException { | ||
File file = new File(path); | ||
return load(file); | ||
} | ||
|
||
public static TransitionSystem load(File file) throws IOException { | ||
String fileContent = new String(Files.readAllBytes(file.toPath())); | ||
return fromJson(fileContent); | ||
} | ||
|
||
public static TransitionSystem fromJson(String string) { | ||
return GSON.fromJson(string, TransitionSystem.class); | ||
} | ||
} |
Oops, something went wrong.