Six Ways to Implement Divisibility by Three in miniKanren

This paper explores options for implementing the relation $n \equiv 0 \ (\text{mod} \ 3)$ within miniKanren using miniKanren numbers and its arithmetic suite. We examine different approaches starting from straightforward implementations to more optimized versions. The implementations discussed inclu...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Schreiber, Brett, Pfingsten, Brysen, Hemann, Jason
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Schreiber, Brett
Pfingsten, Brysen
Hemann, Jason
description This paper explores options for implementing the relation $n \equiv 0 \ (\text{mod} \ 3)$ within miniKanren using miniKanren numbers and its arithmetic suite. We examine different approaches starting from straightforward implementations to more optimized versions. The implementations discussed include brute-force arithmetic methods, divisibility tricks, and derivation from a finite automaton. Our contributions include an in-depth look at the process of implementing a miniKanren relation and observations on benchmarking \texttt{defrel}s. This study aims to provide practical insights for miniKanren programmers on both performance and implementation techniques.
doi_str_mv 10.48550/arxiv.2408.16259
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2408_16259</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2408_16259</sourcerecordid><originalsourceid>FETCH-arxiv_primary_2408_162593</originalsourceid><addsrcrecordid>eNpjYJA0NNAzsTA1NdBPLKrILNMzMjGw0DM0MzK15GSwDM6sUAhPrCxWKMlX8MwtyEnNTc0rUXDJLMsszkzKzMksqVRIqlQIyShKTVXIzFPIzczL9E7MK0rN42FgTUvMKU7lhdLcDPJuriHOHrpgS-ILijJzE4sq40GWxYMtMyasAgAwkTPt</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Six Ways to Implement Divisibility by Three in miniKanren</title><source>arXiv.org</source><creator>Schreiber, Brett ; Pfingsten, Brysen ; Hemann, Jason</creator><creatorcontrib>Schreiber, Brett ; Pfingsten, Brysen ; Hemann, Jason</creatorcontrib><description>This paper explores options for implementing the relation $n \equiv 0 \ (\text{mod} \ 3)$ within miniKanren using miniKanren numbers and its arithmetic suite. We examine different approaches starting from straightforward implementations to more optimized versions. The implementations discussed include brute-force arithmetic methods, divisibility tricks, and derivation from a finite automaton. Our contributions include an in-depth look at the process of implementing a miniKanren relation and observations on benchmarking \texttt{defrel}s. This study aims to provide practical insights for miniKanren programmers on both performance and implementation techniques.</description><identifier>DOI: 10.48550/arxiv.2408.16259</identifier><language>eng</language><subject>Computer Science - Programming Languages</subject><creationdate>2024-08</creationdate><rights>http://creativecommons.org/licenses/by/4.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,780,885</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2408.16259$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2408.16259$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Schreiber, Brett</creatorcontrib><creatorcontrib>Pfingsten, Brysen</creatorcontrib><creatorcontrib>Hemann, Jason</creatorcontrib><title>Six Ways to Implement Divisibility by Three in miniKanren</title><description>This paper explores options for implementing the relation $n \equiv 0 \ (\text{mod} \ 3)$ within miniKanren using miniKanren numbers and its arithmetic suite. We examine different approaches starting from straightforward implementations to more optimized versions. The implementations discussed include brute-force arithmetic methods, divisibility tricks, and derivation from a finite automaton. Our contributions include an in-depth look at the process of implementing a miniKanren relation and observations on benchmarking \texttt{defrel}s. This study aims to provide practical insights for miniKanren programmers on both performance and implementation techniques.</description><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNpjYJA0NNAzsTA1NdBPLKrILNMzMjGw0DM0MzK15GSwDM6sUAhPrCxWKMlX8MwtyEnNTc0rUXDJLMsszkzKzMksqVRIqlQIyShKTVXIzFPIzczL9E7MK0rN42FgTUvMKU7lhdLcDPJuriHOHrpgS-ILijJzE4sq40GWxYMtMyasAgAwkTPt</recordid><startdate>20240829</startdate><enddate>20240829</enddate><creator>Schreiber, Brett</creator><creator>Pfingsten, Brysen</creator><creator>Hemann, Jason</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20240829</creationdate><title>Six Ways to Implement Divisibility by Three in miniKanren</title><author>Schreiber, Brett ; Pfingsten, Brysen ; Hemann, Jason</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-arxiv_primary_2408_162593</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Schreiber, Brett</creatorcontrib><creatorcontrib>Pfingsten, Brysen</creatorcontrib><creatorcontrib>Hemann, Jason</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Schreiber, Brett</au><au>Pfingsten, Brysen</au><au>Hemann, Jason</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Six Ways to Implement Divisibility by Three in miniKanren</atitle><date>2024-08-29</date><risdate>2024</risdate><abstract>This paper explores options for implementing the relation $n \equiv 0 \ (\text{mod} \ 3)$ within miniKanren using miniKanren numbers and its arithmetic suite. We examine different approaches starting from straightforward implementations to more optimized versions. The implementations discussed include brute-force arithmetic methods, divisibility tricks, and derivation from a finite automaton. Our contributions include an in-depth look at the process of implementing a miniKanren relation and observations on benchmarking \texttt{defrel}s. This study aims to provide practical insights for miniKanren programmers on both performance and implementation techniques.</abstract><doi>10.48550/arxiv.2408.16259</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2408.16259
ispartof
issn
language eng
recordid cdi_arxiv_primary_2408_16259
source arXiv.org
subjects Computer Science - Programming Languages
title Six Ways to Implement Divisibility by Three in miniKanren
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-05T11%3A57%3A32IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Six%20Ways%20to%20Implement%20Divisibility%20by%20Three%20in%20miniKanren&rft.au=Schreiber,%20Brett&rft.date=2024-08-29&rft_id=info:doi/10.48550/arxiv.2408.16259&rft_dat=%3Carxiv_GOX%3E2408_16259%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true