import edu.uci.eecs.specCompiler.specExtraction.SequentialDefineSubConstruct;
import edu.uci.eecs.specCompiler.specExtraction.VariableDeclaration;
+/**
+ * <p> Defines a list of commonly used constant strings. </p>
+ * @author peizhaoo
+ *
+ */
public class CodeVariables {
// C++ code or library
public static final String HEADER_STDLIB = "<stdlib.h>";
import edu.uci.eecs.specCompiler.specExtraction.SourceFileInfo;
import edu.uci.eecs.specCompiler.specExtraction.SpecExtractor;
+/**
+ * <p>
+ * A specificaiton semantics checker that checks the consistency of the
+ * specifications after they are extracted from the source code.
+ * </p>
+ *
+ * @author peizhaoo
+ *
+ */
public class SemanticsChecker {
public final HashMap<File, SourceFileInfo> srcFilesInfo;
public final ArrayList<Construct> constructs;
for (int j = 0; j < iConstruct.commitPointSet.size(); j++) {
String label = iConstruct.commitPointSet.get(j);
-// if (!CPLabel2InterfaceConstruct.containsKey(label)) {
-// CPLabel2InterfaceConstruct.put(label,
-// new ArrayList<InterfaceConstruct>());
-// }
-// CPLabel2InterfaceConstruct.get(label).add(iConstruct);
+ // if (!CPLabel2InterfaceConstruct.containsKey(label)) {
+ // CPLabel2InterfaceConstruct.put(label,
+ // new ArrayList<InterfaceConstruct>());
+ // }
+ // CPLabel2InterfaceConstruct.get(label).add(iConstruct);
if (!CPLabel2InterfaceConstruct.containsKey(label)) {
CPLabel2InterfaceConstruct.put(label, iConstruct);
} else {
throw new SemanticsCheckerException(
"Commit point has multiple interfaces!");
}
-
+
}
}
}
/**
* <p>
- * This is just an abstract class for all the constructs.
+ * An abstract class for all different specification constructs.
* </p>
*
* @author peizhaoo
import edu.uci.eecs.specCompiler.grammerParser.utilParser.ParseException;
import edu.uci.eecs.specCompiler.grammerParser.utilParser.UtilParser;
+/**
+ * <p> Utility functions for parsing the specifications </p>
+ * @author peizhaoo
+ *
+ */
public class ParserUtils {
public static String trimSpace(String line) {
int i, j;
* <p>
* This class represents the specification extractor of the specification. The
* main function of this class is to read C/C++11 source files and extract the
- * corresponding specification out, and remember its location, including the
- * file name and the line number, to help the code generation process.
+ * corresponding specifications, and record corresponding information such as
+ * location, e.g., the file name and the line number, to help the code
+ * generation process.
* </p>
*
* @author peizhaoo
public SpecExtractor() {
srcFilesInfo = new HashMap<File, SourceFileInfo>();
}
-
+
public ArrayList<Construct> getConstructs() {
ArrayList<Construct> constructs = new ArrayList<Construct>();
for (File f : srcFilesInfo.keySet()) {
}
return constructs;
}
-
+
/**
* <p>
* Given a list of files, it scans each file and add found SpecConstrcut to
}
}
-
}