John Whaley | 27 Nov 2006 19:45
Picon

Re: datalog operations allowed

Hi David,

For operations like addition and multiplication, you will need to
build up a BDD that implements that function and load it in.  For
example, for multiplication you will need to make your own BDD that
contains the multiplication table, i.e. it should have these tuples:

mult(1,1,1).
mult(1,2,2).
mult(2,1,2).
mult(2,2,4).
mult(3,1,3).
mult(3,2,6).
...

As you guessed, BDDs aren't too good at representing multiplication,
but if you limit the number (up to say, 256x256) it should be
tractable.  Addition is no problem.

Adding native support for addition would be pretty easy as the pieces
are mostly there.  Just need to edit the parser to parse it correctly:
see parseRuleTerm() in DatalogParser.java, and then use buildAdd() in
BDDDomain.java or add() in BDDBitVector.java to actually build the
addition relation.

Let me know if you have any more questions.

-John

On 11/16/06, David Brumley <dbrumley <at> cs.cmu.edu> wrote:
(Continue reading)

David Brumley | 8 Jan 2007 22:15
Picon
Favicon

Re: datalog operations allowed

Hi John,
I'm having troubles building bddbddb. Are there instructions anywhere?
If I just type 'make jikes' in bddbddb, I get:

*** Semantic Error: You need to modify your classpath, sourcepath,
bootclasspath, and/or extdirs setup. Jikes could not find package
"java.lang" in:
                .
                javabdd-2.0.jar
                jwutil-1.0.jar
                weka.jar
                jdom.jar
                .

make: *** [_jikes] Error 1

So I modify  BUILD_CLASSPATH in the Makefile to include ${CLASSPATH}.
Then I get with 'make jikes':
jikes -target 1.3
-classpath .:/usr/java/jdk1.5.0_07/jre/lib/rt.jar:.:javabdd-2.
0.jar:jwutil-1.0.jar:weka.jar:jdom.jar  <at> .source_list

Issued 1 semantic warning compiling
"net/sf/bddbddb/ir/BDDInterpreter.java":

    69.                     InferenceRule ir = (InferenceRule) o;
....<many more warnings>.....
*** Semantic Error: The type of the left sub-expression,
"net.sf.bddbddb.ir.Oper
ation", cannot possibly be an instance of type
(Continue reading)

John Whaley | 28 Feb 2007 07:12
Picon

Re: datalog operations allowed

Hi David,

jikes doesn't compile bddbddb (or a lot of other Java code).  They
have a "different" interpretation of the Java standard.  javac and
eclipse can compile it correctly.  I should remove the jikes target in
the Makefile, as it is obsolete.

-John

On 1/8/07, David Brumley <dbrumley <at> cs.cmu.edu> wrote:
> Hi John,
> I'm having troubles building bddbddb. Are there instructions anywhere?
> If I just type 'make jikes' in bddbddb, I get:
>
> *** Semantic Error: You need to modify your classpath, sourcepath,
> bootclasspath, and/or extdirs setup. Jikes could not find package
> "java.lang" in:
>                 .
>                 javabdd-2.0.jar
>                 jwutil-1.0.jar
>                 weka.jar
>                 jdom.jar
>                 .
>
> make: *** [_jikes] Error 1
>
> So I modify  BUILD_CLASSPATH in the Makefile to include ${CLASSPATH}.
> Then I get with 'make jikes':
> jikes -target 1.3
> -classpath .:/usr/java/jdk1.5.0_07/jre/lib/rt.jar:.:javabdd-2.
(Continue reading)


Gmane