Liking cljdoc? Tell your friends :D

anglican.trap

CPS transformation of Anglican program

CPS transformation of Anglican program
raw docstring

*gensym*clj

customized gensym for code generation, bound to `symbol' in tests

customized gensym for code generation,
bound to `symbol' in tests
sourceraw docstring

*primitive-namespaces*clj

functions in these namespaces are primitive

functions in these namespaces are primitive
sourceraw docstring

*primitive-procedures*clj

primitive procedures, do not exist in CPS form

primitive procedures, do not exist in CPS form
sourceraw docstring

->observeclj

(->observe id dist value cont state)

Positional factory function for class anglican.trap.observe.

Positional factory function for class anglican.trap.observe.
sourceraw docstring

->resultclj

(->result state)

Positional factory function for class anglican.trap.result.

Positional factory function for class anglican.trap.result.
sourceraw docstring

->sampleclj

(->sample id dist cont state)

Positional factory function for class anglican.trap.sample.

Positional factory function for class anglican.trap.sample.
sourceraw docstring

adding-primitive-namespacescljmacro

(adding-primitive-namespaces names & body)

includes namespaces into the set of primitive namespaces

includes namespaces into the set of primitive namespaces
sourceraw docstring

adding-primitive-procedurescljmacro

(adding-primitive-procedures names & body)

includes names into the set of primitive procedures

includes names into the set of primitive procedures
sourceraw docstring

continueclj

(continue cont value state)

returns a trampolined call to continuation

returns a trampolined call to continuation
sourceraw docstring

cps-of-andclj

(cps-of-and args cont)

transforms and to CPS

transforms and to CPS
sourceraw docstring

cps-of-applicationclj

(cps-of-application exprs cont)

transforms application to CPS

transforms application to CPS
sourceraw docstring

cps-of-applyclj

(cps-of-apply args cont)

transforms apply to CPS

transforms apply to CPS
sourceraw docstring

cps-of-caseclj

(cps-of-case args cont)

transforms case to CPS

transforms case to CPS
sourceraw docstring

cps-of-condclj

(cps-of-cond clauses cont)

transforms cond to CPS

transforms cond to CPS
sourceraw docstring

cps-of-doclj

(cps-of-do exprs cont)

transforms do to CPS

transforms do to CPS
sourceraw docstring

cps-of-expressionclj

(cps-of-expression expr cont)

dispatches CPS transformation by expression type

dispatches CPS transformation by expression type
sourceraw docstring

cps-of-hash-mapclj

(cps-of-hash-map expr cont)

transforms literal map to CPS

transforms literal map to CPS
sourceraw docstring

cps-of-ifclj

(cps-of-if args cont)

transforms if to CPS

transforms if to CPS
sourceraw docstring

cps-of-letclj

(cps-of-let args cont)

transforms let to CPS

transforms let to CPS
sourceraw docstring

cps-of-loopclj

(cps-of-loop [bindings & body] cont)

transforms loop

transforms loop
sourceraw docstring

cps-of-observeclj

(cps-of-observe args cont)

transforms observe to CPS, observe updates the weight by adding the result of observe (log-probability) to the log-weight

transforms observe to CPS,
observe updates the weight by adding
the result of observe (log-probability)
to the log-weight
sourceraw docstring

cps-of-opaqueclj

(cps-of-opaque expr cont)

transforms opaque expression to CPS

transforms opaque expression to CPS
sourceraw docstring

cps-of-orclj

(cps-of-or args cont)

transforms or to CPS

transforms or to CPS
sourceraw docstring

cps-of-predictclj

(cps-of-predict args cont)

transforms predict to CPS, predict appends predicted expression and its value to (:predicts $state)

transforms predict to CPS,
predict appends predicted expression
and its value to (:predicts $state)
sourceraw docstring

cps-of-recurclj

(cps-of-recur args cont)

transforms recur

transforms recur
sourceraw docstring

cps-of-retrieveclj

(cps-of-retrieve args cont)

transforms retrieve to CPS

transforms retrieve to CPS
sourceraw docstring

cps-of-sampleclj

(cps-of-sample args cont)

transforms sample to CPS; on sample the program is interrupted and the control is transferred to the inference algorithm

