aalhour / aalhour/micro_kanren.py

Automate number-to-peano conversion.

Offen
#2 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
10
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Automate the conversion of numbers from decimal to peano when passed as parameters to the relations "add" and "multiply".

Example:

``` python
goal = Goal.with_variables(
lambda x, y:
multiply(x, y, peano.to_peano(24)))
```

Will become:

``` python
goal = Goal.with_variables(
lambda x, y:
multiply(x, y, 24))
#24 is automatically converted to peano inside the relation.
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Look at the `multiply` and `add` relation definitions in the codebase to understand how parameters are currently processed. The goal is to modify these relations to automatically convert integer arguments to Peano representation. Start by examining the `peano.to_peano` function and see where it's called. Then, update the relation logic to handle this conversion internally. Test by creating a goal with a raw integer and verifying it works as the example shows.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
backend
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.