Skip to content

Commit

Permalink
for safe
Browse files Browse the repository at this point in the history
  • Loading branch information
Ce Zhang committed Sep 7, 2013
1 parent c96ba2a commit 280d406
Show file tree
Hide file tree
Showing 300 changed files with 8,350 additions and 0 deletions.
Binary file added deepdive/bin/common/Elementary.class
Binary file not shown.
Binary file added deepdive/bin/lda/Main/Main.class
Binary file not shown.
Binary file added deepdive/bin/lda/Utils/CommandOptions.class
Binary file not shown.
Binary file added deepdive/bin/python/DStruct/Extractor.class
Binary file not shown.
Binary file added deepdive/bin/python/DStruct/Factor.class
Binary file not shown.
Binary file added deepdive/bin/python/DStruct/Relation.class
Binary file not shown.
Binary file added deepdive/bin/python/DStruct/VariableGroup.class
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/python/Main/Main.class
Binary file not shown.
Binary file added deepdive/bin/python/Utils/CommandOptions.class
Binary file not shown.
Binary file added deepdive/bin/python/Utils/Config.class
Binary file not shown.
Binary file added deepdive/bin/python/Utils/DB.class
Binary file not shown.
Binary file added deepdive/bin/python/Utils/INIParser.class
Binary file not shown.
Binary file added deepdive/bin/sql/main/Main.class
Binary file not shown.
Binary file added deepdive/bin/sql/main/SQLCommandOptions.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/db/RDB$1.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/db/RDB.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/db/SQLMan.class
Binary file not shown.
8 changes: 8 additions & 0 deletions deepdive/bin/tuffy/db/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>package</title>
</head>
<body>
Provides interfaces to the RDBMS. Currently only supports PostgreSQL.
</body>
</html>
Binary file added deepdive/bin/tuffy/ground/Grounding.class
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/ground/KBMC$AtomCutSet.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/ground/KBMC.class
Binary file not shown.
28 changes: 28 additions & 0 deletions deepdive/bin/tuffy/ground/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<html>
<head>
<title>package</title>
</head>
<body>
Provides facilities for grounding MLNs, including KBMC, SQL-based grounding, and MRF partitioning.

<p>
Grounding will be conducted in three phases:
<ul>
<li> Ground relevant atoms: This phase is done by class KBMC. In this phase, a rough sift
of atoms results from a partially grounded predicate tables. In these tables (one
for each predicate), those definitely not useful atoms are not grounded.
<li> Pick active atoms: This phase is done by class Grounding. In this phase, all
atoms that will not violate any clauses by default are further eliminated
on the basis of the first phase. These eliminated atoms will not play any role
in following inference or learning, therefore grounding them out will make no sense.
<li> Ground active clauses: This phase is done by class Grounding. In this phase, clauses
are grounded according to picked active atoms in the second phase. Clauses relying on
exactly the same atoms will be merged together to form GClause for efficiency
consideration.
</ul>
</p>



</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added deepdive/bin/tuffy/ground/partition/Bucket.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions deepdive/bin/tuffy/ground/partition/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>package</title>
</head>
<body>
Data structures and algorithms for MRF partitioning.
</body>
</html>
Binary file not shown.
Binary file added deepdive/bin/tuffy/helper/Stats.class
Binary file not shown.
8 changes: 8 additions & 0 deletions deepdive/bin/tuffy/helper/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>package</title>
</head>
<body>
Misc functionalities to help develop MLN programs.
</body>
</html>
Binary file added deepdive/bin/tuffy/infer/DataMover.class
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/InferBucket.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/InferComponent.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/InferPartitioned.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/MRF$1.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/MRF$2.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/MRF$INIT_STRATEGY.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/MRF$myDouble.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/MRF.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/PGInfer.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/ds/GAtom.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/ds/GClause.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/infer/ds/KeyBlock.class
Binary file not shown.
8 changes: 8 additions & 0 deletions deepdive/bin/tuffy/infer/ds/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>package</title>
</head>
<body>
Data structures used to represent MRFs.
</body>
</html>
26 changes: 26 additions & 0 deletions deepdive/bin/tuffy/infer/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>
<head>
<title>package</title>
</head>
<body>
Provides MLN inference algorithms. Currently supports MAP inference and
Marginal inference.

<p>
By default this package deals with inference in memory. It first loads from
database about information of MLN groundings. Then, it forms a MRF by taking
GAtom and GClause as elements. Once this MRF is formed, this package will not
interact with DBMS.
</p>

