-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
181 changed files
with
2,393 additions
and
833 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
::/*#! 2> /dev/null # | ||
@ 2>/dev/null # 2>nul & echo off & goto BOF # | ||
if [ -z ${SIREUM_HOME} ]; then # | ||
echo "Please set SIREUM_HOME env var" # | ||
exit -1 # | ||
fi # | ||
exec ${SIREUM_HOME}/bin/sireum slang run "$0" "$@" # | ||
:BOF | ||
setlocal | ||
if not defined SIREUM_HOME ( | ||
echo Please set SIREUM_HOME env var | ||
exit /B -1 | ||
) | ||
%SIREUM_HOME%\\bin\\sireum.bat slang run "%0" %* | ||
exit /B %errorlevel% | ||
::!#*/ | ||
// #Sireum | ||
|
||
import org.sireum._ | ||
|
||
val rootDir = Os.slashDir.up.up.up | ||
|
||
val sireumBin = Os.path(Os.env("SIREUM_HOME").get) / "bin" | ||
val sireum = sireumBin / (if(Os.isWin) "sireum.bat" else "sireum") | ||
|
||
val attestations = Os.Path.walk(rootDir, T, T, p => p.name == "attestation" && p.isDir && (p / "run-attestation.cmd").exists) | ||
|
||
val canonical = rootDir / "isolette" / "attestation" / "run-attestation.cmd" | ||
|
||
if (ops.ISZOps(Os.cliArgs).contains("update")) { | ||
for (a <- attestations if (a != canonical.up)) { | ||
a.removeAll() | ||
a.mkdir() | ||
canonical.copyOverTo(a / "run-attestation.cmd") | ||
println(s"Wrote: ${a / "run-attestation.cmd"}") | ||
} | ||
} else if (ops.ISZOps(Os.cliArgs).contains("provision")) { | ||
for (a <- attestations if (a != canonical.up)) { | ||
proc"$sireum slang run ${a / "run-attestation.cmd"} provision".console.run() | ||
} | ||
} else if (ops.ISZOps(Os.cliArgs).contains("appraise")) { | ||
for (a <- attestations) { | ||
if ( (a.up / "aadl").exists) { | ||
proc"$sireum slang run ${a / "run-attestation.cmd"} aadl".console.run() | ||
} | ||
if ( (a.up / "sysml").exists) { | ||
proc"$sireum slang run ${a / "run-attestation.cmd"} sysml".console.run() | ||
} | ||
} | ||
} else { | ||
println("Usage: update | provision | appraise") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
::/*#! 2> /dev/null # | ||
@ 2>/dev/null # 2>nul & echo off & goto BOF # | ||
if [ -z ${SIREUM_HOME} ]; then # | ||
echo "Please set SIREUM_HOME env var" # | ||
exit -1 # | ||
fi # | ||
exec ${SIREUM_HOME}/bin/sireum slang run "$0" "$@" # | ||
:BOF | ||
setlocal | ||
if not defined SIREUM_HOME ( | ||
echo Please set SIREUM_HOME env var | ||
exit /B -1 | ||
) | ||
%SIREUM_HOME%\\bin\\sireum.bat slang run "%0" %* | ||
exit /B %errorlevel% | ||
::!#*/ | ||
// #Sireum | ||
|
||
import org.sireum._ | ||
|
||
val rootDir = Os.slashDir.up.up.up | ||
|
||
val sireumBin = Os.path(Os.env("SIREUM_HOME").get) / "bin" | ||
val sireum = sireumBin / (if(Os.isWin) "sireum.bat" else "sireum") | ||
|
||
val excludes: ops.ISZOps[Os.Path] = ops.ISZOps(ISZ( | ||
rootDir / "micro-examples" / "case-transition-models" | ||
)) | ||
|
||
var result: Z = 0 | ||
def findCIs(p: Os.Path): Unit = { | ||
if (!excludes.contains(p)) { | ||
if(p.isFile && p.name == "ci.cmd") { | ||
val r = proc"$sireum slang run $p".console.echo.run() | ||
result = result + r.exitCode | ||
} else if(p.isDir) { | ||
p.list.foreach((m: Os.Path) => findCIs(m)) | ||
} | ||
} | ||
} | ||
findCIs(rootDir) | ||
|
||
Os.exit(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.