Indexed text attachment
coherent-specialization-on-graalvm.tex
Source for Coherent Specialization on GraalVM
View paper · Download original file
Lines 623–722 of 803. Source text is displayed literally.
623largest absolute difference in an interleaved real or imaginary624component. To test unitarity across the entire finite basis, the test625applies the compiled kernels to every real unit vector in the complex626basis, reconstructs the complex columns, and computes the largest627entrywise magnitude of $U^*U-I$. Table~\ref{tab:quantum-errors} reports628the observed defects. Each check uses absolute tolerance $2\,10^{-12}$.629 630\subsection{Validation across the time grid}631 632The runtime generated the plotted values by evaluating the specialized633CatPE rows at each time. For every sample we compared the amplitudes634against a reference, checked the squared norm against one, and checked635the energy against its initial value. The electron reference uses the636direct Fourier action. The field references use successive applications637of the 48th-degree Taylor polynomial for $\Delta t=0.04$ to the initial638vector. The spectral propagator used to generate the field kernels and639the Taylor reference share a Hamiltonian matrix and use different640numerical methods. The Taylor reference uses one step per sampling interval.641 642\begin{table}[htbp]643\centering644\caption{Maximum discrepancies over 101 times for the compiled dynamics.}645\label{tab:sweep-check}646\small647\begin{tabular}{lrrr}648\toprule649Model & Reference & Norm & Energy \\650\midrule651Free electron &652$3.89\,10^{-16}$ & $6.66\,10^{-16}$ & $8.88\,10^{-16}$ \\653Field, $v=1.25$ &654$2.40\,10^{-15}$ & $1.11\,10^{-15}$ & $1.55\,10^{-15}$ \\655Field, $v=0$ &656$1.44\,10^{-15}$ & $1.78\,10^{-15}$ & $2.91\,10^{-16}$ \\657\bottomrule658\end{tabular}659\end{table}660 661Table~\ref{tab:sweep-check} gives maximum errors across the 303662compiled states from the three sweeps. Reference error uses the largest663absolute difference of a real or imaginary amplitude component. The664reproducibility archive includes the original CSVs, the Java exporter665with an absolute tolerance of $2\,10^{-12}$, and the script that renders666Figures~\ref{fig:electron-sweep} and~\ref{fig:field-sweep}.667 668 669\section{Scope and limitations}670 671The certification and gluing statements are mathematical theorems.672The implementation realizes a first-order fragment with finite contexts,673read-only inputs and static data, and lexical bindings. The software674executes ordinary typed arithmetic. The higher path witnesses used in the675theorems are mathematical objects rather than proof terms serialized by676the runtime. Extending the language with effects, exceptions, unbounded677iteration, or observation of machine representation would require a678revised semantic equivalence and proof of the residual transformations.679 680The numerical examples are finite quantum simulations. The single681electron is spinless with periodic boundary conditions and a682finite-difference Hamiltonian. The interacting field models spinless683fermions in a finite set of sites and a fixed number sector. Full684continuum field simulation, spin, and electromagnetic radiation require685different state spaces and operators. The size of a fixed-number sector686grows binomially with the number of sites, which limits dense compilation.687 688The code measures the size of residual syntax and checks specified689observations. A JIT compilation trace records the actual compilation690event. Source and residual node counts do not estimate machine instruction691counts or execution time. Correctness of the machine-code generation,692the guest interoperability implementations, and their exception handling693is an obligation of the underlying JVM and GraalVM implementations.694 695\paragraph{Artifact and disclosure.}696The accompanying source archive contains the implementations, guest697scripts, build descriptor, test suite, simulation data, figure generator,698and LaTeX sources.699The manuscript and software were produced with AI assistance, including700drafting, code generation, and verification. The responsible submitter uses an anonymous public byline.701 702\begin{thebibliography}{12}703 704\bibitem{graalpe}705GraalVM.706\emph{Partial Evaluation in Truffle}.707\href{https://www.graalvm.org/latest/graalvm-as-a-platform/language-implementation-framework/PartialEvaluation/}{GraalVM documentation}.708 709\bibitem{graalinterop}710GraalVM.711\emph{InteropLibrary}.712\href{https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/api/interop/InteropLibrary.html}{Truffle API documentation}.713 714\bibitem{graalroot}715GraalVM.716\emph{RootNode}.717\href{https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/api/nodes/RootNode.html}{Truffle API documentation}.718 719\bibitem{graalprofile}720GraalVM.721\emph{CountingConditionProfile}.722\href{https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/api/profiles/CountingConditionProfile.html}{Truffle API documentation}.