Skip to content

Commit

Permalink
fix naming of diffOpen ports
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Sep 19, 2023
1 parent c17700e commit e03a3ce
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ append @run $result

### DiffList

[ [Goto The Playground](https://inet.run/playground/aW1wb3J0IExpc3QgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgovLyBDb25jYXRlbmF0aW9uIG9mIGxpc3RzIGlzIHBlcmZvcm1lZCBpbiBsaW5lYXIgdGltZQovLyB3aXRoIHJlc3BlY3QgdG8gaXRzIGZpcnN0IGFyZ3VtZW50LgovLyBDb25zdGFudCB0aW1lIGNvbmNhdGVuYXRpb24gaXMgcG9zc2libGUKLy8gd2l0aCBkaWZmZXJlbmNlLWxpc3RzOiB0aGUgaWRlYSBjb25zaXN0cyBpbgovLyBwbHVnZ2luZyB0aGUgZnJvbnQgb2YgdGhlIHNlY29uZCBhcmd1bWVudAovLyBhdCB0aGUgYmFjayBvZiB0aGUgZmlyc3Qgb25lLgoKdHlwZSBEaWZmTGlzdCBAVHlwZSAtLSBAVHlwZSBlbmQKCm5vZGUgZGlmZgogICdBIExpc3QgOmZyb250CiAgLS0tLS0tLQogICdBIExpc3QgOmJhY2sKICAnQSBEaWZmTGlzdCA6dmFsdWUhCmVuZAoKbm9kZSBkaWZmQXBwZW5kCiAgJ0EgRGlmZkxpc3QgOnRhcmdldCEKICAnQSBEaWZmTGlzdCA6cmVzdAogIC0tLS0tLS0tCiAgJ0EgRGlmZkxpc3QgOnJlc3VsdAplbmQKCm5vZGUgZGlmZk9wZW4KICAnQSBEaWZmTGlzdCA6dGFyZ2V0IQogICdBIExpc3QgOmxpc3QKICAtLS0tLS0tLS0tCiAgJ0EgTGlzdCA6cm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VzcyBsb2NhbCB2YXJpYWJsZSBgJGJhY2tgLAovLyB3ZSBjYW4gZnVydGhlciBzaW1wbGlmeSB0aGUgYWJvdmUgY29kZToKCihkaWZmKSBAc3ByZWFkICRmcm9udCB6ZXJvIGNvbnMgemVybyBjb25zIGZyb250IEBjb25uZWN0CihkaWZmKSBAc3ByZWFkICRmcm9udCB6ZXJvIGNvbnMgemVybyBjb25zIGZyb250IEBjb25uZWN0CmRpZmZBcHBlbmQKCkBydW4gJHJlc3VsdA) ]

```inet
import List from "https://code-of-inet-cute.fidb.app/tests/datatype/List.i"
Expand Down Expand Up @@ -169,9 +169,9 @@ end
node diffOpen
'A DiffList :target!
'A List :list
'A List :newBack
----------
'A List :result
'A List :oldBack
end
rule diff diffAppend
Expand All @@ -180,8 +180,8 @@ rule diff diffAppend
end
rule diff diffOpen
(diff)-back list-(diffOpen)
(diff)-front result-(diffOpen)
(diff)-back newBack-(diffOpen)
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.fidb.app/tests/datatype/Nat.i"
Expand Down
10 changes: 5 additions & 5 deletions docs/articles/programming-with-interaction-nets.md
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ follows `@spread` to put all it's ports to the stack
in reverse order of the definition,
then we save the ports to local variables for later use.

[Goto the playground of `DiffList` and `(diffAppend)`](https://inet.run/playground/aW1wb3J0IExpc3QgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgp0eXBlIERpZmZMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBkaWZmCiAgJ0EgTGlzdCA6ZnJvbnQKICAtLS0tLS0tCiAgJ0EgTGlzdCA6YmFjawogICdBIERpZmZMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGRpZmZBcHBlbmQKICAnQSBEaWZmTGlzdCA6dGFyZ2V0IQogICdBIERpZmZMaXN0IDpyZXN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GNvbm5lY3QKKGRpZmYpIEBzcHJlYWQgJGZyb250IHplcm8gY29ucyB6ZXJvIGNvbnMgZnJvbnQgQGNvbm5lY3QKZGlmZkFwcGVuZAoKQHJ1biAkcmVzdWx0)

```
import List from "https://code-of-inet-cute.fidb.app/tests/datatype/List.i"
Expand All @@ -980,9 +980,9 @@ end
node diffOpen
'A DiffList :target!
'A List :list
'A List :newBack
----------
'A List :result
'A List :oldBack
end
rule diff diffAppend
Expand All @@ -991,8 +991,8 @@ rule diff diffAppend
end
rule diff diffOpen
(diff)-back list-(diffOpen)
(diff)-front result-(diffOpen)
(diff)-back newBack-(diffOpen)
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.fidb.app/tests/datatype/Nat.i"
Expand Down
10 changes: 5 additions & 5 deletions docs/articles/反应网编程.md
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ append @run $result
后面跟着的 `@spread` 可以将其所有接口按定义中相反的顺序返回到栈中,
然后我们把这些接口保存到了一些局部变量中。

[去 `DiffList` 与 `(diffAppend)` 的演算场](https://inet.run/playground/aW1wb3J0IExpc3QgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgp0eXBlIERpZmZMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBkaWZmCiAgJ0EgTGlzdCA6ZnJvbnQKICAtLS0tLS0tCiAgJ0EgTGlzdCA6YmFjawogICdBIERpZmZMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGRpZmZBcHBlbmQKICAnQSBEaWZmTGlzdCA6dGFyZ2V0IQogICdBIERpZmZMaXN0IDpyZXN0CiAgLS0tLS0tLS0KICAnQSBEaWZmTGlzdCA6cmVzdWx0CmVuZAoKbm9kZSBkaWZmT3BlbgogICdBIERpZmZMaXN0IDp0YXJnZXQhCiAgJ0EgTGlzdCA6bGlzdAogIC0tLS0tLS0tLS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9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9OYXQuaSIKaW1wb3J0IGNvbnMgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgooZGlmZikgQHNwcmVhZCAkZnJvbnQgJGJhY2sgJHZhbHVlCmJhY2sgemVybyBjb25zIHplcm8gY29ucyBmcm9udCBAY29ubmVjdCB2YWx1ZQooZGlmZikgQHNwcmVhZCAkZnJvbnQgJGJhY2sgJHZhbHVlCmJhY2sgemVybyBjb25zIHplcm8gY29ucyBmcm9udCBAY29ubmVjdCB2YWx1ZQpkaWZmQXBwZW5kCgovLyDkuIrpnaLnmoTku6PnoIHlj6_ku6XlsJHnlKjkuIDkuKrlsYDpg6jlj5jph48gYCR2YWx1ZWAg77yM6ICM566A5YyW5aaC5LiL77yaCgooZGlmZikgQHNwcmVhZCAkZnJvbnQgJGJhY2sKYmFjayB6ZXJvIGNvbnMgemVybyBjb25zIGZyb250IEBjb25uZWN0CihkaWZmKSBAc3ByZWFkICRmcm9udCAkYmFjawpiYWNrIHplcm8gY29ucyB6ZXJvIGNvbnMgZnJvbnQgQGNvbm5lY3QKZGlmZkFwcGVuZAoKLy8g5YaN5bCR55So5LiA5Liq5bGA6YOo5Y-Y6YePIGAkYmFja2DvvIzov5vkuIDmraXnroDljJbvvJoKCihkaWZmKSBAc3ByZWFkICRmcm9udCB6ZXJvIGNvbnMgemVybyBjb25zIGZyb250IEBjb25uZWN0CihkaWZmKSBAc3ByZWFkICRmcm9udCB6ZXJvIGNvbnMgemVybyBjb25zIGZyb250IEBjb25uZWN0CmRpZmZBcHBlbmQKCkBydW4gJHJlc3VsdA)

```
import List from "https://code-of-inet-cute.fidb.app/tests/datatype/List.i"
Expand All @@ -944,9 +944,9 @@ end
node diffOpen
'A DiffList :target!
'A List :list
'A List :newBack
----------
'A List :result
'A List :oldBack
end
rule diff diffAppend
Expand All @@ -955,8 +955,8 @@ rule diff diffAppend
end
rule diff diffOpen
(diff)-back list-(diffOpen)
(diff)-front result-(diffOpen)
(diff)-back newBack-(diffOpen)
(diff)-front oldBack-(diffOpen)
end
import zero from "https://code-of-inet-cute.fidb.app/tests/datatype/Nat.i"
Expand Down
8 changes: 4 additions & 4 deletions tests/datatype/DiffList.i
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ end

node diffOpen
'A DiffList :target!
'A List :list
'A List :newBack
----------
'A List :result
'A List :oldBack
end
rule diff diffAppend
Expand All @@ -36,6 +36,6 @@ rule diff diffAppend
end
rule diff diffOpen
(diff)-back list-(diffOpen)
(diff)-front result-(diffOpen)
(diff)-back newBack-(diffOpen)
(diff)-front oldBack-(diffOpen)
end

0 comments on commit e03a3ce

Please sign in to comment.