Definitions
Sorry, no definitions found. You may find more data at cryptol.
Etymologies
Sorry, no etymologies found.
Support

Help support Wordnik (and make this page ad-free) by adopting the word Cryptol.
Examples
-
It appears that all we have done so far is to write a Cryptol program to recognize whether a given solution to the n-Queens problem is valid.
Planet Haskell Levent Erkok 2010
-
Without further ado, here is how we solve n-Queens in Cryptol, without writing any additional code on top of what we have already seen:
Planet Haskell Levent Erkok 2010
-
(Note that we do not have to check for negative numbers since all Cryptol numbers are non-negative.)
Planet Haskell Levent Erkok 2010
-
Having done the heavy-lifting above, we can now write the predicate that recognizes a valid n-Queens solution in Cryptol: type Solution (n) = [n]
Planet Haskell Levent Erkok 2010
-
The first command puts Cryptol in the sbv mode, which allows for the use of SAT/SMT solvers.
Planet Haskell Levent Erkok 2010
-
We would be remiss if we didn't mention some of the actual uses of the satisfiability checker in the Cryptol tool chain.
Planet Haskell Levent Erkok 2010
-
We can test this function in Cryptol, by providing sample input:
Planet Haskell Levent Erkok 2010
-
Having described how we will recognize an alleged solution, let us now consider how we can code this in Cryptol.
Planet Haskell Levent Erkok 2010
-
Given any predicate (like nQueens above), Cryptol can find inputs that will satisfy it automatically, at the push of a button!
Planet Haskell Levent Erkok 2010
-
The second command tells Cryptol to print results in base 10.
Planet Haskell Levent Erkok 2010
Comments
Log in or sign up to get involved in the conversation. It's quick and easy.