LogicBlox 4.1.4

Release Date: November 3rd 2014

What's New


  • The compiler’s quantifier placement inference algorithm has been optimized, resulting in a significant improvement in compilation performance.


    As a part of this change some existing code my now trigger a VAR_UNBOUND_IN_DISJUNCT error. This is due to the same named variable being used in more than one disjunct in a rule, but not all of the disjuncts. If the intent was that the variables were supposed to be distinct, as they were considered before, the occurrences in each disjunct will need to be simply renamed.

Developer Tools

  • Removing installed blocks is now supported through the following command:
    lb removeblock <WORKSPACE> <BLOCKNAME> [... <BLOCKNAME>]


    Blocks cannot be removed if they define predicates required by other blocks outside the removal set. When removing “trivial” blocks, where blocks do not contain rules deriving into predicates that are not being removed, the operation should not trigger a full evaluation of all installed rules. However, if removed blocks are “non-trivial”, the operation may require full evaluation of the remaining installed rules.
  • Aborting long-running transactions is now supported. The following command will abort transaction identified by <TXN_ID>, on <WORKSPACE>:
    lb aborttransaction <WORKSPACE> <TXN_ID>
    To retrieve a list of active transactions in a workspace, use the following command:
    lb status <WORKSPACE> --active --debug


    It is possible to omit the workspace but then the server will have to search all workspaces to find the transaction with that id.

  • Novice users frequently perform bulk data imports using LogiQL source code, whereas the preferred and more performant way is to use Tabular Data Exchange Services. In order to discourage users from performing bulk data imports via LogiQL source code, the compiler will now report a BULK_IMPORT error on a file where an atom is inserted more than 2048 times in the head of rule (either in an IDB or delta rule).


    The check is performed before DNF, so using deeply nested disjunctions will not trigger the error. If necessary the limit can be set by using the LB_MAX_USES environment variable or the lang:compiler:maxUses[]=num pragma.


  • New uid<<>> P2P for generating unique numeric identifiers. The values generated are guaranteed to be unique among all uid<<>> invocations within the scope of a workspace. Useful in situations where you need fresh, arbitrary (but not random!) numbers, and don’t want to go to the trouble of e.g. creating an autonumbered refmode just for this purpose.

    Example 9. 

    addBlock <doc>
    a(x) -> string(x).
    b[x]=y -> string(x), int(y).
    exec <doc>
    +b[x]=y <- uid<<y>> a(x).


    │ "apple",10000000043
    │ "banana",10000000045
    │ "cherry",10000000046
    └─b [end]


    The P2P is intended to be used in delta-logic (like the example above) or non-recursive transaction/query IDB computation, where no incremental maintenance needs to be performed.

Services Framework

  • TDX now allows the customization of how data values are quoted and escaped in import and export services. Please refer to the [Reference Manual] for an overview of the file modes supported and their examples.
  • lb-web services now support a service_parameter 'commit_mode', which can be set to softcommit or diskcommit. This will determine the commit_mode of the database requests submitted.

Measure Service

  • Added support for sorting a measure by value, where the values are grouped by all but one key, and each value is mapped to an integer index in increasing order according to its sorted position within its group.
  • Metrics defined by measure language formulas can now be defined by predicates with a different name from the metric.
  • Improved normalization of dicers, filters, and aggregation groupings for more consistent code generation.

Corrected Issues

The issues listed below have been corrected since the 4.1.3 release.


  • Resolved an issue that could cause an exception when refmode conversion was used incorrectly.

Developer Tools

  • Resolved an issue where the lb web-server monitor command to log assertions and retractions for predicates had no effect when used in conjunction with a TDX service call.

Measure Service

  • Resolved issue with decimal constant normalization.
  • Histogram and mode aggregations now work with named/entity types.
  • The global measure handler now works correctly and supports model requests.
  • Resolved an issue with the internal predicate name generation, where it did not match predicates in the model.
  • Generate logic when a predicate doesn’t yet have a derivation type.
  • Resolved an issue that could cause an exception when using mutually recursive measure formulas.

Installation and Upgrade information

Installation Instructions

Installing LogicBlox 4.1.4 is as simple as following the steps outlined below:

  1. Download the installation package.
  2. Extract the tarball in <YourPreferredInstallDirectory>
  3. Run the following command:
    source <YourPreferredInstallDirectory>/logicblox-4.1.4/etc/profile.d/logicblox.sh
    NOTE: this script will set all the necessary environment variables. You might want to add this command to your .bashrc.

Upgrade Information

  • 4.1.4 includes significant internal revisions to the handling of database metadata, crucial for implementing features such as lb removeblock. As part of this change, users may notice increased memory consumption, in particular for projects having large numbers of rules and predicates. We will be reducing this overhead in subsequent releases.
  • The $ character is no longer allowed in identifiers in LogiQL.
  • If a variable is prefixed with an underscore (e.g. '_person') a VARIABLE_SOLITARY warning will no longer be issued, as was the case before for variables that were simply underscore.
  • The compiler no longer recognizes the following pragmas which are no longer relevant for LogicBlox 4.x:
    • lang:disjoint
    • lang:skolem
    • lang:lockingPolicy
    • lang:capacity / lang:physical:capacity
    • lang:physical:lineNumbers
    • lang:physical:partitioning
    • lang:physical:storageModel
    • lang:remoteRef
    • lang:roleNames
  • Query and fraction parent update transformations now require a target type in order to better support composing multiple transformations together.


    The query only needs a type if the result has values.

  • Logic is only generated for measure language formulas lazily. This change is to avoid generating and storing results for formulas that are never used at their base intersection.

Release Information

Table 6. 

Server requirements
Operating System: 64 bit Linux
Java Runtime Environment 1.7, update 11 or higher
Python 2.7 or higher