r6rs-ad 0.0.0-akku.160.a1b8db1

Automatic Differentiation and more

These are some AD (Automatic Differentiation) tools for both forward and reverse mode written for R6RS Scheme. Also included are some experimental packages to support nondeterministic and stochastic programming, including constraint satisfaction problems.

Also from the README: "This code is completely unsupported".

$ akku update
$ akku install r6rs-ad
$ .akku/env
Authors

Jeffrey Mark Siskind

Uploaded to Akku by Göran Weinholt

Homepage

Information missing.

License

GPL-2.0-or-later

Dependencies

No dependencies.

Source code

https://github.com/qobi/R6RS-AD git
a1b8db1d468e81c3ba640f8655019545f132dbd5

Package contents

  • (AD) R6
    • → + - * / sqrt exp log expt sin cos atan = < > <= >= zero? positive? negative? real? write-real forward-mode derivative-F directional-derivative-list-F directional-derivative-vector-F gradient-list-F gradient-vector-F reverse-mode derivative-R gradient-list-R gradient-vector-R f-gradient-vector-vector-R
    • ← (rnrs) R6
  • (QobiScheme) R6
    • → first second third fourth fifth sixth rest last identity fuck-up list-insert list-remove list-replace but-last sublist fold map-reduce map-reduce-n map-reduce-vector some some-n some-vector every every-vector one for-each-indexed for-each-n map-indexed map-n map-vector map-n-vector enumerate removeq remove-if remove-if-not positionq position-if find-if count-if-not unionq remove-duplicatesp every-other merge sort matrix-ref minus-infinity
    • ← (rnrs) R6
  • (constraint-categorical-grammar) R6
    • → all-sentences
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (nondeterministic-constraints)
  • (constraint-categorical-grammar2) R6
    • → all-sentences
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (nondeterministic-constraints)
    • ← (nondeterministic-lifting)
  • (constraint-montague-grammar) R6
    • → generate understand
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (nondeterministic-constraints)
    • ← (nondeterministic-lifting)
  • (deterministic-memoization) R6
    • → memoize
    • ← (rnrs) R6
  • (games) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player test-lexicon test-grammar test-parse->lf test-semantics sentence->rule sentences->rules initial-state initial-state? win? draw? legal-moves random-game valid? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (maximizing-nondeterministic-promises)
  • (games1) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player test-lexicon test-grammar test-parse->lf test-semantics sentence->rule sentences->rules initial-state initial-state? win? draw? legal-moves *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (maximizing-nondeterministic-promises)
  • (games2) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player *lexicon* remove-duplicates sentence->rule sentences->rules initial-state? win? draw? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (stochastic-scheme)
    • ← (stochastic-promises)
  • (games3) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player *lexicon* remove-duplicates test-lexicon test-grammar test-parse->lf test-semantics sentence->rule sentences->rules initial-state initial-state? win? draw? legal-moves random-game valid? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (maximizing-nondeterministic-promises)
  • (games4) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player *lexicon* remove-duplicates sentence->rule sentences->rules initial-state? win? draw? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (stochastic-scheme)
    • ← (stochastic-promises)
  • (games5) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player *lexicon* remove-duplicates test-lexicon test-grammar test-parse->lf test-semantics sentence->rule sentences->rules initial-state initial-state? win? draw? legal-moves random-game valid? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
    • ← (maximizing-nondeterministic-promises)
  • (games6) R6
    • → make-state state-board state-cache-for-x state-cache-for-o state-player *lexicon* remove-duplicates sentence->rule sentences->rules initial-state? win? draw? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (stochastic-scheme)
    • ← (stochastic-promises)
  • (games7) R6
    • → make-state parse-type pretty-type parse-expression pretty-expression pretty-value pretty-environment type free-variables equal-type? equal-value? *s* *n* *np* *d* *pp/of/np* *pp/for/np* *pp/in/np* *pp/from/np* *pp/to/np* *p/in-np* *p/for-np* *p/of-np* *p/from-np* *p/to-np* *n-pp/of/np* *n-pp/for/np* *n-pp/in/np* *a* *a-pp/for/np* *a-pp/for/np-pp/of/np* *vp* *pp/by/vp* *p-vp* *pp/when/s* *p-s* *v* *v-pp/by/vp* *v-pp/when/s* *v-np* *v-np-pp/from/np-pp/to/np* *coord-vp* *coord-s* *lexicon* board-ref cache-ref vector-replace matrix-replace board-replace cache-replace turn evaluate call a-type a-lambda-expression-of-type a-value-of-type a-phrase-of-type a-phrase-of-value a-bottom-up-parse parse-length a-top-down-parse things a-typed-apply possibly-true? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
  • (games7a) R6
    • → make-state parse-type pretty-type parse-expression pretty-expression pretty-value pretty-environment type free-variables equal-type? equal-value? *s* *n* *np* *d* *pp/of/np* *pp/for/np* *pp/in/np* *pp/from/np* *pp/to/np* *p/in-np* *p/for-np* *p/of-np* *p/from-np* *p/to-np* *n-pp/of/np* *n-pp/for/np* *n-pp/in/np* *a* *a-pp/for/np* *a-pp/for/np-pp/of/np* *vp* *pp/by/vp* *p-vp* *pp/when/s* *p-s* *v* *v-pp/by/vp* *v-pp/when/s* *v-np* *v-np-pp/from/np-pp/to/np* *coord-vp* *coord-s* *lexicon* board-ref cache-ref vector-replace matrix-replace board-replace cache-replace turn evaluate call a-type a-lambda-expression-of-type a-value-of-type a-phrase-of-type a-phrase-of-value a-bottom-up-parse parse-length a-top-down-parse things a-typed-apply possibly-true? *tic-tac-toe* *hexapawn*
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
  • (generative-montague-grammar) R6
    • → parse-type pretty-type parse-expression pretty-expression pretty-value pretty-environment type free-variables equal-type? equal-value? create-typed-meaning *lexicon* evaluate call a-type a-lambda-expression-of-type a-value-of-type a-vacuous-value-of-type a-phrase-of-type a-phrase-of-value a-bottom-up-parse parse-length a-top-down-parse things a-typed-apply possibly-true?
    • ← (rnrs) R6
    • ← (QobiScheme)
    • ← (nondeterministic-scheme)
  • gui Module Chez Scheme
    • (lazy-stochastic-montague-grammar) R6
      • → generate understand
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (stochastic-scheme)
      • ← (stochastic-promises)
      • ← (reduced-gradient)
    • (maximizing-nondeterministic-promises) R6
      • → delayed-a-member-of force-nondeterministic-promise maximal
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
    • (nondeterministic-constraints) R6
      • → set-nondeterministic-strategy! create-domain-variable binding nondeterministic-solution assert-nondeterministic-constraint!
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
    • (nondeterministic-lifting) R6
      • → initialize-domain-variables! domain-variables new-domain-variable true-domain-variable false-domain-variable create-boolean-variable and-constraint or-constraint not-constraint every-constraint some-constraint at-least-constraint at-most-constraint exactly-constraint eq?-constraint memq-constraint assert!
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
      • ← (nondeterministic-constraints)
      • ← (deterministic-memoization)
    • (nondeterministic-memoization) R6
      • → memoize-nondeterministic memoize-nondeterministic-removing-duplicates
      • ← (rnrs) R6
      • ← (nondeterministic-scheme)
      • ← (deterministic-memoization)
    • (nondeterministic-promises) R6
      • → delayed-a-member-of force-nondeterministic-promise
      • ← (rnrs) R6
      • ← (nondeterministic-scheme)
    • (nondeterministic-recognizer) R6
      • → make-production a-tree yield phrase1? yield-equal? phrase2? a-tree-yield-equal? phrase3?
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
      • ← (nondeterministic-memoization)
    • (nondeterministic-scheme) R6
      • → a-boolean fail domain remove-duplicates a-member-of possibly? amb upon-fail
      • ← (rnrs) R6
      • ← (QobiScheme)
    • (nondeterministic-stochastic-memoization) R6
      • → memoize-nondeterministic-stochastic memoize-nondeterministic-removing-duplicates-stochastic memoize-nondeterministic-stochastic-coalescing-duplicates memoize-nondeterministic-removing-duplicates-stochastic-coalescing-duplicates memoize-stochastic-nondeterministic memoize-stochastic-coalescing-duplicates-nondeterministic memoize-stochastic-nondeterministic-removing-duplicates memoize-stochastic-coalescing-duplicates-nondeterministic-removing-duplicates
      • ← (rnrs) R6
      • ← (nondeterministic-scheme)
      • ← (stochastic-scheme)
      • ← (deterministic-memoization)
    • (reduced-gradient) R6
      • → uniform argmax
      • ← (rnrs) R6
      • ← (rnrs r5rs) R6
      • ← (AD)
      • ← (QobiScheme)
    • (stochastic-constraints) R6
      • → set-stochastic-strategy! create-distribution-variable distribution-variable-distribution stochastic-solution assert-stochastic-constraint!
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (stochastic-scheme)
    • (stochastic-memoization) R6
      • → memoize-stochastic memoize-stochastic-coalescing-duplicates
      • ← (rnrs) R6
      • ← (stochastic-scheme)
      • ← (deterministic-memoization)
    • (stochastic-montague-grammar) R6
      • → generate understand
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
      • ← (stochastic-scheme)
      • ← (deterministic-memoization)
      • ← (nondeterministic-memoization)
      • ← (reduced-gradient)
    • (stochastic-promises) R6
      • → delayed-draw force-stochastic-promise
      • ← (rnrs) R6
      • ← (stochastic-scheme)
    • (stochastic-recognizer) R6
      • → make-production a-tree yield phrase-probability1 yield-equal? phrase-probability2 a-tree-yield-equal? phrase-probability3
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (stochastic-scheme)
      • ← (stochastic-memoization)
    • (stochastic-scheme) R6
      • → flip bottom distribution coalesce-duplicates draw-pair draw probability support expected-value entropy upon-bottom
      • ← (rnrs) R6
      • ← (AD)
      • ← (QobiScheme)
    • (old-vlad) R6 Ikarus
      • → old-vlad old-vlad-I
      • ← (rnrs) R6
      • ← (rnrs r5rs) R6
      • ← (ikarus) Built-in
    • (vlad) R6 Ikarus
      • → vlad vlad-I
      • ← (rnrs) R6
      • ← (rnrs r5rs) R6
      • ← (ikarus) Built-in
    • (wwd) R6
      • → *empty* grid-xy? grid-zy? below? below next? next previous? previous grid-points empty? grid-point-contents=? create-grid max-x max-y max-z at grid-binding lift-grid write-grid implies iff assert-lincoln-log-grammar-constraints! left-edge? right-edge? empty?-constraint left-edge?-constraint right-edge?-constraint valid-thing? thing-xy? thing-zy? thing-width thing-height thing-left-of? thing-below? thing-inside? from-to-by things wall?-constraint window?-constraint door?-constraint solid?-constraint parse-type pretty-type parse-expression pretty-expression pretty-value pretty-environment type free-variables equal-type? equal-value? create-typed-meaning evaluate call *s* *n* *np* *d* *vp* *v* *v-np* *lexicon* a-typed-apply a-meaning-constraint create-word-variable create-type-variable make-upper-triangular-matrix upper-triangular-matrix-ref constraints all-domain-variables all-sentences
      • ← (rnrs) R6
      • ← (QobiScheme)
      • ← (nondeterministic-scheme)
      • ← (nondeterministic-constraints)
      • ← (nondeterministic-lifting)

    Version history

    • 2020-05-20 ~ 0.0.0-akku.160.a1b8db1