Skip to content. | Skip to navigation

Informatik 5
Information Systems
Prof. Dr. M. Jarke
Sections
Personal tools
You are here: Home Staff M.Eng. Rihan Hai Correctness check with existing literatures Apply the plain SO tgd generator

Apply the plain SO tgd generator

Here we mainly show example plain SO tgds in different Skolem function mode.  We use below set of parameter values. Note in the paper we use larger values, here we show three simple plain SO tgd generated, to help understand the generation process.  

numPSOTGDs=1

numParts=3

numSrcRels=2

aritySrcRels=2

numTgtRels=1

arityTgtRels=2

numFuncs=1

 

1. skolemFuncArgumentMode=relation. 

In this mode the generator populate 3 parts one by one, and from the second part, it randomly choose whether to include an already generated source relation, adds it to its LHS and includes all of its arity to the Skolem function. Note numSrcRels is the upper bound of newly generated source relations in each part, while in the nested tgd generator,  numSrcRels is exact number of source relations. The reason of such a design difference is that for plain SO tgds we also include previously generated source relations, and we don't want it to grow exponentially.

 

For the below example,  for the first part (P1) it generate two source relations S1 and S2. Then the second part (P2) it generate a new relation S4, also includes both S1 and S2.

But in the third part (P3) it only includes S2.

 

?f1(x1,x2,x3,x4),?f2(x1,x2,x3,x4,x7,x8),?f3(x3,x4,x7,x8,x9,x10) 

*x1,*x2,*x3,*x4,*x7,*x8,*x9,*x10  

(P1:) [S1(x1,x2)^S2(x3,x4) --> T1(f1(x1,x2,x3,x4),x4)] ^

(P2:) [S1(x1,x2)^S2(x3,x4)^S4(x7,x8) --> T2(f2(x1,x2,x3,x4,x7,x8),x8)] ^

(P3:) [S2(x3,x4)^S4(x7,x8)^S5(x9,x10) --> T3(f3(x3,x4,x7,x8,x9,x10),x4)]  

 

2. skolemFuncArgumentMode=part. 

In this mode the generator also populate 3 parts one by one, and from the second part, it randomly choose whether to include an already generated part, adds it to its LHs and includes all of its universal  variables to the Skolem function. 

 

For below example,  The LHs of second part (P2) includes all LHs of P1, and in f2 all the P1's universal variables (x1,x2,x3,x4) are included. Similarly P3 also includes P1, but it doesn't include P2 

 

?f1(x1,x2,x3,x4),?f2(x1,x2,x3,x4,x5,x6,x7,x8),?f3(x1,x2,x3,x4,x9,x10,x11,x12) 

*x1,*x2,*x3,*x4,*x5,*x6,*x7,*x8,*x9,*x10,*x11,*x12  

(P1:)[S1(x1,x2)^S2(x3,x4) --> T1(f1(x1,x2,x3,x4),x2)] ^

(P2:)[S3(x5,x6)^S4(x7,x8)^S1(x1,x2)^S2(x3,x4) --> T2(f2(x1,x2,x3,x4,x5,x6,x7,x8),x8)] ^

(P3:)[S5(x9,x10)^S6(x11,x12)^S1(x1,x2)^S2(x3,x4) --> T3(f3(x1,x2,x3,x4,x9,x10,x11,x12),x10)]  

 

3. skolemFuncArgumentMode=all. 

In this mode the generator also populate 3 parts one by one, and from the second part, it  includes all the already generated parts, adds their source relations to its LHS and includes all of its universal  variables to the Skolem function. For example, as the below plain SO tgd, the LHs of second part (P2) includes all LHs of P1, and in f2 all the P1's universal variables (x1,x2,x3,x4) are included.  P3 includes P1 and P2, and its Skolem function f3 has all the universal variables in its argument.

 

?f1(x1,x2,x3,x4),?f2(x1,x2,x3,x4,x5,x6,x7,x8),?f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12) 

