Logic programming with integer or even floating point domains
The first question can be solved by googling integer logic programming.

http://en.wikipedia.org/wiki/Constraint_logic_programming

The second question is called the theory of expert programming. I was also able to google this.

http://en.wikipedia.org/wiki/Expert_system

There is a practical need for expert systems and rule based systems. They are used in many domains as you can see from here.

http://en.wikipedia.org/wiki/Expert_system#Examples_of_applications