Tuesday, November 20, 2012

My Code is in the Juno release train!

I just wanted to point out that Code Recommenders, and with it Jayes, is in the Juno release train! (see http://www.eclipse.org/org/press-release/20120627_junorelease.php) How sweet is that? Code i wrote as my Bachelor's thesis is now at Eclipse :-)

The Code Recommenders feature is distributed as part of the "Eclipse IDE for Java Developers" Download at Eclipse, thus my code now lives on thousands of developer machines :-D

Friday, June 29, 2012

Minimizing Horn formulas using domain knowledge

Assume you have several implications

(x1 & x2) -> x3
(x1 & !x2) -> x3
...

As, often, you will want to query whether x3 needs to be true for different truth values of your different variables, you might want to optimize your formulas with respect to the number of literals.

For a given right-hand side variable, this is equivalent to a (DNF) logic minimization task that can be done, e.g. with the Quine-McCluskey Algorithm. As your left-hand-side formulas form a formula in DNF, the minterms of this formula are exactly those left-hand-side formulas.

The formula above can be optimised by optimizing (x1 & x2) || (x1 & !x2), which would yield the formula x1, and thus your optimized implication x1 -> x3.

What does this have to do with HornSAT? As you may have noticed, my examples are not Horn formulas. However, in practice you will sometimes model a problem as HornSAT that has additional, implicit constraints. For example, if some variable v potentially has n states, you may model this as n logical variables in your formulas.

These variables have properties that you normally don't explicity model in your formulas, because they only blow up the logical representation without helping the original problem. The property i am refering to is the assumption that v will take exactly one of it's n states, thus exactly one of the n logical variables will be true at any time.

This (also called principle of bivalence for logic) is the same property that allows logic minimization! Thus, using domain knowledge, one can, with a little alteration of "normal" logic minimization algorithms, derive domain-specific logic minimization algorithms. I did this once for extracting logical rules that were implicitly contained inside bayesian networks (didn't help for inference, but gave me the idea).

Note that, while HornSAT is an easy problem, logic minimization is hard.

Monday, May 28, 2012

Jayes 0.2.0 release

Jayes 0.2.0 is here!

I finally removed the SNAPSHOT marker from the plugin.xml and pom.xml files - which means i consider this a release version. Find it at Github

What is Jayes?


Jayes is an open-source Bayesian Network library written in pure Java. I wrote it as part of my Bachelor's thesis. It is used by the Code Recommenders project at Eclipse, where it predicts method calls for code completion. It performs very well, as i showed in my Bachelor's thesis (also available in the repository), and can compete even with native Bayesian Network libraries.

Why version it 0.2.0?


The reason the current version number is 0.2.0 is that at the point where i first wrote Jayes, the Code Recommenders project was in version 0.2.0. This version number is in no wise related to the state of the development of the library.

Features in version 0.2.0


- exact inference in Bayesian Networks with discrete-valued variables
- File formats: XMLBIF v0.3, GeNIe's XDSL format


License


Jayes is licensed under the EPL 1.0

Wednesday, April 18, 2012

Tools I don't want to miss


Inkscape

Inkscape is an open-source SVG editor. Vector graphics have many advantages over pixel graphics that can be done with e.g. GIMP, Paint etc.
I had to draw several diagrams for my bachelors thesis, and I found Inkscape offers lots of functions that make it suitable for that:
  • alignment of different objects
  • drawing perfect squares / circles (press Ctrl while you draw the shape)
  • (very important!) export to PDF and PNG format
The only thing I feel it lacks (maybe i just haven't found that function?) is something modern pixel graphics programs have: multiple layers. But apart from that, it is perfect for drawing diagrams etc. especially when you will need to scale them, as SVG is scale-independent.


Skype / VoIP

because Instant Messaging and mailing sometimes is not productive enough. I spared so much time in university by communicating with my fellow students through Skype, it's ridiculous. Which medium is best for your communication really depends on your task, but sometimes calling someone is just better than messaging!

Cygwin

Yes, i'm still a Windows user, but i can't live without my shell anymore. I do most things through my IDE or some GUI, but often enough, something needs to be automated through a script, and then i open up my cygwin shell and just love it :-)

SSH-Clients (e.g. PuTTy)

It happens more and more that I need to run stuff remotely, so...

Wednesday, March 28, 2012

Colaboration Tool: Online Screen Sharing

While this can also be done with e.g. Skype, maybe you find this useful:
http://www.screenleap.com/ allows for the sharing of screens through a browser interface. Have fun!

Sunday, January 1, 2012

The importance of secure email accounts

Email accounts are extremely vulnerable to attacks on the online identity. Why? If someone can capture an email-account, this at the same time means he gets the power to capture accounts on other websites e.g. facebook, paypal(?) etc.
This is because people tend to register one single email address for multiple other accounts, which gives attackers the power to reset passwords, and thus gain control over these other accounts. Fortunately, for some of these accounts you need to know the nickname that is registered. I don't have the statistics, but i would guess the nicknames aren't incredibly hard to guess most of the time (people probably tend to reuse those).

==> keep your email accounts safe guys (especially don't use your email password for other accounts!)