This subproject is part of a repo illustrating constraint programming. This subproject illustrates solving a fairly simple cryptarithmetic puzzle using naive brute force, permutations, and constraint-programming with Choco.
Examples for this problem are also provided for Clojure, Haskell (Frege), Java, JavaScript (Nashorn), Ruby (JRuby), Python (Jython), Kotlin, Lua (Luaj), Prolog (tuprolog), and Scala.
You have the following options to run the examples:
- running locally on the command-line (see below) or in an IDE
- running via gitpod
- running as a Jupyter/BeakerX notebook (more details)
- running in the Groovy Console or Groovy Web Console
This applies to command-line execution with Gradle either locally or within gitpod, or an IDE that supports Gradle task execution.
Command-line arguments for Gradle to run the Java solution (use ./gradlew
for Unix-like systems):
gradlew :SendMoreMoney:run
Command-line arguments for Gradle to see the task names for the JavaScript and various Groovy solutions:
gradlew :SendMoreMoney:tasks --group="Application"
Then pick one of those tasks to run, e.g. to run the Groovy permutations example:
gradlew :SendMoreMoney:runSendMoreMoneyPermutations
For the other languages, choose the appropriate subproject and arguments:
gradlew :SendMoreMoneyClojure:tasks --group="Application"
gradlew :SendMoreMoneyFrege:tasks --group="Application"
gradlew :SendMoreMoneyJRuby:tasks --group="Application"
gradlew :SendMoreMoneyJython:tasks --group="Application"
gradlew :SendMoreMoneyKotlin:run
gradlew :SendMoreMoneyLuaj:tasks --group="Application"
gradlew :SendMoreMoneyProlog:run
gradlew :SendMoreMoneyScala:run
Typically run
is used if there is only one example, otherwise you will have to
pick one of the run tasks returned by the tasks
command.