Blob Blame History Raw
Name:           csisat
Version:        1.2
Release:        2%{?dist}
Summary:        Tool for LA+EUF Interpolation

Group:          Applications/Engineering
License:        ASL 2.0
URL:            http://csisat.googlecode.com/
Source0:        http://csisat.googlecode.com/files/%{name}-%{version}.zip
# This patch has not been sent upstream.  Upstream wishes to distribute the
# picosat sources with their code.  This patch builds with the system picosat
# instead, and also adds missing dependencies so that parallel make works.
Patch0:         csisat-makefile.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  glpk-devel, ocaml, picosat-devel

# Exclude arches where ocaml is not available
ExcludeArch:    sparc64 s390 s390x

# Use the Ocaml dependency generators
%global _use_internal_dependency_generator 0
%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh

%description
CSIsat reads a set of mathematical formulas that may combine variables,
addition, multiplication, comparisons (<,>, etc.), as well as boolean
expressions (and, or, not).  It determines if it is possible to set the
variables to values so that the set of formulas are all simultaneously true
(if it can, then the set of formulas is "satisfiable").

More technically, CSIsat is an interpolating decision procedure for the
quantifier-free theory of rational linear arithmetic (LA) and equality with
uninterpreted function (EUF) symbols.  This implementation combines the
efficiency of linear programming for solving the arithmetic part with the
efficiency of a SAT solver to reason about the boolean structure.

%prep
%setup -q
%patch0

# Make sure we don't use the bundled version of picosat
rm -fr picosat-*

# Get rid of inappropriate executable bits
chmod a-x *.txt
find . -name \*.c | xargs chmod a-x

%build
make %{?_smp_mflags} \
  CFLAGS="$RPM_OPT_FLAGS -I%{_libdir}/ocaml -I%{_includedir}/glpk"

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
cp -p bin/* $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc License.txt License_Apache-2.0.txt ReadMe.txt ToDo.txt server/README
%{_bindir}/csisat
%{_bindir}/csisatServer

%changelog
* Tue Jan 19 2010 Jerry James <loganjerry@gmail.com> - 1.2-2
- Fix parallel make
- Less opaque description

* Wed Sep  2 2009 Jerry James <loganjerry@gmail.com> - 1.2-1
- Initial RPM