You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: paper.md
+34-45
Original file line number
Diff line number
Diff line change
@@ -53,21 +53,21 @@ Specifically, the library sets out to fulfill the following goals:
53
53
54
54
# Statement of Need
55
55
56
-
High quality open-science tools encourage researchers to follow effective software development practices by improving code quality, scientific rigor, and ease of replication or extension.
57
-
Empirical's debugging suite protects against common C++ programming pitfalls, such as iterator invalidation, memory leakage, and out-of-bounds indexing.
58
-
Throughout, library design obviates trade-offs between performance and safety; compile-time switches toggle safety checks for undefined or incorrect behavior.
56
+
High quality open-science tools improve code quality, scientific rigor, and ease of replication or extension for scientific software.
57
+
Empirical's debugging suite combats C++ programming pitfalls, such as iterator invalidation, memory leakage, and out-of-bounds indexing.
58
+
Throughout, library design achieves both performance and safety through compile-time toggling of checks for undefined or incorrect behavior.
59
59
60
-
In practice, many scientific software applications are difficult to obtain, install, or use, and produce data in proprietary formats.
61
-
Modern web-based interfaces give computational research the potential to better embody open science objectives by making each step of the scientific process more observable[@woelfle2011open].
62
-
Empirical leverages recent developments in web technology to compile C++ source code to browser-based interactive interfaces.
60
+
Unfortunately, in practice, scientific software is often difficult to obtain, install, or use.
61
+
Modern web-based interfaces give computational research the potential to better embody open science objectives by empowering easier and more complete access[@woelfle2011open].
62
+
Empirical leverages modern web technology to provide browser-based interactive interfaces for C++ source code.
63
63
64
64
# Empirical Features
65
65
66
66
## Better Code for Scientific Software
67
67
68
-
Empirical components are subjected to structured code review, unit testing (with coverage tracking), and other modern software development practices detailed [in our documentation](https://empirical.readthedocs.io/en/latest/dev/empirical-development-practices.html).
69
-
Sustained effort invested into optimization of the library's utilities enables developers to produce safe and efficient software at far less effort, especially for new developers.
70
-
Additionally we provide a [template project](https://github.com/devosoft/cookiecutter-empirical-project) that streamlines laying out crosscompilation boilerplate.
68
+
Empirical components are subjected to structured code review, unit testing with coverage tracking, and other best practices detailed [in our documentation](https://empirical.readthedocs.io/en/latest/dev/empirical-development-practices.html).
69
+
Effort invested into optimization of the library's utilities enables developer-users to more easily produce safe and efficient software, especially for new developers.
70
+
We provide a [template project](https://github.com/devosoft/cookiecutter-empirical-project) that streamlines laying out crosscompilation boilerplate.
71
71
72
72
As an example of Emprical's utility, the library provides a configuration framework that includes utilities to
73
73
@@ -76,87 +76,76 @@ As an example of Emprical's utility, the library provides a configuration framew
76
76
* perform on-the-fly configuration adjustments, and
77
77
* support independent configuration subsystems.
78
78
79
-
High-quality software cannot succeed without an inclusivecommunity of contributors.
80
-
As detailed [in our documentation](https://empirical.readthedocs.io/en/latest/dev/empirical-development-practices.html), our development practices emphasize the importance of diverse backgrounds and perspectives in the community.
79
+
High-quality software needs a robust, inclusive, and diverse community of users and contributors.
80
+
Our [development practices](https://empirical.readthedocs.io/en/latest/dev/empirical-development-practices.html) reflect this priority.
81
81
82
82
## Realizing the Promise of Emscripten-based Web UIs
83
83
84
-
Educational or outreach versions of scientific software can promote classroom learning and citizen science.
84
+
Educational editions of scientific software promote classroom learning and citizen science.
85
85
The Emscripten compiler enables an existing native codebase to additionally compile to the web [@zakai2011emscripten].
86
86
Browser-based delivery can yield particularly effective public-facing apps due to easy access and compelling interfaces.
87
87
88
88
Empirical amplifies Emscripten by fleshing out its interface for interaction with browser elements.
89
89
DOM elements are bound to corresponding C++ objects (e.g., `emp::Button` manages a `<button>` and `emp::Canvas` manages a `<canvas>`) and are easily manipulated from within C++.
90
90
Empirical also packages collections of prefabricated web widgets (e.g., configuration managers or collapsible data displays).
91
-
These tools simplify generating a mobile-friendly, web-based GUI for existing software.
91
+
These tools simplify generating a mobile-friendly, web-based GUI.
92
92
93
93
A live demo of Empirical widgets, presented alongside their source C++ code, is available [here](https://devosoft.github.io/empirical-prefab-demo/empirical-prefab-demo).
94
94
95
95
## Runtime Efficiency
96
96
97
-
WebAssembly's runtime efficiency has driven its adoption in web development [@haas2017bringing], achieving 50% to 90% of native performance [@jangda2019not] and enabling new possibilities for browser-based scientific computation.
98
-
For example, [Avida-ED](https://avida-ed.msu.edu/)simulates billions of digital organisms in a day.
97
+
WebAssembly's runtime efficiency --- achieving 50% to 90% of native performance [@jangda2019not]--- has driven adoption in web development [@haas2017bringing]and enabled new possibilities for browser-based scientific computation.
98
+
For example, [Avida-ED](https://avida-ed.msu.edu/)leverages WebAssembly to incorporate sophisticated agent-based evolution models into classroom activities.
99
99
100
100
More broadly, Empirical provides optimized tools for performance-critical tasks.
101
-
For example, `emp::BitArray` and `emp::BitVector` are faster drop-in replacements for their standard library equivalents (`std::bitset` and `std::vector<bool>`) while providing extensive additional functionality.
101
+
For example, `emp::BitArray` and `emp::BitVector` are faster drop-in replacements for their standard library equivalents (`std::bitset` and `std::vector<bool>`) with extensive additional functionality.
102
102
More fundamentally, Empirical's header-only design prioritizes ease of use and runtime performance, albeit at the cost of longer compilation times.
103
103
104
104
## Debugging
105
105
106
-
Undetected software bugs can damage the scientific validity of generated data and analyses.
107
-
However, in an effort to maximize performance, C++ eschews common run time safety checks such as out-of-bounds indexing or memory managment errors.
108
-
Standard library vendors --- like [GCC's `libstdc++`](https://web.archive.org/web/20210118212109/https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html), [Clang's `libc++`](https://web.archive.org/web/20210414014331/https://libcxx.llvm.org/docs/DesignDocs/DebugMode.html), and [Microsoft's `stl`](https://web.archive.org/web/20210121201948/https://docs.microsoft.com/en-us/cpp/standard-library/checked-iterators?view=msvc-160) --- do provide some support for such safety checks, which is incomplete and poorly documented[^1].
109
-
Empirical supplements vendors' runtime safety checking by providing drop-in replacements for standard library containers and even raw pointers,
110
-
identifying memory leaks and invalid memory access in debug mode while retaining the full speed of raw pointers in release mode.
106
+
Although performant, C++'s permissiveness to out-of-bounds indexing or memory managment errors can emperil validity of generated data and analyses.
107
+
Standard library vendors --- like [`libstdc++`](https://web.archive.org/web/20210118212109/https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_using.html), [`libc++`](https://web.archive.org/web/20210414014331/https://libcxx.llvm.org/docs/DesignDocs/DebugMode.html), and [`stl`](https://web.archive.org/web/20210121201948/https://docs.microsoft.com/en-us/cpp/standard-library/checked-iterators?view=msvc-160) --- provide some runtime safety features, but these are incomplete and poorly documented[^1].
108
+
Empirical supplements vendor offerings with debug mode standins for standard library containers and even raw pointers that can identify memory leaks and invalid memory access.
111
109
112
-
Because of poor support for built-in runtime safety checks, C++ developers typically use an external toolchain to detect and diagnose runtime violations.
113
-
Popular tools include Valgrind, GDB, and runtime sanitizers.
114
-
Although this tooling is very mature and quite powerful, there are substantial limitations to the runtime violations it can detect[^1].
115
-
Additionally, most of this tooling is not available when debugging WASM code compiled with Emscripten --- a core use case targeted by the Empirical library.
116
-
Although Emscripten provides some [sanitizer support](https://web.archive.org/web/20210513071104/https://emscripten.org/docs/debugging/Sanitizers.html) and [other debugging features](https://web.archive.org/web/20210513070806/https://emscripten.org/docs/porting/Debugging.html), tooling limitations (such as the lack of a steppable debugger) make runtime safety checking provided by Empirical particularly useful.
110
+
Developers typically compensate for C++'s missing guardrails with external toolchains like Valgrind, GDB, and sanitizers.
111
+
Although mature, such tooling suffers substantial limitations[^1], particularly for WASM compiled with Emscripten.
112
+
Although Emscripten provides some [sanitizer support](https://web.archive.org/web/20210513071104/https://emscripten.org/docs/debugging/Sanitizers.html) and [other debugging features](https://web.archive.org/web/20210513070806/https://emscripten.org/docs/porting/Debugging.html), Empirical's safety features offset remaining limitations, such as the lack of a steppable debugger.
117
113
118
114
[^1]: For example, neither GCC 10.3 nor Clang 12.0.0 detect `std::vector` iterator invalidation when appending to a `std::vector` happens to fall within existing allocated buffer space ([GCC live example](https://perma.cc/6WDU-3C8X); [Clang live example](https://perma.cc/6SU9-CUKY)).
119
-
Clang 12.0.0's sanitizers also fail todetect this iterator invalidation ([live example](https://perma.cc/4ECQ-D5LG)).
115
+
Clang 12.0.0's sanitizers also fail to detect this iterator invalidation ([live example](https://perma.cc/4ECQ-D5LG)).
120
116
121
117
# Outlook and Future Plans
122
118
123
119
Empirical remains under active development.
124
-
Current priorities include assembling higher-level web widgets for common tasks, making existing classes more web-friendly (such as file management and rich text handling), and adding more step-by-step tutorials to our documentation.
120
+
Current priorities include web-friendly refinements (e.g., file management, rich text handling) and additional step-by-step tutorials for new users.
121
+
That said, Empirical has largely converged to API stability, and releases are archived on Zenodo for those who depend on them [@empirical_2020].
125
122
126
-
We are committed to maintaining a stable interface for existing users.
127
-
Our software releases are archived on Zenodo to guarantee access to our software for those who depend on it [@empirical_2020].
128
-
129
-
Empirical has already been successfully incorporated into major projects within our research group's primary domains: digital evolution, artificial life, and genetic programming.
130
-
We aim for potential utility across a much broader swath of the scientific software ecosystem, particularly among projects that prioritize open science objectives.
131
-
To this end, we look forward to welcoming new collaborations and supporting a wider collection of end-users.
123
+
Empirical already underlies major projects within digital evolution, artificial life, and genetic programming.
124
+
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.
132
125
133
126
# Related Software Packages
134
127
135
-
## Software Addressing Related Needs
136
-
137
-
Many existing software platforms that provide functionalities overlapping with Empirical.
138
-
However, most are not in C++, and there is value in this functionality being easily available to C++ programmers.
128
+
Several projects pursue objectives related to Empirical's.
139
129
140
130
### RepastHPC
141
131
142
-
RepastHPC, accessible at <https://repast.github.io/>, is a C++ modeling framework targeted at large computing clusters and supercomputers[@collier2013parallel; @north2013complex].
132
+
RepastHPC, accessible at <https://repast.github.io/>, is a C++ modeling framework targeted to high-performance computing [@collier2013parallel; @north2013complex].
143
133
A Java-based counterpart, Repast Simphony, provides interactive GUI support.
144
134
145
135
### Boost C++ Libraries
146
136
147
-
Boost C++ Libraries, available at <https://www.boost.org/>, provide an enormous range of software components.
148
-
However, Boost does not contain libraries for web-based GUI tools, configuration management, or data management specifically tailored to scientific software.
137
+
Boost C++ Libraries, available at <https://www.boost.org/>, implement a broad portfolio of software components.
138
+
However, Boost lacks tools for web-based GUI, configuration management, or data management tailored to scientific software.
149
139
150
140
### Emscripten
151
141
152
-
Emscripten is available at <https://emscripten.org/>[@zakai2011emscripten].
153
-
It provides cross-compilation from C++ to WebAssembly and we use it in Empirical.
154
-
Empirical's tools build abstractions from Emscripten intrinsics tailored to visualization and interactive control of scientific simulations.
142
+
Emscripten provides cross-compilation from C++ to WebAssembly and available at <https://emscripten.org/>[@zakai2011emscripten].
143
+
Empirical furnishes a complementary high-level interface to Emscripten intrinsics.
155
144
156
145
### Cheerp
157
146
158
147
Cheerp, another C++ to WebAssembly compiler, is available at <https://leaningtech.com/cheerp/>.
159
-
Like Emscripten, Cheerp provides primariliy low-level APIs for interaction with browser GUI elements.
148
+
Like Emscripten, Cheerp provides primariliy low-level APIs for browser interaction.
0 commit comments