OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | sat4j-dev List | November 2007 Index

<--  Date Index  --> <--  Thread Index  -->

[sat4j-dev] On the way to SAT4J 2.0


Dear SAT4J users and developers,

I continued to rearrange the code.

SAT4J code is now divided into 4 modules:

- core, contains all the code necessary to embed SAT solvers into a Java application.
There is no longer any dependency with external code. The compiled code is around 135Kb big.
The command line is pretty basic : it uses the default SAT solver to solve the CNF file given as parameter.


- sat, contains the full featured command line available in SAT4J-1.7.
It has a dependency to Jakarta commons CLI and to the core module.


- pb, contains all the code related to PB solving. It does not have any depency with external code either.
It has a dependency to the core module. The compiled code is around 200Kb big.


- maxsat, contains the code related to maxsat solving. That module has a dependency to both the core and pb modules, and the jakarta commons CLI.

- csp, contains all the code related to CSP to SAT translation. The code has a dependency to both the cspxmlparser jar file and the rhino JavaScript compiler.

I added to the files section a 2.0 RC1 binary release.

Your feedback is welcome.

Cheers,

   Daniel

PS: I include a new build file to build the various jar files with the new organisation.

--
          Daniel Le Berre mailto:leberre@xxxxxxxxxxxxxxxxxxx
          MCF,    CRIL-CNRS FRE 2499,    Universite d'Artois
          http://www.cril.univ-artois.fr/~leberre

