| CARVIEW |
Select Language
HTTP/2 200
date: Mon, 29 Dec 2025 20:56:14 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
etag: W/"246947d87d87d4ba8a50ca1527b729ac"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=XNObCx5b%2FpY3mcjYEjqRNJIH1wbz9DgdHr54PMj8KkSkAgVOYcY5m4YrnEo22OnX6Jn6fzA7KAme5zcRiXmbX0MUipJGYGjnMEPha4fegL9SpqPFjOitqhi%2BBTCFtDwEwbP7Tp4oedmjKVQJMLrsO9H5b2go4eWNCULsZokv%2BETLX34yJyGY6MJtK2fqyI5%2FipN%2BpSIudXZJpc15aaeMPMazRjP0ysvo3cCfeu%2FEtmx6QD26s3TvQjcM1H71bmyub9bNYU9S57YEEhgyYtEkQA%3D%3D--zYsAkimbNLWSwf%2B6--lCE0T%2FdUCHfspyoOae9%2B9Q%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.241714429.1767041774; Path=/; Domain=github.com; Expires=Tue, 29 Dec 2026 20:56:14 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Tue, 29 Dec 2026 20:56:14 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: BB94:2D673F:6776222:7BD1025:6952EAEE
GitHub - backtracking/combine: OCaml library for combinatorics
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 3
OCaml library for combinatorics
License
backtracking/combine
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
##########################################################################
# #
# Combine - an OCaml library for combinatorics #
# #
# Copyright (C) 2012-2014 #
# Remy El Sibaie #
# Jean-Christophe Filliatre #
# #
# This software is free software; you can redistribute it and/or #
# modify it under the terms of the GNU Library General Public #
# License version 2.1, with the special exception on linking #
# described in file LICENSE. #
# #
# This software is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #
# #
##########################################################################
* Library
The Combine library contains four main modules:
- Dlx: implements Knuth's dancing links
- Zdd: implements Zero-suppressed binary decision diagrams
- Emc: a common interface to modules Dlx and Zdd to solve EMC +
reduction of EMC to SAT
- Tiling: converts a 2D tiling problem into an EMC problem
Usage: the Combine library is packed into a single module Combine, installed
in the subdirectory combine/ of OCaml's standard library. Thus, it must be
used as follows:
ocamlc -I +combine combine.cma <other files>
full documentation : https://usr.lmf.cnrs.fr/~jcf/combine/
* Examples
The distribution contains several example programs:
- queens.ml: solve the N-queens puzzle
- sudoku.ml: well, you haved guessed already
- color.ml: 4-color planar graphs using DLX and SAT (requires OCamlgraph
and an explicit 'make color.opt')
* Tiling language and interpreter
In addition to the library, Combine provides a language to describe 2D tiling
problems and an interpreter (combine) for this language.
Directory tests/ contains various examples of tiling problems (.cmb files).
To execute such a test, just run "combine" on the file.
The grammar of the tiling language is the following:
<file> ::= | decl ... decl
<decl> ::=
| pattern <identifier> = <expr>
| tiles <identifier> = <tile_list>
| problem <identifier> equal <expr> tl = tiles
| assert b = boolean_expr
| print <identifier>
| solve a = algo <identifier> out = output
| count a = algo <identifier>
| dimacs <identifier> <string>
| debug st = state
| timing st = state
| exit
| include <string>
algo ::=
| dlx
| zdd
| sat <string>
state ::=
| on
| off
option ::=
| one
| maybe
| sym
| rot
tiles ::=
| <tile_list>
| <identifier>
tile_list ::=
| [ tile, ..., tile ]
output ::=
| svg_out <string>
| ascii_out
isometry ::=
| id
| rot90
| rot180
| rot270
| vertrefl
| horizrefl
| diag1refl
| diag2refl
tile ::=
| <expr> o = list(option)
expr ::=
| lpar <expr> rpar
| <identifier>
| constant <dim> <bool>
| union <expr> <expr>
| inter <expr> <expr>
| diff <expr> <expr>
| xor <expr> <expr>
| <expr> minus <expr>
| <expr> ampamp <expr>
| <expr> barbar <expr>
| <expr> hat <expr>
| set <expr> <dim> <bool>
| crop <dim> <dim> <expr>
| shift <expr> <dim>
| resize <expr> <dim>
| apply <isometry> <expr>
| <ascii>
bool ::=
| false
| true
boolean_expr::=
| <bool>
| <expr> equal <expr>
About
OCaml library for combinatorics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
You can’t perform that action at this time.