Tabnine Logo
DatalogDependencyGraphGenerator
Code IndexAdd Tabnine to your IDE (free)

How to use
DatalogDependencyGraphGenerator
in
it.unibz.inf.ontop.datalog

Best Java code snippets using it.unibz.inf.ontop.datalog.DatalogDependencyGraphGenerator (Showing top 10 results out of 315)

origin: it.unibz.inf.ontop/ontop-model

public DatalogDependencyGraphGenerator(List<CQIE> program) {
  for (CQIE rule : program) {
    updateRuleIndexes(rule);
    
    updatePredicateDependencyGraph(rule);
  }
  generateRuleDependencyGraph(program);
  
  generateOrderedDepGraph();
  /**
   * 
   * Intuitively, the extenion predicates in the datalog program without
   * definitions 
   * 
   * <pre>
   * extensionalPredicates = vertices(predicateDependencyGraph) - ruleIndex.keys()
   * </pre>
   */
  extensionalPredicates.addAll(predicateDependencyGraph.vertexSet());
  extensionalPredicates.removeAll(ruleIndex.keySet());
}

origin: ontop/ontop

isOrderBy = queryModifiers.hasModifiers() && !queryModifiers.getSortConditions().isEmpty();
DatalogDependencyGraphGenerator depGraph = new DatalogDependencyGraphGenerator(queryProgram.getRules());
Multimap<Predicate, CQIE> ruleIndex = depGraph.getRuleIndex();
List<Predicate> predicatesInBottomUp = depGraph.getPredicatesInBottomUp();
List<Predicate> extensionalPredicates = depGraph.getExtensionalPredicates();
origin: ontop/ontop

DatalogDependencyGraphGenerator dependencyGraph = new DatalogDependencyGraphGenerator(rules);
List<Predicate> topDownPredicates = Lists.reverse(dependencyGraph.getPredicatesInBottomUp());
  throw new InvalidDatalogProgramException("The root predicate must not be a table predicate");
Multimap<Predicate, CQIE> ruleIndex = dependencyGraph.getRuleIndex();
origin: it.unibz.inf.ontop/ontop-model

  dependencyList.add(bodyAtom.getFunctionSymbol());
} else if (bodyAtom.isAlgebraFunction() || bodyAtom.isOperation()) {
  updatePredicateDependencyGraph_traverseBodyAtom(dependencyList, bodyAtom);
origin: it.unibz.inf.ontop/ontop-model

/**
 * Removes the old indexes given by a rule.
 * 
 * @param rule
 */
public void removeOldRuleIndexByBodyPredicate(CQIE rule) {
  for (Function bodyAtom : rule.getBody()) {
    if (bodyAtom.isDataFunction()) {
      Predicate functionSymbol = bodyAtom.getFunctionSymbol();
      if (ruleIndexByBodyPredicate.containsEntry(functionSymbol, rule)){
        ruleIndexByBodyPredicate.remove(functionSymbol, rule);
      }
    } else if (bodyAtom.isAlgebraFunction() || bodyAtom.isOperation()) {
      removeRuleIndexByBodyPredicate_traverseBodyAtom(rule, bodyAtom);
      // BC: should we reintroduce arithmetic functions?//}
      // else if (bodyAtom.isArithmeticFunction() || bodyAtom.isDataTypeFunction()){
    } else if (bodyAtom.isDataTypeFunction()){
      continue;
    } else {
      throw new IllegalStateException("Unknown Function");
    }
  }
}
origin: it.unibz.inf.ontop/ontop-reformulation-sql

isOrderBy = queryModifiers.hasModifiers() && !queryModifiers.getSortConditions().isEmpty();
DatalogDependencyGraphGenerator depGraph = new DatalogDependencyGraphGenerator(queryProgram);
Multimap<Predicate, CQIE> ruleIndex = depGraph.getRuleIndex();
List<Predicate> predicatesInBottomUp = depGraph.getPredicatesInBottomUp();
List<Predicate> extensionalPredicates = depGraph.getExtensionalPredicates();
origin: it.unibz.inf.ontop/ontop-optimization

List<CQIE> rules = queryProgram.getRules();
DatalogDependencyGraphGenerator dependencyGraph = new DatalogDependencyGraphGenerator(rules);
List<Predicate> topDownPredicates = Lists.reverse(dependencyGraph.getPredicatesInBottomUp());
  throw new InvalidDatalogProgramException("The root predicate must not be a table predicate");
Multimap<Predicate, CQIE> ruleIndex = dependencyGraph.getRuleIndex();
origin: ontop/ontop

  dependencyList.add(bodyAtom.getFunctionSymbol());
} else if (bodyAtom.isAlgebraFunction() || bodyAtom.isOperation()) {
  updatePredicateDependencyGraph_traverseBodyAtom(dependencyList, bodyAtom);
origin: it.unibz.inf.ontop/ontop-translation-sql

DatalogDependencyGraphGenerator depGraph = new DatalogDependencyGraphGenerator(
    queryProgram);
ruleIndex = depGraph.getRuleIndex();
    .getPredicatesInBottomUp();
    .getExtensionalPredicates();
origin: ontop/ontop

public DatalogDependencyGraphGenerator(List<CQIE> program) {
  for (CQIE rule : program) {
    updateRuleIndexes(rule);
    updatePredicateDependencyGraph(rule);
  }
  generateRuleDependencyGraph(program);
  generateOrderedDepGraph();
  /**
   * 
   * Intuitively, the extensional predicates in the datalog program without
   * definitions 
   * 
   * <pre>
   * extensionalPredicates = vertices(predicateDependencyGraph) - ruleIndex.keys()
   * </pre>
   */
  extensionalPredicates.addAll(predicateDependencyGraph.vertexSet());
  extensionalPredicates.removeAll(ruleIndex.keySet());
}

it.unibz.inf.ontop.datalogDatalogDependencyGraphGenerator

Javadoc

This class generates two dependency graphs for the datalog program
  • Predicate dependency graph with Predicate as nodes
  • Rule dependency graph with Rule as nodes
add some index
  • Rule Index by Head Predicate
  • Rule Index by Body Predicate
  • extensionalPredicates

Most used methods

  • <init>
  • getPredicatesInBottomUp
    Returns the Bottom-up Ordered List of predicates
  • getRuleIndex
  • getExtensionalPredicates
  • generateOrderedDepGraph
    This method will * Order the #predicateDependencyGraph using a top down approach * Then reverse the
  • generateRuleDependencyGraph
    generates the #ruleDependencyGraph
  • removeRuleIndexByBodyPredicate_traverseBodyAtom
    This is a helper method for #removeRuleIndexByBodyPredicate. This method traverses in an atom, and r
  • updatePredicateDependencyGraph
    Updates the #predicateDependencyGraph by the input rule. It adds all the edges to #predicateDepende
  • updatePredicateDependencyGraph_traverseBodyAtom
    This is a helper method for #updatePredicateDependencyGraph. This method traverses in an atom, and p
  • updateRuleIndexByBodyPredicate
    updates
  • updateRuleIndexByBodyPredicate_traverseBodyAtom
    This is a helper method for #updateRuleIndexByBodyPredicate. This method traverses in an atom, and p
  • updateRuleIndexes
    This method takes a rule and populates the ruleIndex field.
  • updateRuleIndexByBodyPredicate_traverseBodyAtom,
  • updateRuleIndexes

Popular in Java

  • Reactive rest calls using spring rest template
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now