Binding Strength: Difference between revisions
From NARS2000
Jump to navigationJump to search
(Created page with "=Binding Strength= The rules for how Variables, Functions, Operators, and Hyperators are covered in the following table: {| border="1" cellspacing="0" cellpadding="5" !# !Ca...") |
No edit summary |
||
Line 1: | Line 1: | ||
= | ==Table== | ||
The rules for how Variables, Functions, Operators, and Hyperators are covered in the following table: | The rules for how Variables, Functions, Operators, and Hyperators are covered in the following table: | ||
Line 9: | Line 9: | ||
!Example | !Example | ||
|- | |- | ||
|align="right"|12: || Brackets left || Brackets to what is on their left || <apll>"? [ | |align="right"|12: || Brackets left || Brackets to what is on their left || <apll>"? […]"</apll> | ||
|- | |- | ||
|align="right"|11: || Specification left || Left arrow to what is on its left || <apll>"? ←"</apll> | |align="right"|11: || Specification left || Left arrow to what is on its left || <apll>"? ←"</apll> | ||
Line 27: | Line 27: | ||
|align="right"| 4: || Left operand || Operator to its left operand || <apll>"? MOP"</apll> | |align="right"| 4: || Left operand || Operator to its left operand || <apll>"? MOP"</apll> | ||
|- | |- | ||
|align="right"| 4: || Trains to right paren || || <apll>" | |align="right"| 4: || Trains to right paren || || <apll>"… F)"</apll> | ||
|- | |- | ||
|align="right"| 3: || Left paren to Trains || || <apll>"(F | |align="right"| 3: || Left paren to Trains || || <apll>"(F …"</apll> | ||
|- | |- | ||
|align="right"| 3: || Left argument || Function to its left argument || <apll>"A F"</apll> | |align="right"| 3: || Left argument || Function to its left argument || <apll>"A F"</apll> | ||
Line 37: | Line 37: | ||
|align="right"| 1: || Specification right || Left arrow to what is on its right || <apll>"← ?"</apll> | |align="right"| 1: || Specification right || Left arrow to what is on its right || <apll>"← ?"</apll> | ||
|- | |- | ||
|align="right"| 0: || Brackets right || Brackets to what is on their right || <apll>"[ | |align="right"| 0: || Brackets right || Brackets to what is on their right || <apll>"[…] ?"</apll> | ||
|} | |} | ||
One way to look at these rules is that if you are given three names and/or symbols, you can always tell whether the middle object binds to the left or right object. | |||
==Vector Notation== | |||
As the above table indicates, Vector Notation has a lower Binding Strength than both a right operand to its operator and either hyperand to its hyperator. One consequence of this is a change introduced in NARS2000 Version 0.5.10 w.r.t. Numeric Strands. In particular, | |||
* A dyadic operator written as <apll>… dop 1 2 3</apll> is interpreted as having a right operand ('''short''' right scope) of <apll>1</apll> and a right argument of <apll>2 3</apll>. | |||
* A hyperator written as <apll>1 2 3 mhmo</apll> is interpreted as having a left hyperand ('''short''' left scope) of <apll>3</apll> and a left operand ('''long''' left scope) of <apll>1 2</apll>. | |||
* A dyadic hyperator written as <apll>… dhmo 1 2 3</apll> is interpreted as having a right hyperand ('''short''' right scope) of <apll>1</apll> and a right argument of <apll>2 3</apll>. | |||
* A dyadic hyperator written as <apll>… dhdo 1 2 3</apll> is interpreted as having a right hyperand ('''short''' right scope) of <apll>1</apll>, a right operand ('''short''' right scope) of <apll>2</apll>, and a right argument of <apll>3</apll>. | |||
To reduce confusion, use parentheses such as <apll>(LO (LH dhdo 1) 2) 3</apll>. |
Revision as of 16:10, 21 March 2019
Table
The rules for how Variables, Functions, Operators, and Hyperators are covered in the following table:
# | Category | Description | Example |
---|---|---|---|
12: | Brackets left | Brackets to what is on their left | "? […]" |
11: | Specification left | Left arrow to what is on its left | "? ←" |
10: | Right hyperand, right operand | Dyadic hyperator to its right hyperand | "HYP ?" |
9: | Right hyperand, left operand | Dyadic hyperator to its right hyperand | "HYP ?" |
8: | Left hyperand, right operand | Hyperator to its left hyperand | "? HYP" |
7: | Left hyperand, left operand | Hyperator to its left hyperand | "? HYP" |
6: | Right operand | Dyadic operator to its right operand | "DOP ?" |
5: | Vector notation | Array to an array | "A A" |
4: | Left operand | Operator to its left operand | "? MOP" |
4: | Trains to right paren | "… F)" | |
3: | Left paren to Trains | "(F …" | |
3: | Left argument | Function to its left argument | "A F" |
2: | Right argument | Function to its right argument | "F A" |
1: | Specification right | Left arrow to what is on its right | "← ?" |
0: | Brackets right | Brackets to what is on their right | "[…] ?" |
One way to look at these rules is that if you are given three names and/or symbols, you can always tell whether the middle object binds to the left or right object.
Vector Notation
As the above table indicates, Vector Notation has a lower Binding Strength than both a right operand to its operator and either hyperand to its hyperator. One consequence of this is a change introduced in NARS2000 Version 0.5.10 w.r.t. Numeric Strands. In particular,
- A dyadic operator written as … dop 1 2 3 is interpreted as having a right operand (short right scope) of 1 and a right argument of 2 3.
- A hyperator written as 1 2 3 mhmo is interpreted as having a left hyperand (short left scope) of 3 and a left operand (long left scope) of 1 2.
- A dyadic hyperator written as … dhmo 1 2 3 is interpreted as having a right hyperand (short right scope) of 1 and a right argument of 2 3.
- A dyadic hyperator written as … dhdo 1 2 3 is interpreted as having a right hyperand (short right scope) of 1, a right operand (short right scope) of 2, and a right argument of 3.
To reduce confusion, use parentheses such as (LO (LH dhdo 1) 2) 3.