Does anyone know if there's a datalog-like embeddable language that is suitable for simple integer constraints (the sum of a, b, c, and d must be e; e=10.,b>2.)?
But I really just want some simple constraints-oriented form validation (you have 100 points, please feel free to by x's for 1 point each, y's for a cost of 5 points. You don't have to spend all points - with feedback of how many points are left as more x and y are bought. But for more variables, where there are clear rules that can be modeled naturally as constraints rather than with state and callbacks on change).
For prolog, there's apparently https://github.com/triska/clpz/
But I really just want some simple constraints-oriented form validation (you have 100 points, please feel free to by x's for 1 point each, y's for a cost of 5 points. You don't have to spend all points - with feedback of how many points are left as more x and y are bought. But for more variables, where there are clear rules that can be modeled naturally as constraints rather than with state and callbacks on change).
Ed: specifically for forms, there's https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML... - but it feels like it gets messy with interdependent fields.