*x1,*x2,*x3,*x4,*x5,*x6,*x7,*x8,*x9,*x10,*x11,*x12  [S1(x1,x2)^S2(x3,x4) --> T1(f1(x1,x2,x3,x4),x2)] ^

[S1(x1,x2)^S2(x3,x4)^S3(x5,x6)^S4(x7,x8) --> T2(f2(x1,x2,x3,x4,x5,x6,x7,x8),x1)] ^

 

[S1(x1,x2)^S2(x3,x4)^S3(x5,x6)^S4(x7,x8)^S5(x9,x10)^S6(x11,x12) --> T3(f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12),x11)]  

 

 

For interested readers we include three plain SO tgds with another larger set parameter values.

numParts=7

numSrcRels=2

aritySrcRels=5

numTgtRels=1

arityTgtRels=4

numFuncs=1

 

 -------------------relation--------------------------------

 Generated plain SO tgd: 

?f1(x6,x7,x8,x9,x10),?f2(x16,x17,x18,x19,x20),?f3(x11,x12,x13,x14,x15,x21,x22,x23,x24,x25),?f4(x1,x2,x3,x4,x5,x21,x22,x23,x24,x25,x31,x32,x33,x34,x35),?f5(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),?f6(x1,x2,x3,x4,x5,x11,x12,x13,x14,x15,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x56,x57,x58,x59,x60),?f7(x6,x7,x8,x9,x10,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70) 

*x6,*x7,*x8,*x9,*x10,*x16,*x17,*x18,*x19,*x20,*x11,*x12,*x13,*x14,*x15,*x21,*x22,*x23,*x24,*x25,*x1,*x2,*x3,*x4,*x5,*x31,*x32,*x33,*x34,*x35,*x41,*x42,*x43,*x44,*x45,*x46,*x47,*x48,*x49,*x50,*x26,*x27,*x28,*x29,*x30,*x36,*x37,*x38,*x39,*x40,*x56,*x57,*x58,*x59,*x60,*x51,*x52,*x53,*x54,*x55,*x61,*x62,*x63,*x64,*x65,*x66,*x67,*x68,*x69,*x70  [S2(x6,x7,x8,x9,x10) --> T1(f1(x6,x7,x8,x9,x10),x9,x6,x8)] ^

[S4(x16,x17,x18,x19,x20) --> T2(f2(x16,x17,x18,x19,x20),x20,x19,x17)] ^

[S3(x11,x12,x13,x14,x15)^S5(x21,x22,x23,x24,x25) --> T3(f3(x11,x12,x13,x14,x15,x21,x22,x23,x24,x25),x13,x15,x21)] ^

[S1(x1,x2,x3,x4,x5)^S5(x21,x22,x23,x24,x25)^S7(x31,x32,x33,x34,x35) --> T4(f4(x1,x2,x3,x4,x5,x21,x22,x23,x24,x25,x31,x32,x33,x34,x35),x35,x24,x25)] ^

[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S5(x21,x22,x23,x24,x25)^S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50) --> T5(f5(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),x2,x44,x46)] ^

[S1(x1,x2,x3,x4,x5)^S3(x11,x12,x13,x14,x15)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S8(x36,x37,x38,x39,x40)^S9(x41,x42,x43,x44,x45)^S12(x56,x57,x58,x59,x60) --> T6(f6(x1,x2,x3,x4,x5,x11,x12,x13,x14,x15,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x56,x57,x58,x59,x60),x25,x13,x4)] ^

[S2(x6,x7,x8,x9,x10)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S11(x51,x52,x53,x54,x55)^S12(x56,x57,x58,x59,x60)^S13(x61,x62,x63,x64,x65)^S14(x66,x67,x68,x69,x70) --> T7(f7(x6,x7,x8,x9,x10,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70),x57,x58,x68)]  

 -------------------part--------------------------------

 Generated plain SO tgd: 

?f1(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10),?f2(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20),?f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30),?f4(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40),?f5(x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),?f6(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60),?f7(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70) 

*x1,*x2,*x3,*x4,*x5,*x6,*x7,*x8,*x9,*x10,*x11,*x12,*x13,*x14,*x15,*x16,*x17,*x18,*x19,*x20,*x21,*x22,*x23,*x24,*x25,*x26,*x27,*x28,*x29,*x30,*x31,*x32,*x33,*x34,*x35,*x36,*x37,*x38,*x39,*x40,*x41,*x42,*x43,*x44,*x45,*x46,*x47,*x48,*x49,*x50,*x51,*x52,*x53,*x54,*x55,*x56,*x57,*x58,*x59,*x60,*x61,*x62,*x63,*x64,*x65,*x66,*x67,*x68,*x69,*x70  [S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T1(f1(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10),x2,x4,x9)] ^

[S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T2(f2(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20),x9,x5,x8)] ^

[S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T3(f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30),x21,x30,x9)] ^

[S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20) --> T4(f4(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40),x12,x40,x1)] ^

[S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T5(f5(x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),x46,x13,x47)] ^

[S11(x51,x52,x53,x54,x55)^S12(x56,x57,x58,x59,x60)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50) --> T6(f6(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60),x7,x40,x57)] ^

[S13(x61,x62,x63,x64,x65)^S14(x66,x67,x68,x69,x70)^S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T7(f7(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70),x9,x61,x64)]  

 
-------------------all--------------------------------
 
 Generated plain SO tgd: 
original plain SO tgd: 
?f1(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10),?f2(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20),?f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30),?f4(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40),?f5(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),?f6(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60),?f7(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70) 
*x1,*x2,*x3,*x4,*x5,*x6,*x7,*x8,*x9,*x10,*x11,*x12,*x13,*x14,*x15,*x16,*x17,*x18,*x19,*x20,*x21,*x22,*x23,*x24,*x25,*x26,*x27,*x28,*x29,*x30,*x31,*x32,*x33,*x34,*x35,*x36,*x37,*x38,*x39,*x40,*x41,*x42,*x43,*x44,*x45,*x46,*x47,*x48,*x49,*x50,*x51,*x52,*x53,*x54,*x55,*x56,*x57,*x58,*x59,*x60,*x61,*x62,*x63,*x64,*x65,*x66,*x67,*x68,*x69,*x70  [S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10) --> T1(f1(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10),x3,x2,x7)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20) --> T2(f2(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20),x15,x14,x11)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30) --> T3(f3(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30),x9,x21,x16)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40) --> T4(f4(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40),x6,x36,x10)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50) --> T5(f5(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50),x3,x34,x21)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50)^S11(x51,x52,x53,x54,x55)^S12(x56,x57,x58,x59,x60) --> T6(f6(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60),x50,x40,x37)] ^
[S1(x1,x2,x3,x4,x5)^S2(x6,x7,x8,x9,x10)^S3(x11,x12,x13,x14,x15)^S4(x16,x17,x18,x19,x20)^S5(x21,x22,x23,x24,x25)^S6(x26,x27,x28,x29,x30)^S7(x31,x32,x33,x34,x35)^S8(x36,x37,x38,x39,x40)^S9(x41,x42,x43,x44,x45)^S10(x46,x47,x48,x49,x50)^S11(x51,x52,x53,x54,x55)^S12(x56,x57,x58,x59,x60)^S13(x61,x62,x63,x64,x65)^S14(x66,x67,x68,x69,x70) --> T7(f7(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30,x31,x32,x33,x34,x35,x36,x37,x38,x39,x40,x41,x42,x43,x44,x45,x46,x47,x48,x49,x50,x51,x52,x53,x54,x55,x56,x57,x58,x59,x60,x61,x62,x63,x64,x65,x66,x67,x68,x69,x70),x55,x31,x13)]  
 
Document Actions