op_spec() returns nullptr for the 17 operator aliases that op_key(), apply() and the generated functions accept
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend-api-design
Research direction
Start in ops.hpp at op_spec() (around line 6305) and inspect how it searches kOps; compare that with Session::op_key() and the manifest aliases. Run the supplied C++ reproduction and check op_spec() for all 17 aliases. Done means each alias returns its canonical operator spec, including its arity fields, while canonical-name lookup still works.
Written by the indexing model from the issue text.
Description
op_spec() returns nullptr for all 17 operator aliases (bessel_j, lambert_w, fresnel_s, ...), although the same names are accepted by apply(), resolved by Session::op_key() and exported as documented functions — so the table says "not registered" about a name the library registers.
// repro.cpp
#include <cstdio>
#include "rssn/client.hpp"
#include "rssn/ops.hpp"
using namespace rssn::client;
int main() {
Session s; const auto x = s.sym("x");
std::printf("op_spec(bessel_j) = %s\n", op_spec("bessel_j") ? op_spec("bessel_j")->name : "nullptr");
std::printf("op_spec(besselj) = %s\n", op_spec("besselj") ? op_spec("besselj")->name : "nullptr");
std::printf("apply(bessel_j) = %s\n", s.apply("bessel_j", {x, s.integer(1)}).text().c_str());
auto k = Session::op_key("bessel_j");
std::printf("op_key(bessel_j) = %s/%s\n", k.rule_set.c_str(), k.name.c_str());
}
Actual output (twice, identical):
op_spec(bessel_j) = nullptr
op_spec(besselj) = besselj
apply(bessel_j) = besselj(x, 1)
op_key(bessel_j) = special/besselj
The other 16 affected names: airy_ai, airy_ai_prime, airy_bi, airy_bi_prime, anger_j, bessel_i, bessel_k, bessel_y, chebyshev_t, chebyshev_u, erfc_inv, fresnel_c, fresnel_s, lambert_w, lambert_w_m1, weber_e. All are listed in the manifest's aliases field, all have a generated function in ops.hpp (e.g. inline Term airy_ai(const Term &a0) { return airyai(a0); }, ops.hpp:70925), and Session::op_key resolves every one of them to its canonical name.
Why it is wrong: op_spec is documented as "The spec of name, or nullptr when the name is not registered" (ops.hpp:6305) and the README advertises it as the way to look an operator up before calling it. Code that validates a name — if (!op_spec(name)) throw std::invalid_argument(name); — rejects 17 names that work, and a caller cannot read min_arity/max_arity for them.
Mechanism: kOps only holds canonical names, while aliases exist solely as thin wrapper functions, and op_spec binary-searches kOps with strcmp (ops.hpp:6305-6314), so an alias name can never match. Either add the aliases to kOps (pointing at the canonical spec) or resolve them before the search, the way op_key already does.
rssn 0.3.0, C++ client (header-only) over the release C library, Windows x86_64.
- Dominant language
- Rust
- Stars
- 36
- Forks
- 3
- Avg merge
- 14h 51m
- Merged PRs (30d)
- 29
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Apich-Organization/rssn
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothOpenarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#383 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/5-trivial
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Apich-Organization/rssn#373 ·
Maintainers usually reply within 1 day
-
area/numerical good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#371 ·
Maintainers usually reply within 1 day
-
json_encode() re-emits a decoded empty JSON object as [], so {} and {"":1} are not round-trip stableOpenarea/api-bindings good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#361 ·
Maintainers usually reply within 1 day
-
area/statistics good first issue help wanted kind/wrong-result severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Apich-Organization/rssn#362 ·
Maintainers usually reply within 1 day
All issues in Apich-Organization/rssn
Similar issues
-
Update Wasmtime to 48.0.11 for RUSTSEC-2026-0648Possibly taken @flyingrobots claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
flyingrobots/edict#457 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
O-windows relnotes relnotes-needs-review relnotes-tracking-issue T-libs
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day
-
Frame::second_to_frame truncates f32 product, causing periodic off-by-one framesPossibly taken @ShamanicArts claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
dmtrKovalenko/fframes#296 ·
Maintainers usually reply within 1 day