@@ -875,31 +875,66 @@ \chapter{Related Work} % TODO
875
875
\citeauthor {WasmCoqMechanization } developed an independent mechanization of
876
876
WebAssembly using the Coq proof assistant, and came close to proving its
877
877
soundness\cite {WasmCoqMechanization }.
878
+ Challenges involving control instructions, polymorphism, stack-unwinding, and
879
+ infrastructural difficulties involving unintuitive stack ordering in certain
880
+ contexts prevented the author from fully completing the correctness proof.
881
+ Fortunately for myself, all of these challenges were already addressed in the
882
+ Isabelle mechanization on which my work was based, and I was able to take
883
+ advantage of these existing definitions when implementing the proposals.
884
+ The author mentions plans to finish the correctness proof, implement an
885
+ interpreter and type checker, and integrate proposal changes into the
886
+ mechanization in order to prove their soundness as well, much like the Isabelle
887
+ mechanization and my work does and plans to do.
878
888
879
889
\citeauthor {JSCert } mechanized the JavaScript ECMAScript 5 standard in
880
890
Coq, and created a reference interpreter proved correct with respect to
881
891
the mechanization.
892
+ Unlike WebAssembly with its small number of values and instruction set,
893
+ mechanization of large-scale languages that are intended to be written
894
+ directly are massive undertakings and significantly more challenging.
895
+ Because of this, the JSCert mechanization focuses on the core aspects of the
896
+ language, omitting certain superficial niceties such as for-in loops as well as
897
+ many standard library functions and libraries that can be considered derivable
898
+ from core language features.
882
899
883
900
\citeauthor {RustBelt } mechanized a core calculus of the Rust programming
884
- language using the Iris proof assistant\cite {RustBelt }.
885
- Rust is a modern systems language and one of the leading languages with
886
- support for compiling to WebAssembly.
901
+ language using the Iris proof assistant\cite {RustBelt } and an accompanying
902
+ \textit {extensible soundness proof }.
903
+ Rust is a modern systems language and one of the leading languages with support
904
+ for compiling to WebAssembly.
905
+ Notable features of the language include its novel ownership and borrowing
906
+ lifetime model for references and their valid lifetimes, and its composable
907
+ trait-based inheritance scheme.
908
+ Like JSCert, the full language is too massive of an undertaking to be
909
+ implemented at once---in fact, no full language specification even exists to
910
+ use as a starting point---so the authors reduced the language to a
911
+ continuation-passing style language that includes the core lifetime features
912
+ mentioned above named $ \lambda _{\textrm {Rust}}$ .
913
+ Iris provides built-in support for ownership reasoning, making it a fitting
914
+ choice for a proof assistant for this task.
887
915
\citeauthor {RustBeltRelaxed } extended this work, accounting for relaxed-memory
888
916
operations in use by concurrent Rust programs\cite {RustBeltRelaxed }.
889
917
890
918
\citeauthor {Watt_2020 }, the author of the original Isabelle WebAssembly
891
- mechanization on which my work is based, has mechanized the JavaScript memory
892
- model in Coq, finding errors in JavaScript's specification causing concurrency
893
- issues and compilation problems\cite {Watt_2020 }.
919
+ mechanization on which my work is based, used the Alloy model checker to find
920
+ errors in JavaScript's specification causing concurrency issues and compilation
921
+ problems\cite {Watt_2020 }.
922
+ In particular, the authors show that JavaScript's concurrency model does not in
923
+ fact support compilation to the ARMv8 scheme which is used in real-world
924
+ applications without violating its specified guarantees, and also show that
925
+ JavaScript's model does not guarantee the essential correctness condition of
926
+ Sequential Consistency for Data-Race-Free (SC-DRF) programs.
927
+ An amended version of the specification is proposed that fixes these errors,
928
+ and mechanized in Coq with proofs of compilation and SC-DRF correctness.
894
929
895
930
\chapter {Future Work } % TODO
896
931
897
932
Certainly, much remains to be done in the area of WebAssembly soundness
898
933
validation.
899
934
With the three proposals included in this work, as of the time of this writing
900
935
no other proposals which affect the language specification and its soundness
901
- have been fully adopted into the language, however many proposals remain
902
- outstanding.
936
+ have been fully adopted into the language.
937
+ However, many proposals remain outstanding.
903
938
In order to maximize the effectiveness of proof mechanization, such attempts
904
939
should be performed before they are adopted in order to confirm that they
905
940
do not adversely affect the soundness of the language's type system;
@@ -912,6 +947,11 @@ \chapter{Future Work} % TODO
912
947
Reference Types Proposal\cite {ReferenceTypesProposalOverview ,WeakeningWasm }
913
948
and phase 2 Threading Proposal\cite {ThreadingProposalOverview ,WeakeningWasm }.
914
949
950
+ The mechanization's extensions have been approved by its original author
951
+ \citeauthor {WattMechanizing }, and plans are in place to integrate the changes
952
+ into the official source and the WebAssembly entry in Isabelle's Archive of
953
+ Formal Proofs\cite {WebAssembly -AFP }.
954
+
915
955
\chapter {Conclusion }
916
956
917
957
This paper investigates the WebAssembly language and the soundness of its
@@ -921,9 +961,6 @@ \chapter{Conclusion}
921
961
additions to the language, two of which have since been included into a new
922
962
release of the official WebAssembly language specification, with the third
923
963
remaining a proposed addition still under review and finalization.
924
- The mechanization's extensions have been approved by its original author
925
- \citeauthor {WattMechanizing }, and plans are in place to integrate the changes
926
- into the official source.
927
964
928
965
Over the course of this project I have had the opportunity to join the
929
966
WebAssembly community, learn about the language and its origins, and take
0 commit comments