forked from rems-project/asl-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embed ARM ASL specs within OCaml (#92)
* extract arm environment into separate file. * allow loading files from either disk or memory * use ppx_blob to embed ASL files instead of dune-site This is instead of installing the ASL files to disk. This should make the installation less liable to random breakages when installed or linked in an unexpected way. The binary size increases by 6MB. Updates tests/coverage/run.sh to substitute away the new file paths of the embedded files, so no coverage re-generation needed. * replace --aarch64-dir with --export-aarch64 this is more useful once the MRA files are bundled.
- Loading branch information
1 parent
e35714f
commit 9b14c90
Showing
14 changed files
with
168 additions
and
115 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 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 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 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 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 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 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,34 @@ | ||
(* defines the evaluation environment for the bundled Arm spsecifications. *) | ||
|
||
let aarch64_asl_dir: string option = | ||
None | ||
|
||
let prelude_blob : LoadASL.source = DataSource ("prelude.asl", [%blob "../prelude.asl"]) | ||
|
||
let asl_blobs : LoadASL.source list = [ | ||
DataSource ("mra_tools/arch/regs.asl", [%blob "../mra_tools/arch/regs.asl"]); | ||
DataSource ("mra_tools/types.asl", [%blob "../mra_tools/types.asl"]); | ||
DataSource ("mra_tools/arch/arch.asl", [%blob "../mra_tools/arch/arch.asl"]); | ||
DataSource ("mra_tools/arch/arch_instrs.asl", [%blob "../mra_tools/arch/arch_instrs.asl"]); | ||
DataSource ("mra_tools/arch/regs_access.asl", [%blob "../mra_tools/arch/regs_access.asl"]); | ||
DataSource ("mra_tools/arch/arch_decode.asl", [%blob "../mra_tools/arch/arch_decode.asl"]); | ||
DataSource ("mra_tools/support/aes.asl", [%blob "../mra_tools/support/aes.asl"]); | ||
DataSource ("mra_tools/support/barriers.asl", [%blob "../mra_tools/support/barriers.asl"]); | ||
DataSource ("mra_tools/support/debug.asl", [%blob "../mra_tools/support/debug.asl";]); | ||
DataSource ("mra_tools/support/feature.asl", [%blob "../mra_tools/support/feature.asl"]); | ||
DataSource ("mra_tools/support/hints.asl", [%blob "../mra_tools/support/hints.asl"]); | ||
DataSource ("mra_tools/support/interrupts.asl", [%blob "../mra_tools/support/interrupts.asl"]); | ||
DataSource ("mra_tools/support/memory.asl", [%blob "../mra_tools/support/memory.asl";]); | ||
DataSource ("mra_tools/support/stubs.asl", [%blob "../mra_tools/support/stubs.asl"]); | ||
DataSource ("mra_tools/support/fetchdecode.asl", [%blob "../mra_tools/support/fetchdecode.asl"]); | ||
DataSource ("tests/override.asl", [%blob "../tests/override.asl"]); | ||
DataSource ("tests/override.prj", [%blob "../tests/override.prj"]); | ||
] | ||
|
||
let aarch64_asl_files: (LoadASL.source * LoadASL.source list) option = | ||
Some (prelude_blob, asl_blobs) | ||
|
||
let aarch64_evaluation_environment ?(verbose = false) (): Eval.Env.t option = | ||
Option.bind aarch64_asl_files | ||
(fun (prelude, filenames) -> Eval.evaluation_environment prelude filenames verbose) | ||
|
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 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.