transforms sample to CPS;
on sample the program is interrupted
and the control is transferred to the inference algorithm
sourceraw docstring

cps-of-setclj

(cps-of-set expr cont)

transforms literal set to CPS

transforms literal set to CPS
sourceraw docstring

cps-of-storeclj

(cps-of-store args cont)

transforms store to CPS; the continuation receives the stored value

transforms store to CPS;
the continuation receives the stored value
sourceraw docstring

cps-of-vectorclj

(cps-of-vector expr cont)

transforms literal vector to CPS

transforms literal vector to CPS
sourceraw docstring

cps-of-whenclj

(cps-of-when args cont)

transforms when to CPS

transforms when to CPS
sourceraw docstring

declaration?clj

(declaration? form)

true if the form is a declaration

true if the form is a declaration
sourceraw docstring

defn-with-named-contcljmacro

(defn-with-named-cont cps-of & args)

binds the continuation to a name

binds the continuation to a name
sourceraw docstring

fn-cpsclj

(fn-cps args)

transforms function definition to CPS form

transforms function definition to CPS form
sourceraw docstring

fn-form?clj

(fn-form? expr)

true when the argument is a fn form

true when the argument is a fn form
sourceraw docstring

make-of-argsclj

(make-of-args args make)
(make-of-args args first-is-rator make)

builds lexical bindings for all compound args and then calls `make' to build expression out of the args; used by predict, observe, sample, application

builds lexical bindings for all compound args
and then calls `make' to build expression
out of the args; used by predict, observe, sample, application
sourceraw docstring

map->observeclj

(map->observe m__7585__auto__)

Factory function for class anglican.trap.observe, taking a map of keywords to field values.

Factory function for class anglican.trap.observe, taking a map of keywords to field values.
sourceraw docstring

map->resultclj

(map->result m__7585__auto__)

Factory function for class anglican.trap.result, taking a map of keywords to field values.

Factory function for class anglican.trap.result, taking a map of keywords to field values.
sourceraw docstring

map->sampleclj

(map->sample m__7585__auto__)

Factory function for class anglican.trap.sample, taking a map of keywords to field values.

Factory function for class anglican.trap.sample, taking a map of keywords to field values.
sourceraw docstring

mem-cpsclj

(mem-cps [arg & _ :as args])

transforms mem to CPS

transforms mem to CPS
sourceraw docstring

mem-form?clj

(mem-form? expr)

true when the argument is a mem form

true when the argument is a mem form
sourceraw docstring

opaque-cpsclj

(opaque-cps expr)

return CPS form of an opaque expression

return CPS form of an opaque expression
sourceraw docstring

opaque?clj

(opaque? expr)

true when the argument is an expression which is passed to continuation (rather than accepts continuation) in its CPS form

true when the argument is an expression
which is passed to continuation (rather
than accepts continuation) in its CPS form
sourceraw docstring

primitive-operator?clj

(primitive-operator? procedure)

true if the experssion is converted by clojure to a primitive procedure in operator position

true if the experssion is converted by clojure 
to a primitive procedure in operator position
sourceraw docstring

primitive-procedure-cpsclj

(primitive-procedure-cps expr)

wraps primitive procedure as a CPS form

wraps primitive procedure as a CPS form
sourceraw docstring

primitive-procedure?clj

(primitive-procedure? expr)

true if the expression is primitive, that is, a procedure that does not have a CPS form

true if the expression is primitive,
that is, a procedure that does not have a CPS form
sourceraw docstring

query-cpsclj

(query-cps args)

transforms nested query into CPS

transforms nested query into CPS
sourceraw docstring

query-form?clj

(query-form? expr)

true when the argument is a mem form

true when the argument is a mem form
sourceraw docstring

result-contclj

(result-cont v s)
source

shading-primitive-procedurescljmacro

(shading-primitive-procedures names & body)

excludes names from the set of primitive procedures

excludes names from the set of primitive procedures
sourceraw docstring

simple?clj

(simple? expr)

true if expr has no continuation

true if expr has no continuation
sourceraw docstring

state-contclj

(state-cont _ s)

returns state

returns state
sourceraw docstring

value-contclj

(value-cont v _)

returns value

returns value
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close