1

I am reading a lot about logic programming - ASP (Answer Set Programming) is one example or this. They (logic programs) are usually in the form:

[Program 1] Rule1: a <- a1, a2, ..., not am, am+1; Rule2: ...

This set of rules is called the logic program and the s.c. model is the result of such computation - some kind of assignment of True/False values to each of a1, a2, ... There is lot of research going on - e.g. how such kind of programs (rules) can be integrated with the (semantic web) ontologies to build knowledge bases that contain both - rules and ontologies (some kind of constraints/behaviour and data); there is lot of research about ASP itself - like parallel extensions, extensions for probabilistic logic, for temporal logic and so on.

My question is - is there some kind of research and maybe some proof-of-concept projects where this analysis is extended from Boolean variables to variables with integer and maybe even float domains? Currently I have not found any research that could address the following programs:

[Program 2] Rule1 a1:=5 <- a2=5, a3=7, a4<8, ... Rule2 ... ... [the final assignment of values to a1, a2, etc., is the solution of this program]

Currently - as I understand - if one could like to perform some kind of analysis on Program-2 (e.g. to find if this program is correct in some sense - e.g. if it satisfies some properties, if it terminates, what domains are allowed not to violate some kind of properties and so on), then he or she must restate Program-2 in terms of Program-1 and then proceed in way which seems to be completely unexplored - to my knowledge (and I don't believe that is it unexplored, simply - I don't know some sources or trend). There is constraint logic programming that allow the use of statements with inequalities in Program-1, but it is too focused on Boolean variables as well. Actually - Programm-2 is of kind that can be fairly common in business rules systems, that was the cause of my interest in logic programming.

SO - my question has some history - my practical experience has led me to appreciate business rules systems/engines, especially - JBoss project Drools and it was my intention to do some kind of research of theory underlying s.c. production rules systems (I was and I am planning to do my thesis about them - if I would spot what can be done here), but I can say that there is little to do - after going over the literature (e.g. http://www.computer.org/csdl/trans/tk/2010/11/index.html was excellent IEEE TKDE special issues with some articles about them, one of them was writter by Drools leader) one can see that there is some kind of technical improvements of the decades old Rete algorithm but there is no theory of Drools or other production rule systems that could help with to do some formal analysis about them. So - the other question is - is there theory of production rule systems (for rule engines like Drools, Jess, CLIPS and so on) and is there practical need for such theory and what are the practical issues of using Drools and other systems that can be addressed by the theory of production rule systems.

p.s. I know - all these are questions that should be directed to thesis advisor, but my current position is that there is no (up to my knowledge) person in department where I am enrolled with who could fit to answer them, so - I am reading journals and also conference proceedings (there are nice conference series series of Lecture Notes in Computer Science - RuleML and RR)...

Thanks for any hint in advance!

TomR
  • 2,696
  • 6
  • 34
  • 87
  • This question is off-topic. If it's appropriate anywhere in the StackExchange network, it might be on [Theoretical CS](http://cstheory.stackexchange.com/). – Dan J May 04 '12 at 21:18

2 Answers2

1

In a sense the boolean systems already do what you suggest.

to ensure A=5 is part of your solution, consider the rules (I forget my ASP syntax so bear with me)

integer 1..100 //integers 1 to 100 exist
1{A(X) : integer(X)}1 //there is one A(X) that is true, where X is an integer
A(5) //A(5) is true

and I think your clause would require:

integer 1..100 //integers 1 to 100 exist
1{A(X) : integer(X)}1  //A1 can take only one value and must take a value
1{B(X) : integer(X)}1  //A2 ``
1{C(X) : integer(X)}1  //A3 ``
1{D(X) : integer(X)}1  //A4 ``
A(5) :- B(5), C(7), D(8) //A2=5, A3=7, A4=8 ==> A1=5

I hope I've understood the question correctly.

Jean-Bernard Pellerin
  • 12,556
  • 10
  • 57
  • 79
  • Yes, this is the line of thought that I am considering to pursue, but I am a bit afraid because it seems to me, that everything here should be done from scratch, no previous research. But if integer variables are not the first class citizens then there is one problem immediately - e.g. the heads of rules can contain many variables, not all of the rules should fire and so - variables can take different values and that means - if our domain is Integer(1..100), then we should define 100 Boolean variables to allow any assignment. And domains of business rule programms are much larger. – TomR May 04 '12 at 21:31
  • Besides, sometimes I think that any such Program-2 should be translated in the linear programming problem and be solved by means that are almost outside computer science. – TomR May 04 '12 at 21:36
  • The problem with using non-booleans is that you no longer have just on/off, you have multiple possible states for an item. But then you try to use rules like implication or int comparison that return booleans. Which might not be compatible in a pure logical solver. – Jean-Bernard Pellerin May 04 '12 at 21:37
1

Recent versions of Clojure core.logic (since 0.8) include exactly this kind of support, based on cKanren

See an example here: https://gist.github.com/4229449

Malcolm Sparks
  • 369
  • 3
  • 4