Datalog (i.e., function-free logic) programs with monotonicity constraints on extensional predicates are considered. A monotonicity constraint states that one argument of a predicate is always less than another argument, according to some partial order. Relations of an extensional database are required to satisfy the monotonicity constraints imposed on their predicates. More specifically, a partial order is defined on the domain (i.e., set of constants) of the database, and every tuple of each relation satisfies the monotonicity constraints imposed on its predicate. An algorithm is given for inferring all monotonicity constraints that hold in relations of the intensional database from monotonicity constraints that hold in the extensional database. A complete inference algorithm is also given for disjunctions of monotonicity and equality constraints. It is shown that the inference of monotonicity constraints in programs is a complete problem for exponential time. For linear programs, this problem is complete for polynomial space.
Alexander BrodskyYehoshua Sagiv
Laurent FribourgMarcos Veloso Peixoto