Skip to content

Commit

Permalink
Update 'CHANGELOG.md' for the latest v2.0.0-beta changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Dec 1, 2023
1 parent b538684 commit 2c1d0c9
Showing 1 changed file with 63 additions and 38 deletions.
101 changes: 63 additions & 38 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
## New Features

- Added new overloads for many functions of Adiar's API that use [1] (pure)
label predicates, [2] (stateful) label generator functions (coroutines), and
[3] iterators. For example, `bdd_exists` is now overloaded with the following
label *predicates*, [2] (stateful) label *generator* functions, and [3]
*iterators*. For example, `bdd_exists` is now overloaded with the following
alternatives

- `bdd_exists(f, pred)`: quantify all variables *i* in *f* where *pred(i)*
evaluates to true.

- `bdd_exists(f, gen)`: quantify all variables *i* generated by *gen()*. Here
it is important that *gen()* provides the variables in descending order.
- `bdd_exists(f, gen)`: quantify all variables *i* generated by *gen()*. Here,
*gen()* must provides the to-be quantified variables in descending order.

- `bdd_exists(f, begin, end)`: quantify all variables *i* from *begin* to
*end* (assuming these are sorted in descending order).
Expand All @@ -23,36 +23,63 @@
iterators as an argument, such that they are compatible with any data
structure you desire.

- `domain_set(...)` Add overload to set domain given a number of variables, a
*generator*, or an *iterator*.
- `domain_set(...)` Add overload to set the global domain given a number of
variables, a *generator*, or an *iterator*.

- BDD and ZDD operations now optionally take an `exec_policy` its first
argument. This can be used to set parameters for the algorithms to non-default
values.

- Added `bdd_top()` and `bdd_bot()` together with `zdd_top(...)` and
`zdd_bot(...)` to provide a more uniform interface to quicky switch from BDDs
to ZDDs (and vica versa).

- Added `bdd_iscube(f)` and `zdd_ispoint(A)` predicates. Furthermore, added
`bdd_cube(...)` and `zdd_point(...)` as aliases of the relevant BDD
construction function.

- Added `bdd_isvar(f)`, `bdd_isithvar(f)`, `bdd_isnithvar(f)` predicates.

- The functions `bdd_and(...)` and `bdd_or(...)` now support negated variables.
This can either be parsed as a boolean flag or by negating the label.

- Added *<adiar/version.h>* with the library's version number as compile-time
known and inlinable integers and strings.

## Optimisations

- The `access_mode` enum has been added as a new global setting. If set to
*AUTO* or to *Random_Access* then `bdd_apply`, `zdd_binop`, and their
derivatives will use random access on one of the input (if possible). This
- The algorithms `bdd_apply`, `zdd_binop`, and their derivatives now use a
level-by-level random access on one of the input (if possible). This
circumvents using an entire priority queue, thereby drastically improving
performance. This is especially beneficial when applying an operator to a very
large decision diagram together with a narrow one.

- Added proper algoritms for the quantification of multi-variable
quantificiation. To this end, there are now three separate algorithms. The
`quantify_mode` enum can be used to pick what algorithm to use (the default is
a heuristic that picks between all three algorithms)
With `exec_policy::access` one can turn this optimisation off and/or force it
to always be used.

1. The *v1.x* approach of quantifying a single variable at a time still
persists (`quantify_mode::Singleton`).
- The functions `bdd_equal` and `zdd_equal` terminate in constant time, if the
width of the two decision diagrams are not the same.

- Added proper support for quantification of multiple variable. To this end, we
have implemented three separate algorithms. One can use
`exec_policy::quantify` to pick between the three:

1. The *v1.x* approach of quantifying a single variable at a time is still
available (`exec_policy::quantify::Singleton`).

