Commit 480db093 authored by Ryan Wisnesky's avatar Ryan Wisnesky
Browse files

minor syntax changes

add pi
rename coproduct_unrestricted to coproduct
rename coproduct to union
parent 36e15531
Loading
Loading
Loading
Loading
+5 −2
Changes for doc/aqlmanual/aqlmanual.tex: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -449,6 +449,9 @@ If $F : S \to T$ is a mapping and $J$ is an $T$-instance, then $\Delta_F J$ is a
\section{{\tt sigma <mapping> <instance>}}
If $F : S \to T$ is a mapping and $I$ is an $S$-instance, then $\Sigma_F I$ is a $T$-instance. 

\section{{\tt pu <mapping> <instance>}}
If $F : S \to T$ is a mapping and $I$ is an $S$-instance, then $\Pi_F I$ is a $T$-instance. 

\section{{\tt sigma\_chase <mapping> <instance>}}
Like {\tt sigma}, but uses an alternative chase/left-kan extension based algorithm.  See {\tt chase\_style} option.

@@ -458,10 +461,10 @@ If $Q : S \to T$ is a query and $t$ is a $T$-entity, then $frozen \ Q \ t$ is th
\section{{\tt coproduct\_sigma (<mapping> <instance>)+ : <schema>}}
The expression {\tt coproduct\_sigma}  $F \ I \ G \ J \ : S$ means $\Sigma_F(I) + \Sigma_G(J)$, where $+$ is $S$-instance co-product.  Arbitrarily many mapping-instance pairs can be used.  This operation is provided to help minimize the number of intermediate materializations required to execute an AQL program.

\section{{\tt coproduct <instance> + ... + <instance> : <schema>}}
\section{{\tt union <instance> + ... + <instance> : <schema>}}
Takes the coproduct of the input instances.  Desugars into {\tt coproduct\_sigma} along the identity mapping.

\section{{\tt coproduct\_unrestricted <instance> + ... + <instance> : <schema>}}
\section{{\tt coproduct <instance> + ... + <instance> : <schema>}}
Takes the coproduct of the input instances.  Note that the instances must be names; unlike the other coproduct expressions, there is no requirement that generators not overlap in this expression.

\section{{\tt coequalize <transform> <transform>}}
+1 −1
Changes for resources/cdide.properties: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@ Name=Categorical Data IDE
Copyright=Patrick Schultz, David Spivak, and Ryan Wisnesky
URL=categoricaldata.net/aql.html
Version=alpha-snapshot
Packaged=December 2, 2017 or later
Packaged=January 19, 2018 or later
+7 −3
Changes for resources/examples/aql/All_Syntax.aql: 7 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -130,7 +130,10 @@ query q3 = simple : s3 {
	options
		prover = completion
}
//eval q4 ~ delta m3 and coeval q4 ~ sigma m3
query q4 = toQuery m3 { options dont_validate_unsafe = true } // this isn't a real query 

//coeval q4 ~ delta (id s3) and eval q4 ~ pi (id s3)
query q5 = toCoQuery identity s3 { 
	options 
		prover = completion 
@@ -148,14 +151,15 @@ instance i5 = eval (identity s3) i1
instance i6 = coeval (identity s3) i1 { options prover = completion }
instance i7 = sigma (identity s3) i1 { options prover = completion }
instance i8 = delta (identity s3) i1
instance i9 = coproduct i1 + i1 : s3 { options prover = completion }
instance i9 = union i1 + i1 : s3 { options prover = completion }
instance i10 = coproduct_sigma (identity s3) i1 (identity s3) i1 : s3 { options prover = completion }
instance i20 = coproduct_unrestricted i1 + i2 : s3 { options prover = completion }
instance i20 = coproduct i1 + i2 : s3 { options prover = completion }
instance i11 = coequalize (identity i1) (identity i1) { options prover = completion }
instance i12 = chase literal : s3 { } i3 
instance i15 = anonymize i12
instance i16 = frozen q3 Q
//random -- see Employees example
instance i17 = pi (identity s2) (empty : s2) { options prover = completion }
//random -- see delta example
//import_jdbc -- see JDBC example
//import_jdbc_all -- see JDBC example
//quotient_jdbc -- see JDBC example
+9 −0
Changes for resources/examples/aql/Delta.aql: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -52,6 +52,15 @@ instance J = literal : D {
		XF667.salary0 = 250 XF891.salary0 = 300 XF221.salary0 = 100
}  


instance J2 = random : D {
	generators
		T -> 10
	//options
	//	random_seed = 2
}


instance deltaFJ = delta F J
instance deltaFJ_alt1 = eval (toQuery F) J
instance deltaFJ_alt2 = coeval (toCoQuery F) J
+0 −8
Changes for resources/examples/aql/Employees.aql: 0 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -124,14 +124,6 @@ instance J = eval Q IJava

////////////////////////////////////////////////////////////////////////////////////////////////////

instance IRandom = random : SJava {
	generators
		Employee -> 10
		Department -> 2
	//options
	//	random_seed = 2
}

////////////////////////////////////////////////////////////////////////////////////////////////////
//demonstrates 'interpret as instance' option.   which interprets the instance as a model, 
//similar to JDBC / CSV import.  This behavior can be useful when writing down an 
Loading