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
IDpredicatesubjectobject
0fa1b1
1fa2b2
2fa2b1
3http://www.w3.org/1999/02/22-rdf-syntax-ns#typea1A
4http://www.w3.org/1999/02/22-rdf-syntax-ns#typea2A
5http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1B
6http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2B
7attAa1Alice
8attAa2Ann
9attBb1Bob
10attBb2Bill


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 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 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
IDpredicatesubjectobject
0http://www.w3.org/1999/02/22-rdf-syntax-ns#type?0W
1http://www.w3.org/1999/02/22-rdf-syntax-ns#type?1W
2http://www.w3.org/1999/02/22-rdf-syntax-ns#type?2W
3http://www.w3.org/1999/02/22-rdf-syntax-ns#type?3W
4http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1W
5http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2W
6http://www.w3.org/1999/02/22-rdf-syntax-ns#typea1W
7http://www.w3.org/1999/02/22-rdf-syntax-ns#typea2W
8attW?0Bob
9attW?1Bill
10attW?2Alice
11attW?3Ann


instance L

R
IDpredicatesubjectobject
0http://www.w3.org/1999/02/22-rdf-syntax-ns#type?0W
1http://www.w3.org/1999/02/22-rdf-syntax-ns#type?1W
2http://www.w3.org/1999/02/22-rdf-syntax-ns#typea1W
3http://www.w3.org/1999/02/22-rdf-syntax-ns#typea2W
4http://www.w3.org/1999/02/22-rdf-syntax-ns#type?2X
5http://www.w3.org/1999/02/22-rdf-syntax-ns#type?3X
6http://www.w3.org/1999/02/22-rdf-syntax-ns#type?4X
7http://www.w3.org/1999/02/22-rdf-syntax-ns#type?5Y
8http://www.w3.org/1999/02/22-rdf-syntax-ns#type?6Y
9http://www.w3.org/1999/02/22-rdf-syntax-ns#type?7Y
10http://www.w3.org/1999/02/22-rdf-syntax-ns#type?8Z
11http://www.w3.org/1999/02/22-rdf-syntax-ns#type?9Z
12http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb1Z
13http://www.w3.org/1999/02/22-rdf-syntax-ns#typeb2Z
14ga1?2
15ga2?3
16ga2?4
17h?2?5
18h?3?6
19h?4?7
20i?5b1
21i?6b2
22i?7b1
23attW?0Alice
24attW?1Ann
25attZ?8Bob
26attZ?9Bill