on master help sign in
rename date example to cjdate example
a244f5fAgentM
docs/15_minute_tutorial.markdown+1−1
@@ -28,7 +28,7 @@ Note that TutorialD is strongly-typed- no type coercions take place automaticall
28### Load the Canonical Chris Date Example
28### Load the Canonical Chris Date Example
29
29
30```
30```
31−TutorialD (master/main): :importexample date
31+TutorialD (master/main): :importexample cjdate
32```
32```
33
33
34```:importexample``` (do not skip typing the preceding colon), loads a built-in example schema and executes it to change the state of the database. In this case, the relations "s" (supplier), "p" (product), and "sp" (suppliers-products) are now loaded.
34```:importexample``` (do not skip typing the preceding colon), loads a built-in example schema and executes it to change the state of the database. In this case, the relations "s" (supplier), "p" (product), and "sp" (suppliers-products) are now loaded.
docs/import_export_csv.markdown+2−2
@@ -9,7 +9,7 @@ If a relation variable cannot be exported due to data types which are not suppor
9### Example Export
9### Example Export
10
10
11```
11```
12−TutorialD (master/main): :importexample date
12+TutorialD (master/main): :importexample cjdate
13TutorialD (master/main): :exportcsv s "/tmp/csv"
13TutorialD (master/main): :exportcsv s "/tmp/csv"
14```
14```
15```
15```
@@ -37,7 +37,7 @@ s#,sname,status,city
37S6,Samson,100,New York
37S6,Samson,100,New York
38```
38```
39```
39```
40−TutorialD (master/main): :importexample date
40+TutorialD (master/main): :importexample cjdate
41TutorialD (master/main): :showexpr s
41TutorialD (master/main): :showexpr s
42┌──────────┬────────┬───────────┬───────────────┐
42┌──────────┬────────┬───────────┬───────────────┐
43│city::Text│s#::Text│sname::Text│status::Integer│
43│city::Text│s#::Text│sname::Text│status::Integer│
docs/reaching_out_of_the_tarpit.markdown+1−1
@@ -57,7 +57,7 @@ Project:M36 implements multiple interfaces:
57To understand how Project:M36 stacks up against the fictional programming language shown in the paper, we have implemented the [example from the paper](/examples/out_of_the_tarpit.tutd). The language used in the script is a dialect of Chris Date's TutorialD language. It can be loaded into an interactive ```tutd``` session like so:
57To understand how Project:M36 stacks up against the fictional programming language shown in the paper, we have implemented the [example from the paper](/examples/out_of_the_tarpit.tutd). The language used in the script is a dialect of Chris Date's TutorialD language. It can be loaded into an interactive ```tutd``` session like so:
58
58
59```
59```
60−TutorialD (master/main): :importexample date
60+TutorialD (master/main): :importexample cjdate
61TutorialD (master/main): :showexpr p
61TutorialD (master/main): :showexpr p
62┌───────────────────┬────────────┬───────────────────┬────────────┬────────────┐
62┌───────────────────┬────────────┬───────────────────┬────────────┬────────────┐
63│address::Address │agent::Agent│dateRegistered::Day│photo::Text │price::Price│
63│address::Address │agent::Agent│dateRegistered::Day│photo::Text │price::Price│
docs/tutd_cheatsheet.markdown+1−1
@@ -47,7 +47,7 @@ Database context expressions take the current database context as input and alte
47
47
48|Database Context Expression |Description |
48|Database Context Expression |Description |
49|------------------------------------------------------|---------------------------------------|
49|------------------------------------------------------|---------------------------------------|
50−|`:importexample date`|Imports a precooked schema from Chris Date's books resulting in relvars `s`, `sp`, and `p`|
50+|`:importexample cjdate`|Imports a precooked schema from Chris Date's books resulting in relvars `s`, `sp`, and `p`|
51|`newrelvar:=relation{tuple{age 3}}`|Assign a new relation variable named `newrelvar`|
51|`newrelvar:=relation{tuple{age 3}}`|Assign a new relation variable named `newrelvar`|
52|`undefine s`|Remove a relation variable|
52|`undefine s`|Remove a relation variable|
53|`insert s relation{tuple{city "Boston",s# "S10",sname "Gonzalez",status 10}}`| Append to an existing relation variable with another relational expression|
53|`insert s relation{tuple{city "Boston",s# "S10",sname "Gonzalez",status 10}}`| Append to an existing relation variable with another relational expression|
docs/tutd_tutorial.markdown+1−1
@@ -19,7 +19,7 @@ TutorialD (master/main):
19The examples in this tutorial can be executed after loading Chris Date's sample relations using:
19The examples in this tutorial can be executed after loading Chris Date's sample relations using:
20
20
21```
21```
22−:importexample date
22+:importexample cjdate
23```
23```
24
24
25Each section assumes a fresh instance of the Date examples. The relation variables created in the script are:
25Each section assumes a fresh instance of the Date examples. The relation variables created in the script are:
jupyter/TutorialD Notebook Walkthrough.ipynb+1−1
@@ -38,7 +38,7 @@
38 }
38 }
39 ],
39 ],
40 "source": [
40 "source": [
41− ":importexample date"
41+ ":importexample cjdate"
42 ]
42 ]
43 },
43 },
44 {
44 {
src/bin/ProjectM36/Server/WebSocket/websocket-client.html+1−1
@@ -126,7 +126,7 @@ margin-bottom: 5pt;
126 <li>:showrelvars</li>
126 <li>:showrelvars</li>
127 <li>:showexpr true</li>
127 <li>:showexpr true</li>
128 <li>:showexpr false</li>
128 <li>:showexpr false</li>
129− <li>:importexample date</li>
129+ <li>:importexample cjdate</li>
130 <li>:showexpr s join sp</li>
130 <li>:showexpr s join sp</li>
131 <li>update s where city=&quot;Paris&quot; (status:=10)</li>
131 <li>update s where city=&quot;Paris&quot; (status:=10)</li>
132 <li>:showexpr s</li>
132 <li>:showexpr s</li>
src/bin/TutorialD/Interpreter/Import/BasicExamples.hs+2−2
@@ -20,8 +20,8 @@ importBasicExampleOperatorP :: Parser ImportBasicExampleOperator
20importBasicExampleOperatorP = do
20importBasicExampleOperatorP = do
21 reservedOp ":importexample"
21 reservedOp ":importexample"
22 example <- identifier
22 example <- identifier
23− if example == "date" then
23+ if example == "cjdate" then
24 pure ImportBasicDateExampleOperator
24 pure ImportBasicDateExampleOperator
25 else
25 else
26 fail "Unknown example name"
26 fail "Unknown example name"
27−
27+
src/bin/TutorialD/Interpreter/RelationalExpr.hs+2
@@ -212,10 +212,12 @@ atomExprP = consumeAtomExprP True
212consumeAtomExprP :: RelationalMarkerExpr a => Bool -> Parser (AtomExprBase a)
212consumeAtomExprP :: RelationalMarkerExpr a => Bool -> Parser (AtomExprBase a)
213consumeAtomExprP consume = try functionAtomExprP <|>
213consumeAtomExprP consume = try functionAtomExprP <|>
214 try (parens (constructedAtomExprP True)) <|>
214 try (parens (constructedAtomExprP True)) <|>
215+ try (parens relationalAtomExprP) <|>
215 constructedAtomExprP consume <|>
216 constructedAtomExprP consume <|>
216 attributeAtomExprP <|>
217 attributeAtomExprP <|>
217 try nakedAtomExprP <|>
218 try nakedAtomExprP <|>
218 relationalAtomExprP
219 relationalAtomExprP
220+
219
221
220attributeAtomExprP :: Parser (AtomExprBase a)
222attributeAtomExprP :: Parser (AtomExprBase a)
221attributeAtomExprP = do
223attributeAtomExprP = do