From c3ae415e573d3b7b662cd9e2e26f3c21b3450867 Mon Sep 17 00:00:00 2001 From: Tom Faulhaber Date: Sat, 8 Aug 2009 01:05:55 -0700 Subject: Updated documentation for commit db7ac3aa9a5de29ac9c0107a21a790f90104ad3f --- datalog-api.html | 142 +++++++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) (limited to 'datalog-api.html') diff --git a/datalog-api.html b/datalog-api.html index 12dc4be0..0f3d0e8c 100644 --- a/datalog-api.html +++ b/datalog-api.html @@ -249,7 +249,7 @@ by Jeffrey Straszheim
Given a list of rules and a query, build a work plan that can be
 used to execute the query.
- Source + Source

run-work-plan

@@ -258,7 +258,7 @@ used to execute the query.
Given a work plan, a database, and some query bindings, run the
 work plan and return the results.
- Source + Source

datalog.database


@@ -270,7 +270,7 @@ work plan and return the results.
   
Usage: (add-index db name key)
 
Adds an index to an empty relation named name
- Source + Source

add-relation

@@ -278,7 +278,7 @@ work plan and return the results.
Usage: (add-relation db name keys)
 
Adds a relation to the database
- Source + Source

add-tuple

@@ -292,7 +292,7 @@ work plan and return the results. the new database. [rel tuple] adds to the relation object. Returns the new relation. - Source + Source

add-tuples

@@ -303,7 +303,7 @@ the new database. (add-tuples db [:rel-name :key-1 1 :key-2 2] [:rel-name :key-1 2 :key-2 3]) - Source + Source

any-match?

@@ -311,7 +311,7 @@ the new database.
Usage: (any-match? db rn pt)
 
Finds if there are any matching records for the partial tuple
- Source + Source

database-counts

@@ -319,7 +319,7 @@ the new database.
Usage: (database-counts db)
 
Returns a map with the count of elements in each relation.
- Source + Source

database-merge

@@ -327,7 +327,7 @@ the new database.
Usage: (database-merge dbs)
 
Merges databases together
- Source + Source

database-merge-parallel

@@ -335,7 +335,7 @@ the new database.
Usage: (database-merge-parallel dbs)
 
Merges databases together in parallel
- Source + Source

datalog-relation

@@ -343,7 +343,7 @@ the new database.
Usage: (datalog-relation schema data indexes)
 
Creates a relation
- Source + Source

ensure-relation

@@ -351,7 +351,7 @@ the new database.
Usage: (ensure-relation db name keys indexes)
 
If the database lacks the named relation, add it
- Source + Source

get-relation

@@ -359,7 +359,7 @@ the new database.
Usage: (get-relation db rel-name)
 
Get a relation object by name
- Source + Source

make-database

@@ -373,7 +373,7 @@ the new database. (relation :sally [:jen :becky]) (index :sally :jen) (index :sally :becky)) - Source + Source

merge-relations

@@ -381,7 +381,7 @@ the new database.
Usage: (merge-relations r1 r2)
 
Merges two relations
- Source + Source

remove-tuple

@@ -396,7 +396,7 @@ returns a new database. [rel tuple] removes the tuple from the relation. Returns the new relation. - Source + Source

replace-relation

@@ -404,7 +404,7 @@ relation.
Usage: (replace-relation db rel-name rel)
 
Add or replace a fully constructed relation object to the database.
- Source + Source

select

@@ -412,7 +412,7 @@ relation.
Usage: (select db rn pt)
 
finds all matching tuples to the partial tuple (pt) in the relation named (rn)
- Source + Source

datalog.literals


@@ -423,7 +423,7 @@ relation.
   multimethod
No usage documentation available
When passed a set of bound columns, returns the adorned literal
- Source + Source

build-atom

@@ -432,7 +432,7 @@ relation.
Returns an unevaluated expression (to be used in a macro) of an
 atom.
- Source + Source

build-literal

