*/
public class Compiler {
+ /* Set this flag to false to turn repairs off */
public static boolean REPAIR=true;
public static void main(String[] args) {
Termination termination=null;
- if (REPAIR) {
- /* Check partition constraints */
- (new ImplicitSchema(state)).update();
- termination=new Termination(state);
- }
+ /* Check partition constraints */
+ (new ImplicitSchema(state)).update();
+ termination=new Termination(state);
+
state.printall();
(new DependencyBuilder(state)).calculate();
//(new Optimizer(state)).optimize();
- if(REPAIR) {
- FileOutputStream gcode2 = new FileOutputStream(cli.infile + "_aux.cc");
- FileOutputStream gcode3 = new FileOutputStream(cli.infile + "_aux.h");
- RepairGenerator wg = new RepairGenerator(state,termination);
- wg.generate(gcode,gcode2,gcode3, cli.infile + "_aux.h");
- gcode2.close();
- gcode3.close();
- } else {
+
+ FileOutputStream gcode2 = new FileOutputStream(cli.infile + "_aux.cc");
+ FileOutputStream gcode3 = new FileOutputStream(cli.infile + "_aux.h");
+ RepairGenerator wg = new RepairGenerator(state,termination);
+ wg.generate(gcode,gcode2,gcode3, cli.infile + "_aux.h");
+ gcode2.close();
+ gcode3.close();
+ /* } else {
WorklistGenerator ng = new WorklistGenerator(state);
+ SetInclusion.worklist=true;
+ RelationInclusion.worklist=true;
ng.generate(gcode);
- }
+ }*/
gcode.close();
} catch (Exception e) {
e.printStackTrace();
LineCount.reset();
FileInputStream infile = new FileInputStream(state.infile + ".struct");
TDLParser parser = new TDLParser(new Lexer(infile));
+ parser.filename = state.infile + ".struct";
CUP$TDLParser$actions.debug = state.verbose > 1 ;
state.ptStructures = (ParseNode) parser.parse().value;
} catch (FileNotFoundException fnfe) {
LineCount.reset();
FileInputStream infile = new FileInputStream(state.infile + ".model");
MDLParser parser = new MDLParser(new Lexer(infile));
+ parser.filename = state.infile + ".model";
CUP$MDLParser$actions.debug = state.verbose > 1 ;
state.ptModel = (ParseNode) parser.parse().value;
} catch (FileNotFoundException fnfe) {
LineCount.reset();
FileInputStream infile = new FileInputStream(state.infile + ".space");
SDLParser parser = new SDLParser(new Lexer(infile));
+ parser.filename = state.infile + ".space";
CUP$SDLParser$actions.debug = state.verbose > 1 ;
state.ptSpace = (ParseNode) parser.parse().value;
} catch (FileNotFoundException fnfe) {
System.err.println("Unable to open file: " + state.infile + ".space");
System.exit(-1);
} catch (Exception e) {
- // System.out.println(e);
- // e.printStackTrace();
+ System.out.println(e);
+ e.printStackTrace();
return false;
}
LineCount.reset();
FileInputStream infile = new FileInputStream(state.infile + ".constraints");
CDLParser parser = new CDLParser(new Lexer(infile));
+ parser.filename = state.infile + ".constraints";
CUP$CDLParser$actions.debug = state.verbose > 1 ;
state.ptConstraints = (ParseNode) parser.parse().value;
} catch (FileNotFoundException fnfe) {