Existing techniques for using code written in an unsafe language within a safe virtual machine generally involve transformations from one source code language (such as C, Pascal, or Fortran) to another (such as Java) which is then compiled into virtual machine bytecodes.We present an alternative approach which translate MIPS binaries produced by any compiler into safe virtual machine bytecodes. This approach offers four key advantages over existing techniques: it is language agnostic, it offers bug-for-bug compiler compatibility, requires no post-translation human intervention, and introduces no build process modifications.We also present NestedVM, an implementation of this technique, and discuss its application to six software packages: LINPACK (Fortran), which was used as one of our performance tests, T E X (Pascal), which was used to typeset this document, libjpeg, libmspack, and FreeType (all C source), which are currently in production use as part of the Ibex Project [13], and gcc, which was used to compile all of the aforementioned.Performance measurements indicate a best case performance within 3x of native code and worst case typically within 10x, making it an attractive solution for code which is not performance-critical.
This paper develops machinery necessary to mechanically import arbitrary functional programs into Coq's type theory, manually strengthen their specifications with additional proofs, and then mechanicaly re-extracting the newly-certified program in a form which is as efficient as the original program.In order to facilitate this goal, the coinductive technique of [Cap05] is modified to form a monad whose operators are the constructors of a coinductive type rather than functions defined over the type. The inductive invariant technique of [KM03] is extended to allow optional "after the fact" termination proofs. These proofs inhabit members of Prop, and therefore do not affect extracted code.Compared to [Cap05], the new monad makes it possible to directly represent unrestricted recursion without violating productivity requirements [Gim95], and it produces efficient code via Coq's extraction mechanism. The disadvantages of this technique include reliance on the JMeq axiom [McB00] and a significantly more complex notion of equality.The resulting technique is packaged as a Coq library, and is suitable for formalizing programs written in any side-effect-free functional language with call-by-value semantics.
Abstract. Instances of the GArrow type class (Figure 2) are called generalized arrows. The GArrow class generalizes Control.Arrow by allowing any type-level monoid to take the place of the cartesian product (,) and by replacing arr with the "structural" functions usually defined in terms of it. This paper presents the first nontrivial application of generalized arrows. Previously, GHC had been extended 1 with environment classifiers and an additional compiler pass which implements the flattening transformation [Meg11]. In the present work this facility has been augmented to allow for programs in which level-0 terms consist of unrestricted Haskell, while level-1 terms are limited to a small κ-calculus [Has95] based language. The flattened, GArrow-parameterized term is then instantiated with the instance GArrowVerilog, which renders the term as a Verilog program, which is then synthesized and run on an FPGA.The sample application presented here is a bit-serial circuit which searches for SHA-256 hash collisions. The circuit has been synthesized on a Xilinx Spartan-6 FPGA and functions correctly.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
customersupport@researchsolutions.com
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.