From dc60d398d208e3de0e2c51412e5f4b7bcea7fdc6 Mon Sep 17 00:00:00 2001 From: Jonathan Shahen Date: Mon, 21 Nov 2016 20:40:34 -0500 Subject: [PATCH] Adding comments to the ConvertTo class and the subclass ConverToNuSMV --- src/mohawk/converter/to/ConvertTo.java | 13 +++++++++++++ src/mohawk/converter/to/nusmv/ConvertToNuSMV.java | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/mohawk/converter/to/ConvertTo.java b/src/mohawk/converter/to/ConvertTo.java index 404d53d..2cc2bcb 100644 --- a/src/mohawk/converter/to/ConvertTo.java +++ b/src/mohawk/converter/to/ConvertTo.java @@ -25,10 +25,23 @@ public class ConvertTo { this.timing = timing; } + /** + * Takes in a Mohawk+T Policy and converts it to an equivalent problem instance. Has the ability to then write that + * instance out to a file, when {@code writeToFile} is TRUE. + * @param m Input Mohawk+T policy to convert + * @param f can be NULL if {@code writeToFile} is FALSE + * @param writeToFile TRUE to write the instance out to the file {@code f} + * @return the equivalent instance string + */ public String convert(MohawkT m, File f, Boolean writeToFile) { return null; } + /** + * Returns the file extension that {@link ConvertTo#convert(MohawkT, File, Boolean)} will append to the file when + * writing out + * @return + */ public String getFileExtenstion() { return null; } diff --git a/src/mohawk/converter/to/nusmv/ConvertToNuSMV.java b/src/mohawk/converter/to/nusmv/ConvertToNuSMV.java index 9bc69c3..dfdd2ad 100644 --- a/src/mohawk/converter/to/nusmv/ConvertToNuSMV.java +++ b/src/mohawk/converter/to/nusmv/ConvertToNuSMV.java @@ -21,11 +21,21 @@ public class ConvertToNuSMV extends ConvertTo { tPrefix = "ConvertToNuSMV"; } + public ConvertToNuSMV(MohawkTiming timing, String timerPrefix) { + super(timing); + tPrefix = timerPrefix; + } + @Override public String getFileExtenstion() { return ".smv"; } + /** + * Converts Mohawk+T policies to equivalent NuSMV Model Checker instances + *

+ * {@inheritDoc} + */ @Override public String convert(MohawkT m, File file, Boolean writeToFile) { try { -- GitLab