Skip to content

Commit

Permalink
change principal port name
Browse files Browse the repository at this point in the history
- constructor use `value`
- eliminator use `target`
  • Loading branch information
xieyuheng committed Jul 30, 2023
1 parent ed4133f commit fcd9c00
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 105 deletions.
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[bug] why no active edge in `Nat.inet.four.initial`

`connect` v.s. `reconnect`

- `reconnect` is used in `PortReconnect`
Expand Down
12 changes: 6 additions & 6 deletions docs/tests/DiffList.inet
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
defnode sole -- return! end
defnode sole -- value! end

defnode null -- return! end
defnode null -- value! end

defnode cons
head
tail
-------
return!
value!
end

defnode diff
left
right
------
return!
value!
end

defnode diff_append
left!
target!
right
------
return
Expand All @@ -30,7 +30,7 @@ defrule diff diff_append
end

defnode diff_open
diff_list!
target!
list
------
return
Expand Down
12 changes: 6 additions & 6 deletions docs/tests/DiffList.inet.one_two_soles.finial.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(sole₁)-return head-(cons₂)
(sole₅)-return head-(cons₆)
(sole₇)-return head-(cons₈)
(cons₆)-return tail-(cons₈)
(sole₁)-value head-(cons₂)
(sole₅)-value head-(cons₆)
(sole₇)-value head-(cons₈)
(cons₆)-value tail-(cons₈)
(cons₆)-tail left-(diff₁₃)
(cons₂)-return return-(cons₈)
(cons₂)-value value-(cons₈)
(cons₂)-tail right-(diff₁₃)
(diff₁₃)-return
(diff₁₃)-value
16 changes: 8 additions & 8 deletions docs/tests/DiffList.inet.one_two_soles.initial.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(diff₉)-return!left-(diff_append₁₀)
(sole₁)-return head-(cons₂)
(cons₂)-return left-(diff₃)
(sole₅)-return head-(cons₆)
(sole₇)-return head-(cons₈)
(cons₆)-return tail-(cons₈)
(cons₈)-return left-(diff₉)
(diff₃)-return right-(diff_append₁₀)
(diff₉)-value!target-(diff_append₁₀)
(sole₁)-value head-(cons₂)
(cons₂)-value left-(diff₃)
(sole₅)-value head-(cons₆)
(sole₇)-value head-(cons₈)
(cons₆)-value tail-(cons₈)
(cons₈)-value left-(diff₉)
(diff₃)-value right-(diff_append₁₀)
(diff₃)-right tail-(cons₂)
(diff₉)-right tail-(cons₆)
(diff_append₁₀)-return
16 changes: 8 additions & 8 deletions docs/tests/DiffList.inet.two_two_soles.finial.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
(sole₁₅)-return head-(cons₁₆)
(sole₁₇)-return head-(cons₁₈)
(cons₁₆)-return tail-(cons₁₈)
(sole₂₁)-return head-(cons₂₂)
(sole₂₃)-return head-(cons₂₄)
(cons₂₂)-return tail-(cons₂₄)
(sole₁₅)-value head-(cons₁₆)
(sole₁₇)-value head-(cons₁₈)
(cons₁₆)-value tail-(cons₁₈)
(sole₂₁)-value head-(cons₂₂)
(sole₂₃)-value head-(cons₂₄)
(cons₂₂)-value tail-(cons₂₄)
(cons₂₂)-tail left-(diff₂₉)
(cons₁₈)-return return-(cons₂₄)
(cons₁₈)-value value-(cons₂₄)
(cons₁₆)-tail right-(diff₂₉)
(diff₂₉)-return
(diff₂₉)-value
20 changes: 10 additions & 10 deletions docs/tests/DiffList.inet.two_two_soles.initial.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(diff₂₅)-return!left-(diff_append₂₆)
(sole₁₅)-return head-(cons₁₆)
(sole₁₇)-return head-(cons₁₈)
(cons₁₆)-return tail-(cons₁₈)
(cons₁₈)-return left-(diff₁₉)
(sole₂₁)-return head-(cons₂₂)
(sole₂₃)-return head-(cons₂₄)
(cons₂₂)-return tail-(cons₂₄)
(cons₂₄)-return left-(diff₂₅)
(diff₁₉)-return right-(diff_append₂₆)
(diff₂₅)-value!target-(diff_append₂₆)
(sole₁₅)-value head-(cons₁₆)
(sole₁₇)-value head-(cons₁₈)
(cons₁₆)-value tail-(cons₁₈)
(cons₁₈)-value left-(diff₁₉)
(sole₂₁)-value head-(cons₂₂)
(sole₂₃)-value head-(cons₂₄)
(cons₂₂)-value tail-(cons₂₄)
(cons₂₄)-value left-(diff₂₅)
(diff₁₉)-value right-(diff_append₂₆)
(diff₁₉)-right tail-(cons₁₆)
(diff₂₅)-right tail-(cons₂₂)
(diff_append₂₆)-return
14 changes: 7 additions & 7 deletions docs/tests/List.inet
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
defnode sole
------
return!
value!
end