2. The *v1.x* algorithm has been generalized to (partially) handle multiple
variables at once in a single sweep (`quantify_mode::Partial`).
variables at once in a single sweep (`exec_policy::quantify::Partial`).
Furthermore, this generalized sweep can be rerun on its own unreduced
result (skipping the possibly costly and unecessary Reduce sweep).

3. Implemented the *nested sweeping* framework to add support for an
I/O-efficient simulation of BDD operations that (may) recurse on
intermediate results. This provides a completely new multi-variable
quantification operations that is similar to the one in other BDD packages
(`quantify_mode::Nested`).
(`exec_policy::quantify::Nested`).

By default, one or more of the above algorithms are used in conjunction
(`exec_policy::quantify::Auto`).

## Bug Fixes

Expand All @@ -66,10 +93,10 @@
## Breaking Changes

There has been a major rewrite of the internal logic of Adiar to pay off
technical debt and to get Adiar ready for implementing the I/O-efficient version
of the much more complex BDD operations. At the same time, this also brings
Adiar much closer to support other types of decision diagrams (e.g. QMDDs) and
to store BDDs on disk and loading them again later.
technical debt and to get Adiar ready for an I/O-efficient implementation of the
much more complex BDD operations, e.g. multi-variable quantification. At the
same time, this also brings Adiar much closer to support other types of decision
diagrams (e.g. QMDDs) and to store BDDs on disk and loading them again later.

- All internal logic in *<adiar/internal/...>* has been moved into its nested
namespace `adiar::internal`. If you use anything from this namespace (e.g. the
Expand All @@ -80,16 +107,9 @@ to store BDDs on disk and loading them again later.
`{prefix}_{nocase}` naming scheme. For example, `adiar::adiar_set_domain(...)`
has been renamed into `adiar::domain_set(...)`.

- Fundamental data types in *<adiar/data.h>* have been moved to each their own
file (most of which are placed in the *<adiar/internal/data_types/...>*).
These have been converted from C-like structs with manipulating functions to
C++ (immutable) classes. That is, the entire interface for *node*, *arc* etc.
have completely changed.

- Files, streams and their writers have been moved, rewritten, and renamed.
Since the v2.0 API uses *predicates* and *generator* functions, Adiar's files
do not need to be used directly. Hence, these have been delegated to the
*adiar::internal* namespace.
Since newly added *predicates* and *generator* functions superseed any use of
`adiar::file<...>`, all file-based overloads have been removed.

That is, this rewrite only results in breaking changes if you have been
interacting with Adiar's files directly, e.g. you have used the `bdd_restrict`,
Expand All @@ -107,16 +127,21 @@ Other breaking changes are:
`zdd_singleton` function.

- `bdd_satmin(f)` and `bdd_satmax(f)`, resp. `zdd_minelem(A)` and `zdd_maxelem(A)`:
- The return type when called without a *callback function* has been turned
into a `bdd`, resp. `zdd`. This ought to make their return type more usable
in a symbolic context.
- The return type when called without a *consumer* or iterators has been
turned into a `bdd`, resp. `zdd`. This ought to make their return type more
usable in a symbolic context.

- Semantics has changed such that it only reports the variables on the path
traversed in the decision diagram. That is, if a level is skipped on some
path, then that variable is also skipped in the output.

- Renamed `bdd_varprofile(...)` to `bdd_support(...)` (and the ZDD variant
similarly). This improves its discoverability and better reflects its content.

- Semantics has been changed if the global domain has been set. If so, then it
will return the assignment to the variables in the domain rather than
specifically the levels present in the BDD.
- The `memory_mode` enum introduced in *v1.2* on/off has been moved to
`exec_policy::memory`.

- Every deprecated function from *v1.x* that was moved to *<adiar/deprecated.h>*
has been removed.
- All deprecated function from *v1.x* have been removed.

- The two-level granularity of statistics has been removed. If you want to
compile Adiar with statistics you just have to set the CMake variable
Expand Down

0 comments on commit 2c1d0c9

Please sign in to comment.