├── .gitignore ├── .readthedocs.yml ├── .travis.yml ├── README.md ├── docs ├── .buildinfo ├── .nojekyll ├── _modules │ ├── index.html │ └── muk │ │ └── core.html ├── _sources │ ├── index.rst.txt │ ├── mclock.rst.txt │ ├── primer.rst.txt │ ├── reasoned_schemer.rst.txt │ ├── under_the_hood.rst.txt │ └── write_the_doc.rst.txt ├── _static │ ├── alabaster.css │ ├── basic.css │ ├── custom.css │ ├── doctools.js │ ├── documentation_options.js │ ├── file.png │ ├── jquery-3.5.1.js │ ├── jquery.js │ ├── language_data.js │ ├── minus.png │ ├── plus.png │ ├── pygments.css │ ├── searchtools.js │ ├── underscore-1.3.1.js │ └── underscore.js ├── genindex.html ├── index.html ├── mclock.html ├── objects.inv ├── primer.html ├── py-modindex.html ├── reasoned_schemer.html ├── search.html ├── searchindex.js ├── under_the_hood.html └── write_the_doc.html ├── documentation ├── .gitignore ├── Makefile └── source │ ├── _static │ └── .gitignore │ ├── _templates │ └── .gitignore │ ├── conf.py │ ├── index.rst │ ├── mclock.rst │ ├── primer.rst │ ├── reasoned_schemer.rst │ ├── under_the_hood.rst │ └── write_the_doc.rst └── src ├── Makefile ├── __init__.py ├── difference_structures_test.py ├── mclock.py ├── mclock_test.py ├── microkanren_test.py ├── muk ├── __init__.py ├── core.py ├── ext.py ├── sexp.py └── utils.py ├── reasonedschemer.py ├── reasonedschemer_test.py └── sexp_test.py /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.swp 3 | *.pyc 4 | *.DS_Store 5 | src/__pycache__/ 6 | venv/ 7 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | 2 | 3 | python: 4 | version: 3.5 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | 2 | language: python 3 | python: 4 | - "3.5" 5 | - "3.6" 6 | # command to install dependencies 7 | install: 8 | - pip install sphinx sympy # necessary for Python version not present in the default test container 9 | # command to run tests 10 | script: 11 | - make suite -C src PYTHON=python # pass plain `python` to be instantiate according to virtual env 12 | - make -C docs # to run doctests and code snippet in the documentation 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | μkanrenpy 3 | ========= 4 | 5 | [![Build Status](https://travis-ci.org/massimo-nocentini/microkanrenpy.svg?branch=master)](https://travis-ci.org/massimo-nocentini/microkanrenpy) 6 | [![Documentation Status](https://readthedocs.org/projects/microkanrenpy/badge/?version=latest)](http://microkanrenpy.readthedocs.io/en/latest/?badge=latest) 7 | 8 | A *pythonic* implementation of the relational interpreter **μkanren** in the 9 | family of *miniKanren* languages. 10 | 11 | A comprehesive documentation ([read latest][read:doc]) is hosted at 12 | https://readthedocs.org/projects/microkanrenpy/ 13 | 14 | [read:doc]: http://microkanrenpy.readthedocs.io/en/latest/ 15 | -------------------------------------------------------------------------------- /docs/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: db48ba976c5f1723a5a84a1fa249b363 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/massimo-nocentini/microkanrenpy/62c71ae015c0ecc0330d70a2eeb6084430a5bb47/docs/.nojekyll -------------------------------------------------------------------------------- /docs/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Overview: module code — microkanrenpy 1.0 documentation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |
30 |
31 | 32 | 33 |
34 | 35 |

All modules for which code is available