<p>
Marginal and MAP inference on this in-memory structure follow classic scheme.
There are indices from GClause to GAtom, vice versa. Therefore, the change
of GAtom's truth assignment will influence GClause's truth value. Together with the
sign of GClause's weight, whether a GClause is violated in current truth assignment
setting can be tracked. The WalkSAT or MCSAT subroutines are then invoked.
</p>


</body>
</html>
Binary file added deepdive/bin/tuffy/infer/package_infer.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added deepdive/bin/tuffy/learn/DNLearner.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/learn/Learner.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/learn/Main.class
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/learn/NaiveDNLearner.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/learn/NaiveGDLearner.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/learn/SGDLearner.class
Binary file not shown.
24 changes: 24 additions & 0 deletions deepdive/bin/tuffy/learn/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html>
<head>
<title>package</title>
</head>
<body>
Provides weight learning in Tuffy.

<p>
This package provide frameworks for weight learning. You can write
your own learner by materializing several functions of the abstract class
Learner. An example in this package is DNLearner, which implements
a Diagonal Newton optimizer. This materialized class only need to tell
the learner how to update the weight according to the gradient and Hessian.
</p>

<p>
This package deals with in memory MRF directly, and has nothing
to do with DBMS. The flow of learning involves repetitive invocations of MCSAT (see
package infer), which will update the expectation of clause violation/satisfaction
under current weight settings.
</p>

</body>
</html>
Binary file added deepdive/bin/tuffy/main/Infer.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/main/Main.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/main/NonPartInfer.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/main/PartInfer.class
Binary file not shown.
8 changes: 8 additions & 0 deletions deepdive/bin/tuffy/main/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>package</title>
</head>
<body>
Entrances to Tuffy.
</body>
</html>
Binary file added deepdive/bin/tuffy/mln/Atom$AtomType.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Atom.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Clause$ClauseInstance.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Clause.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Literal$VarClique.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Literal.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/MarkovLogicNetwork.class
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Predicate.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Term.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Tuple.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/mln/Type.class
Binary file not shown.
36 changes: 36 additions & 0 deletions deepdive/bin/tuffy/mln/package.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<html>
<head>
<title>package</title>
</head>
<body>

This package builds the data structure of MLN.

<p>
This package defines the data structure representing logics, e.g.,
Atom, Predicate, Term, etc. Also, it bridges these objects to
relational tables in DBMS.
</p>

<p>
Following figure illustrates the relationship between classes in this
package, and the relationship between class and database table. For example,
from this figure, we can see that, an Atom object is formed by a Tuple object
and a Predicate object. And a Predicate object is associated with two
database tables.
</p>

<p>
There are four kinds of database tables. type_TypeName table saves the constant
ID of type TypeName. pred_PredicateName table saves grounded instances of predicate
PredicateName.
act_pred_PredicateName table saves the active atoms of predicate PredicateName.
ClauseName_instances table saves instances of clause ClauseName. Here by instance,
it means the possible binding from meta-variable to constant. By such bindings, you
can get clauses as the same as your input program.
</p>



</body>
</html>
Binary file added deepdive/bin/tuffy/mln/package_mln.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/parse/CommandOptions.class
Binary file not shown.
38 changes: 38 additions & 0 deletions deepdive/bin/tuffy/parse/Config.g
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
grammar Config;
options {language=Java; output=AST; backtrack=false; memoize=false;}

@lexer::header {
package tuffy.parse;
}

@parser::header{
package tuffy.parse;
import java.util.Hashtable;
import tuffy.mln.*;
import tuffy.util.*;
}

@parser::members {
public Hashtable<String, String> map = new Hashtable<String, String>();
}

WS : (' '
| '\r'
| '\n'
| '\t'
) {$channel=HIDDEN;}
;

COMMENT
: (('#' ~('\n'|'\r')* '\r'? '\n')) {$channel=HIDDEN;}
;

SPAN: ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|':'|'/'|'\\'|'\.')+;

config : (state)+ EOF;

state : id=SPAN '=' value=SPAN
{
map.put($id.text, $value.text);
}
;
5 changes: 5 additions & 0 deletions deepdive/bin/tuffy/parse/Config.tokens
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
WS=4
SPAN=6
COMMENT=5
T__7=7
'='=7
Binary file added deepdive/bin/tuffy/parse/ConfigLexer.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added deepdive/bin/tuffy/parse/ConfigParser.class
Binary file not shown.
Binary file added deepdive/bin/tuffy/parse/InputParser.class
Binary file not shown.
Loading

0 comments on commit 280d406

Please sign in to comment.