forked from rems-project/asl-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compilation to Javascript #90
Merged
Merged
Conversation
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
katrinafyi
force-pushed
the
js-of-ocaml
branch
3 times, most recently
from
June 25, 2024 08:51
d3d378b
to
de0cfaf
Compare
Z3 links to a native shared library, and so is unsuitable for use via js-of-ocaml. This separates the one use of Z3 in the code (the type-checker's constraint solver) into a separate library which may be stubbed for non-native platforms. This separates libASL into two parts: libASL_ast which is the minimum needed to define the ASL syntax tree, and libASL which contains the rest of the library. libASL should still be used as the public interface of the library. Since libASL re-exports all of libASL_ast, this should not affect the API visible by downstream users. This is required since we need to insert a platform-specific library, libASL_support, which introduces z3 only on native builds. The dependency tree now looks like: libASL_ast <- libASL_support (virtual) <- libASL.
PCRE relies on a shared library, precluding its use in Javascript. instead, we use the standard ocaml "str" library. note, however, that this supports a smaller subscript of regex (notably no negative lookahead), and has a different syntax. see: https://ocaml.org/manual/5.2/api/Str.html
* 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.
necessary for correct unmarshalling, as this must contain global variables
katrinafyi
changed the title
[WIP] support compilation to Javascript
Support compilation to Javascript
Jul 1, 2024
katrinafyi
added a commit
to UQ-PAC/gtirb-semantics
that referenced
this pull request
Jul 1, 2024
katrinafyi
added a commit
to UQ-PAC/gtirb-semantics
that referenced
this pull request
Jul 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an effort to enable compilation to Javascript via js-of-ocaml, to enable the partial evaluator to be run in the browser. It is anticipated that providing ASLp in the browser will enable greater ease of collaboration and help our work reach new audiences.
Work items required:
BREAKING: this moves the aarch64_evaluation_environment into the separate Arm_env module, instead of being in the Eval module.
Documentation: