Skip to content

Latest commit

 

History

History

SendMoreMoney

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Cryptarithmetic

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.


The problem

SendMoreMoney


The solutions

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.

Languages

Running the examples

You have the following options to run the examples:


Execution via Gradle

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.