
==============================
About KIND
==============================

KIND is a k-induction based model checker for Lustre programs.  The KIND
included in this distribution can only handle single-node Lustre programs.

This distribution includes the following tools:

 * kind : a sequential k-induction based model checker for Lustre programs (single property)
 * kind-inv : an offline invariants generator for Lustre programs
 * pkind : an incremental and parallel k-induction based model checker for Lustre programs (multiple properties)


=============
Prerequisites
=============

Kind relies on the following systems/solvers:

1. OCaml (version 3.11.2 or greater). More information can be found at http://www.ocaml.org

2. An MPI implementation: 
    * OPENMPI (http://www.open-mpi.org/)
    * MPICH2  (http://www.mcs.anl.gov/research/projects/mpich2/)

3. A compatible SMT solver, including
     * Yices, available at http://yices.csl.sri.com/
         Get the latest version, with GMP statically linked
         (this requires a click-through license agreement)
     * CVC3, available at http://www.cs.nyu.edu/acsys/cvc3/ 
         (version 1.5 or later)

4. Kind relies on the following OCaml libraries:

  * ExtLib: Extended library for OCaml
  * OcamlMpi: Mpi wrapper for OCaml


If you don't have the above mentioned items, please download the
source code of KIND and follow the INSTALL instruction.


============
SMT Solvers
============

It is possible to use either the CVC3 pre-compiled executable or to compile
your own version.  Similarly, with a command flag, it is possible to use
the pre-compiled Yices executable.

The default operation of Kind uses a wrapper version of the Yices solver.
The wrapper is written in C and, when compiled, calls the Yices (statically
linked) library.  (Yices' command line version's interactive mode is limited 
in the size of formulas it can accept).  Depending on the version of Yices 
you use, you may need to upgrade your compiler version.


==================================================
Lustre files supported by KIND
==================================================

KIND currently does not support included files, and there can be no
forward references of nodes.  There is only very limited support for
non-linear arithmetic, records, and the "when" operation.  We do not
support arrays, recursive calls, or user-defined types at this time.

For integer constants, only those with up to nine digits are supported.
For floating-points numbers, only up to nine digits can appear right or
left of the decimal point.  Floating-points number of the form 0.000000E+00
are supported.

Properties to be checked should appear in special comment lines in the body
of the topmost node:

  --%PROPERTY <lustre property>

where <lustre property> is a Lustre Boolean expression, ending with a
semicolon.  Multiple property lines are conjoined.

Moreover KIND allows the verification of multiple properties in an
incremental fashion. More information about this feature can be found
in 'Multi-Property-README' file.


=============
Running KIND
=============

To run PKIND with incremental invariant generation: 

  mpiexec -np 3 pkind <options> [LUSTRE FILE]


To run PKIND with invariant generation and the verification of multiple properties in an incremental fashion:

  mpiexec -np 3 pkind -multi <options> [LUSTRE FILE]


To run PKIND with invariant generation, where the invariant generation is not generated incrementally:

  mpiexec -np 3 pkind -no_incremental <options> [LUSTRE FILE]


To run PKIND without invariant generation:

  mpiexec -np 2 pkind <options> [LUSTRE FILE]


To run sequential KIND:

   kind <options> [LUSTRE FILE]


To run the offline invariant generator:

   kind-inv -inv_int [and/or -inv_bool]  <options> [LUSTRE FILE]



=======
Contact
=======

For more information please contact:
    Temesghen Kahsai (temesghen-kahsaiazene@uiowa.edu) 
or Cesare Tinelli (cesare-tinelli@uiowa.edu).
