example Spans

schema S = literal : rdf {
	entities
		A B
	foreign_keys
		f : A -> B	
	attributes
		attA : A -> Dom
		attB : B -> Dom	
}
schema T = literal : rdf {
	entities
		W X Y Z
	foreign_keys
		g : W -> X 		h : X -> Y 		i : Y -> Z	
	attributes
		attW : W -> Dom	
		attX : X -> Dom	
		attY : Y -> Dom	
		attZ : Z -> Dom	
}
mapping M = literal : S -> T {
	entity
		A -> W
	foreign_keys
		f -> g.h.i
	attributes
		attA -> attW	
	entity
		B -> Z	
	attributes
		attB -> attZ		
}

instance I = literal : rdf {
	generators
		r1 r2 r3 t0 t1 t2 t3 u1 u2 u3 u4: R
	equations
		r1.subject = "a1"	r1.predicate = "f"		r1.object = "b1"	
		r2.subject = "a2"	r2.predicate = "f"		r2.object = "b2"	
		r3.subject = "a2"	r3.predicate = "f"		r3.object = "b1"	

		u1.subject = "a1"	u1.predicate = "attA"	u1.object = "Alice"
		u2.subject = "a2"	u2.predicate = "attA"	u2.object = "Ann"
		u3.subject = "b1"	u3.predicate = "attB"	u3.object = "Bob"
		u4.subject = "b2"	u4.predicate = "attB"	u4.object = "Bill"
		
		t0.subject = "a1"	t0.object = "A"	
		t0.predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
		t1.subject = "a2"	t1.object = "A"	
		t1.predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
		t2.subject = "b1"	t2.object = "B"	
		t2.predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
		t3.subject = "b2"	t3.object = "B"	
		t3.predicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
}

schema S0 = spanify S
schema T0 = spanify T

query Q1 = spanify S
query Q2 = spanify T

query Q = spanify_mapping M

instance J = eval Q1 I
instance K = coeval Q J
instance L = coeval Q2 K

#####################################

schema X = literal : rdf {
	entities
		W 
	attributes
		attW : W -> Dom	
}
mapping F = literal : S -> T {
	entity
		A -> W
	foreign_keys
		f -> identity
	attributes
		attA -> attW	
	entity
		B -> W	
	attributes
		attB -> attW		
}

schema Y = spanify X

query U = spanify_mapping F

instance J2 = eval Q1 I
instance K2 = coeval U J2
instance L2 = coeval Q2 K2
Keywords:

schema_literal
spanify
spanify_mapping
eval
mapping_literal
coeval
instance_literal
spanify

Options:




instance I

R
IDobjectpredicatesubject
0b1fa1
1b2fa2
2b1fa2
3Ahttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea1
4Ahttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea2
5Bhttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1
6Bhttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2
7AliceattAa1
8AnnattAa2
9BobattBb1
10BillattBb2


instance J2

A
IDsubject
0a1
1a2
B
IDsubject
2b1
3b2
attA_A
IDobjectsubject
4Alice0
5Ann1
attB_B
IDobjectsubject
6Bob2
7Bill3
f_A_B
IDobjectsubject
820
921
1031


instance J

A
IDsubject
0a1
1a2
B
IDsubject
2b1
3b2
attA_A
IDobjectsubject
4Alice0
5Ann1
attB_B
IDobjectsubject
6Bob2
7Bill3
f_A_B
IDobjectsubject
820
921
1031


instance K2

W
IDsubject
0a2
1a1
2b2
3b1
4?0
5?1
6?2
7?3
X
IDsubject
Y
IDsubject
Z
IDsubject
attW_W
IDobjectsubject
8Ann4
9Alice5
10Bill6
11Bob7
attX_X
IDobjectsubject
attY_Y
IDobjectsubject
attZ_Z
IDobjectsubject
g_W_X
IDobjectsubject
h_X_Y
IDobjectsubject
i_Y_Z
IDobjectsubject


instance K

W
IDsubject
0a2
1a1
2?0
3?1
X
IDsubject
4?2
5?3
6?4
Y
IDsubject
7?5
8?6
9?7
Z
IDsubject
10b2
11b1
12?8
13?9
attW_W
IDobjectsubject
14Ann2
15Alice3
attX_X
IDobjectsubject
attY_Y
IDobjectsubject
attZ_Z
IDobjectsubject
16Bill12
17Bob13
g_W_X
IDobjectsubject
1840
1950
2061
h_X_Y
IDobjectsubject
2174
2285
2396
i_Y_Z
IDobjectsubject
24117
25108
26119


instance L2

R
IDobjectpredicatesubject
0Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?0
1Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?1
2Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?2
3Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?3
4Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1
5Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2
6Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea1
7Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea2
8BobattW?0
9BillattW?1
10AliceattW?2
11AnnattW?3


instance L

R
IDobjectpredicatesubject
0Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?0
1Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?1
2Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea1
3Whttp://www.w3.org/1999/02/22-rdf-syntax-ns#typea2
4Xhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?2
5Xhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?3
6Xhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?4
7Yhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?5
8Yhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?6
9Yhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?7
10Zhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?8
11Zhttp://www.w3.org/1999/02/22-rdf-syntax-ns#type?9
12Zhttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1
13Zhttp://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2
14?2ga1
15?3ga2
16?4ga2
17?5h?2
18?6h?3
19?7h?4
20b1i?5
21b2i?6
22b1i?7
23AliceattW?0
24AnnattW?1
25BobattZ?8
26BillattZ?9