diff --git a/TODO.md b/TODO.md index e69de29b..4f4c2201 100644 --- a/TODO.md +++ b/TODO.md @@ -0,0 +1,3 @@ +rename `return` to `result` in inet code +update readme -- for renaming from `return` to `result` +update docs -- for renaming from `return` to `result` diff --git a/tests/builtin/run-only-top-port.i.out b/tests/builtin/run-only-top-port.i.out index f6b64bcd..48d6bf21 100644 --- a/tests/builtin/run-only-top-port.i.out +++ b/tests/builtin/run-only-top-port.i.out @@ -2,7 +2,7 @@ netFromPort (add1₂₅)-value! (add1₂₅)-prev value-(add1₂₃) (add1₂₃)-prev value-(zero₂₁) end -netFromPort (add₁₀)-return +netFromPort (add₁₀)-result (add₁₀)-target!value-(add1₂₂) (add₁₀)-addend value-(add1₂₁) (add1₂₂)-prev value-(zero₂₀) diff --git a/tests/builtin/spread.i b/tests/builtin/spread.i index a0bc804e..9c4dfbf6 100644 --- a/tests/builtin/spread.i +++ b/tests/builtin/spread.i @@ -6,10 +6,10 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end -(add) @spread $target $addend $return +(add) @spread $target $addend $result target @inspect addend @inspect -return @inspect +result @inspect diff --git a/tests/builtin/spread.i.out b/tests/builtin/spread.i.out index 68bc6b7e..bf2f650a 100644 --- a/tests/builtin/spread.i.out +++ b/tests/builtin/spread.i.out @@ -1,3 +1,3 @@ netFromPort (add₀)-target! end netFromPort (add₀)-addend end -netFromPort (add₀)-return end +netFromPort (add₀)-result end diff --git a/tests/checking/connect-type.error.i b/tests/checking/connect-type.error.i index bd9df357..811697e7 100644 --- a/tests/checking/connect-type.error.i +++ b/tests/checking/connect-type.error.i @@ -9,15 +9,15 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - (add)-return sole @connect + (add)-result sole @connect end rule add1 add (add)-addend (add1)-prev add add1 - return-(add) + result-(add) end diff --git a/tests/checking/connect-type.error.i.err b/tests/checking/connect-type.error.i.err index 75e4634c..24771f75 100644 --- a/tests/checking/connect-type.error.i.err +++ b/tests/checking/connect-type.error.i.err @@ -10,7 +10,7 @@ 14 | 15 |rule zero add 16 | (add)-addend - 17 | (add)-return sole @connect + 17 | (add)-result sole @connect 18 |end 19 | @@ -19,12 +19,12 @@ rule nodes: zero add 11 | -------- - 12 | Nat :return + 12 | Nat :result 13 |end 14 | 15 |rule zero add 16 | (add)-addend - 17 | (add)-return sole @connect + 17 | (add)-result sole @connect 18 |end 19 | 20 |rule add1 add diff --git a/tests/checking/locals-not-used-in-rule.error.i b/tests/checking/locals-not-used-in-rule.error.i index d30e5c00..e8cb3911 100644 --- a/tests/checking/locals-not-used-in-rule.error.i +++ b/tests/checking/locals-not-used-in-rule.error.i @@ -15,12 +15,12 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add @@ -29,5 +29,5 @@ rule add1 add 'abc $abc - add1 return-(add) + add1 result-(add) end diff --git a/tests/checking/locals-not-used-in-rule.error.i.err b/tests/checking/locals-not-used-in-rule.error.i.err index edb613d8..74ddc673 100644 --- a/tests/checking/locals-not-used-in-rule.error.i.err +++ b/tests/checking/locals-not-used-in-rule.error.i.err @@ -7,7 +7,7 @@ rule nodes: add1 add 22 | (add)-addend - 23 | return-(add) + 23 | result-(add) 24 |end 25 | 26 |rule add1 add @@ -16,6 +16,6 @@ 29 | 30 | 'abc $abc 31 | - 32 | add1 return-(add) + 32 | add1 result-(add) 33 |end 34 | diff --git a/tests/checking/rule-node-order.error.i b/tests/checking/rule-node-order.error.i index c0f834e4..e171c2f8 100644 --- a/tests/checking/rule-node-order.error.i +++ b/tests/checking/rule-node-order.error.i @@ -9,17 +9,17 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule add zero (add)-addend - (add)-return sole @connect + (add)-result sole @connect end // The correct definition is: // rule zero add // (add)-addend -// (add)-return sole @connect +// (add)-result sole @connect // end diff --git a/tests/checking/rule-node-order.error.i.err b/tests/checking/rule-node-order.error.i.err index ac63af2d..2a1fc4d8 100644 --- a/tests/checking/rule-node-order.error.i.err +++ b/tests/checking/rule-node-order.error.i.err @@ -8,12 +8,12 @@ rule nodes: add zero 11 | -------- - 12 | Nat :return + 12 | Nat :result 13 |end 14 | 15 |rule add zero 16 | (add)-addend - 17 | (add)-return sole @connect + 17 | (add)-result sole @connect 18 |end 19 | 20 |// The correct definition is: diff --git a/tests/checking/rule-sign.error.i b/tests/checking/rule-sign.error.i index e9ed21f4..a96e48e3 100644 --- a/tests/checking/rule-sign.error.i +++ b/tests/checking/rule-sign.error.i @@ -9,22 +9,22 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend prev-(add1) add add1 - return-(add) + result-(add) end // The correct definition is: // rule add1 add // (add)-addend (add1)-prev add add1 -// return-(add) +// result-(add) // end diff --git a/tests/checking/rule-sign.error.i.err b/tests/checking/rule-sign.error.i.err index b1b33503..32aa363a 100644 --- a/tests/checking/rule-sign.error.i.err +++ b/tests/checking/rule-sign.error.i.err @@ -12,7 +12,7 @@ 19 | 20 |rule add1 add 21 | (add)-addend prev-(add1) add add1 - 22 | return-(add) + 22 | result-(add) 23 |end [DefineRule.execute] I fail to define rule. @@ -20,12 +20,12 @@ rule nodes: add1 add 16 | (add)-addend - 17 | return-(add) + 17 | result-(add) 18 |end 19 | 20 |rule add1 add 21 | (add)-addend prev-(add1) add add1 - 22 | return-(add) + 22 | result-(add) 23 |end 24 | 25 |// The correct definition is: diff --git a/tests/checking/rule-type-occur-check.error.i b/tests/checking/rule-type-occur-check.error.i index 6ec32939..d155f04d 100644 --- a/tests/checking/rule-type-occur-check.error.i +++ b/tests/checking/rule-type-occur-check.error.i @@ -16,19 +16,19 @@ node append 'A List :target! 'A List :rest -------- - 'A List :return + 'A List :result end rule null append (append)-rest - return-(append) + result-(append) end rule cons append (cons)-head (append)-rest (cons)-tail append cons - return-(append) + result-(append) end // The correct definition is: @@ -36,5 +36,5 @@ end // rule cons append // (append)-rest (cons)-tail append // (cons)-head cons -// return-(append) +// result-(append) // end diff --git a/tests/checking/rule-type-occur-check.error.i.err b/tests/checking/rule-type-occur-check.error.i.err index 8654fecd..27705aaa 100644 --- a/tests/checking/rule-type-occur-check.error.i.err +++ b/tests/checking/rule-type-occur-check.error.i.err @@ -16,7 +16,7 @@ 28 | (cons)-head 29 | (append)-rest (cons)-tail append 30 | cons - 31 | return-(append) + 31 | result-(append) 32 |end [DefineRule.execute] I fail to define rule. @@ -24,14 +24,14 @@ rule nodes: cons append 23 | (append)-rest - 24 | return-(append) + 24 | result-(append) 25 |end 26 | 27 |rule cons append 28 | (cons)-head 29 | (append)-rest (cons)-tail append 30 | cons - 31 | return-(append) + 31 | result-(append) 32 |end 33 | 34 |// The correct definition is: diff --git a/tests/checking/rule-type.error.i b/tests/checking/rule-type.error.i index 2c9b9bb8..4e89ca66 100644 --- a/tests/checking/rule-type.error.i +++ b/tests/checking/rule-type.error.i @@ -9,15 +9,15 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend (add1)-prev add sole add1 - return-(add) + result-(add) end diff --git a/tests/checking/rule-type.error.i.err b/tests/checking/rule-type.error.i.err index 4663d97f..e77b1ed3 100644 --- a/tests/checking/rule-type.error.i.err +++ b/tests/checking/rule-type.error.i.err @@ -11,7 +11,7 @@ 19 | 20 |rule add1 add 21 | (add)-addend (add1)-prev add sole add1 - 22 | return-(add) + 22 | result-(add) 23 |end [DefineRule.execute] I fail to define rule. @@ -19,11 +19,11 @@ rule nodes: add1 add 16 | (add)-addend - 17 | return-(add) + 17 | result-(add) 18 |end 19 | 20 |rule add1 add 21 | (add)-addend (add1)-prev add sole add1 - 22 | return-(add) + 22 | result-(add) 23 |end 24 | diff --git a/tests/datatype/Bin.i b/tests/datatype/Bin.i index 3a7ee784..f5e04a8b 100644 --- a/tests/datatype/Bin.i +++ b/tests/datatype/Bin.i @@ -168,15 +168,15 @@ from "./Nat.i" node natDouble Nat :target! ------------ - Nat :return + Nat :result end rule zero natDouble - zero return-(natDouble) + zero result-(natDouble) end rule add1 natDouble - (add1)-prev natDouble add1 add1 return-(natDouble) + (add1)-prev natDouble add1 add1 result-(natDouble) end node ntob diff --git a/tests/datatype/DiffList.i b/tests/datatype/DiffList.i index e2917079..b0a62cdb 100644 --- a/tests/datatype/DiffList.i +++ b/tests/datatype/DiffList.i @@ -20,22 +20,22 @@ node diffAppend 'A DiffList :target! 'A DiffList :rest -------- - 'A DiffList :return + 'A DiffList :result end node diffOpen 'A DiffList :target! 'A List :list ---------- - 'A List :return + 'A List :result end rule diff diffAppend - (diff)-front diff return-(diffAppend) + (diff)-front diff result-(diffAppend) (diffAppend)-rest diffOpen back-(diff) end rule diff diffOpen (diff)-back list-(diffOpen) - (diff)-front return-(diffOpen) + (diff)-front result-(diffOpen) end diff --git a/tests/datatype/DiffList.test.i.out b/tests/datatype/DiffList.test.i.out index 055b32c7..04a42936 100644 --- a/tests/datatype/DiffList.test.i.out +++ b/tests/datatype/DiffList.test.i.out @@ -1,4 +1,4 @@ -netFromPort (diffAppend₂)-return +netFromPort (diffAppend₂)-result (diffAppend₂)-target!value-(diff₆) (diffAppend₂)-rest value-(diff₅) (diff₆)-front value-(cons₇) @@ -19,7 +19,7 @@ netFromPort (diff₇)-value! (cons₆)-tail value-(cons₅) (cons₅)-head value-(sole₃) end -netFromPort (diffAppend₄)-return +netFromPort (diffAppend₄)-result (diffAppend₄)-target!value-(diff₁₁) (diffAppend₄)-rest value-(diff₁₀) (diff₁₁)-front value-(cons₁₅) diff --git a/tests/datatype/List.i b/tests/datatype/List.i index e4d124d1..98795c36 100644 --- a/tests/datatype/List.i +++ b/tests/datatype/List.i @@ -16,16 +16,16 @@ node append 'A List :target! 'A List :rest -------- - 'A List :return + 'A List :result end rule null append (append)-rest - return-(append) + result-(append) end rule cons append (append)-rest (cons)-tail append (cons)-head cons - return-(append) + result-(append) end diff --git a/tests/datatype/List.test.i.out b/tests/datatype/List.test.i.out index 81f03701..1f74c477 100644 --- a/tests/datatype/List.test.i.out +++ b/tests/datatype/List.test.i.out @@ -1,4 +1,4 @@ -netFromPort (append₄)-return +netFromPort (append₄)-result (append₄)-target!value-(cons₁₃) (append₄)-rest value-(cons₁₀) (cons₁₃)-head value-(sole₁₁) diff --git a/tests/datatype/Nat.i b/tests/datatype/Nat.i index a7486919..8d50ef37 100644 --- a/tests/datatype/Nat.i +++ b/tests/datatype/Nat.i @@ -15,18 +15,18 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend (add1)-prev add - add1 return-(add) + add1 result-(add) end @@ -77,18 +77,18 @@ node mul Nat :target! Nat :mulend -------- - Nat :return + Nat :result end rule zero mul (mul)-mulend natErase - zero return-(mul) + zero result-(mul) end rule add1 mul (mul)-mulend natDup $first $second (add1)-prev first mul second add - return-(mul) + result-(mul) end // To define `max`, we need `maxAux`. @@ -97,31 +97,31 @@ node maxAux Nat :first Nat :second! -------- - Nat :return + Nat :result end node max Nat :first! Nat :second ---------- - Nat :return + Nat :result end rule zero max - (max)-second return-(max) + (max)-second result-(max) end rule add1 max (max)-second (add1)-prev maxAux - return-(max) + result-(max) end rule zero maxAux (maxAux)-first add1 - return-(maxAux) + result-(maxAux) end rule add1 maxAux (add1)-prev (maxAux)-first max - add1 return-(maxAux) + add1 result-(maxAux) end diff --git a/tests/datatype/Nat.test.i.out b/tests/datatype/Nat.test.i.out index 9049e308..bd7121a4 100644 --- a/tests/datatype/Nat.test.i.out +++ b/tests/datatype/Nat.test.i.out @@ -1,9 +1,9 @@ -netFromPort (add₁₀)-return +netFromPort (add₁₀)-result (add₁₀)-target!value-(zero₂₀) (add₁₀)-addend value-(zero₁₉) end netFromPort (zero₁₉)-value! end -netFromPort (add₁₁)-return +netFromPort (add₁₁)-result (add₁₁)-target!value-(add1₂₂) (add₁₁)-addend value-(add1₂₁) (add1₂₂)-prev value-(zero₂₂) @@ -13,9 +13,9 @@ netFromPort (add1₂₃)-value! (add1₂₃)-prev value-(add1₂₁) (add1₂₁)-prev value-(zero₂₁) end -netFromPort (add₁₅)-return - (add₁₅)-target return-(add₁₄) - (add₁₅)-addend return-(add₁₃) +netFromPort (add₁₅)-result + (add₁₅)-target result-(add₁₄) + (add₁₅)-addend result-(add₁₃) (add₁₄)-target!value-(add1₂₇) (add₁₄)-addend value-(add1₂₆) (add1₂₇)-prev value-(zero₂₆) @@ -31,7 +31,7 @@ netFromPort (add1₃₀)-value! (add1₂₈)-prev value-(add1₂₄) (add1₂₄)-prev value-(zero₂₃) end -netFromPort (add₂₀)-return +netFromPort (add₂₀)-result (add₂₀)-target!value-(add1₃₂) (add₂₀)-addend value-(zero₂₇) (add1₃₂)-prev value-(zero₂₈) @@ -47,7 +47,7 @@ end netFromPort (zero₃₄)-value! end netFromPort (zero₃₄)-value! end netFromPort (natDup₄)-first - (natDup₄)-target return-(add₃₀) + (natDup₄)-target result-(add₃₀) (add₃₀)-target!value-(add1₄₃) (add₃₀)-addend value-(add1₄₂) (add1₄₃)-prev value-(zero₃₆) @@ -57,9 +57,9 @@ netFromPort (add1₄₅)-value! (add1₄₅)-prev value-(add1₄₇) (add1₄₇)-prev value-(zero₃₇) end -netFromPort (mul₃)-return - (mul₃)-target return-(add₃₃) - (mul₃)-mulend return-(add₃₂) +netFromPort (mul₃)-result + (mul₃)-target result-(add₃₃) + (mul₃)-mulend result-(add₃₂) (add₃₃)-target!value-(add1₅₂) (add₃₃)-addend value-(add1₅₁) (add1₅₂)-prev value-(zero₄₂) @@ -75,18 +75,18 @@ netFromPort (add1₅₇)-value! (add1₆₃)-prev value-(add1₆₆) (add1₆₆)-prev value-(zero₅₁) end -netFromPort (mul₈)-return - (mul₈)-target return-(add₄₇) - (mul₈)-mulend return-(add₄₅) +netFromPort (mul₈)-result + (mul₈)-target result-(add₄₇) + (mul₈)-mulend result-(add₄₅) (add₄₇)-target!value-(add1₇₂) - (add₄₇)-addend return-(add₄₆) + (add₄₇)-addend result-(add₄₆) (add1₇₂)-prev value-(zero₅₇) (add₄₆)-target!value-(add1₇₁) (add₄₆)-addend value-(add1₇₀) (add1₇₁)-prev value-(zero₅₆) (add1₇₀)-prev value-(zero₅₅) (add₄₅)-target!value-(add1₆₉) - (add₄₅)-addend return-(add₄₄) + (add₄₅)-addend result-(add₄₄) (add1₆₉)-prev value-(zero₅₄) (add₄₄)-target!value-(add1₆₈) (add₄₄)-addend value-(add1₆₇) diff --git a/tests/module/define-rule-for-non-own-node.error.i b/tests/module/define-rule-for-non-own-node.error.i index 195697e9..9b19dcf3 100644 --- a/tests/module/define-rule-for-non-own-node.error.i +++ b/tests/module/define-rule-for-non-own-node.error.i @@ -2,10 +2,10 @@ import Nat, zero, add1, add from "../datatype/Nat.i" rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend (add1)-prev add add1 - return-(add) + result-(add) end diff --git a/tests/module/define-rule-for-non-own-node.error.i.err b/tests/module/define-rule-for-non-own-node.error.i.err index da338b3d..153ee45b 100644 --- a/tests/module/define-rule-for-non-own-node.error.i.err +++ b/tests/module/define-rule-for-non-own-node.error.i.err @@ -12,7 +12,7 @@ 2 | 3 |rule zero add 4 | (add)-addend - 5 | return-(add) + 5 | result-(add) 6 |end 7 | 8 |rule add1 add diff --git a/tests/module/import.i.out b/tests/module/import.i.out index a115079b..1d3e7dd3 100644 --- a/tests/module/import.i.out +++ b/tests/module/import.i.out @@ -1,4 +1,4 @@ -netFromPort (add₁₀)-return +netFromPort (add₁₀)-result (add₁₀)-target!value-(add1₂₁) (add₁₀)-addend value-(zero₁₉) (add1₂₁)-prev value-(zero₂₀) diff --git a/tests/module/require.i.out b/tests/module/require.i.out index a115079b..1d3e7dd3 100644 --- a/tests/module/require.i.out +++ b/tests/module/require.i.out @@ -1,4 +1,4 @@ -netFromPort (add₁₀)-return +netFromPort (add₁₀)-result (add₁₀)-target!value-(add1₂₁) (add₁₀)-addend value-(zero₁₉) (add1₂₁)-prev value-(zero₂₀) diff --git a/tests/module/reuqire-more-rules-2.i b/tests/module/reuqire-more-rules-2.i index 8671955c..547edba3 100644 --- a/tests/module/reuqire-more-rules-2.i +++ b/tests/module/reuqire-more-rules-2.i @@ -4,16 +4,16 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend (add1)-prev add - add1 return-(add) + add1 result-(add) end diff --git a/tests/statement/compose.i b/tests/statement/compose.i index 01f87252..ca20a470 100644 --- a/tests/statement/compose.i +++ b/tests/statement/compose.i @@ -6,17 +6,17 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend (add1)-prev add add1 - return-(add) + result-(add) end zero add1 add1 @inspect diff --git a/tests/statement/rule-before-node.error.i b/tests/statement/rule-before-node.error.i index 7c4e8d8f..24e287b8 100644 --- a/tests/statement/rule-before-node.error.i +++ b/tests/statement/rule-before-node.error.i @@ -4,12 +4,12 @@ node add1 Nat :prev -- Nat :value! end rule zero add (add)-addend - return-(add) + result-(add) end node add Nat :target! Nat :addend ---------- - Nat :return + Nat :result end diff --git a/tests/statement/rule-before-node.error.i.err b/tests/statement/rule-before-node.error.i.err index 3e9152ac..81a6a2b1 100644 --- a/tests/statement/rule-before-node.error.i.err +++ b/tests/statement/rule-before-node.error.i.err @@ -12,7 +12,7 @@ 4 | 5 |rule zero add 6 | (add)-addend - 7 | return-(add) + 7 | result-(add) 8 |end 9 | 10 |node add diff --git a/tests/value/input-and-output-placeholders.i b/tests/value/input-and-output-placeholders.i index 897989ab..4c3b4e09 100644 --- a/tests/value/input-and-output-placeholders.i +++ b/tests/value/input-and-output-placeholders.i @@ -6,17 +6,17 @@ node add Nat :target! Nat :addend -------- - Nat :return + Nat :result end rule zero add (add)-addend - return-(add) + result-(add) end rule add1 add (add)-addend @inspect (add1)-prev add add1 - (add)-return @inspect @connect + (add)-result @inspect @connect end zero add1 zero add1 add @inspect diff --git a/tests/value/input-and-output-placeholders.i.out b/tests/value/input-and-output-placeholders.i.out index 638b6918..6d81be84 100644 --- a/tests/value/input-and-output-placeholders.i.out +++ b/tests/value/input-and-output-placeholders.i.out @@ -1,6 +1,6 @@ netFromPort (@inputPortCap₂)-covering end netFromPort (@ouputPortCap₁)-covering end -netFromPort (add₃)-return +netFromPort (add₃)-result (add₃)-target!value-(add1₃) (add₃)-addend value-(add1₂) (add1₃)-prev value-(zero₂)