Accessible
Combinatorial Programming

  • Declare function signatures
  • Optionally: define functions explicitly
  • Post constraints over these functions
  • Reason over set of admissible functions
  • Functions are total and strongly typed along bool, int, string

= != > < >= =< + - * /
not and or xor implies

div rem abs min max count

distinct same if-then-else

Builtins

Explanation for unexpected satisfiability

Try it online at manyworlds.site

Explanation for unexpected unsatisfiability

declare drinksAlcohol: -> bool.
declare age: -> {0..150}.
age() >= 18 implies drinksAlcohol().

define drinksAlcohol() as true.
define age() as 0.

· · age() [0]
· >= [false]
· · 18

implies [true]
· drinksAlcohol() [true].

1  declare color: string -> {"r", "g", "b", "y"}.

2  declare border: string, string -> bool.

3

4  define border as {("NL","BE"), ("NL","DE"),
5  ("BE","LU"), ("BE","DE"), ("BE","FR"),
6  ("FR","LU"), ("FR","DE"), ("LU","DE")} default false.

7

8  all[ color(x)!=color(y) for x,y where border(x,y) ].

Bug: forget color "y"

BASIC BLOCKERS
Line 8: all[ color(x)!=color(y) for x,y where border(x,y) ].

DETAILED BLOCKERS
Line 8: not color("BE")=color("DE")
Line 8: not color("BE")=color("FR")
Line 8: not color("BE")=color("LU")
Line 8: not color("DE")=color("FR")
Line 8: not color("DE")=color("LU")
Line 8: not color("FR")=color("LU")

Bug: wrong use of implication

Incorrect world returned

Explain in detail why constraints hold in world

Jo Devriendt

A knowledge base

system in the spirit of

Reasoning modes (inferences)

find intersect count

@minimize @maximize @mode

Fold-Map-Filter expressions

all any none odd even count
sum product min max
distinct same