Empirical is a C++ library designed to promote open science and + facilitate the development of scientific software that is efficient, + reliable, and easily distributable to researchers and non-experts + alike. Specifically, the library sets out to fulfill the following + goals:
+-
+
High quality open-science tools improve code quality, scientific + rigor, and ease of replication or extension for scientific software. + Empirical’s debugging suite combats C++ programming pitfalls, such as + iterator invalidation, memory leakage, and out-of-bounds indexing. + Throughout, library design achieves both performance and safety + through compile-time toggling of checks for undefined or incorrect + behavior.
+Unfortunately, in practice, scientific software is often difficult
+ to obtain, install, or use. Modern web-based interfaces give
+ computational research the potential to better embody open science
+ objectives by empowering easier and more complete access
+ (
Empirical components are subjected to structured code review,
+ unit testing with coverage tracking, and other best practices
+ detailed
+
As an example of Emprical’s utility, the library provides a + configuration framework that includes utilities to
+-
+
create documented configuration parameters with default + values in a single line of C++ code,
+adjust parameters via configuration files, command line + flags, URL query parameters, or in-browser GUIs,
+perform on-the-fly configuration adjustments, and
+support independent configuration subsystems.
+High-quality software needs a robust, inclusive, and diverse
+ community of users and contributors. Our
+
Educational editions of scientific software promote classroom
+ learning and citizen science. The Emscripten compiler enables an
+ existing native codebase to additionally compile to the web
+ (
Empirical amplifies Emscripten by fleshing out its interface for
+ interaction with browser elements. DOM elements are bound to
+ corresponding C++ objects (e.g.,
A live demo of Empirical widgets, presented alongside their
+ source C++ code, is available
+
WebAssembly’s runtime efficiency — achieving 50% to 90% of native
+ performance
+ (
More broadly, Empirical provides optimized tools for
+ performance-critical tasks. For example,
+
Although performant, C++’s permissiveness to out-of-bounds
+ indexing or memory management errors can undermine the validity of
+ generated data and analyses. Standard library vendors — like
+
Developers typically compensate for C++’s missing guardrails with
+ external toolchains like Valgrind, GDB, and sanitizers. Although
+ mature, such tooling suffers substantial
+ limitations
Empirical remains under active development. Current priorities
+ include web-friendly refinements (e.g., file management, rich text
+ handling) and additional step-by-step tutorials for new users. That
+ said, Empirical has largely converged to API stability, and releases
+ are archived on Zenodo for those who depend on them
+ (
Empirical already underlies major projects within digital + evolution, artificial life, and genetic programming. To benefit the + broader scientific software and open science community, we look + forward to welcoming new collaborations and supporting a wider + collection of end-users.
+Several projects pursue objectives related to Empirical’s.
+RepastHPC, accessible at
+
Boost C++ Libraries, available at
+
Emscripten provides cross-compilation from C++ to WebAssembly and
+ available at
+
Cheerp, another C++ to WebAssembly compiler, is available at
+
-
+
Pyodide
+ (
Shiny
+ (
-
+
This research was supported in part by NSF grants DEB-1655715 and + DBI-0939454, by the National Science Foundation Graduate Research + Fellowship under Grant No. DGE-1424871, by Michigan State University + through the computational resources provided by the Institute for + Cyber-Enabled Research, and by the Eric and Wendy Schmidt AI in + Science Postdoctoral Fellowship, a Schmidt Futures program. Any + opinions, findings, and conclusions or recommendations expressed in + this material are those of the author(s) and do not necessarily + reflect the views of the National Science Foundation.
+For example, neither GCC 10.3 nor Clang 12.0.0
+ detect
For example, neither GCC 10.3 nor Clang 12.0.0
+ detect