All Projects → xcsp3team → XCSP3-Java-Tools

xcsp3team / XCSP3-Java-Tools

Licence: MIT license
XCSP3 Tools in Java

Programming Languages

java
68154 projects - #9 most used programming language

XCSP3-Java-Tools v2.0.1

IMPORTANT: For the 2022 XSCP3 Competition, you can use Version 2.0.1 (available on Maven Central)

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
  • JvCSP3, an API to build models of combinatorial constrained problems; these models can be compiled in order to generate XCSP3 instances (files) ; 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, v2.0, December 2021, note that:

1) Documentation

Information about XCSP3 can be found at www.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.

Java-based Modeler (Java-based API called JvCSP3)

See the miniguide in file JvCSP3v1-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.0</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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].