defnode null
------
return!
value!
end

defnode cons
head
tail
-------
return!
value!
end

defnode append
left!
right
target!
rest
------
return
end

defrule null append
(append)-right return-(append)
(append)-rest return-(append)
end

defrule cons append
(cons)-tail
(append)-right
(append)-rest
append
(cons)-head cons
return-(append)
Expand Down
26 changes: 13 additions & 13 deletions docs/tests/List.inet.six_soles.finial.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(sole₁₂)-return head-(cons₁₇)
(sole₅)-return head-(cons₁₉)
(cons₁₉)-return tail-(cons₁₇)
(sole₁₀)-return head-(cons₂₁)
(cons₂₁)-return tail-(cons₁₉)
(sole₃)-return head-(cons₂₃)
(cons₂₃)-return tail-(cons₂₁)
(sole₈)-return head-(cons₂₅)
(cons₂₅)-return tail-(cons₂₃)
(sole₁)-return head-(cons₂₇)
(cons₂₇)-return tail-(cons₂₅)
(null₀)-return tail-(cons₂₇)
(cons₁₇)-return
(sole₁₂)-value head-(cons₁₇)
(sole₅)-value head-(cons₁₉)
(cons₁₉)-value tail-(cons₁₇)
(sole₁₀)-value head-(cons₂₁)
(cons₂₁)-value tail-(cons₁₉)
(sole₃)-value head-(cons₂₃)
(cons₂₃)-value tail-(cons₂₁)
(sole₈)-value head-(cons₂₅)
(cons₂₅)-value tail-(cons₂₃)
(sole₁)-value head-(cons₂₇)
(cons₂₇)-value tail-(cons₂₅)
(null₀)-value tail-(cons₂₇)
(cons₁₇)-value
28 changes: 14 additions & 14 deletions docs/tests/List.inet.six_soles.initial.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
(cons₁₃)-return!left-(append₁₄)
(sole₁)-return head-(cons₂)
(null₀)-return tail-(cons₂)
(sole₃)-return head-(cons₄)
(cons₂)-return tail-(cons₄)
(sole₅)-return head-(cons₆)
(cons₄)-return tail-(cons₆)
(sole₈)-return head-(cons₉)
(null₇)-return tail-(cons₉)
(sole₁₀)-return head-(cons₁₁)
(cons₉)-return tail-(cons₁₁)
(sole₁₂)-return head-(cons₁₃)
(cons₁₁)-return tail-(cons₁₃)
(cons₆)-return right-(append₁₄)
(cons₁₃)-value!target-(append₁₄)
(sole₁)-value head-(cons₂)
(null₀)-value tail-(cons₂)
(sole₃)-value head-(cons₄)
(cons₂)-value tail-(cons₄)
(sole₅)-value head-(cons₆)
(cons₄)-value tail-(cons₆)
(sole₈)-value head-(cons₉)
(null₇)-value tail-(cons₉)
(sole₁₀)-value head-(cons₁₁)
(cons₉)-value tail-(cons₁₁)
(sole₁₂)-value head-(cons₁₃)
(cons₁₁)-value tail-(cons₁₃)
(cons₆)-value rest-(append₁₄)
(append₁₄)-return
11 changes: 5 additions & 6 deletions docs/tests/Nat.inet
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
defnode zero -- return! end
defnode zero -- value! end

