[bddbddb-devel] Fwd: bddbddb Examples
Status: Beta
Brought to you by:
joewhaley
|
From: Luke S. <luk...@gm...> - 2007-06-15 16:49:19
|
Thanks for the tips. I will play around with it. Also, I was thinking about a relatively simple declarative bddbddb-to-Java and Java-to-bddbddb interface. The current interface is a combination of input predicates and embedded Java code. Input predicates could be replaced with a "Java" predicate type, with certain attributes explicitly declared as input and others declared as output. A Java predicate would have the same name as a Java class that implements a special interface that takes in a collection of inputs and returns a corresponding collection of outputs. This would require mode inference to make sure that Java predicate inputs are always bound, and it would require some form of incrementalizing and memoizing boilerplate. The result would be less flexible than the current inter-language interface, but it would be more declarative and structure, requiring less work for the programmer in most cases. I am specifically thinking about the use case involving lazy scanning of classes as they are encountered via call graph discovery. If I can get up to speed on the use of embedded code, I will see if I can implement this idea via syntactic sugaring, i.e., a new language with a straightforward compilation into bddbddb and Java. On 6/14/07, John Whaley <joe...@gm... > wrote: > > Hi Luke, > > You can add code fragments to rules that is executed before or after > the rule is fired. The code is arbitrary Java code and you can access > objects like the relations and the rule itself. The rule object is > "rule", the head term is "head", each subgoal is "subgoal0", > "subgoal1", etc., the new terms added is "val", and the relations are > accessible by name. You can also add a code fragment to a relation > that is triggered when that relation changes. Check CodeFragment.java > (http://bddbddb.sourceforge.net/xref/net/sf/bddbddb/CodeFragment.html) > for more information. > > -John > > > On 6/14/07, Luke Simon <luk...@gm...> wrote: > > Which bddbddb examples is the -fly option used with and which examples > is > > -partial used with and what exactly does each option do? Also, how is > > "pafly.datalog" used? I see that it uses embedded Java code, but the > papers > > and slides on bddbddb don't describe how embedded Java in bddbddb > scripts > > works. For example, can the script declare an instance of an object, > which > > has calls made to it each time a IDB predicate changes, or is it limited > to > > calling static methods? > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > bddbddb-devel mailing list > > bdd...@li... > > https://lists.sourceforge.net/lists/listinfo/bddbddb-devel > > > > > |