Energy consumption is a growing concern in several fields, from mobile devices to large data centers. Developers need detailed data on the energy consumption of their software to mitigate consumption issues. Previous approaches have a broader focus, such as on specific functions or programs, rather than source code statements. They primarily focus on estimating the CPU's energy consumption using point estimates, thereby disregarding other hardware effects and limiting their use for statistical reasoning and explainability. We developed a novel methodology to address the limitations of measuring only the CPU's consumption and using point estimates, focusing on predicting the energy usage of statically typed JVM-based programming languages, such as Java and Scala. We measure the energy consumption of Bytecode patterns, the translation from the programming language's source code statement to their Java Bytecode representation. With the energy measurements, we construct a statistical model using Bayesian statistics, which allows us to predict the energy consumption through statistical distributions and analyze individual factors. The model includes three factors we obtain statically fr
Multi-party computation (MPC) based machine learning, referred to as multi-party learning (MPL), has become an important technology for utilizing data from multiple parties with privacy preservation. In recent years, in order to apply MPL in more practical scenarios, various MPC-friendly models have been proposedto reduce the extraordinary communication overhead of MPL. Within the optimization of MPC-friendly models, a critical element to tackle the challenge is profiling the communication cost of models. However, the current solutions mainly depend on manually establishing the profiles to identify communication bottlenecks of models, often involving burdensome human efforts in a monotonous procedure. In this paper, we propose HawkEye, a static model communication cost profiling framework, which enables model designers to get the accurate communication cost of models in MPL frameworks without dynamically running the secure model training or inference processes on a specific MPL framework. Firstly, to profile the communication cost of models with complex structures, we propose a static communication cost profiling method based on a prefix structure that records the function calling
Though many compilation and runtime systems have been developed for DNNs in recent years, the focus has largely been on static DNNs. Dynamic DNNs, where tensor shapes and sizes and even the set of operators used are dependent upon the input and/or execution, are becoming common. This paper presents SoD$^2$, a comprehensive framework for optimizing Dynamic DNNs. The basis of our approach is a classification of common operators that form DNNs, and the use of this classification towards a Rank and Dimension Propagation (RDP) method. This framework statically determines the shapes of operators as known constants, symbolic constants, or operations on these. Next, using RDP we enable a series of optimizations, like fused code generation, execution (order) planning, and even runtime memory allocation plan generation. By evaluating the framework on 10 emerging Dynamic DNNs and comparing it against several existing systems, we demonstrate both reductions in execution latency and memory requirements, with RDP-enabled key optimizations responsible for much of the gains. Our evaluation results show that SoD$^2$ runs up to $3.9\times$ faster than these systems while saving up to $88\%$ peak mem
We present a statically typed embedding of relational programming (specifically a dialect of miniKanren with disequality constraints) in Haskell. Apart from handling types, our dialect extends standard relational combinator repertoire with a variation of relational matching that supports static exhaustiveness checks. To hide the boilerplate definitions and support comfortable logic programming with user-defined data types we use generic programming via GHC.Generics as well as metaprogramming via Template Haskell. We demonstrate our dialect on several examples and compare its performance against some other known implementations of miniKanren.
Infrastructure as Code (IaC) has enabled cloud customers to have more agility in creating and modifying complex deployments of cloud-provisioned resources. By writing a configuration in IaC languages such as CloudFormation, users can declaratively specify their infrastructure and CloudFormation will handle the creation of the resources. However, understanding the complexity of IaC deployments has emerged as an unsolved issue. In particular, estimating the cost of an IaC deployment requires estimating the future usage and pricing models of every cloud resource in the deployment. Gaining transparency into predicted usage/costs is a leading challenge in cloud management. Existing work either relies on historical usage metrics to predict cost or on coarse-grain static analysis that ignores interactions between resources. Our key insight is that the topology of an IaC deployment imposes constraints on the usage of each resource, and we can formalize and automate the reasoning on constraints by using an SMT solver. This allows customers to have formal guarantees on the bounds of their cloud usage. We propose a tool for fine-grained static usage analysis that works by modeling the inter-r
Efficient structural reanalysis for high-rank modification plays an important role in engineering computations which require repeated evaluations of structural responses, such as structural optimization and probabilistic analysis. To improve the efficiency of engineering computations, a novel approximate static reanalysis method based on system reduction and iterative solution is proposed for statically indeterminate structures with high-rank modification. In this approach, a statically indeterminate structure is divided into the basis system and the additional components. Subsequently, the structural equilibrium equations are rewritten as the equation system with the stiffness matrix of the basis system and the pseudo forces derived from the additional elements. With the introduction of spectral decomposition, a reduced equation system with the element forces of the additional elements as the unknowns is established. Then, the approximate solutions of the modified structure can be obtained by solving the reduced equation system through a pre-conditioned iterative solution algorithm. The computational costs of the proposed method and the other two reanalysis methods are compared an
We introduce and analyze a Statically Condensed Iterated Penalty (SCIP) method for solving incompressible flow problems discretized with $p$th-order Scott-Vogelius elements. While the standard iterated penalty method is often the preferred algorithm for computing the discrete solution, it requires inverting a linear system with $\mathcal{O}(p^{d})$ unknowns at each iteration. The SCIP method reduces the size of this system to $\mathcal{O}(p^{d-1})$ unknowns while maintaining the geometric rate of convergence of the iterated penalty method. The application of SCIP to Kovasznay flow and Moffatt eddies shows good agreement with the theory.
We numerically study the distributions of global pressure that are found in ensembles of statically jammed and quasistatically sheared systems of bidisperse, frictionless, disks at fixed packing fraction $φ$ in two dimensions. We use these distributions to address the question of how pressure increases as $φ$ increases above the jamming point $φ_J$, $p\sim |φ- φ_J|^y$. For statically jammed ensembles, our results are consistent with the exponent $y$ being simply related to the power law of the interparticle soft-core interaction. For sheared systems, however, the value of $y$ is consistent with a non-trivial value, as found previously in rheological simulations.
A recently developed spectral-element adaptive refinement incompressible magnetohydrodynamic (MHD) code [Rosenberg, Fournier, Fischer, Pouquet, J. Comp. Phys. 215, 59-80 (2006)] is applied to simulate the problem of MHD island coalescence instability (MICI) in two dimensions. MICI is a fundamental MHD process that can produce sharp current layers and subsequent reconnection and heating in a high-Lundquist number plasma such as the solar corona [Ng and Bhattacharjee, Phys. Plasmas, 5, 4028 (1998)]. Due to the formation of thin current layers, it is highly desirable to use adaptively or statically refined grids to resolve them, and to maintain accuracy at the same time. The output of the spectral-element static adaptive refinement simulations are compared with simulations using a finite difference method on the same refinement grids, and both methods are compared to pseudo-spectral simulations with uniform grids as baselines. It is shown that with the statically refined grids roughly scaling linearly with effective resolution, spectral element runs can maintain accuracy significantly higher than that of the finite difference runs, in some cases achieving close to full spectral accura
We present a static-condensation method for time-implicit discretizations of the Discontinuous Galerkin Spectral Element Method on Gauss-Lobatto points (GL-DGSEM). We show that, when solving the compressible Navier-Stokes equations, it is possible to reorganize the linear system that results from the implicit time-integration of the GL-DGSEM as a Schur complement problem, which can be efficiently solved using static condensation. The use of static condensation reduces the linear system size and improves the condition number of the system matrix, which translates into shorter computational times when using direct and iterative solvers. The statically condensed GL-DGSEM presented here can be applied to linear and nonlinear advection-diffusion partial differential equations in conservation form. To test it we solve the compressible Navier-Stokes equations with direct and Krylov subspace solvers, and we show for a selected problem that using the statically condensed GL-DGSEM leads to speed-ups of up to $200$ when compared to the time-explicit GL-DGSEM, and speed-ups of up to three when compared with the time-implicit GL-DGSEM that solves the global system. The GL-DGSEM has gained incre
Statically indeterminate systems are experimentally demonstrated to be in fact dynamical at the microscopic scale. Take the classic ladder-wall problem, for instance. Depending on the Young's modulus of the wall, it may take up to twenty minutes before its weight saturates. This finding is shown to be shared by other statically indeterminate systems, such as a granule silo and a beam with three support points. We believe that the aging effect is responsible for this surprising phenomenon because it can be correlated with the evolution of microscopic contact area with the wall and floor. Finally, a heuristic and simple method is introduced that can uniquely determine and analytically solve the saturated weight without invoking detailed material properties.
With increasing inter-electronic distance, the screening of the electron-electron interaction by the presence of other electrons becomes the dominant source of electron correlation. This effect is described by the random phase approximation (RPA) which is therefore a promising method for the calculation of weak interactions. The success of the RPA relies on the cancellation of errors, which can be traced back to the violation of the crossing symmetry of the 4-point vertex, leading to strongly overestimated total correlation energies. By addition of second-order screened exchange (SOSEX) to the correlation energy, this issue is substantially reduced. In the adiabatic connection (AC) SOSEX formalism, one of the two electron-electron interaction lines in the second-order exchange term is dynamically screened (SOSEX($W$,$v_c$)). A related SOSEX expression in which both electron-electron interaction lines are statically screened (SOSEX($W(0)$,$W(0)$)) is obtained from the $G3W2$ contribution to the electronic self-energy. In contrast to SOSEX($W$,$v_c$), the evaluation of this correlation energy expression does not require an expensive numerical frequency integration and is therefore ad
The key feature for the successful implementation of the surrogate data test for nonlinearity on a scalar time series is the generation of surrogate data that represent exactly the null hypothesis (statically transformed normal stochastic process), i.e. they possess the sample autocorrelation and amplitude distribution of the given data. A new conceptual approach and algorithm for the generation of surrogate data is proposed, called {\em statically transformed autoregressive process} (STAP). It identifies a normal autoregressive process and a monotonic static transform, so that the transformed realisations of this process fulfill exactly both conditions and do not suffer from bias in autocorrelation as the surrogate data generated by other algorithms. The appropriateness of STAP is demonstrated with simulated and real world data.
Consumption of REST services has become a popular means of invoking code provided by third parties, particularly in web applications. Nowadays programmers of web applications can choose TypeScript over JavaScript to benefit from static type checking that enables validating calls to local functions or to those provided by libraries. Errors in calls to REST services, however, can only be found at run-time. In this paper, we present SafeRESTScript (SRS, for short) a language that extends the support of static analysis to calls to REST services, with the ability to statically find common errors such as missing or invalid data in REST calls and misuse of the results from such calls. SafeRESTScript features a syntax similar to JavaScript and is equipped with (i) a rich collection of types (including objects, arrays and refinement types)and (ii) primitives to natively support REST calls that are statically validated against specifications of the corresponding APIs. Specifications are written in HeadREST, a language that also features refinement types and supports the description of semantic aspects of REST APIs in a style reminiscent of Hoare triples. We present SafeRESTScript and its val
The coupled-channel theory is a natural way of treating nonelastic channels, in particular those arising from collective excitations characterized by nuclear deformations. A proper treatment of such excitations is often essential to the accurate description of experimental nuclear-reaction data and to the prediction of a wide variety of scattering observables. Stimulated by recent work substantiating the near validity of the adiabatic approximation in coupled-channel calculations for scattering on statically deformed nuclei, we explore the possibility of generalizing a global spherical optical model potential (OMP) to make it usable in coupled-channel calculations on this class of nuclei. To do this, we have deformed the Koning-Delaroche global spherical potential for neutrons, coupling a sufficient number of states of the ground state band to ensure convergence. We present an extensive study of the effects of collective couplings and nuclear deformations on integrated cross sections as well as on angular distributions for neutron-induced reactions on statically deformed nuclei in the rare-earth region. We choose isotopes of three rare-earth elements (Gd, Ho, W), which are known to
The Julia programming language is considered a strong contender as a future language for high-energy physics (HEP) computing. However, transitioning to the Julia ecosystem will be a long process and interoperability between Julia and C++ is required. So far several successful attempts have been made to wrap HEP C++ packages for use in Julia. It is also important to explore the reverse direction, allowing Julia code to be called from existing HEP codebases, written primarily in C++ and Python, which would significantly improve potential adoption of Julia code. With recent developments in Julia enabling it to produce statically compiled code, this approach is becoming increasingly feasible, and investigating this potential for the benefit of HEP community is the focus of this work. This work presents a case study of statically compiling the JetReconstruction.jl package - a highly performant, native Julia implementation of sequential jet reconstruction algorithms. Two different backends for Julia code compilation are compared: the existing PackageCompiler.jl and the new static compilation feature of Julia language, which is one of the major improvements in the Julia v1.12 release. The
Agent frameworks increasingly encode tool-using behavior as explicit workflow graphs, yet safety enforcement remains a runtime concern. These frameworks expose analyzable graph structure through their APIs, enabling pre-deployment static verification of safety properties that runtime guardrails can only check reactively. This paper presents Agentproof, a system that automatically extracts a unified abstract graph model from four major agent frameworks (LangGraph, CrewAI, AutoGen, Google ADK), applies six structural checks with witness trace generation, and evaluates temporal safety policies via a DSL compiled to deterministic finite automata, both statically through a graph x DFA product construction and at runtime over event traces. Unlike general-purpose model checkers, Agentproof requires no manual modeling. In a curated benchmark of 18 author-constructed workflows, 27% of the benchmark contain structural defects (dead-end nodes, unreachable exits) and 55% violate a human-gate policy when enforced, distinct categories that prior work conflates. All 15 temporal policies defined fit within the seven-form DSL fragment, and verification completes in sub-second time for graphs up to
Diffusion Transformers for video generation have gained significant research interest since the impressive performance of SORA. Efficient deployment of such generative-AI models on GPUs has been demonstrated with dynamic quantization. However, resource-constrained devices cannot support dynamic quantization, and need static quantization of the models for their efficient deployment on AI processors. In this paper, we propose a novel method for the post-training quantization of OpenSora\cite{opensora}, a Video Diffusion Transformer, without relying on dynamic quantization techniques. Our approach employs static quantization, achieving video quality comparable to FP16 and dynamically quantized ViDiT-Q methods, as measured by CLIP, and VQA metrics. In particular, we utilize per-step calibration data to adequately provide a post-training statically quantized model for each time step, incorporating channel-wise quantization for weights and tensor-wise quantization for activations. By further applying the smooth-quantization technique, we can obtain high-quality video outputs with the statically quantized models. Extensive experimental results demonstrate that static quantization can be a
Gradual typing enables developers to annotate types of their own choosing, offering a flexible middle ground between no type annotations and a fully statically typed language. As more and more code bases get type-annotated, static type checkers detect an increasingly large number of type errors. Unfortunately, fixing these errors requires manual effort, hampering the adoption of gradual typing in practice. This paper presents PyTy, an automated program repair approach targeted at statically detectable type errors in Python. The problem of repairing type errors deserves specific attention because it exposes particular repair patterns, offers a warning message with hints about where and how to apply a fix, and because gradual type checking serves as an automatic way to validate fixes. We addresses this problem through three contributions: (i) an empirical study that investigates how developers fix Python type errors, showing a diverse set of fixing strategies with some recurring patterns; (ii) an approach to automatically extract type error fixes, which enables us to create a dataset of 2,766 error-fix pairs from 176 GitHub repositories, named PyTyDefects; (iii) the first learning-ba
Static analysis is an essential component of many modern software development tools. Unfortunately, the ever-increasing complexity of static analyzers makes their coding error-prone. Even analysis tools based on rigorous mathematical techniques, such as abstract interpretation, are not immune to bugs. Ensuring the correctness and reliability of software analyzers is critical if they are to be inserted in production compilers and development environments. While compiler validation has seen notable success, formal validation of static analysis tools remains relatively unexplored. In this paper, we propose a method for testing abstract interpretation-based static analyzers. Broadly, it consists in checking, over a suite of benchmarks, that the properties inferred statically are satisfied dynamically. The main advantage of our approach lies in its simplicity, which stems directly from framing it within the Ciao assertion-based validation framework, and its blended static/dynamic assertion checking approach. We demonstrate that in this setting, the analysis can be tested with little effort by combining the following components already present in the framework: 1) the static analyzer, wh