<project name="sat4j" default="all">
	<property name="build" value="bin" />
	<property name="doc" value="api" />
	<property name="target" value="1.5"/>

	<target name="pseudo" depends="core" description="Build a jar file suitable for the PB evaluations from CVS">
		<echo>Building Pseudo Boolean Solver</echo>
		<antcall target="build">
		   <param name="package" value="pb"/>
		   <param name="src" value="pb/src" />
                   <param name="lib" value="core/lib"/>
                   <param name="jarname" value="sat4j-pb"/>
		   <param name="mainclass" value="org.sat4j.LanceurPseudo2007"/>
                </antcall>
	</target>

        <target name="maxsat" depends="pseudo" description="Build a jar file suitable for the MaxSAT evaluations from CVS">
		<echo>Building MAXSAT Solver</echo>
                <antcall target="build">
		   <param name="package" value="maxsat"/>
		   <param name="src" value="maxsat/src" />
                   <param name="lib" value="maxsat/lib"/>
		   <param name="jarname" value="sat4j-maxsat"/>
		   <param name="mainclass" value="org.sat4j.GenericOptLauncher"/>
		</antcall>
	</target>

	<target name="csp" depends="core" description="Build a jar file suitable for the CSP competitions from CVS">
		<echo>Building CSP Solver</echo>
                <antcall target="build">
		   <param name="package" value="csp"/>
		   <param name="src" value="csp/src" />
                   <param name="lib" value="csp/lib"/>
                   <param name="jarname" value="sat4j-csp"/>
		   <param name="mainclass" value="org.sat4j.CSPLauncher"/>
		</antcall>
	</target>

	<target name="sat" depends="core" description="Build a jar file suitable for experimenting with SAT solvers from CVS">
		<echo>Building Default SAT Solvers</echo>
                <antcall target="build">
		   <param name="package" value="sat"/>
		   <param name="src" value="sat/src" />
                   <param name="lib" value="sat/lib"/>
                   <param name="jarname" value="sat4j-sat"/>
		   <param name="mainclass" value="org.sat4j.Lanceur"/>
		</antcall>
	</target>

	<target name="core" depends="clean" description="Build a jar file suitable for embedding SAT technology into a Java application from CVS">
		<echo>Building core library to be embedded into Java applications</echo>
                <antcall target="build">
		   <param name="package" value="core"/>
		   <param name="src" value="core/src" />
                   <param name="lib" value="core/lib"/>
                   <param name="jarname" value="sat4j-core"/>
		   <param name="mainclass" value="org.sat4j.BasicLauncher"/>
		</antcall>
	</target>

	<target name="sudoku" depends="core" description="Build the sudoku demo from CVS">
		<echo>Building Sudoku app ${java.home}</echo>
		<antcall target="build">
			<param name="package" value="sudoku"/>
			<param name="src" value="sudoku/src"/>
                        <param name="lib" value="sudoku/lib"/>
                        <param name="jarname" value="sudoku"/>
			<param name="mainclass" value="org.sat4j.apps.sudoku.SDApplication"/>
		</antcall>
	</target>

	<target name="prepare">
		<!-- Create the time stamp -->
		<tstamp/>
		<echo>Creating build and doc directories</echo>
		<mkdir dir="${build}" />
		<mkdir dir="${doc}" />
	</target>

	<path id="somePath">
		<pathelement location="${build}"/>
		<fileset dir="${lib}">
			<include name="*.jar"/>
		</fileset>
		<pathelement location="${java.home}/lib/javaws.jar"/> 
	</path>

	<target name="javadoc">
		<echo>Generating Javodoc</echo>
		<javadoc destdir="${doc}" 
				 access="public" 
				 source="1.5" 
				 use="true" 
				 notree="false" 
				 nonavbar="false" 
				 noindex="false" 
				 splitindex="true" 
				 author="true" 
				 version="true" 
				 nodeprecatedlist="false" 
				 nodeprecated="false" 
				 packagenames="org.sat4j.*,org.sat4j.spec.*,org.sat4j.core.*,org.sat4j.minisat.*,org.sat4j.minisat.core.*,org.sat4j.minisat.constraints.*,org.sat4j.minisat.constraints.cnf.*"
				 sourcepath="${src}" 
				 overview="${src}/overview.html" 
				 doctitle="SAT4J: a SATisfiability library for Java">
				 <classpath refid="somePath"/>
		</javadoc>
	</target>

	<target name="build" depends="prepare,getsource">
		<echo>Compiling source code ${src} using target ${target}</echo>
		<javac
		srcdir="${src}"
		destdir="${build}"
		source="1.5"
		target="${target}"
	>
			<classpath refid="somePath"/>
		</javac>
		<copy file="${src}/${jarname}.version" todir="${build}" failonerror="false"/>
		<copy todir="${build}" failonerror="false">
			<fileset dir="${src}">
				<include name="**/*.properties"/>
				<include name="**/*.png"/>
				<include name="**/*.gif"/>
				<include name="**/*.jpg"/> 
				<include name="**/*.js"/>
			</fileset>
		</copy>
                <copy file="core/html/sat4j.png" todir="${build}"/>

		<jar destfile="${jarname}.jar" basedir="${build}">
			<manifest>
				<attribute name="Built-By" value="Daniel Le Berre"/>
				<attribute name="Main-Class" value="${mainclass}"/>
                                <attribute name="SplashScreen-Image" value="sat4j.png"/>
				<attribute name="Specification-Title" value="SAT4J"/>
				<attribute name="Specification-Version" value="1.5+"/>
				<attribute name="Specification-Vendor"
						   value="Daniel Le Berre"
				 />
				<attribute name="Implementation-Title" value="SAT4J"/>
				<attribute name="Implementation-Version" value="NA "/>
				<attribute name="Implementation-Vendor"
						   value="CRIL-CNRS FRE 2499"
				 />
			</manifest>
			<zipgroupfileset dir="${lib}">
                           <include name="commons*.jar"/>
			   <include name="jlf*.jar"/>
			   <include name="csp*.jar"/>
			   <include name="js.jar"/>
                        </zipgroupfileset>
		</jar>
	</target>
		
	<target name="getsource">
		<echo>Looking for the latest version of the source code on ObjectWeb forge</echo>
		<cvs cvsRoot=":pserver:anonymous@xxxxxxxxxxxxxxxxxxxxxxx/cvsroot/sat4j"
			package="${package}"
				dest="."
			  />
	</target>
	<target name="all"
				depends="sat" description="Build the SAT4J library and the associated Javadoc from CVS"
			>
                        <antcall target="javadoc">
                           <param name="src" value="core/src"/>
                           <param name="lib" value="core/lib"/>
                        </antcall>
			<echo>
	You just built SAT4J from CVS. 
	The code might not be in a very good shape.
	You should take a look at http://www.sat4j.org/junit/ 
	to check that the functional tests are ok. 
	Use that snapshot at your own risk! :-=)
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	Please fill bug reports and feature requests at 
	http://forge.objectweb.org/tracker/?group_id=228
					</echo>
		</target>

	<target name="clean" description="Delete build and doc directories">
		<!-- Delete the ${build} and ${dist} directory trees -->
		<delete dir="${build}" />
		<delete dir="${doc}" />
	</target>

</project>


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.