Skip to content

Commit

Permalink
Replace usages of priorities, require, and import (#207)
Browse files Browse the repository at this point in the history
* Replace deprecated tokens

* Set Version: 0.1.7

---------

Co-authored-by: devops <[email protected]>
  • Loading branch information
Scott-Guest and devops authored Feb 22, 2024
1 parent 94d7ed6 commit 9337d0a
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion auto-allocate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently, only function imports are supported.
Calling an imported host function will result in `hostCall(MODULE_NAME, FUNCTION_NAME, FUNCTION_TYPE)` being left on the `instrs` cell.

```k
require "wasm-semantics/wasm-text.md"
requires "wasm-semantics/wasm-text.md"
module WASM-AUTO-ALLOCATE
imports WASM-DATA-TOOLS
Expand Down
2 changes: 1 addition & 1 deletion data/bytes-type.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

module BYTES-TYPE
import BYTES
imports BYTES

syntax WrappedBytes
syntax BYTES
Expand Down
2 changes: 1 addition & 1 deletion data/int-type.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

module INT-TYPE
import INT
imports INT

syntax WrappedInt
syntax Int
Expand Down
2 changes: 1 addition & 1 deletion data/list-bytes.k
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "bytes-type.k"
requires "bytes-type.k"

module LIST-BYTES
imports private INT-SYNTAX
Expand Down
6 changes: 3 additions & 3 deletions data/map-bytes-to-bytes.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

require "bytes-type.k"
// require "bytes-type.k"
requires "bytes-type.k"
// requires "bytes-type.k"

module MAP-BYTES-TO-BYTES
imports private BOOL-SYNTAX
Expand Down Expand Up @@ -32,7 +32,7 @@ module MAP-BYTES-TO-BYTES
injective
]

syntax priorities _Bytes2Bytes|->_ > _MapBytesToBytes_ .MapBytesToBytes
syntax priority _Bytes2Bytes|->_ > _MapBytesToBytes_ .MapBytesToBytes
syntax non-assoc _Bytes2Bytes|->_
syntax WrappedBytes ::= MapBytesToBytes "[" WrappedBytes "]"
[function, hook(MAP.lookup), klabel(MapBytesToBytes:lookup), symbol]
Expand Down
6 changes: 3 additions & 3 deletions data/map-int-to-bytes.k
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

require "int-type.k"
require "bytes-type.k"
requires "int-type.k"
requires "bytes-type.k"

module MAP-INT-TO-BYTES
imports private BOOL-SYNTAX
Expand Down Expand Up @@ -32,7 +32,7 @@ module MAP-INT-TO-BYTES
injective
]

syntax priorities _Int2Bytes|->_ > _MapIntToBytes_ .MapIntToBytes
syntax priority _Int2Bytes|->_ > _MapIntToBytes_ .MapIntToBytes
syntax non-assoc _Int2Bytes|->_
syntax WrappedBytes ::= MapIntToBytes "[" WrappedInt "]"
[function, hook(MAP.lookup), klabel(MapIntToBytes:lookup), symbol]
Expand Down
10 changes: 5 additions & 5 deletions elrond-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Elrond Configuration
Combine Elrond node with Wasm.

```k
require "auto-allocate.md"
require "deps/plugin/plugin/krypto.md"
require "elrond-node.md"
require "esdt.md"
require "wasm-semantics/wasm-text.md"
requires "auto-allocate.md"
requires "deps/plugin/plugin/krypto.md"
requires "elrond-node.md"
requires "esdt.md"
requires "wasm-semantics/wasm-text.md"
module ELROND-CONFIG
imports KRYPTO
Expand Down
8 changes: 4 additions & 4 deletions elrond-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Elrond Node
===========

```k
require "data/list-bytes.k"
require "data/map-bytes-to-bytes.k"
require "data/map-int-to-bytes.k"
require "wasm-semantics/wasm.md"
requires "data/list-bytes.k"
requires "data/map-bytes-to-bytes.k"
requires "data/map-int-to-bytes.k"
requires "wasm-semantics/wasm.md"
module ELROND-NODE
imports DOMAINS
Expand Down
4 changes: 2 additions & 2 deletions elrond.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Elrond Semantics
================

```k
require "elrond-config.md"
require "vmhooks/vmhooks.md"
requires "elrond-config.md"
requires "vmhooks/vmhooks.md"
module ELROND
imports ELROND-CONFIG
Expand Down
2 changes: 1 addition & 1 deletion esdt.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TODO ESDT transfer should be a builtin function
TODO check token settings: frozen, paused, limited transfer...

```k
require "elrond-node.md"
requires "elrond-node.md"
module ESDT
imports ELROND-NODE
Expand Down
4 changes: 2 additions & 2 deletions kasmer.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Kasmer Semantics

```k
require "mandos.md"
requires "mandos.md"
module KASMER-SYNTAX
imports KASMER
Expand Down Expand Up @@ -632,4 +632,4 @@ Only the `#foundryRunner` account can execute these commands/host functions.
<instrs> #waitCommands ... </instrs>
endmodule
```
```
2 changes: 1 addition & 1 deletion kmultiversx/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kmultiversx"
version = "0.1.6"
version = "0.1.7"
description = "Python tools for Elrond semantics"
authors = [
"Runtime Verification, Inc. <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions mandos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Mandos Testing Framework
========================

```k
require "wasm-semantics/wasm-text.md"
require "elrond.md"
requires "wasm-semantics/wasm-text.md"
requires "elrond.md"
module MANDOS-SYNTAX
imports MANDOS
Expand Down
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.6
0.1.7
6 changes: 3 additions & 3 deletions vmhooks/baseOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Base Operations
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/baseOps.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/baseOps.go)

```k
require "../elrond-config.md"
require "eei-helpers.md"
require "utils.md"
requires "../elrond-config.md"
requires "eei-helpers.md"
requires "utils.md"
module BASEOPS
imports ELROND-CONFIG
Expand Down
6 changes: 3 additions & 3 deletions vmhooks/bigIntOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Big Integers
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/bigIntOps.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/bigIntOps.go)

```k
require "../elrond-config.md"
require "../data/map-int-to-bytes.k"
require "baseOps.md"
requires "../elrond-config.md"
requires "../data/map-int-to-bytes.k"
requires "baseOps.md"
module BIGINT-HELPERS
imports ELROND-CONFIG
Expand Down
4 changes: 2 additions & 2 deletions vmhooks/cryptoei.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Crypto API
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/cryptoei.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/cryptoei.go)

```k
require "../elrond-config.md"
require "manBufOps.md"
requires "../elrond-config.md"
requires "manBufOps.md"
```

## Helpers
Expand Down
6 changes: 3 additions & 3 deletions vmhooks/manBufOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Managed Buffers
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/manBufOps.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/manBufOps.go)

```k
require "../elrond-config.md"
require "bigIntOps.md"
require "../data/map-int-to-bytes.k"
requires "../elrond-config.md"
requires "bigIntOps.md"
requires "../data/map-int-to-bytes.k"
module MANBUFOPS
imports ELROND-CONFIG
Expand Down
6 changes: 3 additions & 3 deletions vmhooks/managedConversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/managedConversions.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/managedConversions.go)

