Archive for the ‘tolog’ Category

Logic and Lattices for Distributed Programming

Wednesday, January 30th, 2013

Logic and Lattices for Distributed Programming

From the post:

Neil Conway from Berkeley CS is giving an advanced level talk at a meetup today in San Francisco on a new paper: Logic and Lattices for Distributed Programming – extending set logic to support CRDT-style lattices.

The description of the meetup is probably the clearest introduction to the paper:

Developers are increasingly choosing datastores that sacrifice strong consistency guarantees in exchange for improved performance and availability. Unfortunately, writing reliable distributed programs without the benefit of strong consistency can be very challenging.


In this talk, I’ll discuss work from our group at UC Berkeley that aims to make it easier to write distributed programs without relying on strong consistency. Bloom is a declarative programming language for distributed computing, while CALM is an analysis technique that identifies programs that are guaranteed to be eventually consistent. I’ll then discuss our recent work on extending CALM to support a broader range of programs, drawing upon ideas from CRDTs (A Commutative Replicated Data Type).

If you have an eye towards understanding the future then this is for you.

Do note that the Bloom language is treated more extensively in Datalog Reloaded. You may recall that the basis for tolog (a topic map query language) was Datalog.

Linked Lists in Datomic [Herein of tolog and Neo4j]

Tuesday, August 21st, 2012

Linked Lists in Datomic by Joachim Hofer.

From the post:

As my last contact with Prolog was over ten years ago, I think it’s time for some fun with Datomic and Datalog. In order to learn to know Datomic better, I will attempt to implement linked lists as a Datomic data structure.

First, I need a database “schema”, which in Datomic means that I have to define a few attributes. I’ll define one :content/name (as a string) for naming my list items, and also the attributes for the list data structure itself, namely :linkedList/head and :linkedList/tail (both are refs):

You may or may not know that tolog, a topic map query language, was inspired in part by Datalog. Understanding Datalog could lead to new insights into tolog.

The other reason to mention this post is that Neo4j uses linked lists as part of its internal data structure.

If I am reading slide 9 (Neo4J Internals (update)) correctly, relationships are hard coded to have start/end nodes (singletons).

Not going to squeeze hyperedges out of that data structure.

What if you replaced the start/end node values with key/value pair as membership criteria for membership in the hyperedge?

Even if most nodes have only start/end nodes meeting a membership criteria, would free you up to have hyperedges when needed.

Will have to look at the implementation details on hyperedges/nodes to see. Suspect others have found better solutions.

Extending tolog

Friday, September 30th, 2011

Extending tolog by Lars Marius Garshol.


This paper describes a number of extensions that might be made to the tolog query language for topic maps in order to make it fulfill all the requirements for the ISO-standardized TMQL (Topic Map Query Language). First, the lessons to be learned from the considerable body of research into the Datalog query language are considered. Finally, a number of different extensions to the existing tolog query language are considered and evaluated.

This paper extends and improves on earlier work on tolog, first described in [Garshol01].

As you can see from some recent post here, Datalog research continues!

Ontopia now supports numbers in tolog

Monday, September 5th, 2011

Ontopia now supports numbers in tolog

Peter-Paul Kruijsen announces support for numbers in tolog:

Over the past years Ontopia was not able to work with numbers. Sorting e.g. a list of occurrence values could result in ‘123’, ’45’, ‘6’, ’78’. For one of our customers, we needed an implementation that would sort these as ‘6’, ’45’, ’78’, ‘123’, as well as an implementation for adding, subtracting, multiplying and diving numbers.

I have just committed NumbersModule to Ontopia [1]. It will be available in the upcoming 5.2.0 release. With this addition, tolog queries can now work with numbers. It supports these predicates:

  • value(string, result): Parses a string (e.g. an occurrence value) into a number. Pattern and locale are optional, e.g. to parse ‘€ 5.026,34’ for us Europeans
  • format(number, result): Formats a number into a string. Pattern and locale are optional, e.g. to format a number as ‘42.6 %’.
  • absolute(result, number): Calculates the absolute value of a number.
  • add(result, number, number): Adds numbers. Providing more than 2 input values is allowed.
  • subtract(result, number, number): Subtracts numbers. Providing more than 2 input values is allowed.
  • multiply(result, number, number): Multiplies numbers. Providing more than 2 input values is allowed.
  • divide(result, number, number): Divides numbers. Providing more than 2 input values is allowed.
  • min(result, number, number): Calculates the minimum value. Providing more than 2 input values is allowed.
  • max(result, number, number): Calculates the maximum value. Providing more than 2 input values is allowed.



See the post for full details.

Thanks Peter-Paul!