About: MiniKanren

An Entity of Type: ProgrammingLanguage106898352, from Named Graph: http://dbpedia.org, within Data Space: dbpedia.org

miniKanren is a family of programming languages for relational programming. As relations are bidirectional, if miniKanren is given an expression and a desired output, miniKanren can run the expression "backward", finding all possible inputs to the expression that produce the desired output. This bidirectional behavior allows the user to constrain both the input to the program and the result of the program simultaneously. miniKanren performs an interleaved search which will eventually find any solution that exists, even if any one branch of the search tree is infinitely long and contains no solutions. If no solution exists, miniKanren may search forever if the search tree is infinite.

Property Value
dbo:abstract
  • miniKanren is a family of programming languages for relational programming. As relations are bidirectional, if miniKanren is given an expression and a desired output, miniKanren can run the expression "backward", finding all possible inputs to the expression that produce the desired output. This bidirectional behavior allows the user to constrain both the input to the program and the result of the program simultaneously. miniKanren performs an interleaved search which will eventually find any solution that exists, even if any one branch of the search tree is infinitely long and contains no solutions. If no solution exists, miniKanren may search forever if the search tree is infinite. An example of miniKanren code is evalo, a relational goal that relates expressions to the values that they evaluate to. When evalo is called in miniKanren like so: (evalo q q), it will generate quines, that is, expressions q that when run will evaluate to themselves. The book The Reasoned Schemer uses miniKanren to demonstrate relational programming, and provides a complete implementation in Scheme. The core of the language fits on two printed pages. The Scheme implementation of miniKanren is designed to be easily understood, modified, and extended. αleanTAP is a program written in αKanren, an extension of miniKanren for . Given a theorem, it can find a proof, making it a theorem-prover. Given a proof, it can find the theorem, making it a theorem-checker. Given part of a proof and part of a theorem, it will fill in the missing parts of the proof and the theorem, making it a theorem-explorer. There are implementations of miniKanren in Haskell, Racket, Ruby, Clojure, JavaScript, Scala, Swift, Dart and Python. The canonical implementation is an embedded language in Scheme. The Clojure core.logic library was inspired by miniKanren. The name kanren comes from a Japanese word (関連) meaning "relation". (en)
  • miniKanren是一类关系型编程语言。miniKanren可以通过给定的关系表达式和计算结果来反向推导,找出符合条件的输入变量的取值组合。程序员可以通过加入关系表达式对输入变量和计算结果添加约束条件。miniKanren通过“搜索树”的办法来搜索所有可能的输入变量。如果搜索空间非常大而且符合条件的结果不存在,miniKanren的搜索有可能永远也不会停止。 evalo是一个用miniKanren写的程序,evalo是以关系表达式为输入和输出的程序。在miniKanren中调用evalo的方法是:(evalo q q)。evalo具有自产生程式的功能。 Dan Friedman的《The Reasoned Schemer》一书使用miniKanren来介绍关系型编程。该书还提供了miniKanren在Scheme语言上的一个完整实现。该实现的核心代码的长度仅仅只有两页纸。miniKanren的Scheme实现的设计目的是容易理解,修改并扩展。 目前,Haskell、Racket、Ruby、Clojure以及Python中有miniKanren的具体实现。其中最典型的实现是Scheme的版本。Clojure语言里的core.logic也是受到miniKanren启发。 "Kanren"这个词来自于日语“関連”,即“关联”。 (zh)
dbo:wikiPageExternalLink
dbo:wikiPageID
  • 39116526 (xsd:integer)
dbo:wikiPageLength
  • 3820 (xsd:nonNegativeInteger)
dbo:wikiPageRevisionID
  • 1085509520 (xsd:integer)
dbo:wikiPageWikiLink
dbp:wikiPageUsesTemplate
dcterms:subject
gold:hypernym
rdf:type
rdfs:comment
  • miniKanren是一类关系型编程语言。miniKanren可以通过给定的关系表达式和计算结果来反向推导,找出符合条件的输入变量的取值组合。程序员可以通过加入关系表达式对输入变量和计算结果添加约束条件。miniKanren通过“搜索树”的办法来搜索所有可能的输入变量。如果搜索空间非常大而且符合条件的结果不存在,miniKanren的搜索有可能永远也不会停止。 evalo是一个用miniKanren写的程序,evalo是以关系表达式为输入和输出的程序。在miniKanren中调用evalo的方法是:(evalo q q)。evalo具有自产生程式的功能。 Dan Friedman的《The Reasoned Schemer》一书使用miniKanren来介绍关系型编程。该书还提供了miniKanren在Scheme语言上的一个完整实现。该实现的核心代码的长度仅仅只有两页纸。miniKanren的Scheme实现的设计目的是容易理解,修改并扩展。 目前,Haskell、Racket、Ruby、Clojure以及Python中有miniKanren的具体实现。其中最典型的实现是Scheme的版本。Clojure语言里的core.logic也是受到miniKanren启发。 "Kanren"这个词来自于日语“関連”,即“关联”。 (zh)
  • miniKanren is a family of programming languages for relational programming. As relations are bidirectional, if miniKanren is given an expression and a desired output, miniKanren can run the expression "backward", finding all possible inputs to the expression that produce the desired output. This bidirectional behavior allows the user to constrain both the input to the program and the result of the program simultaneously. miniKanren performs an interleaved search which will eventually find any solution that exists, even if any one branch of the search tree is infinitely long and contains no solutions. If no solution exists, miniKanren may search forever if the search tree is infinite. (en)
rdfs:label
  • MiniKanren (en)
  • MiniKanren (zh)
owl:sameAs
prov:wasDerivedFrom
foaf:homepage
foaf:isPrimaryTopicOf
is dbo:wikiPageRedirects of
is dbo:wikiPageWikiLink of
is foaf:primaryTopic of
Powered by OpenLink Virtuoso    This material is Open Knowledge     W3C Semantic Web Technology     This material is Open Knowledge    Valid XHTML + RDFa
This content was extracted from Wikipedia and is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License