User Tools

Site Tools


magik-demo:developer:class:core:programgenerator

This is an old revision of the document!


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

====== Program Generator ====== ''**public class ProgramGenerator**'' This class generates EDB (Extensional Database) and translate the schema constraints into a DLV program ===== Class Attributes ===== No attributes for this class ===== Class Constructor ===== No constructor for this class ===== Class Methods ===== For better comprehension of the class, the figure underlying illustrates the dependencies between methods. {{ :magik-demo:developer:class:core:generateprogram.png?nolink&850 |}} ---- ==== generateProgram ==== <code java> public static java.util.ArrayList<java.lang.String> generateProgram (Query relQ, java.util.ArrayList <TCStatement> tcs, boolean semantics, Schema schema, boolean isThereComparisons ) throws CycleException, PrimaryKeyViolationException </code> This method managing all the process of generation of the DLV program. **Parameters:** * relQ - query that we want to analyze * tcs - TC-statements selected * semantics - //TRUE// if distinct-set semantics, //FALSE// if none-multiset semantics * isThereComparison **Returns:** * DLV program associated to the parameters given **Exceptions:** * CycleException * PrimaryKeyViolationException ---- ==== makeEDB ==== <code java> private static java.lang.String makeEDB (Query relQ, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of query to prototypical EDB. **Parameters:** * relQ - query that we want to analyze * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Returns:** * String with the extensional database definition ---- ==== makeP_TC ==== <code java> private static java.util.ArrayList<java.lang.String> makeP_TC (java.util.ArrayList <TCStatement> tcs, boolean isUnfolding) </code> Creates the line of the program related to a list of rules out of a set of TC statements **Parameters:** * relQ - query that we want to analyze * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Returns:** * List of line of program related to TC-Statements given ---- ==== makeQ_a ==== <code java> private static java.lang.String makeQ_a (Query Q, boolean semantics, boolean isUnfolding) </code> This method generates line of program for a given query **Parameters:** * Q - query that we want to generate the program * semantics - //TRUE// if distinct-set semantics, //FALSE// if none-multiset semantics * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Returns:** * line of program associated to the query ---- ==== makeFDC_Rules ==== <code java> private static java.util.ArrayList<java.lang.String> makeFDC_Rules ( java.util.ArrayList<FiniteDomainConstraint> fdcs) </code> This method generates the lines of program for all the finite domain constraints selected. **Parameter:** * fdcs - finite domain constraints to convert **Returns:** * list of lines of program for the finite domain constraints given ---- ==== createValFunctionalityContraint ==== <code java> private static java.lang.String createValFunctionalityContraint () </code> **Returns:** * String of val functionality ---- ==== generatePredicateOriginal ==== <code java> public static java.lang.String generatePredicateOriginal (Query query) </code> This method generates the lines of program for the original predicate. **Parameter:** * query - query that has to be converted **Returns:** * list of lines of program for the original predicate of the query ---- ---- ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ---- ==== makeEDB_Atom ==== <code java> static java.lang.String makeEDB_Atom (Atom atom, boolean isUnfolding) </code> An internal auxiliary function, needed for conversion of atoms of the query to prototypical EDB. **Parameters:** * atom - atom that we want to convert * isUnfolding - //TRUE// if unfolding needed, //FALSE// no unfolding **Return** * String with the extensional database definition of the atom ----

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