PBES Rewriters
Wieger Wesselink, Tim Willemse, Thomas Neele
This document describes several rewriters on PBES expressions. We assume that a data
rewriter is given that rewrites data expressions.
Simplifying rewriter
We define a simplifying PBES rewriter recursively as follows. We assume
that
is a non-empty data type, and we denote the free variables
appearing in
as
. We assume that a data
rewriter
is given that rewrites data terms.
where and
are arbitrary PBES expressions,
is a data
term of data sort
,
and
are elements of data sort
,
is a predicate variable,
consists of zero or more data
sorts and
is a data variable of sort
.
Simplify
The PBES expression rewrite system Simplify [Luc Engelen, 2007] consists of the following rules [1]:
PFNF rewriter
Definition
A predicate formula is said to be in Predicate Formula Normal Form (PFNF) if it has the following form:
where (
is a countable set of sorted predicate
variables),
,
is a (possibly
empty) finite index set, each
is a non-empty finite index set, and
and every
are simple formulae.
Note that here is used to index a set of occurrences of not
necessarily different variables. For instance,
is a formula complying with the
definition of PFNF. So long as it does not lead to confusion, we stick to the
convention to drop the typing of the quantified variables
. An
algorithm to compute a PFNF is:
where
under the assumption that and
are disjoint, and
for all
.
OnePointRule quantifier elimination rewriter
The function computes a set of equalities and inequalities for an
expression
, such that the following holds:
for some expression .
The function is inductively defined as follows:
where is a boolean data variable,
is an arbitrary data variable,
is a boolean data expression,
is the set of all equalities and
inequalities (so it is the idempotent element for
) and
We define the OnePointRule rewriter inductively as follows:
Quantifier inside rewriter
This rewriter was originally specified by Jan Friso Groote. We define a rewriter that pushes universal and existential quantifiers into an expression. A typical example is
which is rewritten to
If quantifiers are pushed inside formulas as much as possible, quantifier elimination leads to smaller expressions and the one-point rewriter is more often applicable. There might be cases where the application of this push-quantifiers-inside rewriter can also have adverse effects.
Below the definition of the rewrite rules are given. It is assumed that it is
cheap to obtain the free variables in each term, which are denoted by
for a term
. If not, care needs to be taken as in the
formulation below — calculating the variables of each term recursively on a
by-need basis can be very expensive.
Let be a PBES expression. We define
using the functions
and
where
is a set of typed
variables. The definition of
employs the structure of a formula:
Here is a set of typed variables.
The function is defined as
where
The function is defined as
where
Quantifier expansion rewriter
Conjunctions and disjunctions
The function computes a sequence of conjunctions and disjunctions for
an expression
, such that the following holds:
The function is inductively defined as follows:
with
Note
This rewriter has not been implemented yet.