User Tools

Site Tools


Writing /home/academic/ogsavkovic/public_html/wiki/data/cache/0/01f21848de708ef25657604b439f79ee.metadata failed
magik-demo:developer:class:core:queryspecialization

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Query Specialization ====== This class is used for calculate the specializations of a given query. ===== Class Attributes ===== <code java> public static long executionTime; public static boolean PROLOG_SELECTION; public static String prolog_encoding; public static String queryForProlog; public static String metaProlog; public static String commandQuery; public static String encodingGUI; </code> ===== Class Constructor ===== No constructor for this class ===== Class Methods ===== ==== getQuerySpecializations ==== <code java> public static Query getQueryGeneralizations (Query query, java.util.ArrayList<TCStatement> currentTCs, Schema currentSchema, int maximal) throws Exception </code> Main method of this class, that given an incomplete query computes complete query specializations of that query given that currentTCs are true and schema constraints from currentSchema holds. Based on the constant PROLOG_SELECTION, Magik runs two different prolog engines. //Called by:// * it.unibz.inf.magik.core.TCQCReasoner * it.unibz.inf.magik.test.TestQuerySpecialization **Parameters:** * Query - query that we want to find their specialization versions * currentTCs - which data are complete, expressed in TC-statements * currentSchema - database schema (that contains finite domain constraints and foreign keys) * maximal - maximal number of atoms that Magik can add for calculating specialization queries **Returns:** * Returned specialization are maximal (in query containment sense) **Throws:** * Exception ---- ==== getQuerySpecializationsSWI ==== <code java> public static Query getQueryGeneralizationsSWI (Query query, java.util.ArrayList<TCStatement> currentTCs, Schema currentSchema, int maximal) throws Exception </code> Method that manage the query specializations algorithm for SWI Prolog **Parameters:** * Query - query that we want to find their specialization versions * currentTCs - which data are complete, expressed in TC-statements * currentSchema - database schema (that contains finite domain constraints and foreign keys) * maximal - maximal number of atoms that Magik can add for calculating specialization queries **Returns:** * Returned specialization are maximal (in query containment sense) **Throws:** * Exception ---- ==== getQuerySpecializationsTuProlog ==== <code java> public static Query getQueryGeneralizationsTuProlog (Query query, java.util.ArrayList<TCStatement> currentTCs, Schema currentSchema, int maximal) throws Exception </code> Method that manage the query specializations algorithm for Tu Prolog **Parameters:** * Query - query that we want to find their specialization versions * currentTCs - which data are complete, expressed in TC-statements * currentSchema - database schema (that contains finite domain constraints and foreign keys) * maximal - maximal number of atoms that Magik can add for calculating specialization queries **Returns:** * Returned specialization are maximal (in query containment sense) **Throws:** * Exception ---- ==== generateInput ==== <code java> public static java.lang.String generateInput (java.util.ArrayList<TCStatement> currentTCs, Schema schema, int maxQSpecSize) </code> Method that encodes in Prolog currentSchema and TC-statements **Parameters:** * currentTCs - which data are complete, expressed in TC-statements * schema - database schema (that contains finite domain constraints and foreign keys) * maxQSpecSize - maximal number of atoms that Magik can add for calculating specialization queries **Returns:** * String that contains all the prolog code for the given schema and tc-statements ---- === generatePrologNotEnfFKs === <code java> public static java.util.ArrayList<java.lang.String> generatePrologNotEnfFKs (java.util.ArrayList<ForeignKey> fks) </code> Method that encodes in Prolog Foreign Keys not enforced ---- === generatePrologEnfFKs === <code java> public static java.util.ArrayList<java.lang.String> generatePrologEnfFKs (java.util.ArrayList<ForeignKey> fks) </code> Method that encodes in Prolog Foreign Keys enforced ---- === generatePrologRels === <code java> public static java.util.ArrayList<java.lang.String> generatePrologRels (Schema schema) </code> Method that encodes in Prolog relations of the schema selected ---- === generatePrologTCs === <code java> public static java.util.ArrayList<java.lang.String> generatePrologEnfTCs (java.util.ArrayList<TCStatement> tcs) </code> Method that encodes in Prolog TC-Statements ----

magik-demo/developer/class/core/queryspecialization.1377261855.txt.gz · Last modified: 2017/07/06 15:24 (external edit)