On Thu, Oct 25, 2012 at 8:32 PM, jking <
j.kenne...@gmail.com> wrote:
> I'm having trouble finding a specification of Datalog; there are lots of
> papers on it but I can't find a formal description of the language.
I don't know of a handy formal spec, although Datalog is a simple
language (also, "Datalog" is often taken as shorthand for a family of
related languages with different degrees of expressiveness).
Datalog is discussed in depth in a few textbooks; for example,
Foundations of Databases by Abiteboul, Hull, and Vianu. Looks like
there is a free version of the book online:
http://webdam.inria.fr/Alice/
To implement a version of Bud, you probably don't need an exhaustive
understanding of the Datalog literature. We basically use Datalog as
"SQL + recursion"; to ensure that recursion is used safely in
programs, use of non-monotonic constructs must be stratified.
> I'm also curious if tables/collections are even necessary -- is it possible
> to express equivalent Dedalus programs with only lattices? (For example,
> Figure 1 in Logic and Lattices for Distributed Programming -- could an
> equivalent program be written with lattices?).
Good question. Certainly the set lattice covers a lot of the common
things that you might want to use Bud collections for. When adding
support for lattices to Bloom, I didn't replace collections with
lattices for a few reasons:
(a) there was already a convenient syntax for doing relational-style
operations over collections. You could perhaps invent similar syntax
for lattices, but that would probably mean adding a notion of schemas
to lattices, which isn't always necessary (e.g., lbool or lmax don't
need a schema).
(b) the Bud collection types include channels, timers, and scratches;
Bud collections also support deletion (<- operator). In Bloom^L as it
was proposed, there is no analogous lattice-y version of this
functionality.
(c) I didn't want to break existing Bloom programs that used collections.
In the context of a new language implementation, none of those reasons
is very compelling -- it certainly might make sense to start with
lattices as the only representation of state and then see what else
you need to add along the way. One factor is how closely you'd like to
keep to the existing Bloom implementations vs. experiment with related
language designs.
Neil