Skip to content

Commit

Permalink
Update 2 for alignment with conference paper.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPratten committed Sep 10, 2023
1 parent d6f75b9 commit 5e900aa
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 26 deletions.
10 changes: 5 additions & 5 deletions ACT_Conveyance_Duty.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"source": [
"# Australian Capital Territory (ACT) Conveyance Duty\n",
"\n",
"The following is an intensionally defined relation that captures the\n",
"The following is an sigma complete relation that captures the\n",
"relationship between price and [conveyance duty in the ACT from 1 July\n",
"2022](https://www.revenue.act.gov.au/duties/conveyance-duty). The duty\n",
"payable depends firstly on whether the purchase is non-commercial or\n",
Expand All @@ -37,15 +37,15 @@
"\n",
" - the effort in capturing this calculation is of the same order as\n",
" using a procedural or functional language, however the\n",
" `ACT_Conveyance_Duty` intensionally defined relation has a bigger\n",
" `ACT_Conveyance_Duty` sigma complete relation has a bigger\n",
" \"pay-off\". It is queryable in any direction, just like an ordinary\n",
" database table\n",
"\n",
" - the usage of an intensionally defined relation `units` in the\n",
" - the usage of an sigma complete relation `units` in the\n",
" definition of `ACT_Conveyance_Duty`. This is a reusable relation\n",
" that captures the idea of converting a value to a number of units, whether full or partial.\n",
"\n",
"The the `ACT_Conveyance_Duty` intensionally defined relation has the\n",
"The the `ACT_Conveyance_Duty` sigma complete relation has the\n",
"following attributes\n",
"\n",
"```\n",
Expand Down Expand Up @@ -325,7 +325,7 @@
},
"source": [
"### Definition\n",
"Here is the definition of the ```ACT_Conveyance_Duty``` intensionally defined relation."
"Here is the definition of the ```ACT_Conveyance_Duty``` sigma complete relation."
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions Australian_GST.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"source": [
"# Australian Goods and Services Tax (GST) Example\n",
"\n",
"The following is an example intensionally defined relation that captures\n",
"The following is an example sigma complete relation that captures\n",
"the relationship between consumer Price, the Goods and Services Tax\n",
"(GSTAmount), and the price before application of the GST (ExGSTAmount).\n",
"The definition is written in MiniZinc."
Expand Down Expand Up @@ -94,7 +94,7 @@
"constraint Price = GSTAmount*11;\n",
"```\n",
"\n",
"The following is the behaviour of this intensionally defined relation\n",
"The following is the behaviour of this sigma complete relation\n",
"under various queries. The `Australian_GST` relation returns an empty\n",
"extension when insufficiently constrained to lead to a finite extension.\n",
"\n",
Expand All @@ -106,7 +106,7 @@
"Query result is an empty relation.\n",
"\n",
"The same empty result is obtained when the relation is constrained in a\n",
"manner that violates the intension. For example:\n"
"manner that violates the predicate. For example:\n"
],
"metadata": {
"collapsed": false
Expand Down
10 changes: 5 additions & 5 deletions Birthday Money.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"| Original Language | OpenFisca |\n",
"| Retrieved | 2022-Nov-27 |\n",
"\n",
"_Lets revisit the example above using intensionally defined relations (IDRs)..._\n",
"_Lets revisit the example above using sigma complete relations (IDRs)..._\n",
"\n",
"## Initially a flat rate that applies to all children\n",
"\n",
"Initially the policy for birthday money was calculated as $10.00 per year. Here is an intensionally defined relation (IDR)\n",
"Initially the policy for birthday money was calculated as $10.00 per year. Here is a sigma complete relation:\n",
"```standard_birthday_money``` that captures this."
]
},
Expand Down Expand Up @@ -75,10 +75,10 @@
"collapsed": false
},
"source": [
"The language used to define IDRs is not so important, the crucial aspect is that the reader, and the computing system, understand the intension. The\n",
"The language used to define sigma complete relations is not so important, the crucial aspect is that the reader, and the computing system, understand the predicate. The\n",
"definition above happens to have been written in [MiniZinc](https://www.minizinc.org/).\n",
"\n",
"IDRs can be queried as if they are an ordinary database table that contains _all_ the answers. With this table defined, the\n",
"Sigma complete relations can be queried as if they are an ordinary database table that contains _all_ the answers. With this table defined, the\n",
"following query gives the expected answer:"
]
},
Expand Down Expand Up @@ -303,7 +303,7 @@
},
"source": [
"# Test Data\n",
"The intensionally define relation lends itself to automated generation of test cases. Here is an example of a test case that can be validated then copied and used with [pytest](https://docs.pytest.org/). The name of the function is generated by hashing the input query."
"The sigma complete relation lends itself to automated generation of test cases. Here is an example of a test case that can be validated then copied and used with [pytest](https://docs.pytest.org/). The name of the function is generated by hashing the input query."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion COVID_vaccinations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"# Australian COVID Vaccination eligibility and up-to-date (circa mid-2022)\n",
"This example explores the COVID vaccination eligibility and up-to-date regime in place in the middle of 2022.\n",
"\n",
"The relation (table) containing the rules has the following columns:\n",
"The sigma complete relation (table) containing the rules has the following columns:\n",
"```\n",
" covid_vaccinations(age,\n",
" recommended_doses,\n",
Expand Down
2 changes: 1 addition & 1 deletion COVID_vaccinations_and_work.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"# Australian COVID Vaccinations and Work (circa mid 2022)\n",
"This example explores the mandatory COVID vaccination regime in place in the middle of 2022. Three Australian states: New South Wales, Victoria, and Western Australia are covered in this example.\n",
"\n",
"The relation ```covid_vaccinations_and_work``` which contains the relevant rules is defined in [MiniZinc](https://www.minizinc.org/). Here is the definition."
"The sigma complete relation ```covid_vaccinations_and_work``` which contains the relevant rules is defined in [MiniZinc](https://www.minizinc.org/). Here is the definition."
],
"metadata": {
"collapsed": false
Expand Down
8 changes: 3 additions & 5 deletions Goal_seeking_covid_vaccination_and_work.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"cell_type": "markdown",
"source": [
"# Interactive Q&A with COVID Rules for Workplaces\n",
"Intensionally defined relations support goal directed question and answer with users. This notebook shows how to find the values in any column in the [covid_vaccinations_and_work](COVID_vaccinations_and_work.ipynb) relation through Q&A.\n",
"Sigma complete relations support goal directed question and answer with users. This notebook shows how to find the values in any column in the [covid_vaccinations_and_work](COVID_vaccinations_and_work.ipynb) relation through Q&A.\n",
"\n",
"Goal seeking is begun by nominating the relation being searched and the list of columns that are sought. Jetisu chooses the sequence of questions to ask that will give the answer in the fewest questions.\n",
"\n",
Expand All @@ -38,8 +38,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Finding covid_vaccination_work_recommended_doses, covid_vaccination_work_mandatory, please answer the following questions ...\n",
"\n"
"Finding covid_vaccination_work_recommended_doses, covid_vaccination_work_mandatory, please answer the following questions ...\n"
]
},
{
Expand Down Expand Up @@ -93,8 +92,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Finding work_sector, please answer the following questions ...\n",
"\n"
"Finding work_sector, please answer the following questions ...\n"
]
},
{
Expand Down
11 changes: 5 additions & 6 deletions Range.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"`ToStop`.\n",
"\n",
"The `range` relation is used to illustrate three aspects of\n",
"intensionally defined relations:\n",
"sigma complete relations:\n",
"\n",
"1. Multi-row result sets\n",
"\n",
Expand All @@ -39,7 +39,7 @@
" `WHERE` clause\n",
"\n",
"3. Querying a relation from multiple directions as we normally do for\n",
" extensionally defined relations.\n",
" data relations.\n",
"\n",
"Here is the definition MiniZinc:"
]
Expand Down Expand Up @@ -77,7 +77,7 @@
"collapsed": false
},
"source": [
"The first example query illustrates how an intensionally defined\n",
"The first example query illustrates how an sigma complete\n",
"relation may return multiple rows when queried, giving a result which starts at 10, finishes at 20 and has 5 values in\n",
"the sequence:"
]
Expand Down Expand Up @@ -116,7 +116,7 @@
},
"source": [
"The second example query shows how the contents of `WHERE` clauses may\n",
"be folded into intentional definition of the relation.\n",
"be folded into the predicate of the relation.\n",
"\n",
"```\n",
"\n",
Expand All @@ -138,8 +138,7 @@
" - Compute the result of the first example query and filter out rows\n",
" which do not have `nthValue < 13`\n",
"\n",
" - Push the \"`nthValue < 13`\" constraint down into an intensionally\n",
" defined relation `range1` and query it instead of `range`.\n",
" - Push the \"`nthValue < 13`\" constraint down into an sigma complete relation `range1` and query it instead of `range`.\n",
"\n",
"Here is an intensional definition of a relation where the query\n",
"constraints in the `WHERE` clause are pushed down into the MiniZinc\n",
Expand Down

0 comments on commit 5e900aa

Please sign in to comment.