36 | 38 | 39 |
40 | 41 |
42 |
43 | 90 |
91 |
92 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /docs/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. microkanrenpy documentation master file, created by 2 | sphinx-quickstart on Wed Apr 19 15:20:56 2017. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | ========= 7 | μkanrenpy 8 | ========= 9 | 10 | Introduction 11 | ------------ 12 | 13 | Welcome to documentation of *μkanrenpy*, a *pythonic* implementation of a 14 | *relational interpreter* and an effort to port the `original code written in 15 | Scheme `_ by Jason Hemann and Daniel P. Friedman. We report 16 | their words to describe what this work is about: 17 | 18 | This paper presents μKanren, a minimalist language in the miniKanren family of 19 | relational (logic) programming languages. Its implementation comprises fewer 20 | than 40 lines of Scheme. We motivate the need for a minimalist miniKanren 21 | language, and iteratively develop a complete search strategy. Finally, we 22 | demonstrate that through sufficient user-level features one regains much of the 23 | expressiveness of other miniKanren languages. In our opinion its brevity and 24 | simple semantics make μKanren uniquely elegant. 25 | 26 | Contents 27 | -------- 28 | We organize our thoughts according to the following outline: 29 | 30 | 31 | .. toctree:: 32 | :maxdepth: 3 33 | 34 | write_the_doc 35 | primer 36 | reasoned_schemer 37 | mclock 38 | under_the_hood 39 | 40 | This documentation is automatically generated using `Sphinx `_, which 41 | provides content search facilities, so a `dedicated page `_ is provided 42 | for free for open searches. 43 | 44 | About 45 | ----- 46 | My name is Massimo Nocentini, I'm: 47 | * a PhD student @ `University of Florence `_ 48 | * coding @ `GitHub `_ 49 | 50 | .. * :ref:`modindex` 51 | * :ref:`genindex` 52 | * :ref:`search` 53 | 54 | .. REFERENCES {{{ 55 | 56 | 57 | .. _microkanren_scheme: https://github.com/jasonhemann/microKanren 58 | .. _sphinx: http://www.sphinx-doc.org/en/stable/ 59 | .. _unifi: http://www.unifi.it/ 60 | 61 | .. }}} 62 | -------------------------------------------------------------------------------- /docs/_sources/mclock.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _montecarlo_lock: 3 | 4 | *********************** 5 | Monte Carlo Lock puzzle 6 | *********************** 7 | 8 | .. literalinclude:: ../../src/mclock.py 9 | -------------------------------------------------------------------------------- /docs/_sources/reasoned_schemer.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | .. _reasoned_schemer: 3 | 4 | ******************** 5 | The Reasoned Schemer 6 | ******************** 7 | 8 | .. literalinclude:: ../../src/reasonedschemer.py 9 | -------------------------------------------------------------------------------- /docs/_sources/under_the_hood.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | ``muk.core`` module 4 | =================== 5 | .. automodule:: muk.core 6 | 7 | Primitive goals and ctors 8 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 9 | .. autoclass:: muk.core.succeed 10 | .. autoclass:: muk.core.fail 11 | .. autoclass:: muk.core._disj 12 | .. autoclass:: muk.core._conj 13 | .. autoclass:: muk.core.fresh 14 | .. autoclass:: muk.core._unify 15 | .. autofunction:: muk.core.unification 16 | 17 | States streams and enumerations 18 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 19 | .. autofunction:: muk.core.mplus 20 | .. autofunction:: muk.core.bind 21 | 22 | Solver and interface 23 | ~~~~~~~~~~~~~~~~~~~~ 24 | .. autofunction:: muk.core.run 25 | -------------------------------------------------------------------------------- /docs/_sources/write_the_doc.rst.txt: -------------------------------------------------------------------------------- 1 | 2 | ***** 3 | Intro 4 | ***** 5 | 6 | I love *Lisp*, *Python* too. The work I'm going to describe has born *for fun*, 7 | for my education, to bang my head against a taugh, beautiful, not so simple to 8 | grasp yet elegant piece of software which is *μkanren* [HF13]_, in the 9 | *miniKanren* [RS05]_ family of logic languages. 10 | 11 | To be honest, this documentations has many targets: 12 | 13 | * it (should) describes what I've done 14 | * it is used to get credits for my PhD course 15 | * to clear my thoughts about the system I'm keeping alive 16 | * to understand and play with documentation tools 17 | * to write down abstract machines that I believe *charming* and *elegant* 18 | * to keep one foot in Lisp and the other in Python, however keep coding 19 | 20 | I would like to structure my exposition following advices from `an interesting 21 | group of people `_, and `one of them in particular 22 | `_, much more experienced that me on writing this kind of stuff; 23 | consequently, in what follows you will find the same sections as you find in 24 | the referenced page, hoping to provide answers and to taylor paragraphs to this 25 | particular project. Quoting their `Sidebar on open source 26 | `_: 27 | 28 | There is a magical feeling that happens when you release your code. It comes in 29 | a variety of ways, but it always hits you the same. Someone is using my code?! 30 | A mix of terror and excitement. 31 | 32 | I made something of value! 33 | What if it breaks?! 34 | I am a real open source developer! 35 | Oh god, someone else is using my code... 36 | 37 | Writing good documentation will help alleviate some of these fears. A lot of 38 | this fear comes from putting something into the world. My favorite quote about 39 | this is something along these lines: 40 | 41 | Fear is what happens when you're doing something important. 42 | If you are doing work that isn't scary, 43 | it isn't improving you or the world. 44 | 45 | Congrats on being afraid! It means you're doing something important. 46 | 47 | from my little and humble point of view, I'm proud to have been afraid as I was 48 | doing all this stuff... 49 | 50 | Why write docs 51 | ============== 52 | 53 | You will be using your code in 6 months (aka, *the future of this project*) 54 | --------------------------------------------------------------------------- 55 | 56 | The reality: 57 | 58 | I find it best to start off with a selfish appeal. The best reason to write 59 | docs is because you will be using your code in 6 months. Code that you 60 | wrote 6 months ago is often indistinguishable from code that someone else 61 | has written. You will look upon a file with a fond sense of remembrance. 62 | Then a sneaking feeling of foreboding, knowing that someone less 63 | experienced, less wise, had written it. 64 | 65 | I started to document what I've done because I would like to keep this code 66 | alive, after the core has been proven mature enough, I would like to add 67 | *constraints* [HF15]_, *guided search* [CF15]_ and *uncertainty* [GS17]_. 68 | 69 | You want people to use your code 70 | -------------------------------- 71 | 72 | *If people don't know why your project exists, they won't use it.* 73 | This project exists mainly *for fun*, to code something beautiful and understand 74 | core and elegant ideas underlying *logic programming*. In parallel, instead of 75 | providing a clone implementation again in Scheme as the original authors do, 76 | we prefere to target the *Python* language which allows us to characterize our version with respect to: 77 | 78 | * we stick to the original language as possible, so we use the same names for functions and 79 | objects; moreover, we adopt the same functional style, without messing up with different paradigms 80 | 81 | * we use native *generator* objects provided by Python to handle relations that can be 82 | satisfied by both a finite or a *countably* infinite set of substitutions for *logic variables* 83 | 84 | * we rewrite the fundamental function that explores the space of substitutions that satisfy a relation 85 | as an *iterative* process instead of *recursive*, in this way we lose the elegance of recursion (inspite of 86 | limit on recursive calls imposed by the language), gaining a *fair* exploration of the solutions space 87 | even if it infinite respect to both the number of streams and the content in each one of them ( 88 | for more details on the topic, have a look at docstring of function :py:func:`muk.core.mplus`) 89 | 90 | * try to write concise, powerful and idiomatic python code for a non-trivial problem, 91 | we would like to keep functions and definitions as small and simple as possible; remember the mantra 92 | 93 | .. doctest:: 94 | 95 | >>> import this 96 | The Zen of Python, by Tim Peters 97 | 98 | Beautiful is better than ugly. 99 | Explicit is better than implicit. 100 | Simple is better than complex. 101 | Complex is better than complicated. 102 | Flat is better than nested. 103 | Sparse is better than dense. 104 | Readability counts. 105 | Special cases aren't special enough to break the rules. 106 | Although practicality beats purity. 107 | Errors should never pass silently. 108 | Unless explicitly silenced. 109 | In the face of ambiguity, refuse the temptation to guess. 110 | There should be one-- and preferably only one --obvious way to do it. 111 | Although that way may not be obvious at first unless you're Dutch. 112 | Now is better than never. 113 | Although never is often better than *right* now. 114 | If the implementation is hard to explain, it's a bad idea. 115 | If the implementation is easy to explain, it may be a good idea. 116 | Namespaces are one honking great idea -- let's do more of those! 117 | 118 | 119 | *If people can't figure out how to install your code, they won't use it.* 120 | All that is required is to have a `Git client `_ 121 | available, so type the following in a console: 122 | 123 | .. code-block:: shell 124 | 125 | git clone https://github.com/massimo-nocentini/microkanrenpy.git # get stuff 126 | cd microkanrenpy/src # go into there 127 | python3 # start the Python interpreter 128 | 129 | Now in the python interpreter it is possible to load our core module: 130 | 131 | .. code-block:: python 132 | 133 | >>> from muk.core import * 134 | 135 | that's it! 136 | 137 | *If people can't figure out how to use your code, they won't use it.* 138 | We provide a simple tutorial in a dedicated page :ref:`primer`. 139 | 140 | You want people to help out 141 | --------------------------- 142 | 143 | *You only get contributions after you have put in a lot of work.* 144 | We work our μkanren with: 145 | 146 | * the little book [RS05]_ or https://mitpress.mit.edu/books/reasoned-schemer, 147 | reproducing **all relations** and answering **all questions**: definitions are 148 | literally included in the page :ref:`reasoned_schemer`, while we record with in a 149 | `unit test file `_ about **350 asserts** to cover questions in the book; 150 | * the puzzle **The Mistery of the Monte Carlo lock** from the book [RS82]_ by Raymond Smullyan, 151 | where we implement a generic machine based on *inference rules*, coding and plugging in 152 | those rule necessary to build McCulloch's machines to find **he key of the lock**, finally. 153 | All defs and some comments are recorded in :ref:`montecarlo_lock` and 154 | in the `tests suite `_ there are about **60 asserts**. 155 | 156 | 157 | *You only get contributions after you have users (aka, to whet your appetite).* 158 | Although I've played with μkanren mostly by writing down definitions in the 159 | context of sexp, namely ``cons`` cells manipulations, I believe of interest 160 | the definition of a generic machine to be configured with *arbitrary inference 161 | rules*: this allows us to implement a relational interpreter for some *process 162 | algebras*, one of them is Milner's CCS calculus. 163 | 164 | *You only get contributions after you have documentation.* 165 | I'm building it! Moreover, this is an *executable documentation*: every 166 | snippet of Python code appearing in these pages, in particular in 167 | :ref:`primer`, is required to pass in the sense of `doctests 168 | `_, in other words a line 169 | that fails to produce the expected output does preevent the generation of 170 | the *whole* documentation. This is possible by running Sphinx with the 171 | corresponding `doctest extension 172 | `_; moreover, 173 | this extension runs and checks doctests written in docstrings of **any** 174 | referenced Python definition stored in source files. 175 | 176 | 177 | 178 | 179 | 180 | It makes your code better 181 | ------------------------- 182 | I would like to enhance each definition in the :py:mod:`muk.core` module with a solid and 183 | consistent docstring, mainly to clarify my thoughts as done for function :py:func:`muk.core.mplus` 184 | in my humble opinion, where we try to explain different enumeration strategies to achieve 185 | *interleaving* of satisfying substitutions. 186 | 187 | Moreover, looking for some chunk of code that needs better doc allows us to find new ideas and 188 | possible refactorings and/or enhancements, the following is a list of ideas: 189 | 190 | * introduce a ``goal`` class, in order to implement magic methods ``__and__, __or__`` to 191 | provide syntactic sugar for goal composition; 192 | * override method ``__radd__`` in class ``var`` in order to write something like ``[1,2,3]+a``, 193 | where ``a`` is a logic variable; this should construct an object that represent an *extension list*, 194 | currently implemented using ``cons`` objects; 195 | * override method ``__add__`` in class ``var`` in order to write something like ``a+[1,2,3]``, 196 | where ``a`` is a logic variable; this should construct an object that represent an *append list* , 197 | currently not; 198 | * from the previous two points would be possible to write ``([1,2,3]+a)-a``, namely a *difference list* 199 | as provided by standard Prolog. 200 | 201 | You want to be a better writer (aka, *looking at the past*) 202 | ----------------------------------------------------------- 203 | I use this section to summarize references and existing works. 204 | 205 | First of all, thank you `William E. Byrd `_ for your hard 206 | work. Will wrote his PhD thesis [WB09]_ and shared a series of hangout video lectures 207 | known as `miniKanran uncourse 208 | `_; moreover, 209 | he is a coauthor of [RS05]_ and maintains a tremendous archive at http://minikanren.org/, 210 | where it is possible to find references to scientific publications, existing implementation in lots of 211 | different programming languages and, finally, links to talks presented in many confs, all of this stuff 212 | related to the field of *relational programming*. 213 | 214 | Python implementations 215 | ~~~~~~~~~~~~~~~~~~~~~~ 216 | 217 | According to Will, we just review the following existing projects: 218 | 219 | `pykanren `_ 220 | which implements the very basic definitions of the core system of both 221 | miniKanren and μkanren: variables, unification only for `list` objects, 222 | reification and a complete enumeration strategy in the style of [RS05]_ 223 | without *interleaving* of satisfying substitutions. Tests are present to 224 | catch the essentials, no application to particular problems. 225 | 226 | `pythological `_ 227 | which implements a *domain specific language* in the style of Prolog 228 | clauses on top of Python. The core interpreter uses primitive *generators* 229 | as we do, implements all the basic definitions of the logic system with 230 | *interleaving* and *occur-check* to detect circular substitutions. In my 231 | opinion it is an interesting project due to the parsing of the dsl which we do 232 | not provide; for what concerns testing, there are no test suites but simple 233 | and nice examples written in the defined language. 234 | 235 | `logpy `_ 236 | which implements the core system, supports relations satisfiable by 237 | infinite substitutions using primitive Python generator objects and 238 | the style is close to the canonical version, although not closer; in 239 | in our humble opinion, the code seems a bit complex to read and understand 240 | because of the presence of many auxiliary functions to handle streams of 241 | satisfying substitutions and to combine goals. Moreover, this project 242 | aims to extend unification over objects of arbitrary types using two 243 | dependencies to perform *double dispatching* and *structural unification*, 244 | which we aim to reach just by sending messages in a more pure and fundamental 245 | way keeping the *Smalltalk way* as tenet. 246 | 247 | `microkanren `_ 248 | which implements the very very basic implementation in about 100 lines of 249 | code: due to its brevity, it supplies variables, primitive goals, disjs and 250 | conjs as combinators, without interleaving and tests. It is released as a 251 | GitHub gist. 252 | 253 | In spite of these existing projects, our main principle is to remain as close 254 | as possible to ideas presented in [HF13]_: we use the same names for functions 255 | as they use in the paper and we write definitions in the same *purely 256 | functional style*. This allows us to preserve compact and concise defs, most of 257 | them do not exceed 5 lines of code. A drawback is some boilerplate and 258 | redundancy, which can be seen immediately in the unit tests, due to the 259 | presence of many ``lambda`` expressions and to the repeated use of ``run``, 260 | ``fresh`` and ``conj``. Finally, our main contribution comprises two test suites, 261 | the first reproduces all examples (including those about the *discrete logarithm*) 262 | of [RS05]_, the second solves a logic puzzle by building an abstract machine composing 263 | inference rules. 264 | 265 | Lisp implementations 266 | ~~~~~~~~~~~~~~~~~~~~ 267 | There are many implementation in the Lisp family: 268 | 269 | * for vanilla `Scheme `_ there are the 270 | `canonical one `_, 271 | `with symbolic constraints `_, 272 | `with probabilistic inference `_ and 273 | `with guided search `_; 274 | finally, I'm particular interested in a `recent impl `_ 275 | which uses the last `r7rs `_ Scheme standard. 276 | * for `Clojure `_ there is the outstanding 277 | `core.logic `_ maintained by `David Nolen `_; 278 | otherwise, two plain ports for `Racket `_ and for 279 | `CommonLisp `_, respectively. 280 | 281 | Other languages and links 282 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 283 | I would like to list some resources that I've discovered in the meanwhile: 284 | 285 | `μkanren in Haskell `_ 286 | a blog post by *Michael J. Sullivan*, also a `recorded talk `_ 287 | `μkanren in Ruby `_ 288 | a Ruby implementation by *Tom Stuart* 289 | `Hakaru `_ 290 | an embedded probabilistic programming language in Haskell 291 | `Logic Programming `_ 292 | 15-819K Logic Programming course, Fall 2006, taught by prof. *Frank Pfenning* 293 | `Prolog course `_ 294 | Prolog course, 2008–09, Principal lecturer: Dr *David Eyers* 295 | 296 | What technology 297 | =============== 298 | 299 | Information for people who want to contribute back 300 | -------------------------------------------------- 301 | I think that `GitHub `_ is a very strong platform where we 302 | can keep alive this project. Moreover, I think also that the decentralized 303 | model and the `workflow `_ 304 | proposed by GitHub itself, which is based on `pull requests 305 | `_, is a clean and 306 | healthy methodology to do development. Therefore, I would like to accept 307 | contributions according to this settings, using facilities provided by the 308 | platform to do discussions and to track issues. Finally, here is the address 309 | of the repository: 310 | 311 | https://github.com/massimo-nocentini/microkanrenpy 312 | 313 | .. note:: 314 | 315 | The actual repository has its roots from: 316 | 317 | https://github.com/massimo-nocentini/on-python/tree/master/microkanren 318 | 319 | the transition to its new independent location has been possible by the following guide: 320 | https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/ 321 | 322 | Together with simplicity and elegance, we believe that *automated testing* is a 323 | vital principle to keep the code base healthy. Therefore, we link the git repo with: 324 | 325 | *Travis CI* 326 | which performs continuous integration by running **all** test suites when we push 327 | something on the git repository; moreover, we use its capabilities to run doctests 328 | and code snippets described in this documentation. The corresponding page is the following: 329 | 330 | https://travis-ci.org/massimo-nocentini/microkanrenpy 331 | 332 | *Read The Docs* 333 | which allows us to have an up-to-date documentation, namely the one you are reading, 334 | with the code base; although this service doesn't allow us to run doctests, this flaw 335 | is covered by Travis just described above. The corresponding page is the following: 336 | 337 | https://readthedocs.org/projects/microkanrenpy/ 338 | 339 | 340 | README.rd first 341 | --------------- 342 | As raccomanded by `this article `_, 343 | have a look to our `README.md `_ first. 344 | 345 | How to get support 346 | ------------------ 347 | If you are having issues, please let us know and feel free to drop me an 348 | email at massimo.nocentini@unifi.it for any info you would like to known. 349 | 350 | 351 | Your project's license 352 | ---------------------- 353 | 354 | Copyright 2017 Massimo Nocentini 355 | 356 | Permission is hereby granted, free of charge, to any person obtaining a copy of 357 | this software and associated documentation files (the "Software"), to deal in 358 | the Software without restriction, including without limitation the rights to 359 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 360 | of the Software, and to permit persons to whom the Software is furnished to do 361 | so, subject to the following conditions: 362 | 363 | The above copyright notice and this permission notice shall be included in all 364 | copies or substantial portions of the Software. 365 | 366 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 367 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 368 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 369 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 370 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 371 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 372 | SOFTWARE. 373 | 374 | -------------------------------------------------- 375 | 376 | .. [HF13] 377 | Jason Hemann and Daniel P. Friedman, 378 | *microKanren: A Minimal Functional Core for Relational Programming*, 379 | In Proceedings of the 2013 Workshop on Scheme and Functional Programming (Scheme '13), Alexandria, VA, 2013. 380 | 381 | .. [HF15] 382 | Jason Hemann and Daniel P. Friedman, 383 | *A Framework for Extending microKanren with Constraints*, 384 | In Proceedings of the 2015 Workshop on Scheme and Functional Programming (Scheme '15), Vancouver, British Columbia, 2015. 385 | 386 | .. [CF15] 387 | Cameron Swords and Daniel P. Friedman, 388 | *rKanren: Guided Search in miniKanren*, 389 | In Proceedings of the 2013 Workshop on Scheme and Functional Programming (Scheme '13), Alexandria, VA, 2013. 390 | 391 | .. [GS17] 392 | N. D. Goodman and A. Stuhlmüller (electronic), 393 | *The Design and Implementation of Probabilistic Programming Languages*, 394 | Retrieved 2017-4-27 from http://dippl.org 395 | 396 | .. [RS05] 397 | Daniel P. Friedman, William E. Byrd and Oleg Kiselyov, 398 | *The Reasoned Schemer*, 399 | The MIT Press, Cambridge, MA, 2005 400 | 401 | .. [RS82] 402 | Raymond Eric Smullyan, 403 | *The Lady or the Tiger*, 404 | Knopf; 1st edition, 1982 405 | 406 | .. [WB09] 407 | William E. Byrd, 408 | *Relational Programming in miniKanren: Techniques, Applications, and Implementations*, 409 | Ph.D. thesis, Indiana University, Bloomington, IN, 2009. 410 | 411 | .. _write_the_doc: http://www.writethedocs.org/guide/writing/beginners-guide-to-docs/ 412 | .. _reasoned_schemer_unitests: https://github.com/massimo-nocentini/microkanrenpy/blob/master/src/reasonedschemer_test.py 413 | .. _mclock_unitests: https://github.com/massimo-nocentini/microkanrenpy/blob/master/src/mclock_test.py 414 | .. _holscher: http://ericholscher.com/blog/2016/jul/1/sphinx-and-rtd-for-writers/ 415 | -------------------------------------------------------------------------------- /docs/_static/alabaster.css: -------------------------------------------------------------------------------- 1 | @import url("basic.css"); 2 | 3 | /* -- page layout ----------------------------------------------------------- */ 4 | 5 | body { 6 | font-family: Georgia, serif; 7 | font-size: 17px; 8 | background-color: #fff; 9 | color: #000; 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | 15 | div.document { 16 | width: 940px; 17 | margin: 30px auto 0 auto; 18 | } 19 | 20 | div.documentwrapper { 21 | float: left; 22 | width: 100%; 23 | } 24 | 25 | div.bodywrapper { 26 | margin: 0 0 0 220px; 27 | } 28 | 29 | div.sphinxsidebar { 30 | width: 220px; 31 | font-size: 14px; 32 | line-height: 1.5; 33 | } 34 | 35 | hr { 36 | border: 1px solid #B1B4B6; 37 | } 38 | 39 | div.body { 40 | background-color: #fff; 41 | color: #3E4349; 42 | padding: 0 30px 0 30px; 43 | } 44 | 45 | div.body > .section { 46 | text-align: left; 47 | } 48 | 49 | div.footer { 50 | width: 940px; 51 | margin: 20px auto 30px auto; 52 | font-size: 14px; 53 | color: #888; 54 | text-align: right; 55 | } 56 | 57 | div.footer a { 58 | color: #888; 59 | } 60 | 61 | p.caption { 62 | font-family: inherit; 63 | font-size: inherit; 64 | } 65 | 66 | 67 | div.relations { 68 | display: none; 69 | } 70 | 71 | 72 | div.sphinxsidebar a { 73 | color: #444; 74 | text-decoration: none; 75 | border-bottom: 1px dotted #999; 76 | } 77 | 78 | div.sphinxsidebar a:hover { 79 | border-bottom: 1px solid #999; 80 | } 81 | 82 | div.sphinxsidebarwrapper { 83 | padding: 18px 10px; 84 | } 85 | 86 | div.sphinxsidebarwrapper p.logo { 87 | padding: 0; 88 | margin: -10px 0 0 0px; 89 | text-align: center; 90 | } 91 | 92 | div.sphinxsidebarwrapper h1.logo { 93 | margin-top: -10px; 94 | text-align: center; 95 | margin-bottom: 5px; 96 | text-align: left; 97 | } 98 | 99 | div.sphinxsidebarwrapper h1.logo-name { 100 | margin-top: 0px; 101 | } 102 | 103 | div.sphinxsidebarwrapper p.blurb { 104 | margin-top: 0; 105 | font-style: normal; 106 | } 107 | 108 | div.sphinxsidebar h3, 109 | div.sphinxsidebar h4 { 110 | font-family: Georgia, serif; 111 | color: #444; 112 | font-size: 24px; 113 | font-weight: normal; 114 | margin: 0 0 5px 0; 115 | padding: 0; 116 | } 117 | 118 | div.sphinxsidebar h4 { 119 | font-size: 20px; 120 | } 121 | 122 | div.sphinxsidebar h3 a { 123 | color: #444; 124 | } 125 | 126 | div.sphinxsidebar p.logo a, 127 | div.sphinxsidebar h3 a, 128 | div.sphinxsidebar p.logo a:hover, 129 | div.sphinxsidebar h3 a:hover { 130 | border: none; 131 | } 132 | 133 | div.sphinxsidebar p { 134 | color: #555; 135 | margin: 10px 0; 136 | } 137 | 138 | div.sphinxsidebar ul { 139 | margin: 10px 0; 140 | padding: 0; 141 | color: #000; 142 | } 143 | 144 | div.sphinxsidebar ul li.toctree-l1 > a { 145 | font-size: 120%; 146 | } 147 | 148 | div.sphinxsidebar ul li.toctree-l2 > a { 149 | font-size: 110%; 150 | } 151 | 152 | div.sphinxsidebar input { 153 | border: 1px solid #CCC; 154 | font-family: Georgia, serif; 155 | font-size: 1em; 156 | } 157 | 158 | div.sphinxsidebar hr { 159 | border: none; 160 | height: 1px; 161 | color: #AAA; 162 | background: #AAA; 163 | 164 | text-align: left; 165 | margin-left: 0; 166 | width: 50%; 167 | } 168 | 169 | div.sphinxsidebar .badge { 170 | border-bottom: none; 171 | } 172 | 173 | div.sphinxsidebar .badge:hover { 174 | border-bottom: none; 175 | } 176 | 177 | /* To address an issue with donation coming after search */ 178 | div.sphinxsidebar h3.donation { 179 | margin-top: 10px; 180 | } 181 | 182 | /* -- body styles ----------------------------------------------------------- */ 183 | 184 | a { 185 | color: #004B6B; 186 | text-decoration: underline; 187 | } 188 | 189 | a:hover { 190 | color: #6D4100; 191 | text-decoration: underline; 192 | } 193 | 194 | div.body h1, 195 | div.body h2, 196 | div.body h3, 197 | div.body h4, 198 | div.body h5, 199 | div.body h6 { 200 | font-family: Georgia, serif; 201 | font-weight: normal; 202 | margin: 30px 0px 10px 0px; 203 | padding: 0; 204 | } 205 | 206 | div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } 207 | div.body h2 { font-size: 180%; } 208 | div.body h3 { font-size: 150%; } 209 | div.body h4 { font-size: 130%; } 210 | div.body h5 { font-size: 100%; } 211 | div.body h6 { font-size: 100%; } 212 | 213 | a.headerlink { 214 | color: #DDD; 215 | padding: 0 4px; 216 | text-decoration: none; 217 | } 218 | 219 | a.headerlink:hover { 220 | color: #444; 221 | background: #EAEAEA; 222 | } 223 | 224 | div.body p, div.body dd, div.body li { 225 | line-height: 1.4em; 226 | } 227 | 228 | div.admonition { 229 | margin: 20px 0px; 230 | padding: 10px 30px; 231 | background-color: #EEE; 232 | border: 1px solid #CCC; 233 | } 234 | 235 | div.admonition tt.xref, div.admonition code.xref, div.admonition a tt { 236 | background-color: #FBFBFB; 237 | border-bottom: 1px solid #fafafa; 238 | } 239 | 240 | div.admonition p.admonition-title { 241 | font-family: Georgia, serif; 242 | font-weight: normal; 243 | font-size: 24px; 244 | margin: 0 0 10px 0; 245 | padding: 0; 246 | line-height: 1; 247 | } 248 | 249 | div.admonition p.last { 250 | margin-bottom: 0; 251 | } 252 | 253 | div.highlight { 254 | background-color: #fff; 255 | } 256 | 257 | dt:target, .highlight { 258 | background: #FAF3E8; 259 | } 260 | 261 | div.warning { 262 | background-color: #FCC; 263 | border: 1px solid #FAA; 264 | } 265 | 266 | div.danger { 267 | background-color: #FCC; 268 | border: 1px solid #FAA; 269 | -moz-box-shadow: 2px 2px 4px #D52C2C; 270 | -webkit-box-shadow: 2px 2px 4px #D52C2C; 271 | box-shadow: 2px 2px 4px #D52C2C; 272 | } 273 | 274 | div.error { 275 | background-color: #FCC; 276 | border: 1px solid #FAA; 277 | -moz-box-shadow: 2px 2px 4px #D52C2C; 278 | -webkit-box-shadow: 2px 2px 4px #D52C2C; 279 | box-shadow: 2px 2px 4px #D52C2C; 280 | } 281 | 282 | div.caution { 283 | background-color: #FCC; 284 | border: 1px solid #FAA; 285 | } 286 | 287 | div.attention { 288 | background-color: #FCC; 289 | border: 1px solid #FAA; 290 | } 291 | 292 | div.important { 293 | background-color: #EEE; 294 | border: 1px solid #CCC; 295 | } 296 | 297 | div.note { 298 | background-color: #EEE; 299 | border: 1px solid #CCC; 300 | } 301 | 302 | div.tip { 303 | background-color: #EEE; 304 | border: 1px solid #CCC; 305 | } 306 | 307 | div.hint { 308 | background-color: #EEE; 309 | border: 1px solid #CCC; 310 | } 311 | 312 | div.seealso { 313 | background-color: #EEE; 314 | border: 1px solid #CCC; 315 | } 316 | 317 | div.topic { 318 | background-color: #EEE; 319 | } 320 | 321 | p.admonition-title { 322 | display: inline; 323 | } 324 | 325 | p.admonition-title:after { 326 | content: ":"; 327 | } 328 | 329 | pre, tt, code { 330 | font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 331 | font-size: 0.9em; 332 | } 333 | 334 | .hll { 335 | background-color: #FFC; 336 | margin: 0 -12px; 337 | padding: 0 12px; 338 | display: block; 339 | } 340 | 341 | img.screenshot { 342 | } 343 | 344 | tt.descname, tt.descclassname, code.descname, code.descclassname { 345 | font-size: 0.95em; 346 | } 347 | 348 | tt.descname, code.descname { 349 | padding-right: 0.08em; 350 | } 351 | 352 | img.screenshot { 353 | -moz-box-shadow: 2px 2px 4px #EEE; 354 | -webkit-box-shadow: 2px 2px 4px #EEE; 355 | box-shadow: 2px 2px 4px #EEE; 356 | } 357 | 358 | table.docutils { 359 | border: 1px solid #888; 360 | -moz-box-shadow: 2px 2px 4px #EEE; 361 | -webkit-box-shadow: 2px 2px 4px #EEE; 362 | box-shadow: 2px 2px 4px #EEE; 363 | } 364 | 365 | table.docutils td, table.docutils th { 366 | border: 1px solid #888; 367 | padding: 0.25em 0.7em; 368 | } 369 | 370 | table.field-list, table.footnote { 371 | border: none; 372 | -moz-box-shadow: none; 373 | -webkit-box-shadow: none; 374 | box-shadow: none; 375 | } 376 | 377 | table.footnote { 378 | margin: 15px 0; 379 | width: 100%; 380 | border: 1px solid #EEE; 381 | background: #FDFDFD; 382 | font-size: 0.9em; 383 | } 384 | 385 | table.footnote + table.footnote { 386 | margin-top: -15px; 387 | border-top: none; 388 | } 389 | 390 | table.field-list th { 391 | padding: 0 0.8em 0 0; 392 | } 393 | 394 | table.field-list td { 395 | padding: 0; 396 | } 397 | 398 | table.field-list p { 399 | margin-bottom: 0.8em; 400 | } 401 | 402 | /* Cloned from 403 | * https://github.com/sphinx-doc/sphinx/commit/ef60dbfce09286b20b7385333d63a60321784e68 404 | */ 405 | .field-name { 406 | -moz-hyphens: manual; 407 | -ms-hyphens: manual; 408 | -webkit-hyphens: manual; 409 | hyphens: manual; 410 | } 411 | 412 | table.footnote td.label { 413 | width: .1px; 414 | padding: 0.3em 0 0.3em 0.5em; 415 | } 416 | 417 | table.footnote td { 418 | padding: 0.3em 0.5em; 419 | } 420 | 421 | dl { 422 | margin: 0; 423 | padding: 0; 424 | } 425 | 426 | dl dd { 427 | margin-left: 30px; 428 | } 429 | 430 | blockquote { 431 | margin: 0 0 0 30px; 432 | padding: 0; 433 | } 434 | 435 | ul, ol { 436 | /* Matches the 30px from the narrow-screen "li > ul" selector below */ 437 | margin: 10px 0 10px 30px; 438 | padding: 0; 439 | } 440 | 441 | pre { 442 | background: #EEE; 443 | padding: 7px 30px; 444 | margin: 15px 0px; 445 | line-height: 1.3em; 446 | } 447 | 448 | div.viewcode-block:target { 449 | background: #ffd; 450 | } 451 | 452 | dl pre, blockquote pre, li pre { 453 | margin-left: 0; 454 | padding-left: 30px; 455 | } 456 | 457 | tt, code { 458 | background-color: #ecf0f3; 459 | color: #222; 460 | /* padding: 1px 2px; */ 461 | } 462 | 463 | tt.xref, code.xref, a tt { 464 | background-color: #FBFBFB; 465 | border-bottom: 1px solid #fff; 466 | } 467 | 468 | a.reference { 469 | text-decoration: none; 470 | border-bottom: 1px dotted #004B6B; 471 | } 472 | 473 | /* Don't put an underline on images */ 474 | a.image-reference, a.image-reference:hover { 475 | border-bottom: none; 476 | } 477 | 478 | a.reference:hover { 479 | border-bottom: 1px solid #6D4100; 480 | } 481 | 482 | a.footnote-reference { 483 | text-decoration: none; 484 | font-size: 0.7em; 485 | vertical-align: top; 486 | border-bottom: 1px dotted #004B6B; 487 | } 488 | 489 | a.footnote-reference:hover { 490 | border-bottom: 1px solid #6D4100; 491 | } 492 | 493 | a:hover tt, a:hover code { 494 | background: #EEE; 495 | } 496 | 497 | 498 | @media screen and (max-width: 870px) { 499 | 500 | div.sphinxsidebar { 501 | display: none; 502 | } 503 | 504 | div.document { 505 | width: 100%; 506 | 507 | } 508 | 509 | div.documentwrapper { 510 | margin-left: 0; 511 | margin-top: 0; 512 | margin-right: 0; 513 | margin-bottom: 0; 514 | } 515 | 516 | div.bodywrapper { 517 | margin-top: 0; 518 | margin-right: 0; 519 | margin-bottom: 0; 520 | margin-left: 0; 521 | } 522 | 523 | ul { 524 | margin-left: 0; 525 | } 526 | 527 | li > ul { 528 | /* Matches the 30px from the "ul, ol" selector above */ 529 | margin-left: 30px; 530 | } 531 | 532 | .document { 533 | width: auto; 534 | } 535 | 536 | .footer { 537 | width: auto; 538 | } 539 | 540 | .bodywrapper { 541 | margin: 0; 542 | } 543 | 544 | .footer { 545 | width: auto; 546 | } 547 | 548 | .github { 549 | display: none; 550 | } 551 | 552 | 553 | 554 | } 555 | 556 | 557 | 558 | @media screen and (max-width: 875px) { 559 | 560 | body { 561 | margin: 0; 562 | padding: 20px 30px; 563 | } 564 | 565 | div.documentwrapper { 566 | float: none; 567 | background: #fff; 568 | } 569 | 570 | div.sphinxsidebar { 571 | display: block; 572 | float: none; 573 | width: 102.5%; 574 | margin: 50px -30px -20px -30px; 575 | padding: 10px 20px; 576 | background: #333; 577 | color: #FFF; 578 | } 579 | 580 | div.sphinxsidebar h3, div.sphinxsidebar h4, div.sphinxsidebar p, 581 | div.sphinxsidebar h3 a { 582 | color: #fff; 583 | } 584 | 585 | div.sphinxsidebar a { 586 | color: #AAA; 587 | } 588 | 589 | div.sphinxsidebar p.logo { 590 | display: none; 591 | } 592 | 593 | div.document { 594 | width: 100%; 595 | margin: 0; 596 | } 597 | 598 | div.footer { 599 | display: none; 600 | } 601 | 602 | div.bodywrapper { 603 | margin: 0; 604 | } 605 | 606 | div.body { 607 | min-height: 0; 608 | padding: 0; 609 | } 610 | 611 | .rtd_doc_footer { 612 | display: none; 613 | } 614 | 615 | .document { 616 | width: auto; 617 | } 618 | 619 | .footer { 620 | width: auto; 621 | } 622 | 623 | .footer { 624 | width: auto; 625 | } 626 | 627 | .github { 628 | display: none; 629 | } 630 | } 631 | 632 | 633 | /* misc. */ 634 | 635 | .revsys-inline { 636 | display: none!important; 637 | } 638 | 639 | /* Make nested-list/multi-paragraph items look better in Releases changelog 640 | * pages. Without this, docutils' magical list fuckery causes inconsistent 641 | * formatting between different release sub-lists. 642 | */ 643 | div#changelog > div.section > ul > li > p:only-child { 644 | margin-bottom: 0; 645 | } 646 | 647 | /* Hide fugly table cell borders in ..bibliography:: directive output */ 648 | table.docutils.citation, table.docutils.citation td, table.docutils.citation th { 649 | border: none; 650 | /* Below needed in some edge cases; if not applied, bottom shadows appear */ 651 | -moz-box-shadow: none; 652 | -webkit-box-shadow: none; 653 | box-shadow: none; 654 | } 655 | 656 | 657 | /* relbar */ 658 | 659 | .related { 660 | line-height: 30px; 661 | width: 100%; 662 | font-size: 0.9rem; 663 | } 664 | 665 | .related.top { 666 | border-bottom: 1px solid #EEE; 667 | margin-bottom: 20px; 668 | } 669 | 670 | .related.bottom { 671 | border-top: 1px solid #EEE; 672 | } 673 | 674 | .related ul { 675 | padding: 0; 676 | margin: 0; 677 | list-style: none; 678 | } 679 | 680 | .related li { 681 | display: inline; 682 | } 683 | 684 | nav#rellinks { 685 | float: right; 686 | } 687 | 688 | nav#rellinks li+li:before { 689 | content: "|"; 690 | } 691 | 692 | nav#breadcrumbs li+li:before { 693 | content: "\00BB"; 694 | } 695 | 696 | /* Hide certain items when printing */ 697 | @media print { 698 | div.related { 699 | display: none; 700 | } 701 | } -------------------------------------------------------------------------------- /docs/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | div.section::after { 19 | display: block; 20 | content: ''; 21 | clear: left; 22 | } 23 | 24 | /* -- relbar ---------------------------------------------------------------- */ 25 | 26 | div.related { 27 | width: 100%; 28 | font-size: 90%; 29 | } 30 | 31 | div.related h3 { 32 | display: none; 33 | } 34 | 35 | div.related ul { 36 | margin: 0; 37 | padding: 0 0 0 10px; 38 | list-style: none; 39 | } 40 | 41 | div.related li { 42 | display: inline; 43 | } 44 | 45 | div.related li.right { 46 | float: right; 47 | margin-right: 5px; 48 | } 49 | 50 | /* -- sidebar --------------------------------------------------------------- */ 51 | 52 | div.sphinxsidebarwrapper { 53 | padding: 10px 5px 0 10px; 54 | } 55 | 56 | div.sphinxsidebar { 57 | float: left; 58 | width: 230px; 59 | margin-left: -100%; 60 | font-size: 90%; 61 | word-wrap: break-word; 62 | overflow-wrap : break-word; 63 | } 64 | 65 | div.sphinxsidebar ul { 66 | list-style: none; 67 | } 68 | 69 | div.sphinxsidebar ul ul, 70 | div.sphinxsidebar ul.want-points { 71 | margin-left: 20px; 72 | list-style: square; 73 | } 74 | 75 | div.sphinxsidebar ul ul { 76 | margin-top: 0; 77 | margin-bottom: 0; 78 | } 79 | 80 | div.sphinxsidebar form { 81 | margin-top: 10px; 82 | } 83 | 84 | div.sphinxsidebar input { 85 | border: 1px solid #98dbcc; 86 | font-family: sans-serif; 87 | font-size: 1em; 88 | } 89 | 90 | div.sphinxsidebar #searchbox form.search { 91 | overflow: hidden; 92 | } 93 | 94 | div.sphinxsidebar #searchbox input[type="text"] { 95 | float: left; 96 | width: 80%; 97 | padding: 0.25em; 98 | box-sizing: border-box; 99 | } 100 | 101 | div.sphinxsidebar #searchbox input[type="submit"] { 102 | float: left; 103 | width: 20%; 104 | border-left: none; 105 | padding: 0.25em; 106 | box-sizing: border-box; 107 | } 108 | 109 | 110 | img { 111 | border: 0; 112 | max-width: 100%; 113 | } 114 | 115 | /* -- search page ----------------------------------------------------------- */ 116 | 117 | ul.search { 118 | margin: 10px 0 0 20px; 119 | padding: 0; 120 | } 121 | 122 | ul.search li { 123 | padding: 5px 0 5px 20px; 124 | background-image: url(file.png); 125 | background-repeat: no-repeat; 126 | background-position: 0 7px; 127 | } 128 | 129 | ul.search li a { 130 | font-weight: bold; 131 | } 132 | 133 | ul.search li div.context { 134 | color: #888; 135 | margin: 2px 0 0 30px; 136 | text-align: left; 137 | } 138 | 139 | ul.keywordmatches li.goodmatch a { 140 | font-weight: bold; 141 | } 142 | 143 | /* -- index page ------------------------------------------------------------ */ 144 | 145 | table.contentstable { 146 | width: 90%; 147 | margin-left: auto; 148 | margin-right: auto; 149 | } 150 | 151 | table.contentstable p.biglink { 152 | line-height: 150%; 153 | } 154 | 155 | a.biglink { 156 | font-size: 1.3em; 157 | } 158 | 159 | span.linkdescr { 160 | font-style: italic; 161 | padding-top: 5px; 162 | font-size: 90%; 163 | } 164 | 165 | /* -- general index --------------------------------------------------------- */ 166 | 167 | table.indextable { 168 | width: 100%; 169 | } 170 | 171 | table.indextable td { 172 | text-align: left; 173 | vertical-align: top; 174 | } 175 | 176 | table.indextable ul { 177 | margin-top: 0; 178 | margin-bottom: 0; 179 | list-style-type: none; 180 | } 181 | 182 | table.indextable > tbody > tr > td > ul { 183 | padding-left: 0em; 184 | } 185 | 186 | table.indextable tr.pcap { 187 | height: 10px; 188 | } 189 | 190 | table.indextable tr.cap { 191 | margin-top: 10px; 192 | background-color: #f2f2f2; 193 | } 194 | 195 | img.toggler { 196 | margin-right: 3px; 197 | margin-top: 3px; 198 | cursor: pointer; 199 | } 200 | 201 | div.modindex-jumpbox { 202 | border-top: 1px solid #ddd; 203 | border-bottom: 1px solid #ddd; 204 | margin: 1em 0 1em 0; 205 | padding: 0.4em; 206 | } 207 | 208 | div.genindex-jumpbox { 209 | border-top: 1px solid #ddd; 210 | border-bottom: 1px solid #ddd; 211 | margin: 1em 0 1em 0; 212 | padding: 0.4em; 213 | } 214 | 215 | /* -- domain module index --------------------------------------------------- */ 216 | 217 | table.modindextable td { 218 | padding: 2px; 219 | border-collapse: collapse; 220 | } 221 | 222 | /* -- general body styles --------------------------------------------------- */ 223 | 224 | div.body { 225 | min-width: 450px; 226 | max-width: 800px; 227 | } 228 | 229 | div.body p, div.body dd, div.body li, div.body blockquote { 230 | -moz-hyphens: auto; 231 | -ms-hyphens: auto; 232 | -webkit-hyphens: auto; 233 | hyphens: auto; 234 | } 235 | 236 | a.headerlink { 237 | visibility: hidden; 238 | } 239 | 240 | a.brackets:before, 241 | span.brackets > a:before{ 242 | content: "["; 243 | } 244 | 245 | a.brackets:after, 246 | span.brackets > a:after { 247 | content: "]"; 248 | } 249 | 250 | h1:hover > a.headerlink, 251 | h2:hover > a.headerlink, 252 | h3:hover > a.headerlink, 253 | h4:hover > a.headerlink, 254 | h5:hover > a.headerlink, 255 | h6:hover > a.headerlink, 256 | dt:hover > a.headerlink, 257 | caption:hover > a.headerlink, 258 | p.caption:hover > a.headerlink, 259 | div.code-block-caption:hover > a.headerlink { 260 | visibility: visible; 261 | } 262 | 263 | div.body p.caption { 264 | text-align: inherit; 265 | } 266 | 267 | div.body td { 268 | text-align: left; 269 | } 270 | 271 | .first { 272 | margin-top: 0 !important; 273 | } 274 | 275 | p.rubric { 276 | margin-top: 30px; 277 | font-weight: bold; 278 | } 279 | 280 | img.align-left, .figure.align-left, object.align-left { 281 | clear: left; 282 | float: left; 283 | margin-right: 1em; 284 | } 285 | 286 | img.align-right, .figure.align-right, object.align-right { 287 | clear: right; 288 | float: right; 289 | margin-left: 1em; 290 | } 291 | 292 | img.align-center, .figure.align-center, object.align-center { 293 | display: block; 294 | margin-left: auto; 295 | margin-right: auto; 296 | } 297 | 298 | img.align-default, .figure.align-default { 299 | display: block; 300 | margin-left: auto; 301 | margin-right: auto; 302 | } 303 | 304 | .align-left { 305 | text-align: left; 306 | } 307 | 308 | .align-center { 309 | text-align: center; 310 | } 311 | 312 | .align-default { 313 | text-align: center; 314 | } 315 | 316 | .align-right { 317 | text-align: right; 318 | } 319 | 320 | /* -- sidebars -------------------------------------------------------------- */ 321 | 322 | div.sidebar { 323 | margin: 0 0 0.5em 1em; 324 | border: 1px solid #ddb; 325 | padding: 7px; 326 | background-color: #ffe; 327 | width: 40%; 328 | float: right; 329 | clear: right; 330 | overflow-x: auto; 331 | } 332 | 333 | p.sidebar-title { 334 | font-weight: bold; 335 | } 336 | 337 | div.admonition, div.topic, blockquote { 338 | clear: left; 339 | } 340 | 341 | /* -- topics ---------------------------------------------------------------- */ 342 | 343 | div.topic { 344 | border: 1px solid #ccc; 345 | padding: 7px; 346 | margin: 10px 0 10px 0; 347 | } 348 | 349 | p.topic-title { 350 | font-size: 1.1em; 351 | font-weight: bold; 352 | margin-top: 10px; 353 | } 354 | 355 | /* -- admonitions ----------------------------------------------------------- */ 356 | 357 | div.admonition { 358 | margin-top: 10px; 359 | margin-bottom: 10px; 360 | padding: 7px; 361 | } 362 | 363 | div.admonition dt { 364 | font-weight: bold; 365 | } 366 | 367 | p.admonition-title { 368 | margin: 0px 10px 5px 0px; 369 | font-weight: bold; 370 | } 371 | 372 | div.body p.centered { 373 | text-align: center; 374 | margin-top: 25px; 375 | } 376 | 377 | /* -- content of sidebars/topics/admonitions -------------------------------- */ 378 | 379 | div.sidebar > :last-child, 380 | div.topic > :last-child, 381 | div.admonition > :last-child { 382 | margin-bottom: 0; 383 | } 384 | 385 | div.sidebar::after, 386 | div.topic::after, 387 | div.admonition::after, 388 | blockquote::after { 389 | display: block; 390 | content: ''; 391 | clear: both; 392 | } 393 | 394 | /* -- tables ---------------------------------------------------------------- */ 395 | 396 | table.docutils { 397 | margin-top: 10px; 398 | margin-bottom: 10px; 399 | border: 0; 400 | border-collapse: collapse; 401 | } 402 | 403 | table.align-center { 404 | margin-left: auto; 405 | margin-right: auto; 406 | } 407 | 408 | table.align-default { 409 | margin-left: auto; 410 | margin-right: auto; 411 | } 412 | 413 | table caption span.caption-number { 414 | font-style: italic; 415 | } 416 | 417 | table caption span.caption-text { 418 | } 419 | 420 | table.docutils td, table.docutils th { 421 | padding: 1px 8px 1px 5px; 422 | border-top: 0; 423 | border-left: 0; 424 | border-right: 0; 425 | border-bottom: 1px solid #aaa; 426 | } 427 | 428 | table.footnote td, table.footnote th { 429 | border: 0 !important; 430 | } 431 | 432 | th { 433 | text-align: left; 434 | padding-right: 5px; 435 | } 436 | 437 | table.citation { 438 | border-left: solid 1px gray; 439 | margin-left: 1px; 440 | } 441 | 442 | table.citation td { 443 | border-bottom: none; 444 | } 445 | 446 | th > :first-child, 447 | td > :first-child { 448 | margin-top: 0px; 449 | } 450 | 451 | th > :last-child, 452 | td > :last-child { 453 | margin-bottom: 0px; 454 | } 455 | 456 | /* -- figures --------------------------------------------------------------- */ 457 | 458 | div.figure { 459 | margin: 0.5em; 460 | padding: 0.5em; 461 | } 462 | 463 | div.figure p.caption { 464 | padding: 0.3em; 465 | } 466 | 467 | div.figure p.caption span.caption-number { 468 | font-style: italic; 469 | } 470 | 471 | div.figure p.caption span.caption-text { 472 | } 473 | 474 | /* -- field list styles ----------------------------------------------------- */ 475 | 476 | table.field-list td, table.field-list th { 477 | border: 0 !important; 478 | } 479 | 480 | .field-list ul { 481 | margin: 0; 482 | padding-left: 1em; 483 | } 484 | 485 | .field-list p { 486 | margin: 0; 487 | } 488 | 489 | .field-name { 490 | -moz-hyphens: manual; 491 | -ms-hyphens: manual; 492 | -webkit-hyphens: manual; 493 | hyphens: manual; 494 | } 495 | 496 | /* -- hlist styles ---------------------------------------------------------- */ 497 | 498 | table.hlist { 499 | margin: 1em 0; 500 | } 501 | 502 | table.hlist td { 503 | vertical-align: top; 504 | } 505 | 506 | 507 | /* -- other body styles ----------------------------------------------------- */ 508 | 509 | ol.arabic { 510 | list-style: decimal; 511 | } 512 | 513 | ol.loweralpha { 514 | list-style: lower-alpha; 515 | } 516 | 517 | ol.upperalpha { 518 | list-style: upper-alpha; 519 | } 520 | 521 | ol.lowerroman { 522 | list-style: lower-roman; 523 | } 524 | 525 | ol.upperroman { 526 | list-style: upper-roman; 527 | } 528 | 529 | :not(li) > ol > li:first-child > :first-child, 530 | :not(li) > ul > li:first-child > :first-child { 531 | margin-top: 0px; 532 | } 533 | 534 | :not(li) > ol > li:last-child > :last-child, 535 | :not(li) > ul > li:last-child > :last-child { 536 | margin-bottom: 0px; 537 | } 538 | 539 | ol.simple ol p, 540 | ol.simple ul p, 541 | ul.simple ol p, 542 | ul.simple ul p { 543 | margin-top: 0; 544 | } 545 | 546 | ol.simple > li:not(:first-child) > p, 547 | ul.simple > li:not(:first-child) > p { 548 | margin-top: 0; 549 | } 550 | 551 | ol.simple p, 552 | ul.simple p { 553 | margin-bottom: 0; 554 | } 555 | 556 | dl.footnote > dt, 557 | dl.citation > dt { 558 | float: left; 559 | margin-right: 0.5em; 560 | } 561 | 562 | dl.footnote > dd, 563 | dl.citation > dd { 564 | margin-bottom: 0em; 565 | } 566 | 567 | dl.footnote > dd:after, 568 | dl.citation > dd:after { 569 | content: ""; 570 | clear: both; 571 | } 572 | 573 | dl.field-list { 574 | display: grid; 575 | grid-template-columns: fit-content(30%) auto; 576 | } 577 | 578 | dl.field-list > dt { 579 | font-weight: bold; 580 | word-break: break-word; 581 | padding-left: 0.5em; 582 | padding-right: 5px; 583 | } 584 | 585 | dl.field-list > dt:after { 586 | content: ":"; 587 | } 588 | 589 | dl.field-list > dd { 590 | padding-left: 0.5em; 591 | margin-top: 0em; 592 | margin-left: 0em; 593 | margin-bottom: 0em; 594 | } 595 | 596 | dl { 597 | margin-bottom: 15px; 598 | } 599 | 600 | dd > :first-child { 601 | margin-top: 0px; 602 | } 603 | 604 | dd ul, dd table { 605 | margin-bottom: 10px; 606 | } 607 | 608 | dd { 609 | margin-top: 3px; 610 | margin-bottom: 10px; 611 | margin-left: 30px; 612 | } 613 | 614 | dl > dd:last-child, 615 | dl > dd:last-child > :last-child { 616 | margin-bottom: 0; 617 | } 618 | 619 | dt:target, span.highlighted { 620 | background-color: #fbe54e; 621 | } 622 | 623 | rect.highlighted { 624 | fill: #fbe54e; 625 | } 626 | 627 | dl.glossary dt { 628 | font-weight: bold; 629 | font-size: 1.1em; 630 | } 631 | 632 | .optional { 633 | font-size: 1.3em; 634 | } 635 | 636 | .sig-paren { 637 | font-size: larger; 638 | } 639 | 640 | .versionmodified { 641 | font-style: italic; 642 | } 643 | 644 | .system-message { 645 | background-color: #fda; 646 | padding: 5px; 647 | border: 3px solid red; 648 | } 649 | 650 | .footnote:target { 651 | background-color: #ffa; 652 | } 653 | 654 | .line-block { 655 | display: block; 656 | margin-top: 1em; 657 | margin-bottom: 1em; 658 | } 659 | 660 | .line-block .line-block { 661 | margin-top: 0; 662 | margin-bottom: 0; 663 | margin-left: 1.5em; 664 | } 665 | 666 | .guilabel, .menuselection { 667 | font-family: sans-serif; 668 | } 669 | 670 | .accelerator { 671 | text-decoration: underline; 672 | } 673 | 674 | .classifier { 675 | font-style: oblique; 676 | } 677 | 678 | .classifier:before { 679 | font-style: normal; 680 | margin: 0.5em; 681 | content: ":"; 682 | } 683 | 684 | abbr, acronym { 685 | border-bottom: dotted 1px; 686 | cursor: help; 687 | } 688 | 689 | /* -- code displays --------------------------------------------------------- */ 690 | 691 | pre { 692 | overflow: auto; 693 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 694 | } 695 | 696 | pre, div[class*="highlight-"] { 697 | clear: both; 698 | } 699 | 700 | span.pre { 701 | -moz-hyphens: none; 702 | -ms-hyphens: none; 703 | -webkit-hyphens: none; 704 | hyphens: none; 705 | } 706 | 707 | div[class*="highlight-"] { 708 | margin: 1em 0; 709 | } 710 | 711 | td.linenos pre { 712 | border: 0; 713 | background-color: transparent; 714 | color: #aaa; 715 | } 716 | 717 | table.highlighttable { 718 | display: block; 719 | } 720 | 721 | table.highlighttable tbody { 722 | display: block; 723 | } 724 | 725 | table.highlighttable tr { 726 | display: flex; 727 | } 728 | 729 | table.highlighttable td { 730 | margin: 0; 731 | padding: 0; 732 | } 733 | 734 | table.highlighttable td.linenos { 735 | padding-right: 0.5em; 736 | } 737 | 738 | table.highlighttable td.code { 739 | flex: 1; 740 | overflow: hidden; 741 | } 742 | 743 | .highlight .hll { 744 | display: block; 745 | } 746 | 747 | div.highlight pre, 748 | table.highlighttable pre { 749 | margin: 0; 750 | } 751 | 752 | div.code-block-caption + div { 753 | margin-top: 0; 754 | } 755 | 756 | div.code-block-caption { 757 | margin-top: 1em; 758 | padding: 2px 5px; 759 | font-size: small; 760 | } 761 | 762 | div.code-block-caption code { 763 | background-color: transparent; 764 | } 765 | 766 | table.highlighttable td.linenos, 767 | span.linenos, 768 | div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */ 769 | user-select: none; 770 | } 771 | 772 | div.code-block-caption span.caption-number { 773 | padding: 0.1em 0.3em; 774 | font-style: italic; 775 | } 776 | 777 | div.code-block-caption span.caption-text { 778 | } 779 | 780 | div.literal-block-wrapper { 781 | margin: 1em 0; 782 | } 783 | 784 | code.descname { 785 | background-color: transparent; 786 | font-weight: bold; 787 | font-size: 1.2em; 788 | } 789 | 790 | code.descclassname { 791 | background-color: transparent; 792 | } 793 | 794 | code.xref, a code { 795 | background-color: transparent; 796 | font-weight: bold; 797 | } 798 | 799 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 800 | background-color: transparent; 801 | } 802 | 803 | .viewcode-link { 804 | float: right; 805 | } 806 | 807 | .viewcode-back { 808 | float: right; 809 | font-family: sans-serif; 810 | } 811 | 812 | div.viewcode-block:target { 813 | margin: -1px -10px; 814 | padding: 0 10px; 815 | } 816 | 817 | /* -- math display ---------------------------------------------------------- */ 818 | 819 | img.math { 820 | vertical-align: middle; 821 | } 822 | 823 | div.body div.math p { 824 | text-align: center; 825 | } 826 | 827 | span.eqno { 828 | float: right; 829 | } 830 | 831 | span.eqno a.headerlink { 832 | position: absolute; 833 | z-index: 1; 834 | } 835 | 836 | div.math:hover a.headerlink { 837 | visibility: visible; 838 | } 839 | 840 | /* -- printout stylesheet --------------------------------------------------- */ 841 | 842 | @media print { 843 | div.document, 844 | div.documentwrapper, 845 | div.bodywrapper { 846 | margin: 0 !important; 847 | width: 100%; 848 | } 849 | 850 | div.sphinxsidebar, 851 | div.related, 852 | div.footer, 853 | #top-link { 854 | display: none; 855 | } 856 | } -------------------------------------------------------------------------------- /docs/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /docs/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | }; 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s === 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * highlight a given string on a jquery object by wrapping it in 66 | * span elements with the given class name. 67 | */ 68 | jQuery.fn.highlightText = function(text, className) { 69 | function highlight(node, addItems) { 70 | if (node.nodeType === 3) { 71 | var val = node.nodeValue; 72 | var pos = val.toLowerCase().indexOf(text); 73 | if (pos >= 0 && 74 | !jQuery(node.parentNode).hasClass(className) && 75 | !jQuery(node.parentNode).hasClass("nohighlight")) { 76 | var span; 77 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 78 | if (isInSVG) { 79 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 80 | } else { 81 | span = document.createElement("span"); 82 | span.className = className; 83 | } 84 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 85 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 86 | document.createTextNode(val.substr(pos + text.length)), 87 | node.nextSibling)); 88 | node.nodeValue = val.substr(0, pos); 89 | if (isInSVG) { 90 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 91 | var bbox = node.parentElement.getBBox(); 92 | rect.x.baseVal.value = bbox.x; 93 | rect.y.baseVal.value = bbox.y; 94 | rect.width.baseVal.value = bbox.width; 95 | rect.height.baseVal.value = bbox.height; 96 | rect.setAttribute('class', className); 97 | addItems.push({ 98 | "parent": node.parentNode, 99 | "target": rect}); 100 | } 101 | } 102 | } 103 | else if (!jQuery(node).is("button, select, textarea")) { 104 | jQuery.each(node.childNodes, function() { 105 | highlight(this, addItems); 106 | }); 107 | } 108 | } 109 | var addItems = []; 110 | var result = this.each(function() { 111 | highlight(this, addItems); 112 | }); 113 | for (var i = 0; i < addItems.length; ++i) { 114 | jQuery(addItems[i].parent).before(addItems[i].target); 115 | } 116 | return result; 117 | }; 118 | 119 | /* 120 | * backward compatibility for jQuery.browser 121 | * This will be supported until firefox bug is fixed. 122 | */ 123 | if (!jQuery.browser) { 124 | jQuery.uaMatch = function(ua) { 125 | ua = ua.toLowerCase(); 126 | 127 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 128 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 129 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 130 | /(msie) ([\w.]+)/.exec(ua) || 131 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 132 | []; 133 | 134 | return { 135 | browser: match[ 1 ] || "", 136 | version: match[ 2 ] || "0" 137 | }; 138 | }; 139 | jQuery.browser = {}; 140 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 141 | } 142 | 143 | /** 144 | * Small JavaScript module for the documentation. 145 | */ 146 | var Documentation = { 147 | 148 | init : function() { 149 | this.fixFirefoxAnchorBug(); 150 | this.highlightSearchWords(); 151 | this.initIndexTable(); 152 | if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) { 153 | this.initOnKeyListeners(); 154 | } 155 | }, 156 | 157 | /** 158 | * i18n support 159 | */ 160 | TRANSLATIONS : {}, 161 | PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; }, 162 | LOCALE : 'unknown', 163 | 164 | // gettext and ngettext don't access this so that the functions 165 | // can safely bound to a different name (_ = Documentation.gettext) 166 | gettext : function(string) { 167 | var translated = Documentation.TRANSLATIONS[string]; 168 | if (typeof translated === 'undefined') 169 | return string; 170 | return (typeof translated === 'string') ? translated : translated[0]; 171 | }, 172 | 173 | ngettext : function(singular, plural, n) { 174 | var translated = Documentation.TRANSLATIONS[singular]; 175 | if (typeof translated === 'undefined') 176 | return (n == 1) ? singular : plural; 177 | return translated[Documentation.PLURALEXPR(n)]; 178 | }, 179 | 180 | addTranslations : function(catalog) { 181 | for (var key in catalog.messages) 182 | this.TRANSLATIONS[key] = catalog.messages[key]; 183 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 184 | this.LOCALE = catalog.locale; 185 | }, 186 | 187 | /** 188 | * add context elements like header anchor links 189 | */ 190 | addContextElements : function() { 191 | $('div[id] > :header:first').each(function() { 192 | $('\u00B6'). 193 | attr('href', '#' + this.id). 194 | attr('title', _('Permalink to this headline')). 195 | appendTo(this); 196 | }); 197 | $('dt[id]').each(function() { 198 | $('\u00B6'). 199 | attr('href', '#' + this.id). 200 | attr('title', _('Permalink to this definition')). 201 | appendTo(this); 202 | }); 203 | }, 204 | 205 | /** 206 | * workaround a firefox stupidity 207 | * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 208 | */ 209 | fixFirefoxAnchorBug : function() { 210 | if (document.location.hash && $.browser.mozilla) 211 | window.setTimeout(function() { 212 | document.location.href += ''; 213 | }, 10); 214 | }, 215 | 216 | /** 217 | * highlight the search words provided in the url in the text 218 | */ 219 | highlightSearchWords : function() { 220 | var params = $.getQueryParameters(); 221 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 222 | if (terms.length) { 223 | var body = $('div.body'); 224 | if (!body.length) { 225 | body = $('body'); 226 | } 227 | window.setTimeout(function() { 228 | $.each(terms, function() { 229 | body.highlightText(this.toLowerCase(), 'highlighted'); 230 | }); 231 | }, 10); 232 | $('') 234 | .appendTo($('#searchbox')); 235 | } 236 | }, 237 | 238 | /** 239 | * init the domain index toggle buttons 240 | */ 241 | initIndexTable : function() { 242 | var togglers = $('img.toggler').click(function() { 243 | var src = $(this).attr('src'); 244 | var idnum = $(this).attr('id').substr(7); 245 | $('tr.cg-' + idnum).toggle(); 246 | if (src.substr(-9) === 'minus.png') 247 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 248 | else 249 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 250 | }).css('display', ''); 251 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 252 | togglers.click(); 253 | } 254 | }, 255 | 256 | /** 257 | * helper function to hide the search marks again 258 | */ 259 | hideSearchWords : function() { 260 | $('#searchbox .highlight-link').fadeOut(300); 261 | $('span.highlighted').removeClass('highlighted'); 262 | }, 263 | 264 | /** 265 | * make the url absolute 266 | */ 267 | makeURL : function(relativeURL) { 268 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 269 | }, 270 | 271 | /** 272 | * get the current relative url 273 | */ 274 | getCurrentURL : function() { 275 | var path = document.location.pathname; 276 | var parts = path.split(/\//); 277 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 278 | if (this === '..') 279 | parts.pop(); 280 | }); 281 | var url = parts.join('/'); 282 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 283 | }, 284 | 285 | initOnKeyListeners: function() { 286 | $(document).keydown(function(event) { 287 | var activeElementType = document.activeElement.tagName; 288 | // don't navigate when in search box, textarea, dropdown or button 289 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT' 290 | && activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey 291 | && !event.shiftKey) { 292 | switch (event.keyCode) { 293 | case 37: // left 294 | var prevHref = $('link[rel="prev"]').prop('href'); 295 | if (prevHref) { 296 | window.location.href = prevHref; 297 | return false; 298 | } 299 | case 39: // right 300 | var nextHref = $('link[rel="next"]').prop('href'); 301 | if (nextHref) { 302 | window.location.href = nextHref; 303 | return false; 304 | } 305 | } 306 | } 307 | }); 308 | } 309 | }; 310 | 311 | // quick alias for translations 312 | _ = Documentation.gettext; 313 | 314 | $(document).ready(function() { 315 | Documentation.init(); 316 | }); 317 | -------------------------------------------------------------------------------- /docs/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '1.0', 4 | LANGUAGE: 'None', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false 12 | }; -------------------------------------------------------------------------------- /docs/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/massimo-nocentini/microkanrenpy/62c71ae015c0ecc0330d70a2eeb6084430a5bb47/docs/_static/file.png -------------------------------------------------------------------------------- /docs/_static/language_data.js: -------------------------------------------------------------------------------- 1 | /* 2 | * language_data.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * This script contains the language-specific data used by searchtools.js, 6 | * namely the list of stopwords, stemmer, scorer and splitter. 7 | * 8 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 9 | * :license: BSD, see LICENSE for details. 10 | * 11 | */ 12 | 13 | var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"]; 14 | 15 | 16 | /* Non-minified version JS is _stemmer.js if file is provided */ 17 | /** 18 | * Porter Stemmer 19 | */ 20 | var Stemmer = function() { 21 | 22 | var step2list = { 23 | ational: 'ate', 24 | tional: 'tion', 25 | enci: 'ence', 26 | anci: 'ance', 27 | izer: 'ize', 28 | bli: 'ble', 29 | alli: 'al', 30 | entli: 'ent', 31 | eli: 'e', 32 | ousli: 'ous', 33 | ization: 'ize', 34 | ation: 'ate', 35 | ator: 'ate', 36 | alism: 'al', 37 | iveness: 'ive', 38 | fulness: 'ful', 39 | ousness: 'ous', 40 | aliti: 'al', 41 | iviti: 'ive', 42 | biliti: 'ble', 43 | logi: 'log' 44 | }; 45 | 46 | var step3list = { 47 | icate: 'ic', 48 | ative: '', 49 | alize: 'al', 50 | iciti: 'ic', 51 | ical: 'ic', 52 | ful: '', 53 | ness: '' 54 | }; 55 | 56 | var c = "[^aeiou]"; // consonant 57 | var v = "[aeiouy]"; // vowel 58 | var C = c + "[^aeiouy]*"; // consonant sequence 59 | var V = v + "[aeiou]*"; // vowel sequence 60 | 61 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 62 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 63 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 64 | var s_v = "^(" + C + ")?" + v; // vowel in stem 65 | 66 | this.stemWord = function (w) { 67 | var stem; 68 | var suffix; 69 | var firstch; 70 | var origword = w; 71 | 72 | if (w.length < 3) 73 | return w; 74 | 75 | var re; 76 | var re2; 77 | var re3; 78 | var re4; 79 | 80 | firstch = w.substr(0,1); 81 | if (firstch == "y") 82 | w = firstch.toUpperCase() + w.substr(1); 83 | 84 | // Step 1a 85 | re = /^(.+?)(ss|i)es$/; 86 | re2 = /^(.+?)([^s])s$/; 87 | 88 | if (re.test(w)) 89 | w = w.replace(re,"$1$2"); 90 | else if (re2.test(w)) 91 | w = w.replace(re2,"$1$2"); 92 | 93 | // Step 1b 94 | re = /^(.+?)eed$/; 95 | re2 = /^(.+?)(ed|ing)$/; 96 | if (re.test(w)) { 97 | var fp = re.exec(w); 98 | re = new RegExp(mgr0); 99 | if (re.test(fp[1])) { 100 | re = /.$/; 101 | w = w.replace(re,""); 102 | } 103 | } 104 | else if (re2.test(w)) { 105 | var fp = re2.exec(w); 106 | stem = fp[1]; 107 | re2 = new RegExp(s_v); 108 | if (re2.test(stem)) { 109 | w = stem; 110 | re2 = /(at|bl|iz)$/; 111 | re3 = new RegExp("([^aeiouylsz])\\1$"); 112 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 113 | if (re2.test(w)) 114 | w = w + "e"; 115 | else if (re3.test(w)) { 116 | re = /.$/; 117 | w = w.replace(re,""); 118 | } 119 | else if (re4.test(w)) 120 | w = w + "e"; 121 | } 122 | } 123 | 124 | // Step 1c 125 | re = /^(.+?)y$/; 126 | if (re.test(w)) { 127 | var fp = re.exec(w); 128 | stem = fp[1]; 129 | re = new RegExp(s_v); 130 | if (re.test(stem)) 131 | w = stem + "i"; 132 | } 133 | 134 | // Step 2 135 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 136 | if (re.test(w)) { 137 | var fp = re.exec(w); 138 | stem = fp[1]; 139 | suffix = fp[2]; 140 | re = new RegExp(mgr0); 141 | if (re.test(stem)) 142 | w = stem + step2list[suffix]; 143 | } 144 | 145 | // Step 3 146 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 147 | if (re.test(w)) { 148 | var fp = re.exec(w); 149 | stem = fp[1]; 150 | suffix = fp[2]; 151 | re = new RegExp(mgr0); 152 | if (re.test(stem)) 153 | w = stem + step3list[suffix]; 154 | } 155 | 156 | // Step 4 157 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 158 | re2 = /^(.+?)(s|t)(ion)$/; 159 | if (re.test(w)) { 160 | var fp = re.exec(w); 161 | stem = fp[1]; 162 | re = new RegExp(mgr1); 163 | if (re.test(stem)) 164 | w = stem; 165 | } 166 | else if (re2.test(w)) { 167 | var fp = re2.exec(w); 168 | stem = fp[1] + fp[2]; 169 | re2 = new RegExp(mgr1); 170 | if (re2.test(stem)) 171 | w = stem; 172 | } 173 | 174 | // Step 5 175 | re = /^(.+?)e$/; 176 | if (re.test(w)) { 177 | var fp = re.exec(w); 178 | stem = fp[1]; 179 | re = new RegExp(mgr1); 180 | re2 = new RegExp(meq1); 181 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 182 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 183 | w = stem; 184 | } 185 | re = /ll$/; 186 | re2 = new RegExp(mgr1); 187 | if (re.test(w) && re2.test(w)) { 188 | re = /.$/; 189 | w = w.replace(re,""); 190 | } 191 | 192 | // and turn initial Y back to y 193 | if (firstch == "y") 194 | w = firstch.toLowerCase() + w.substr(1); 195 | return w; 196 | } 197 | } 198 | 199 | 200 | 201 | 202 | 203 | var splitChars = (function() { 204 | var result = {}; 205 | var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648, 206 | 1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702, 207 | 2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971, 208 | 2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345, 209 | 3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761, 210 | 3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823, 211 | 4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125, 212 | 8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695, 213 | 11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587, 214 | 43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141]; 215 | var i, j, start, end; 216 | for (i = 0; i < singles.length; i++) { 217 | result[singles[i]] = true; 218 | } 219 | var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709], 220 | [722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161], 221 | [1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568], 222 | [1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807], 223 | [1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047], 224 | [2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383], 225 | [2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450], 226 | [2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547], 227 | [2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673], 228 | [2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820], 229 | [2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946], 230 | [2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023], 231 | [3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173], 232 | [3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332], 233 | [3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481], 234 | [3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718], 235 | [3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791], 236 | [3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095], 237 | [4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205], 238 | [4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687], 239 | [4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968], 240 | [4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869], 241 | [5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102], 242 | [6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271], 243 | [6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592], 244 | [6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822], 245 | [6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167], 246 | [7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959], 247 | [7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143], 248 | [8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318], 249 | [8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483], 250 | [8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101], 251 | [10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567], 252 | [11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292], 253 | [12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444], 254 | [12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783], 255 | [12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311], 256 | [19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511], 257 | [42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774], 258 | [42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071], 259 | [43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263], 260 | [43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519], 261 | [43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647], 262 | [43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967], 263 | [44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295], 264 | [57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274], 265 | [64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007], 266 | [65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381], 267 | [65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]]; 268 | for (i = 0; i < ranges.length; i++) { 269 | start = ranges[i][0]; 270 | end = ranges[i][1]; 271 | for (j = start; j <= end; j++) { 272 | result[j] = true; 273 | } 274 | } 275 | return result; 276 | })(); 277 | 278 | function splitQuery(query) { 279 | var result = []; 280 | var start = -1; 281 | for (var i = 0; i < query.length; i++) { 282 | if (splitChars[query.charCodeAt(i)]) { 283 | if (start !== -1) { 284 | result.push(query.slice(start, i)); 285 | start = -1; 286 | } 287 | } else if (start === -1) { 288 | start = i; 289 | } 290 | } 291 | if (start !== -1) { 292 | result.push(query.slice(start)); 293 | } 294 | return result; 295 | } 296 | 297 | 298 | -------------------------------------------------------------------------------- /docs/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/massimo-nocentini/microkanrenpy/62c71ae015c0ecc0330d70a2eeb6084430a5bb47/docs/_static/minus.png -------------------------------------------------------------------------------- /docs/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/massimo-nocentini/microkanrenpy/62c71ae015c0ecc0330d70a2eeb6084430a5bb47/docs/_static/plus.png -------------------------------------------------------------------------------- /docs/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; margin: 0; } 2 | td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; } 4 | td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #eeffcc; } 8 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 21 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 22 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 23 | .highlight .go { color: #333333 } /* Generic.Output */ 24 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 25 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 28 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 29 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 30 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 31 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #902000 } /* Keyword.Type */ 34 | .highlight .m { color: #208050 } /* Literal.Number */ 35 | .highlight .s { color: #4070a0 } /* Literal.String */ 36 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 37 | .highlight .nb { color: #007020 } /* Name.Builtin */ 38 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 39 | .highlight .no { color: #60add5 } /* Name.Constant */ 40 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 41 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 42 | .highlight .ne { color: #007020 } /* Name.Exception */ 43 | .highlight .nf { color: #06287e } /* Name.Function */ 44 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 45 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 46 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 47 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 48 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 49 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 50 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 51 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 52 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 53 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 54 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 55 | .highlight .sa { color: #4070a0 } /* Literal.String.Affix */ 56 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 57 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 58 | .highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ 59 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 60 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 61 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 62 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 63 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 64 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 65 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 66 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 67 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 68 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 69 | .highlight .fm { color: #06287e } /* Name.Function.Magic */ 70 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 71 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 72 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 73 | .highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ 74 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_static/searchtools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * searchtools.js 3 | * ~~~~~~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilities for the full-text search. 6 | * 7 | * :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | if (!Scorer) { 13 | /** 14 | * Simple result scoring code. 15 | */ 16 | var Scorer = { 17 | // Implement the following function to further tweak the score for each result 18 | // The function takes a result array [filename, title, anchor, descr, score] 19 | // and returns the new score. 20 | /* 21 | score: function(result) { 22 | return result[4]; 23 | }, 24 | */ 25 | 26 | // query matches the full name of an object 27 | objNameMatch: 11, 28 | // or matches in the last dotted part of the object name 29 | objPartialMatch: 6, 30 | // Additive scores depending on the priority of the object 31 | objPrio: {0: 15, // used to be importantResults 32 | 1: 5, // used to be objectResults 33 | 2: -5}, // used to be unimportantResults 34 | // Used when the priority is not in the mapping. 35 | objPrioDefault: 0, 36 | 37 | // query found in title 38 | title: 15, 39 | partialTitle: 7, 40 | // query found in terms 41 | term: 5, 42 | partialTerm: 2 43 | }; 44 | } 45 | 46 | if (!splitQuery) { 47 | function splitQuery(query) { 48 | return query.split(/\s+/); 49 | } 50 | } 51 | 52 | /** 53 | * Search Module 54 | */ 55 | var Search = { 56 | 57 | _index : null, 58 | _queued_query : null, 59 | _pulse_status : -1, 60 | 61 | htmlToText : function(htmlString) { 62 | var virtualDocument = document.implementation.createHTMLDocument('virtual'); 63 | var htmlElement = $(htmlString, virtualDocument); 64 | htmlElement.find('.headerlink').remove(); 65 | docContent = htmlElement.find('[role=main]')[0]; 66 | if(docContent === undefined) { 67 | console.warn("Content block not found. Sphinx search tries to obtain it " + 68 | "via '[role=main]'. Could you check your theme or template."); 69 | return ""; 70 | } 71 | return docContent.textContent || docContent.innerText; 72 | }, 73 | 74 | init : function() { 75 | var params = $.getQueryParameters(); 76 | if (params.q) { 77 | var query = params.q[0]; 78 | $('input[name="q"]')[0].value = query; 79 | this.performSearch(query); 80 | } 81 | }, 82 | 83 | loadIndex : function(url) { 84 | $.ajax({type: "GET", url: url, data: null, 85 | dataType: "script", cache: true, 86 | complete: function(jqxhr, textstatus) { 87 | if (textstatus != "success") { 88 | document.getElementById("searchindexloader").src = url; 89 | } 90 | }}); 91 | }, 92 | 93 | setIndex : function(index) { 94 | var q; 95 | this._index = index; 96 | if ((q = this._queued_query) !== null) { 97 | this._queued_query = null; 98 | Search.query(q); 99 | } 100 | }, 101 | 102 | hasIndex : function() { 103 | return this._index !== null; 104 | }, 105 | 106 | deferQuery : function(query) { 107 | this._queued_query = query; 108 | }, 109 | 110 | stopPulse : function() { 111 | this._pulse_status = 0; 112 | }, 113 | 114 | startPulse : function() { 115 | if (this._pulse_status >= 0) 116 | return; 117 | function pulse() { 118 | var i; 119 | Search._pulse_status = (Search._pulse_status + 1) % 4; 120 | var dotString = ''; 121 | for (i = 0; i < Search._pulse_status; i++) 122 | dotString += '.'; 123 | Search.dots.text(dotString); 124 | if (Search._pulse_status > -1) 125 | window.setTimeout(pulse, 500); 126 | } 127 | pulse(); 128 | }, 129 | 130 | /** 131 | * perform a search for something (or wait until index is loaded) 132 | */ 133 | performSearch : function(query) { 134 | // create the required interface elements 135 | this.out = $('#search-results'); 136 | this.title = $('

' + _('Searching') + '

').appendTo(this.out); 137 | this.dots = $('').appendTo(this.title); 138 | this.status = $('

 

').appendTo(this.out); 139 | this.output = $('