public String getModelThyString() { return modelThy.getContent(); }
/** * Write Isabelle theory files to disk for the model and proof obligations * * @param path * Path to the directory to write the files to. Must end with the {@link File#separatorChar} * @return true if write is successful * @throws IOException */ public Boolean writeThyFiles(String path) throws IOException { File modelThyFile = new File(path + modelThyName); FileUtils.writeStringToFile(modelThyFile, modelThy.getContent()); File posThyFile = new File(path + posThyName); FileUtils.writeStringToFile(posThyFile, posThy); return true; }
generatedCode.append(classCg.getContent()); generatedCode.append(MODULE_DELIMITER);
public static String vdmExp2IsaString(PExp exp) throws AnalysisException, org.overture.codegen.ir.analysis.AnalysisException { IsaGen ig = new IsaGen(); GeneratedModule r = ig.generateIsabelleSyntax(exp); if (r.hasMergeErrors()) { throw new org.overture.codegen.ir.analysis.AnalysisException(exp.toString() + " cannot be generated. Merge errors:" + r.getMergeErrors().toString()); } if (r.hasUnsupportedIrNodes()) { throw new org.overture.codegen.ir.analysis.AnalysisException(exp.toString() + " cannot be generated. Unsupported in IR:" + r.getUnsupportedInIr().toString()); } if (r.hasUnsupportedTargLangNodes()) { throw new org.overture.codegen.ir.analysis.AnalysisException(exp.toString() + " cannot be generated. Unsupported in TargLang:" + r.getUnsupportedInTargLang().toString()); } return r.getContent(); }
public void genJavaSourceFile(File root, GeneratedModule generatedModule) { File moduleOutputDir = JavaCodeGenUtil.getModuleOutputDir(root, this, generatedModule); if (moduleOutputDir == null) { return; } if (generatedModule != null && generatedModule.canBeGenerated() && !generatedModule.hasMergeErrors()) { String javaFileName; org.overture.codegen.ir.INode irNode = generatedModule.getIrNode(); if(irNode instanceof SClassDeclIR) { // The class may have been renamed, hence different form the original name SClassDeclIR clazz = (SClassDeclIR) irNode; javaFileName = clazz.getName(); } else { javaFileName = generatedModule.getName(); } javaFileName += IJavaConstants.JAVA_FILE_EXTENSION; emitCode(moduleOutputDir, javaFileName, generatedModule.getContent()); } }
MsgPrinter.getPrinter().println(generatedClass.getContent()); MsgPrinter.getPrinter().println("\n"); } else