defnode add1 prev -- return! end
defnode add1 prev -- value! end

defnode add x! y -- return end
defnode add target! addend -- return end

defrule zero add
(add)-y return-(add)
(add)-addend return-(add)
end

defrule add1 add
(add1)-prev (add)-y
add add1
(add1)-prev (add)-addend add add1
return-(add)
end

Expand Down
10 changes: 5 additions & 5 deletions docs/tests/Nat.inet.four.finial.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(add1₃₅)-return prev-(add1₂₉)
(add1₃₇)-return prev-(add1₃₅)
(add1₄₁)-return prev-(add1₃₇)
(zero₁₄)-return prev-(add1₄₁)
(add1₂₉)-return
(add1₃₅)-value prev-(add1₂₉)
(add1₃₇)-value prev-(add1₃₅)
(add1₄₁)-value prev-(add1₃₇)
(zero₁₄)-value prev-(add1₄₁)
(add1₂₉)-value
20 changes: 10 additions & 10 deletions docs/tests/Nat.inet.four.initial.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
(add1₁₇)-return!x-(add₁₈)
(add1₂₂)-return!x-(add₂₃)
(zero₁₄)-return prev-(add1₁₅)
(zero₁₆)-return prev-(add1₁₇)
(add1₁₅)-return y-(add₁₈)
(zero₁₉)-return prev-(add1₂₀)
(zero₂₁)-return prev-(add1₂₂)
(add1₂₀)-return y-(add₂₃)
(add₂₃)-return x-(add₂₄)
(add₁₈)-return y-(add₂₄)
(add1₁₇)-value!target-(add₁₈)
(add1₂₂)-value!target-(add₂₃)
(zero₁₄)-value prev-(add1₁₅)
(zero₁₆)-value prev-(add1₁₇)
(add1₁₅)-value addend-(add₁₈)
(zero₁₉)-value prev-(add1₂₀)
(zero₂₁)-value prev-(add1₂₂)
(add1₂₀)-value addend-(add₂₃)
(add₂₃)-return target-(add₂₄)
(add₁₈)-return addend-(add₂₄)
(add₂₄)-return
6 changes: 3 additions & 3 deletions docs/tests/Nat.inet.two.finial.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(add1₁₃)-return prev-(add1₁₁)
(zero₄)-return prev-(add1₁₃)
(add1₁₁)-return
(add1₁₃)-value prev-(add1₁₁)
(zero₄)-value prev-(add1₁₃)
(add1₁₁)-value
8 changes: 4 additions & 4 deletions docs/tests/Nat.inet.two.initial.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(add1₇)-return!x-(add₈)
(zero₄)-return prev-(add1₅)
(zero₆)-return prev-(add1₇)
(add1₅)-return y-(add₈)
(add1₇)-value!target-(add₈)
(zero₄)-value prev-(add1₅)
(zero₆)-value prev-(add1₇)
(add1₅)-value addend-(add₈)
(add₈)-return
2 changes: 1 addition & 1 deletion docs/tests/Nat.inet.zero_zero_add.finial.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(zero₀)-return
(zero₀)-value
4 changes: 2 additions & 2 deletions docs/tests/Nat.inet.zero_zero_add.initial.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(zero₁)-return!x-(add₂)
(zero₀)-return y-(add₂)
(zero₁)-value!target-(add₂)
(zero₀)-value addend-(add₂)
(add₂)-return

0 comments on commit fcd9c00

Please sign in to comment.