package datalog

  1. Overview
  2. Docs
An in-memory datalog implementation for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

datalog-0.7.tbz
sha256=13ca520bddf4f0c44d1468bc89347be72ec543be58fff29469a0da24956be541
sha512=25d6e9cb5abe8aa1110730d884abb9e51ae78bf681b3f21709efa32359b9cbdd97d9076761c91562580c090cbce12ce159c97533ae5d9d427c24cb329e950793

doc/datalog.top_down/Datalog_top_down/MakeParse/index.html

Module Datalog_top_down.MakeParseSource

Parameters

module C : PARSABLE_CONST
module TD : S with type Const.t = C.t

Signature

Sourcetype term = TD.T.t
Sourcetype lit = TD.Lit.t
Sourcetype clause = TD.C.t
Sourcetype name_ctx = (string, term) Hashtbl.t
Sourceval create_ctx : unit -> name_ctx
Sourceval term_of_ast : ctx:name_ctx -> AST.term -> term
Sourceval lit_of_ast : ctx:name_ctx -> AST.literal -> lit
Sourceval clause_of_ast : ?ctx:name_ctx -> AST.clause -> clause
Sourceval clauses_of_ast : ?ctx:name_ctx -> AST.clause list -> clause list
Sourceval parse_chan : in_channel -> [ `Ok of clause list | `Error of string ]
Sourceval parse_file : string -> [ `Ok of clause list | `Error of string ]
Sourceval parse_string : string -> [ `Ok of clause list | `Error of string ]
Sourceval clause_of_string : string -> clause

Parse a clause from a string, or fail. Useful shortcut to define properties of relations without building terms by hand.

  • raises Failure

    if the string is not a valid clause

Sourceval term_of_string : string -> term
  • raises Failure

    if the string is not a valid term

OCaml

Innovation. Community. Security.