```k
require "../elrond-config.md"
require "manBufOps.md"
require "utils.md"
requires "../elrond-config.md"
requires "manBufOps.md"
requires "utils.md"
module MANAGEDCONVERSIONS
Expand Down
6 changes: 3 additions & 3 deletions vmhooks/managedei.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ Managed EI
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/managedei.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/managedei.go)

```k
require "../elrond-config.md"
require "manBufOps.md"
require "managedConversions.md"
requires "../elrond-config.md"
requires "manBufOps.md"
requires "managedConversions.md"
module MANAGEDEI
imports ELROND-CONFIG
Expand Down
4 changes: 2 additions & 2 deletions vmhooks/smallIntOps.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Small Integers
Go implementation: [mx-chain-vm-go/vmhost/vmhooks/smallIntOps.go](https://github.com/multiversx/mx-chain-vm-go/blob/ea3d78d34c35f7ef9c1a9ea4fce8288608763229/vmhost/vmhooks/smallIntOps.go)

```k
require "../elrond-config.md"
requires "../elrond-config.md"
module SMALLINTOPS
imports BASEOPS
Expand Down Expand Up @@ -116,4 +116,4 @@ module SMALLINTOPS
</locals>
endmodule
```
```
4 changes: 2 additions & 2 deletions vmhooks/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Utils

```k
require "../data/bytes-type.k"
require "../data/list-bytes.k"
requires "../data/bytes-type.k"
requires "../data/list-bytes.k"
module UTILS
imports STRING
Expand Down
16 changes: 8 additions & 8 deletions vmhooks/vmhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ Elrond VM Hooks
Here, host calls are implemented, by defining the semantics when `hostCall(MODULE_NAME, EXPORT_NAME, TYPE)` is left on top of the `instrs` cell.

```k
require "../elrond-config.md"
require "bigIntOps.md"
require "cryptoei.md"
require "baseOps.md"
require "managedei.md"
require "manBufOps.md"
require "smallIntOps.md"
requires "../elrond-config.md"
requires "bigIntOps.md"
requires "cryptoei.md"
requires "baseOps.md"
requires "managedei.md"
requires "manBufOps.md"
requires "smallIntOps.md"
module VMHOOKS
imports ELROND-CONFIG
Expand All @@ -21,4 +21,4 @@ module VMHOOKS
imports MANBUFOPS
imports SMALLINTOPS
endmodule
```
```

0 comments on commit 9337d0a

Please sign in to comment.