From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 2FFE87EEB2 for ; Mon, 28 Jan 2013 19:06:24 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yoann.padioleau@gmail.com) identity=pra; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yoann.padioleau@gmail.com"; x-sender="yoann.padioleau@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yoann.padioleau@gmail.com designates 209.85.212.176 as permitted sender) identity=mailfrom; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yoann.padioleau@gmail.com"; x-sender="yoann.padioleau@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f176.google.com) identity=helo; client-ip=209.85.212.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yoann.padioleau@gmail.com"; x-sender="postmaster@mail-wi0-f176.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkBAD69BlHRVdSwjWdsb2JhbABEq3ySUQgWDgEBAQEJCQsJEgYjgh4BAQVAARsSCwEDDAYFCw0NISIBEQEFAQoSBhMSh2wBAw8MoXiMM4J7hDUKGScDClmIdgEFDJEZA4hhjSyBHI1LFimEOg X-IPAS-Result: AvkBAD69BlHRVdSwjWdsb2JhbABEq3ySUQgWDgEBAQEJCQsJEgYjgh4BAQVAARsSCwEDDAYFCw0NISIBEQEFAQoSBhMSh2wBAw8MoXiMM4J7hDUKGScDClmIdgEFDJEZA4hhjSyBHI1LFimEOg X-IronPort-AV: E=Sophos;i="4.84,553,1355094000"; d="scan'208";a="270967" Received: from mail-wi0-f176.google.com ([209.85.212.176]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Jan 2013 19:08:20 +0100 Received: by mail-wi0-f176.google.com with SMTP id hm14so616185wib.3 for ; Mon, 28 Jan 2013 10:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=KBKwpzegVcqKkLZSw/FKGhrzUp1136MWIQ8zrJqDPXo=; b=Y/0AwJRoFRM168XiK8E7tRh7B8fQXAEzDjJHzU3Pps2hxa4vtFjE/hvNEm3FFMrvR9 E8wbJ+w95/wdpQ8T1WJy7HAdU6u1tZKss/+/SMihUJ6VTmpIduuDJmSMz9FbQgwo3eS+ f66bZsy4dE/yjQv8l9KbXFaR+BmBcakbtiTjthEqn/do99A5cVNVnS4HUmTHqa8QbEfm R8UQh9PZD83tJdgoz4wXulGW8nUVXA5VcqHhaOrYIL24OHuz7J3Y1PT7Lms/+GdGCUGb Be/XQd3dr+tqGjMCT3roCgobs5xGVlq28PP+IIKZetjELWrxtYZr/tjoBG0lgRRrgMPi JkzQ== MIME-Version: 1.0 X-Received: by 10.195.13.200 with SMTP id fa8mr23005806wjd.15.1359396383209; Mon, 28 Jan 2013 10:06:23 -0800 (PST) Received: by 10.194.16.71 with HTTP; Mon, 28 Jan 2013 10:06:23 -0800 (PST) In-Reply-To: <51065CFC.8010508@m4x.org> References: <51065CFC.8010508@m4x.org> Date: Mon, 28 Jan 2013 10:06:23 -0800 Message-ID: From: yoann padioleau To: Simon Cruanes Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] [ANN] Datalog-0.1 Hi, How does it compare in terms of performance with other datalog engines? On Mon, Jan 28, 2013 at 3:11 AM, Simon Cruanes wrote: > Hello, > > I'm pleased to announce the first (alpha) release of Datalog, a small > fixpoint engine for the Datalog fragment of logic > (http://en.wikipedia.org/wiki/Datalog) written in OCaml. The library is > designed to be used to compute fixpoints of rules, incrementally. It is > available under the BSD license at https://github.com/c-cube/datalog . > > Both a command-line fixpoint computation tool and a functorial library > are provided. Input files have a prolog-like syntax, but without > function symbols. The command line tool works like this (the example > computes the transitive closure of a graph, and then cliques within this > transitive closure): > > $ cat tests/clique10.pl > reachable(X,Y) :- edge(X,Y). > reachable(X,Y) :- edge(X,Z), reachable(Z,Y). > same_clique(X,Y) :- reachable(X,Y), reachable(Y,X). > edge(0, 1). % edge from 0 to 1 > edge(1, 2). > edge(2, 3). > edge(3, 4). > edge(4, 5). > edge(5, 0). > edge(5, 6). > edge(6, 7). > edge(7, 8). > edge(8, 9). > edge(9, 10). > edge(10, 7). > > $ ./datalog_cli.native tests/clique10.pl -pattern 'same_clique(1,X)' > % start datalog > % parse file tests/clique10.pl > % process 15 rules > % computing fixpoint... > % done. > % facts matching pattern same_clique(1, X1): > same_clique(1, 0). > same_clique(1, 1). > same_clique(1, 3). > same_clique(1, 2). > same_clique(1, 5). > same_clique(1, 4). > % max_heap_size: 126976; minor_collections: 0; major collections: 0 > > The library provides a functor that allows one to create rules (Datalog > clauses), and add them to a structure that computes their fixpoint > incrementally (i.e., the fixpoint is updated after each rule is > inserted). Callbacks can be associated to symbols, to be called whenever > a fact is derived. > > Feedback, comments, or bug reports are very welcome! > > Cheers, > > -- > Simon Cruanes > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs