コード例 #1
0
        public BootableAppVerb(SourcePath dfyroot, DafnyCCVerb.FramePointerMode useFramePointer, VerificationRequest verificationRequest)
        {
            this.dfyroot             = dfyroot;
            this.verificationRequest = verificationRequest;
            string concreteId = verificationRequest.ToString() + "," + useFramePointer.ToString();

            this.abstractId = new AbstractId(this.GetType().Name, version, dfyroot.ToString(), concrete: concreteId);

            string targetDirectory = Path.Combine(BuildEngine.theEngine.getObjRoot(), dfyroot.getDirPath(),
                                                  "bootable-" + verificationRequest.ToString());

            bootIniFile = new BuildObject(Path.Combine(targetDirectory, "safeos/boot.ini"));

            //- TODO: Create the bootloader verb

            loaderVerb = new IroncladAppVerb(new SourcePath(LOADER_DFY), IroncladAppVerb.TARGET.BARE_METAL, useFramePointer, verificationRequest);
            appVerb    = new IroncladAppVerb(dfyroot, IroncladAppVerb.TARGET.BARE_METAL, useFramePointer, verificationRequest);

            batchVerb = new BatchVerifyVerb(dfyroot, new HashSet <IObligationsProducer>()
            {
                appVerb, loaderVerb
            }, BatchVerifyVerb.BatchMode.APP);
            batchSummaryVerb = new VerificationResultSummaryVerb(batchVerb);

            loaderCopy        = new BuildObject(Path.Combine(targetDirectory, targetExecutableName(loaderVerb)));
            bootloaderCopy    = new BuildObject(Path.Combine(targetDirectory, bootloader.getFileName()));
            appExecutableCopy = new BuildObject(Path.Combine(targetDirectory, targetExecutableName(appVerb)));
        }
コード例 #2
0
        public override BuildObject outputFile()
        {
            if (buildSymDiffMutualSummary)
            {
                // SymDiff files need to go into their own directory
                BuildObject normalName = BeatExtensions.makeOutputObject(basmInput, SYMDIFF_EXTN);
                dirName = normalName.getFileName() + SYMDIFF_DIR_EXTN;
                BuildObject dirExtendedName = new BuildObject(Path.Combine(normalName.getDirPath(), dirName, normalName.getFileName()));

                return(dirExtendedName);
            }
            else
            {
                return(BeatExtensions.makeOutputObject(basmInput, BoogieVerb.BPL_EXTN));
            }
        }
コード例 #3
0
        public BuildObject getMutualSummary()
        {
            // SymDiff files need to go into their own directory.
            BuildObject normalName      = BeatExtensions.makeOutputObject(basmInput, MUTUAL_SUMMARY_EXTN);
            BuildObject dirExtendedName = new BuildObject(Path.Combine(normalName.getDirPath(), dirName, normalName.getFileName()));

            return(dirExtendedName);
        }
コード例 #4
0
 // TODO: Rename obj to something meaningful.  Is it a boot file?
 private string mkBootFileEntry(WorkingDirectory workingDirectory, BuildObject obj)
 {
     return(string.Format("Size={0}   Path=/{1}", new FileInfo(workingDirectory.PathTo(obj)).Length, obj.getFileName()));
 }
コード例 #5
0
 private BuildObject RelocateBuildObjectToExeDirectory(BuildObject sourceOb)
 {
     return(new BuildObject(exeOutput.getDirPath() + "\\" + sourceOb.getFileName()));
 }
コード例 #6
0
        public override BuildObject outputFile()
        {
            if (buildSymDiffMutualSummary)
            {
                //- SymDiff files need to go into their own directory
                BuildObject normalName = BeatExtensions.makeOutputObject(basmInput, SYMDIFF_EXTN);

                //- The following produces file names that are too long in the failures directory.
                //- The OS then truncates them, causing filename collisions.
                //-BuildObject dirExtendedName = new BuildObject(Path.Combine(normalName.getDirPath(), Util.mungeClean(getAbstractIdentifier()), normalName.getFileName()));
                //- Try naming the directory after the file instead
                BuildObject dirExtendedName = new BuildObject(Path.Combine(normalName.getDirPath(), normalName.getFileName() + SYMDIFF_DIR_EXTN, normalName.getFileName()));

                return(dirExtendedName);
            }
            else
            {
                return(BeatExtensions.makeOutputObject(basmInput, BoogieVerb.BPL_EXTN));
            }
        }
コード例 #7
0
        public BuildObject getMutualSummary()
        {
            //- SymDiff files need to go into their own directory
            BuildObject normalName      = BeatExtensions.makeOutputObject(basmInput, MUTUAL_SUMMARY_EXTN);
            BuildObject dirExtendedName = new BuildObject(Path.Combine(normalName.getDirPath(), Util.mungeClean(getAbstractIdentifier().ToString()), normalName.getFileName()));

            return(dirExtendedName);
        }
コード例 #8
0
 string mkBootFileEntry(BuildObject obj)
 {
     return(String.Format("Size={0}   Path=/{1}", new FileInfo(obj.getFilesystemPath()).Length, obj.getFileName()));
 }
コード例 #9
0
ファイル: BootableAppVerb.cs プロジェクト: jango2015/Ironclad
 // TODO: Rename obj to something meaningful.  Is it a boot file?
 private string mkBootFileEntry(WorkingDirectory workingDirectory, BuildObject obj)
 {
     return string.Format("Size={0}   Path=/{1}", new FileInfo(workingDirectory.PathTo(obj)).Length, obj.getFileName());
 }
コード例 #10
0
 private BuildObject RelocateBuildObjectToExeDirectory(BuildObject sourceOb)
 {
     return new BuildObject(exeOutput.getDirPath() + "\\" + sourceOb.getFileName());
 }