google / google/xls

Specifying naturally recursive definitions without switching to iterative

Open
#510 1 comment 0 reactions 0 assignees View on GitHub
dslx long-term-enhancement modules 🧦 sox
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 14h
Merged PRs (30d)
122

Description

Right now in the DSL recursive definitions are disallowed. This mostly makes sense: we don't support general recursion due to everything being fixed space, and we don't have any tail call detection / optimization facilities. However, there are a bunch of algorithms that lend themselves nicely to a recursive definition that we should find a way to express so we have have to _force_ everything to be expressed iteratively; i.e. leading zeros detection with a balanced tree could be a good one: https://electronics.stackexchange.com/a/412278

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by locating where the DSL rejects recursive definitions and documenting the fixed-space and tail-call constraints; the work is complete only when a concrete, supported form of natural recursion and its acceptance criteria are defined and tested.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.