Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456 Rok Strniša
Existing ML-like languages guarantee type-safety, ensuring memory
safety and protecting the invariants of abstract types, but only
within single executions of single programs. Distributed programming
is becoming ever more important, and should benefit even
more from such guarantees. In previous work on theoretical calculi
and the Acute prototype language, we outlined techniques to
provide them for simple languages.
In this paper, we put these ideas into practice, describing the
HashCaml extension to the OCaml bytecode compiler, which supports
type-safe and abstraction-safe marshalling, together with related
naming constructs. Our contribution is threefold: (1) We show
how to define globally meaningful runtime type names for key
OCaml type constructs that were not covered in our previous work,
dealing with the generativity issues involved: user-defined variant
and record types, substructures, functors, arbitrary ascription,
separate compilation, and external C functions. (2) We support
marshalling within polymorphic functions by type-passing, requiring
us to build compositional runtime type names and revisit the
OCaml relaxed value restriction. We show that with typed marshalling
one must fall back to the SML97 value restriction. (3) We
show how the above can be implemented with reasonable performance
as an unintrusive modification to the existing OCaml language,
implementation, and standard libraries. An alpha release of
HashCaml, capable of bootstrapping itself, is available, along with
an example type-safe distributed communication library written in
the language.