## LogicBlox 4.1.2

Release Date: June 2nd 2014

### What's New

LogiQL

• New `series<<>>` P2P, which allows the construction of predicates by an iterative application of a function. Current implemented functions are random-number generators (uniform, binomial, Cauchy, Poisson) and run-total (accumulating the values of a column). Please refer to the Reference Manual for more details.

Example 16.

```Successes[expr,trial]=k <- series<<k=rnd_binomial<n,p,seed>[trial]>>
R(n,p,seed,expr,trial).
```

Here, `<n,p,seed>` is the parameter vector for initializing the function, and `[trial]` is the running-index vector.

Example 17.

In this example, `[A]` is the input vector (which is given to the function in every iteration).

```runt[T,A] = V2 <- series<<V2=runtotal[A](V)>> base[T,A] = V.
```

### Note

The current implementation only supports primitive types for the series variables, as opposed to entities. This restriction will be removed in a future release.

• New `list_to_seq<<>>` P2P, which allows the conversion from ordered collections represented using linked-list style first/next predicates (a la ordered entities, `list<<>>` P2P) to an array-style representation (a la `seq<<>>` P2P).

Example 18.

```foo(_) -> .
lang:ordered(`foo).

foo:seq[i]=x -> int(i), foo(x).
foo:seq[_]=_ <- list_to_seq<<>>foo:first(_), foo:next(_,_).
```
• The restriction on predicate width to 64 attributes has been relaxed; now up to around 500 attributes are allowed in predicates, depending on their types and the data.

Measure Service

• Updates and queries in a single `Request`: It is now possible for a single `Request` message to both perform an update and query the results. Consequently, the `kind` field of the `Request` message is no longer necessary as multiple fields of the `Request` may be populated. However, `AdminRequests` must be sent alone in their own `Requests`.
• Update and query requests share parameters: The `Request` message now has a global `params` field that supercedes the `argument` field of the `QueryRequest` message. These parameters are visible from all `QueryRequests` and `UpdateRequests` in the `Request`.
• Inverse spreading: It is now possible to update and spread to metrics defined via measure rules when there are accompanying inverse formulas. Similar to the old measure engine, the measure service will search for a chain of inverse formulas that can be used to perform the update in the presence of other edits.
• Inverse formula updates: It is now possible to reinstall a rule with additional formulas. The original rule will only be overwritten if the new rule has the same name.

### Note

It is currently not possible to update the primary formula (that is currently always the first) so it is important that it be sent exactly the same as it was the first time.

• Sorting aggregation: A new sorting aggregation method has been added.
• Delta expression: The expression language has been extended with a delta operator. The delta operator allows for querying how the values in a given expression have changed during the current request. This is generally only useful if both an update and query are made in the same `Request`. The delta operator can either return those positions that have been added/updated or those positions that have been removed.

### Note

It is only possible to observe retractions on expressions that are materialized. Querying assertions is allowed on any expression, but if the expression is not materialized doing so will be effectively a no-op.

• Override expression: The expression language has been extended with an override operator, defined by the `OverrideExpr` message. Given a list of expressions that are not position-only, the override operator returns left to right, only returning values in positions if they is no value for the position in an expression to the left.

### Note

Please note that this feature is currently considered experimental and may change in a future release.

• Exponentiation operator added: The `POW` exponentiation operator has been added.
• Measure service refresh latency reduced: When refreshing the measure service’s view of the model, it is now reloaded asynchronously to better take advantage of parallelism and avoid the client blocking unnecessarily.

Performance

• The performance of TDX import and export has been improved. The performance improvement is particularly noticeable in settings with many small TDX transactions.

### Corrected Issues

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

• Credential service requests that only query information are now properly marked as read-only.

#### Installation Instructions

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

2. Extract the tarball in <YourPreferredInstallDirectory>
3. Run the following command:
```source <YourPreferredInstallDirectory>/logicblox-4.1.2/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`.

#### Deprecated Features

• Because it is now possible to perform multiple actions in a single `Request` message the `kind` field of the `Request` message is no longer makes sense. For continued backwards compatibility, it is still possible to set the `kind` field to `MODEL_QUERY` instead of setting the `model_request` field.
• The `argument` field of the `QueryRequest` message has been deprecated. Parameters should now be given in the `params` field of the `Request` message, as they will be shared among all queries and updates. It is currently still possible to place parameters in the `argument` field, but they will just internally be appended to the global parameter list.

### Release Information

Table 8.

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