Time Resolution Compatibility as Checked Integer Arithmetic
A 2026 paper presented at the SISO Simulation Innovation Workshop (SIW) by Crues and Dexter of NASA Johnson Space Center defines how the time resolutions of a simulation executive, its scheduled jobs, and an HLA federation must align. The authors restate an observation from a 2011 SIW paper: an integer representation of executive time is preferred over a purely floating-point one. This paper takes that premise at face value.
The alignment rules are implemented below as a short program in cint, a C-family language in which all arithmetic is integer and every plain operator is checked. Written in cint, the paper's rules reduce to a few lines of modular arithmetic. The line to watch is the last one, where a one-year scenario at picosecond resolution exceeds the capacity of a 64-bit integer; instead of producing a wrong number, the program stops with a fault record.
- program
- time_compat.ci · time_compat.c
- domain
- HLA / SpaceFOM and Trick integer time ticks
- operations
- checked gcd, lcm, remainder, and range in I64
- fault
- E_OVERFLOW on 1 ps over 1 Julian year (31,557,600 s)
the problem
A simulation executive counts time in whole ticks. Trick, the simulation environment from NASA Johnson Space Center, counts at a multiplier of ticks per second that the simulation sets. Because every job rate the executive schedules must be a whole number of ticks, the executive's multiplier must be a common multiple of all its job rates.
An HLA federation using integer logical time also counts in whole ticks, in its own base unit, which the SpaceFOM standard fixes at microseconds. A federate's multiplier (Mf) must be greater than or equal to the federation's (Mhlt) and an exact multiple of it, so that every federation tick coincides with a federate tick. When a federate runs at a finer resolution than the federation, any event it sends must also fall on a federation tick; otherwise it cannot be sent at the time it happened. Crues and Dexter express these relationships in tick multipliers: Mp for the smallest compatible executive multiplier, Mf for a federate, Mhlt for the federation, and Rf for their ratio (Mf / Mhlt).
A second constraint, which the TrickHLA documentation states beside each base time unit it offers, is range. A signed 64-bit integer holds 263 - 1 ticks, about 9.22 × 1018. At one microsecond that spans roughly 292,000 years. At one picosecond it spans 106.75 days, shorter than many real scenarios. A multiplier chosen for resolution alone can silently reduce the time range a scenario needs.
I64, at each base time unit, in Julian years of 31,557,600 seconds. Only the picosecond falls short of a year. Every figure is computed from the two constants rather than measured.data
| unit | ticks per second | range |
|---|---|---|
| 1 ms | 1,000 | 292,271,023 years |
| 1 µs | 1,000,000 | 292,271 years |
| 100 ns | 10,000,000 | 29,227 years |
| 10 ns | 100,000,000 | 2,923 years |
| 1 ns | 1,000,000,000 | 292 years |
| 100 ps | 10,000,000,000 | 29 years |
| 10 ps | 100,000,000,000 | 2.92 years |
| 1 ps | 1,000,000,000,000 | 106.75 days |
the checks
- For job rates in whole hertz, the smallest compatible executive multiplier Mp is their least common multiple, and any executive multiplier that is a whole multiple of Mp is compatible.
- A federate is compatible with its federation if Mf ≥ Mhlt and Mf mod Mhlt = 0; the tick ratio is then Rf = Mf / Mhlt.
- An event at federate tick T falls on a federation tick if T mod Rf = 0.
- A scenario of S seconds at multiplier M needs M × S ticks, and that product must fit the time type (
I64).
the program
The program defines gcd and lcm by Euclid's algorithm and the three compatibility checks as functions, then runs a main on the paper's own numbers: job rates of 128, 100, 30, and 10 Hz; a microsecond federation; federates at 1 µs, 100 ns, and 1,920,000 ticks per second; an example multiplier from the paper; and two events.
The last three lines compute the ticks in one Julian year at 1 µs, 10 ns, and 1 ps. The multiply in ticks_in is an ordinary *; in cint, every * on an I64 is checked. The two test blocks at the bottom run under cint test.
// time resolution compatibility, the checks of crues and dexter's
// 2026 siw paper with every quantity a whole number of ticks, the
// last line asks whether a one year scenario fits I64 at one
// picosecond and the checked multiply faults instead of wrapping
I64 gcd(I64 a, I64 b) {
I64 x = a;
I64 y = b;
while (y != 0) {
I64 t = x % y;
x = y;
y = t;
}
return x;
}
I64 lcm(I64 a, I64 b) {
return a / gcd(a, b) * b;
}
// Mf >= Mhlt and Mf % Mhlt == 0, the federate tick multiplier
// against the federation's
void check_federate(I64 mf, I64 mhlt) {
if (compatible(mf, mhlt)) {
"federate {mf} ticks/s against federation {mhlt}: compatible, Rf = {mf / mhlt}\n";
} else {
"federate {mf} ticks/s against federation {mhlt}: not compatible\n";
}
}
// an event at federate tick t must land on a federation tick
void check_event(I64 t, I64 rf) {
if (t % rf == 0) {
"event at tick {t}: on a federation tick\n";
} else {
"event at tick {t}: between federation ticks, remainder {t % rf}\n";
}
}
// ticks in a scenario of this many seconds, faults if I64 cannot hold it
I64 ticks_in(I64 multiplier, I64 seconds) {
return multiplier * seconds;
}
void main() {
// Mp, the smallest executive multiplier where 128, 100, 30 and
// 10 Hz jobs are all whole ticks
I64 mp = lcm(lcm(lcm(128, 100), 30), 10);
"Mp for 128, 100, 30, 10 Hz jobs = {mp} ticks/s\n";
I64 mhlt = 1_000_000; // spacefom, microseconds
check_federate(1_000_000, mhlt); // trick default, microseconds
check_federate(10_000_000, mhlt); // 100 ns executive
check_federate(1_920_000, mhlt); // the paper's 1,920,000
check_event(1_234_560, 10);
check_event(1_234_567, 10);
I64 year = 31_557_600;
"one year at 1 us = {ticks_in(1_000_000, year)} ticks\n";
"one year at 10 ns = {ticks_in(100_000_000, year)} ticks\n";
"one year at 1 ps = {ticks_in(1_000_000_000_000, year)} ticks\n";
}
Bool compatible(I64 mf, I64 mhlt) {
return mf >= mhlt && mf % mhlt == 0;
}
test "lcm of the paper's rates is 9600" {
assert(lcm(lcm(128, 30), 10) == 1_920 && lcm(lcm(lcm(128, 100), 30), 10) == 9600);
}
test "the paper's federates against a microsecond federation" {
assert(compatible(1_000_000, 1_000_000));
assert(compatible(10_000_000, 1_000_000) && 10_000_000 / 1_000_000 == 10);
assert(!compatible(1_920_000, 1_000_000));
assert(!compatible(100_000, 1_000_000));
}
run with the reference of cint 0.2.8, from ref/ of the release: python -m cint_ref run --stdout /dev/stdout time_compat.ci
stdoutMp for 128, 100, 30, 10 Hz jobs = 9600 ticks/s
federate 1000000 ticks/s against federation 1000000: compatible, Rf = 1
federate 10000000 ticks/s against federation 1000000: compatible, Rf = 10
federate 1920000 ticks/s against federation 1000000: not compatible
event at tick 1234560: on a federation tick
event at tick 1234567: between federation ticks, remainder 7
one year at 1 us = 31557600000000 ticks
one year at 10 ns = 3155760000000000 ticks
outcome · fault recordcase time_compat
source reference
outcome fault
stdout-bytes 450
stdout-sha256 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4
fuel-consumed 27
fault.code E_OVERFLOW
fault.operation mul.checked.i64
fault.operand I64 1000000000000
fault.operand I64 31557600
fault.exact 31557600000000000000
fault.limit I64 9223372036854775807
fault.position time_compat.ci:42:23
fault.revision self
fault.address none
fault.stack-depth 1
what the fault record says
The first eight lines of stdout show the checks passing and failing as the paper says they should: Mp = 9600; the 1 µs and 100 ns federates compatible, with Rf of 1 and 10; the 1,920,000 ticks per second federate not compatible; and one event on a federation tick and one between ticks, with its remainder.
The ninth line does not print. The program stops with a fault record that names the operation, mul.checked.i64, both operands, the exact result, 31,557,600,000,000,000,000, the I64 limit, 9,223,372,036,854,775,807, and the position in the source, line 42, column 23. In C, signed overflow of the same multiply on int64_t is undefined behavior, and on common compilers it wraps to a negative tick count that the rest of the program would carry on using. In cint the program stops, the eight lines it already wrote stay in stdout, and the record says exactly which quantity did not fit and by how much.
Change 1 ps to 10 ps and run it again: the year fits, at about 3.16 × 1018 ticks. Make it ten years and it overflows again. The record follows whichever line stops fitting.
The least common multiple can run out of room before the scenario does. Change the line that sets mp so that it starts at 1 and then, in a loop for hz in 1..51, becomes lcm(mp, hz): an executive with a job at every whole rate from 1 to 50 Hz. The program then stops before it prints a line. The multiplier for every rate up to 42 Hz is 219,060,189,739,591,200 ticks per second; at 43 Hz, the multiply inside lcm, line 18, would make it 9,419,588,158,802,421,600, beyond the I64 limit. The record carries both operands, so it shows which rate broke it. Even the multiplier that fits is of little use: at that many ticks per second, a 64-bit count lasts 42 seconds.
the same check elsewhere
None of these checks requires cint, and this paper does not claim that only cint can make them. In C, GCC and Clang provide __builtin_mul_overflow, and C23 adds ckd_mul in <stdckdint.h>. Each reports whether the product fit, and the program has to ask at every multiply and decide what to do when it did not. Rust's checked_mul returns None on overflow, while its plain *, by default, panics in a debug build and wraps in a release build. Ada raises Constraint_Error unless the check has been suppressed.
The claim here is narrower: in cint the plain * is the checked one, in every build. The line in ticks_in stays an ordinary multiply with nothing around it, and the failure is a record, the same bytes from the reference and from the compiled C, which can be compared, logged, and hashed like any other output.
same bytes from the reference and the compiler
The reference, cint_ref, and the compiled program write the same stdout and stop at the same fault with the same record. The one emitted C file was built with four compilers on three machines, each at -O2 (/O2 for MSVC), and run once on each. Every build stopped at the same fault with exit status 1, the status a fault gives:
| run | machine | stdout SHA-256 |
|---|---|---|
| cint_ref | Python 3.12 | 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4 |
| clang 18.1.3 | x86-64 Linux | 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4 |
| gcc 13.3.0 | x86-64 Linux | 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4 |
| MSVC 19.44 | x86-64 Windows 11 | 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4 |
| Apple Clang 21.0.0 | arm64 macOS 27 | 443aea258e753c7d27bcce3937834ed8b44461c7bbc3db5deb99c368c96fb3b4 |
The box below is the C that cintc, the cint compiler, emitted for the program as published. The two checked multiplies are calls to cint_mul_i64 that jump to the fault path when the result does not fit.
time_compat.c · emitted C17 excerpt (full source)static bool ci_14_time_x5Fcompat_3_gcd(cint_ctx *ctx, int64_t v_a, int64_t v_b, int64_t *result)
{
int64_t t0 = 0, t1 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0;
bool t2 = false;
int64_t l0_x = v_a, l1_y = v_b, l2_t = 0;
L4_h:;
t0 = l1_y;
t1 = INT64_C(0);
t2 = t0 != t1;
if (!t2) goto L4_e;
if (!cint_fuel_charge(ctx, (cint_site){0u, 1u}, 1u)) goto fault;
t3 = l0_x;
t4 = l1_y;
if (!cint_rem_i64(ctx, (cint_site){0u, 2u}, t3, t4, &t5)) goto fault;
l2_t = t5;
l0_x = l1_y;
l1_y = l2_t;
goto L4_h;
L4_e:;
*result = l0_x;
return true;
fault:
return false;
}
what is not claimed
This paper demonstrates one program applying four rules. It is not a federate, it links no Run-Time Infrastructure (RTI), and it says nothing about how Trick or TrickHLA implement their own checks, which the paper says are being added. Nothing here is a claim of compliance, and no one cited has reviewed this paper.
limits
The base time units named here are illustrations; which units a given framework supports is for its documentation to say. The year is a Julian year of 31,557,600 seconds, and the 1 ps scenario is chosen to show the range rule, not to describe any federation. The rules are the paper's; any error in restating them is this author's.
references
- E. Z. Crues and D. E. Dexter. Ensuring Time Resolution Compatibility for Simulation Executives, Job Scheduling, and Data Exchange. SISO 2026 Simulation Innovation Workshop, paper 015. A U.S. Government work, included in the TrickHLA repository under docs/Papers.
- E. Z. Crues and D. E. Dexter. A Discussion of Time Management Concepts and Time Constraint Equations for Multi-Rate Federation Executions. SISO 2025 Simulation Innovation Workshop, paper 010.
- M. Karlsson, F. Antelius and B. Möller. Time Representation and Interpretation in Simulation Interoperability, an Overview. SISO 2011 Spring Simulation Interoperability Workshop.
- SISO-STD-018-2020, Standard for Space Reference Federation Object Model (SpaceFOM). Time stamps as HLAinteger64Time in microseconds.
- IEEE Std 1516-2010, High Level Architecture Framework and Rules, and 1516.1-2010, Federate Interface Specification: the HLAinteger64Time and HLAfloat64Time representations.
- NASA Johnson Space Center. Trick Simulation Environment: the executive tick and its multiplier.
- GNU Compiler Collection, Integer Overflow Builtins:
__builtin_mul_overflow, also provided by Clang. - ISO/IEC 9899:2024, Programming languages, C. The header
<stdckdint.h>andckd_mul. - The Rust Reference, Behavior not considered unsafe: integer overflow, and the standard library's
checked_mul. - ISO/IEC 8652:2023, Ada Reference Manual. Section 11.5, the overflow check and
Constraint_Error.
cite as
Harriett Little. Time Resolution Compatibility as Checked Integer Arithmetic. integerc.dev, 2026. https://integerc.dev/papers/time-resolution/
Harriett Little · 2026-10-05