Navigation Menu

Skip to content

xcsp3team/XCSP3-Java-Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XCSP3-Java-Tools v2.4

This library provides:

  • a parser written in Java 8 for XCSP3 instances ; see miniguide
  • a tool for checking solutions (and bounds) of XCSP3 instances ; see miniguide

A C++ parser is available in its own repository.

A Python library for modeling, called PyCSP3, is also independently available. For the current version of PyCSP3, v2.2, December 2023, note that:

  • a website including more than 60 Jupyter notebooks can be found at pycsp.org.
  • the code is available on Github
  • a well-documented guide is available
  • PyCSP3 is available as a PyPi package here
  • a GitHub repository with more than 340 models is available at pycsp3-models

1) Documentation

Information about XCSP3 can be found at xcsp.org.

For details about these tools, see the documents referenced below.

Java Parser

See the miniguide in file parserJava1-2.pdf.

Solution Checker

See the miniguide in file checkerJava1-1.pdf.

2) Obtaining Binary and Sources of XCSP3 Tools

Maven Artifact

You can get it at the Central Repository. Currently, this is:

<dependency>
  <groupId>org.xcsp</groupId>
  <artifactId>xcsp3-tools</artifactId>
  <version>2.5</version>
</dependency>

Directly Building a JAR with Maven

  1. Clone the repository : git clone https://github.com/xcsp3team/XCSP3-Java-Tools.git
  2. Change directory : cd XCSP3-Java-Tools
  3. Run Maven : mvn package -Dmaven.test.skip=true (of course, you need Maven to be installed)
  4. Test the JARs in the directory 'target'. For example, while choosing the right value for X-Y-Z,
  • java -cp target/xcsp3-tools-X-Y-Z.jar org.xcsp.modeler.Compiler. If the usage of the compiler is displayed, you are fine.

You can also directly hit a main method:

  • java -jar target/xcsp3-compiler-X-Y-Z.jar
  • java -jar target/xcsp3-solutionChecker-X-Y-Z.jar
  • java -jar target/xcsp3-competitionValidator-X-Y-Z.jar

Directly Building a JAR with Gradle

  1. Clone the repository : git clone https://github.com/xcsp3team/XCSP3-Java-Tools.git
  2. Change directory : cd XCSP3-Java-Tools
  3. Run Gradle : gradle build -x test (of course, you need Gradle to be installed)
  4. Test the JAR : java -cp build/libs/xcsp3-tools-X-Y-Z.jar org.xcsp.modeler.Compiler (choose the right values for X-Y-Z) If the usage of the compiler is displayed, you are fine.

With this JAR, you can run the compiler (JvCSP3) and the solution checker. See details in the documents, referenced above.