Commit cf158e90 authored by Jonathan Shahen's avatar Jonathan Shahen
Browse files

Reorganizing code for better readability, moving log files into separate...

Reorganizing code for better readability, moving log files into separate folder so that they will not appear to be updated every time you run the script
parent 618905d6
/** /**
* *
*/ */
package mohawk; package mohawk.math;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
...@@ -9,6 +9,10 @@ import java.util.LinkedList; ...@@ -9,6 +9,10 @@ import java.util.LinkedList;
import java.util.Set; import java.util.Set;
import java.util.Vector; import java.util.Vector;
import mohawk.pieces.CAEntry;
import mohawk.pieces.PreCondition;
import mohawk.rbac.RBACInstance;
/** /**
* @author kjayaram * @author kjayaram
* *
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package mohawk; package mohawk.math;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
...@@ -30,6 +30,9 @@ import java.util.Map; ...@@ -30,6 +30,9 @@ import java.util.Map;
import java.util.Vector; import java.util.Vector;
import mohawk.collections.RoleDepTree; import mohawk.collections.RoleDepTree;
import mohawk.pieces.CAEntry;
import mohawk.pieces.PreCondition;
import mohawk.rbac.RBACInstance;
/** /**
* @author kjayaram * @author kjayaram
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package mohawk; package mohawk.nusmv;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
......
...@@ -25,12 +25,14 @@ ...@@ -25,12 +25,14 @@
/** /**
* This class converts from a plain RBAC spec to RBACPAT format * This class converts from a plain RBAC spec to RBACPAT format
*/ */
package mohawk; package mohawk.output;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import mohawk.rbac.RBACPAT;
/** /**
* @author Karthick Jayaraman * @author Karthick Jayaraman
* *
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Author: Karthick Jayaraman * Author: Karthick Jayaraman
*/ */
package mohawk; package mohawk.output;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileWriter; import java.io.FileWriter;
...@@ -14,6 +14,11 @@ import java.io.InputStreamReader; ...@@ -14,6 +14,11 @@ import java.io.InputStreamReader;
import java.util.Map; import java.util.Map;
import java.util.Vector; import java.util.Vector;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
import mohawk.pieces.PreCondition;
import mohawk.rbac.RBACInstance;
import org.antlr.stringtemplate.StringTemplate; import org.antlr.stringtemplate.StringTemplate;
/* /*
...@@ -406,7 +411,7 @@ public class WriteNuSMV { ...@@ -406,7 +411,7 @@ public class WriteNuSMV {
done = true; done = true;
} }
String getNuSMVCode() { public String getNuSMVCode() {
return this.smvcode; return this.smvcode;
} }
......
/** /**
* Tool for generating RBAC policy specification. * Tool for generating RBAC policy specification.
*/ */
package mohawk; package mohawk.output;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.FileWriter; import java.io.FileWriter;
...@@ -12,6 +12,11 @@ import java.util.Map; ...@@ -12,6 +12,11 @@ import java.util.Map;
import java.util.Random; import java.util.Random;
import java.util.Vector; import java.util.Vector;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
import mohawk.pieces.PreCondition;
import mohawk.rbac.RBACInstance;
import org.antlr.stringtemplate.*; import org.antlr.stringtemplate.*;
/** /**
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package mohawk; package mohawk.pieces;
/** /**
* This class represents a CAEntry. Each CAEntry has three parts: - Roles that * This class represents a CAEntry. Each CAEntry has three parts: - Roles that
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package mohawk; package mohawk.pieces;
/** /**
* Each CREntry represents a rule for revocation. The first entry describes the * Each CREntry represents a rule for revocation. The first entry describes the
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package mohawk; package mohawk.pieces;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* RBAC2SMV - Tool for converting a RBAC specification * RBAC2SMV - Tool for converting a RBAC specification
* to NuSMV specification * to NuSMV specification
*/ */
package mohawk; package mohawk.rbac;
import java.io.File; import java.io.File;
import java.io.FileReader; import java.io.FileReader;
...@@ -37,6 +37,9 @@ import java.util.Iterator; ...@@ -37,6 +37,9 @@ import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Vector; import java.util.Vector;
import mohawk.output.WriteNuSMV;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
import antlr.RecognitionException; import antlr.RecognitionException;
import antlr.TokenStreamException; import antlr.TokenStreamException;
......
...@@ -4,12 +4,15 @@ ...@@ -4,12 +4,15 @@
* *
* @author Karthick Jayaraman * @author Karthick Jayaraman
*/ */
package mohawk; package mohawk.rbac;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Vector; import java.util.Vector;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
/** /**
* This class represents an RBAC instance read from an input file. An object of * This class represents an RBAC instance read from an input file. An object of
* this class is passed to WriteNuSMV to convert it to a NuSMV spec. * this class is passed to WriteNuSMV to convert it to a NuSMV spec.
......
// $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACLexer.java"$ // $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACLexer.java"$
package mohawk; package mohawk.rbac;
import java.io.InputStream; import java.io.InputStream;
import java.io.Reader; import java.io.Reader;
......
// $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACLexer.java"$ // $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACLexer.java"$
package mohawk; package mohawk.rbac;
public interface RBACLexerTokenTypes { public interface RBACLexerTokenTypes {
int EOF = 1; int EOF = 1;
......
/** /**
* RBACPAT - This tool converts an RBAC spec to an encoding used by the RBACPAT tool. * RBACPAT - This tool converts an RBAC spec to an encoding used by the RBACPAT tool.
*/ */
package mohawk; package mohawk.rbac;
import java.io.File; import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
...@@ -12,6 +12,10 @@ import java.util.Map; ...@@ -12,6 +12,10 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.Vector; import java.util.Vector;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
import mohawk.pieces.PreCondition;
import org.antlr.stringtemplate.StringTemplate; import org.antlr.stringtemplate.StringTemplate;
import antlr.RecognitionException; import antlr.RecognitionException;
......
// $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACParser.java"$ // $ANTLR 2.7.7 (20060906): "rbac.g" -> "RBACParser.java"$
package mohawk; package mohawk.rbac;
import java.util.Vector; import java.util.Vector;
import java.util.Stack; import java.util.Stack;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import mohawk.collections.PreCondProcessorInt; import mohawk.collections.PreCondProcessorInt;
import mohawk.pieces.CAEntry;
import mohawk.pieces.CREntry;
import mohawk.pieces.PreCondition;
import antlr.TokenBuffer; import antlr.TokenBuffer;
import antlr.TokenStreamException; import antlr.TokenStreamException;
import antlr.Token; import antlr.Token;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment