skip to main content
10.1145/3441296.3441397acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
research-article

Efficient fair conjunction for structurally-recursive relations

Published: 17 January 2021 Publication History

Abstract

We present a new, fair, conjunction evaluation strategy for relational programming language miniKanren. Unlike the original left-biased conjunction, our approach controls the order of conjunct execution based on the intrinsic properties of relation definitions. We present both the formal study of conjunction fairness and practical evaluation, which demonstrates the essential improvement in terms of both performance and convergence.

References

[1]
Claire E. Alvis, Jeremiah J. Willcock, and William E. Byrd. 2011. cKanren: miniKanren with Constraints. Workshop on Scheme and Functional Programming ( 2011 ).
[2]
Yves Bertot and Pierre Castéran. 2004. Interactive Theorem Proving and Program Development-Coq'Art: The Calculus of Inductive Constructions. Springer. htps://doi.org/10.1007/978-3-662-07964-5
[3]
Yves Bertot and Pierre Castéran. 2004. Interactive Theorem Proving and Program Development-Coq'Art: The Calculus of Inductive Constructions. Springer. htps://doi.org/10.1007/978-3-662-07964-5
[4]
William E. Byrd. 2009. Relational Programming in miniKanren: Techniques, Applications, and Implementations. Ph.D. Dissertation. Indiana University.
[5]
William E. Byrd, Michael Ballantyne, Gregory Rosenblatt, and Matthew Might. 2017. A Unified Approach to Solving Seven Programming Problems (Functional Pearl). Proc. ACM Program. Lang. 1, ICFP, Article 8 ( Aug. 2017 ), 26 pages. htps://doi.org/10.1145/3110252
[6]
William E. Byrd and Daniel P. Friedman. 2007. kanren: A Fresh Name in Nominal Logic Programming. Proceedings of the 2007 Annual Workshop on Scheme and Functional Programming ( 2007 ), 79-90.
[7]
William E. Byrd, Eric Holk, and Daniel P. Friedman. 2012. miniKanren, Live and Untagged: Quine Generation via Relational Interpreters (Programming Pearl). Workshop on Scheme and Functional Programming ( 2012 ).
[8]
Daniel P. Friedman, William E. Byrd, and Oleg Kiselyov. 2005. The Reasoned Schemer. The MIT Press.
[9]
Daniel P. Friedman and David S. Wise. 1981. Fancy Ferns Require Little Care. Symposium on Functional Languages and Computer Architecture ( 1981 ), 124-156.
[10]
Gopal Gupta, Enrico Pontelli, Khayri A.M. Ali, Mats Carlsson, and Manuel V. Hermenegildo. 2001. Parallel Execution of Prolog Programs: A Survey. ACM Trans. Program. Lang. Syst. 23, 4 ( July 2001 ), 472-602. htps://doi.org/10.1145/504083.504085
[11]
Jason Hemann, Daniel Friedman, William Byrd, and Matthew Might. 2016. A small embedding of logic programming with a simple complete search. (11 2016 ), 96-107. htps://doi.org/10.1145/2989225.2989230
[12]
Jason Hemann and Daniel P. Friedman. 2013. Kanren: A Minimal Functional Core for Relational Programming. In Proceedings of the 2013 Annual Workshop on Scheme and Functional Programming.
[13]
Robert M. Keller. 1976. Formal Verification of Parallel Programs. Commun. ACM 19, 7 ( 1976 ), 371-384. htps://doi.org/10.1145/360248.360251
[14]
Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, and Amr Sabry. 2005. Backtracking, Interleaving, and Terminating Monad Transformers: (Functional Pearl). SIGPLAN Not. 40, 9 (Sept. 2005 ), 192-203. htps://doi.org/10.1145/1090189.1086390
[15]
Michael Leuschel. 1998. On the Power of Homeomorphic Embedding for Online Termination. In Static Analysis, Giorgio Levi (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 230-245.
[16]
John W. Lloyd. 1984. Foundations of Logic Programming, 1st Edition. Springer.
[17]
P. Lozov, Ekaterina Verbitskaia, and Dmitry Boulytchev. 2019. Relational Interpreters for Search Problems. International Workshop on miniKanren and Relational Programming ( 2019 ).
[18]
Petr Lozov, Andrei Vyatkin, and Dmitry Boulytchev. 2018. Typed Relational Conversion. Trends in Functional Programming ( 2018 ), 39-58.
[19]
Kuang-Chen Lu, Weixi Ma, and Daniel P. Friedman. 2019. Towards a miniKanren with fair search strategies. The miniKanren and Relational Programming Workshop ( 2019 ).
[20]
L. Naish. 1985. Automating Control for Logic Programs. J. Log. Program. 2 ( 1985 ), 167-183.
[21]
Joseph Near, William Byrd, and Daniel Friedman. 2008. leanTAP: A Declarative Theorem Prover for First-Order Classical Logic. 5366 ( 12 2008 ), 238-252. htps://doi.org/10.1007/978-3-540-89982-2_26
[22]
Dmitri Rozplokhas and Dmitri Boulytchev. 2018. Improving Refutational Completeness of Relational Search via Divergence Test. ( 2018 ), 18 : 1-18 : 13. htps://doi.org/10.1145/3236950.3236958
[23]
Dmitry Rozplokhas, Andrey Vyatkin, and Dmitry Boulytchev. 2020. Certified Semantics for Relational Programming. In Programming Languages and Systems, Bruno C. d. S. Oliveira (Ed.). Springer International Publishing, Cham, 167-185.
[24]
T. Schrijvers, Markus Triska, and Bart Demoen. 2012. Tor: extensible search with hookable disjunction. In PPDP.
[25]
Cameron Swords and Daniel P. Friedman. 2013. rKanren: Guided Search in miniKanren. Proceedings of the 2013 Annual Workshop on Scheme and Functional Programming ( 2013 ).
[26]
Morten H. Sørensen and Robert Glück. 1995. An Algorithm of Generalization in Positive Supercompilation. In Proceedings of ILPS'95, the International Logic Programming Symposium. MIT Press, 465-479.
[27]
Hisao Tamaki and Taisuke Sato. 1986. OLD Resolution with Tabulation. In Proceedings of the Third International Conference on Logic Programming. 84-98.
[28]
Valentin F. Turchin. 1986. The Concept of a Supercompiler. ACM Trans. Program. Lang. Syst. 8, 3 ( June 1986 ), 292-325. htps://doi.org/ 10.1145/5956.5957

Cited By

View all
  • (2024)Compiled, Extensible, Multi-language DSLs (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746278:ICFP(64-87)Online publication date: 15-Aug-2024

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PEPM 2021: Proceedings of the 2021 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
January 2021
89 pages
ISBN:9781450383059
DOI:10.1145/3441296
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 January 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. evaluation strategies
  2. miniKanren
  3. operational semantics
  4. relational programming

Qualifiers

  • Research-article

Funding Sources

  • RFBR

Conference

POPL '21
Sponsor:

Acceptance Rates

Overall Acceptance Rate 66 of 120 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)7
  • Downloads (Last 6 weeks)0
Reflects downloads up to 22 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Compiled, Extensible, Multi-language DSLs (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36746278:ICFP(64-87)Online publication date: 15-Aug-2024

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media