ptal / pcp

Constraint programming in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing of constraints : tell! statement

ptal opened this issue · comments

A procedural macro can be used for providing a simple declarative language for constraints such as:

tell! space {
  {x + 1 != y - z}
  {y > a}
  {Distinct(a, b, c)}
}

The idea of using {} is to have a simple way to notify the user that we do not use the traditional "imperative" store of Rust but instead using a "logic" store where variables can or not be assigned.