@@ -440,7 +440,7 @@ atom.
No usage documentation available
(Returns an unevaluated expression (to be used in macros) of a
 literal.
- Source + Source

build-seed-bindings

@@ -449,7 +449,7 @@ literal.
Given a seed literal, already adorned and in magic form, convert
 its bound constants to new variables.
- Source + Source

delta-literal

@@ -457,14 +457,14 @@ its bound constants to new variables.
Usage: (delta-literal l)
 
Given a literal l, return a delta version
- Source + Source

display-literal

multimethod
No usage documentation available
Converts a struct representing a literal to a normal list
- Source + Source

get-adorned-bindings

@@ -472,7 +472,7 @@ its bound constants to new variables.
Usage: (get-adorned-bindings pred)
 
Get the bindings from this adorned literal.
- Source + Source

get-base-predicate

@@ -480,28 +480,28 @@ its bound constants to new variables.
Usage: (get-base-predicate pred)
 
Get the base predicate from this predicate.
- Source + Source

get-cs-from-vs

multimethod
No usage documentation available
From a set of vars, get the columns
- Source + Source

get-self-bound-cs

multimethod
No usage documentation available
Get the columns that are bound withing the literal.
- Source + Source

get-vs-from-cs

multimethod
No usage documentation available
From a set of columns, return the vars
- Source + Source

join-literal

@@ -509,7 +509,7 @@ its bound constants to new variables.
No usage documentation available
Given a database (db), a literal (lit) and a seq of bindings (bs),
 return a new seq of bindings by joining this literal.
- Source + Source

literal-appropriate?

@@ -517,14 +517,14 @@ return a new seq of bindings by joining this literal.
No usage documentation available
When passed a set of bound vars, determines if this literal can be
 used during this point of a SIP computation.
- Source + Source

literal-columns

multimethod
No usage documentation available
Return the column names this applies to
- Source + Source

literal-magic?

@@ -532,21 +532,21 @@ used during this point of a SIP computation.
Usage: (literal-magic? lit)
 
Is this literal magic?
- Source + Source

literal-predicate

multimethod
No usage documentation available
Return the predicate/relation this conditional operates over
- Source + Source

literal-vars

multimethod
No usage documentation available
Returns the logic vars used by this literal
- Source + Source

magic-literal

@@ -554,7 +554,7 @@ used during this point of a SIP computation.
Usage: (magic-literal l)
 
Create a magic version of this adorned predicate.
- Source + Source

negated-literal

@@ -562,7 +562,7 @@ used during this point of a SIP computation.
Usage: (negated-literal l)
 
Given a literal l, return a negated version
- Source + Source

negated?

@@ -570,21 +570,21 @@ used during this point of a SIP computation.
Usage: (negated? l)
 
Is this literal a negated literal?
- Source + Source

negative-vars

multimethod
No usage documentation available
Returns the logic vars used in a negative position
- Source + Source

positive-vars

multimethod
No usage documentation available
Returns the logic vars used in a positive position
- Source + Source

positive?

@@ -592,7 +592,7 @@ used during this point of a SIP computation.
Usage: (positive? l)
 
Is this a positive literal?
- Source + Source

project-literal

@@ -602,7 +602,7 @@ used during this point of a SIP computation.
Project a stream of bindings onto a literal/relation. Returns a new
 db.
- Source + Source

datalog.magic


@@ -614,7 +614,7 @@ db.
   
Usage: (adorn-query q)
 
Adorn a query
- Source + Source

adorn-rules-set

@@ -623,7 +623,7 @@ db.
Adorns the given rules-set for the given query.  (rs) is a
 rules-set, (q) is an adorned query.
- Source + Source

build-partial-tuple

@@ -632,7 +632,7 @@ rules-set, (q) is an adorned query.
Given a query and a set of bindings, build a partial tuple needed
 to extract the relation from the database.
- Source + Source

magic-transform

@@ -643,7 +643,7 @@ to extract the relation from the database.
Return a magic transformation of an adorned rules-set (rs).  The
 (i-preds) are the predicates of the intension database.  These
 default to the predicates within the rules-set.
- Source + Source

seed-predicate-for-insertion

@@ -651,7 +651,7 @@ default to the predicates within the rules-set.
Usage: (seed-predicate-for-insertion q)
 
Given a query, return the predicate to use for database insertion.
- Source + Source

seed-relation

@@ -660,7 +660,7 @@ default to the predicates within the rules-set.
Given a magic form of a query, give back the literal form of its seed
 relation
- Source + Source

seed-rule

@@ -668,7 +668,7 @@ relation
Usage: (seed-rule q)
 
Given an adorned query, give back its seed rule
- Source + Source

datalog.rules


@@ -682,7 +682,7 @@ relation
   
Build a datalog rule.  Like this:
 
 (<- (:head :x ?x :y ?y) (:body-1 :x ?x :y ?y) (:body-2 :z ?z) (not! :body-3 :x ?x) (if > ?y ?z))
- Source + Source

?-

@@ -690,7 +690,7 @@ relation
Usage: (?- & q)
 
Define a datalog query
- Source + Source

all-predicates

@@ -698,7 +698,7 @@ relation
Usage: (all-predicates rs)
 
Given a rules-set, return all defined predicates
- Source + Source

apply-rule

@@ -708,7 +708,7 @@ relation
Apply the rule against db-1, adding the results to the appropriate
 relation in db-2.  The relation will be created if needed.
- Source + Source

compute-sip

@@ -718,7 +718,7 @@ relation in db-2. The relation will be created if needed.
Given a set of bound column names, return an adorned sip for this
 rule.  A set of intensional predicates should be provided to
 determine what should be adorned.
- Source + Source

display-query

@@ -726,7 +726,7 @@ determine what should be adorned.
Usage: (display-query query)
 
Return a query in a readable format.
- Source + Source

display-rule

@@ -734,7 +734,7 @@ determine what should be adorned.
Usage: (display-rule rule)
 
Return the rule in a readable format.
- Source + Source

is-safe?

@@ -742,7 +742,7 @@ determine what should be adorned.
Usage: (is-safe? rule)
 
Is the rule safe according to the datalog protocol?
- Source + Source

make-rules-set

@@ -751,7 +751,7 @@ determine what should be adorned.
Given an existing set of rules, make it a 'rules-set' for
 printing.
- Source + Source

non-base-rules

@@ -759,7 +759,7 @@ printing.
Usage: (non-base-rules rs)
 
Return a collection of rules that depend, somehow, on other rules
- Source + Source

predicate-map

@@ -768,7 +768,7 @@ printing.
Given a rules-set, return a map of rules keyed by their predicates.
 Each value will be a set of rules.
- Source + Source

return-rule-data

@@ -776,7 +776,7 @@ Each value will be a set of rules.
Usage: (return-rule-data rule)
 
Returns an untypted rule that will be fully printed
- Source + Source

rules-set

@@ -784,7 +784,7 @@ Each value will be a set of rules.
Usage: (rules-set & rules)
 
Given a collection of rules return a rules set
- Source + Source

datalog.softstrat


@@ -796,7 +796,7 @@ Each value will be a set of rules.
   
Usage: (build-soft-strat-work-plan rs q)
 
Return a work plan for the given rules-set and query
- Source + Source

get-all-relations

@@ -804,7 +804,7 @@ Each value will be a set of rules.
Usage: (get-all-relations ws)
 
Return a set of all relation names defined in this workplan
- Source + Source

datalog.util


@@ -816,7 +816,7 @@ Each value will be a set of rules.
   
Usage: (is-query-var? sym)
 
Is this a query variable: e.g. a symbol prefixed with ??
- Source + Source

is-var?

@@ -824,7 +824,7 @@ Each value will be a set of rules.
Usage: (is-var? sym)
 
Is this a logic variable: e.g. a symbol prefixed with a ?
- Source + Source

keys-to-vals

@@ -832,7 +832,7 @@ Each value will be a set of rules.
Usage: (keys-to-vals m ks)
 
Given a map and a collection of keys, return the collection of vals
- Source + Source

map-values

@@ -840,7 +840,7 @@ Each value will be a set of rules.
Usage: (map-values f hash)
 
Like map, but works over the values of a hash map
- Source + Source

preduce

@@ -852,7 +852,7 @@ parallel using f. f - a function of 2 arguments. data - a collection of hashes. - Source + Source

reverse-map

@@ -860,7 +860,7 @@ data - a collection of hashes.
Usage: (reverse-map m)
 
Reverse the keys/values of a map
- Source + Source

trace-datalog

@@ -868,7 +868,7 @@ data - a collection of hashes.
Usage: (trace-datalog & body)
 
If *test-datalog* is set to true, run the enclosed commands
- Source + Source
-- cgit v1.2.3-18-g5258