Skip to content

Commit

Permalink
feat(predicates): update axone-protocol/axoned predicates documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bot-anik committed Oct 16, 2024
1 parent c9c1d7f commit a5b12bd
Show file tree
Hide file tree
Showing 28 changed files with 200 additions and 21 deletions.
21 changes: 21 additions & 0 deletions predicates/atomic_list_concat_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
sidebar_position: 1
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# atomic_list_concat/2

## Description

`atomic_list_concat/2` is a predicate that unifies an Atom with the concatenated elements of a List.

## Signature

```text
atomic_list_concat(+List, ?Atom)
```

where:

- List is a list of strings, atoms, integers, floating point numbers or non\-integer rationals
- Atom is an Atom representing the concatenation of the elements of List
24 changes: 24 additions & 0 deletions predicates/atomic_list_concat_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 2
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# atomic_list_concat/3

## Description

`atomic_list_concat/3` is a predicate that unifies an Atom with the concatenated elements of a List using a given separator.

The atomic\_list\_concat/3 predicate creates an atom just like atomic\_list\_concat/2, but inserts Separator between each pair of inputs.

## Signature

```text
atomic_list_concat(+List, +Separator, ?Atom)
```

where:

- List is a list of strings, atoms, integers, floating point numbers or non\-integer rationals
- Separator is an atom \(possibly empty\)
- Atom is an Atom representing the concatenation of the elements of List
2 changes: 1 addition & 1 deletion predicates/bank_balances_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 3
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/bank_locked_balances_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 4
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/bank_spendable_balances_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 5
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/bech32_address_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 6
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/block_height_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 5
sidebar_position: 7
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/block_time_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 6
sidebar_position: 8
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/chain_id_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 9
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/consult_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 10
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/crypto_data_hash_3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 9
sidebar_position: 11
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/current_output_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 10
sidebar_position: 12
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/did_components_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 11
sidebar_position: 13
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/ecdsa_verify_4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 12
sidebar_position: 14
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/eddsa_verify_4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 13
sidebar_position: 15
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/hex_bytes_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 14
sidebar_position: 16
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/json_prolog_2.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 15
sidebar_position: 17
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
23 changes: 23 additions & 0 deletions predicates/json_read_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 18
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# json_read/2

## Description

`json_read/2` is a predicate that reads a JSON from a stream and unifies it with a Prolog term.

See json\_prolog/2 for the canonical representation of the JSON term.

The signature is as follows:

```text
json_read(+Stream, ?Term) is det
```

Where:

- Stream is the input stream from which the JSON is read.
- Term is the Prolog term that represents the JSON structure.
23 changes: 23 additions & 0 deletions predicates/json_write_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 19
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# json_write/2

## Description

`json_write/2` is a predicate that writes a Prolog term as a JSON to a stream.

The JSON object is of the same format as produced by json\_read/2.

The signature is as follows:

```text
json_write(+Stream, +Term) is det
```

Where:

- Stream is the output stream to which the JSON is written.
- Term is the Prolog term that represents the JSON structure.
2 changes: 1 addition & 1 deletion predicates/open_3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 17
sidebar_position: 21
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/open_4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 16
sidebar_position: 20
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/read_string_3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 18
sidebar_position: 22
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
28 changes: 28 additions & 0 deletions predicates/read_term_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 23
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# read_term/3

## Description

`read_term/3` is a predicate that reads a term from a stream or alias.

The signature is as follows:

```text
read_term(+Stream, -Term, +Options)
```

where:

- Stream represents the stream or alias to read the term from.
- Term represents the term to read.
- Options represents the options to control the reading process.

Valid options are:

- singletons\(Vars\): Vars is unified with a list of variables that occur only once in the term.
- variables\(Vars\): Vars is unified with a list of variables that occur in the term.
- variable\_names\(Vars\): Vars is unified with a list of Name = Var terms, where Name is an atom and Var is a variable.
2 changes: 1 addition & 1 deletion predicates/source_file_1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 19
sidebar_position: 24
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
2 changes: 1 addition & 1 deletion predicates/string_bytes_3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 20
sidebar_position: 25
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
30 changes: 30 additions & 0 deletions predicates/term_to_atom_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar_position: 26
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# term_to_atom/2

## Description

`term_to_atom/2` is a predicate that describes Atom as a term that unifies with Term.

## Signature

```text
term_to_atom(?Term, ?Atom)
```

where:

- Term is a term that unifies with Atom.
- Atom is an atom.

When Atom is instantiated, Atom is parsed and the result unified with Term. If Atom has no valid syntax, a syntax\_error exception is raised. Otherwise, Term is “written” on Atom using write\_term/2 with the option quoted\(true\).

## Example

```text
# Convert the atom to a term.
- term_to_atom(foo, foo).
```
2 changes: 1 addition & 1 deletion predicates/uri_encoded_3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 21
sidebar_position: 27
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

Expand Down
30 changes: 30 additions & 0 deletions predicates/write_term_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
sidebar_position: 28
---
[//]: # (This file is auto-generated. Please do not modify it yourself.)

# write_term/3

## Description

`write_term/3` is a predicate that writes a term to a stream or alias.

The signature is as follows:

```text
write_term(+Stream, +Term, +Options)
```

where:

- Stream represents the stream or alias to write the term to.
- Term represents the term to write.
- Options represents the options to control the writing process.

Valid options are:

- quoted\(Bool\): If true, atoms and strings that need quotes will be quoted. The default is false.
- ignore\_ops\(Bool\): If true, the generic term representation \(\<functor\>\(\<args\> ... \)\) will be used for all terms. Otherwise \(default\), operators will be used where appropriate.
- numbervars\(Bool\): If true, variables will be numbered. The default is false.
- variable\_names\(\+List\): Assign names to variables in Term. List is a list of Name = Var terms, where Name is an atom and Var is a variable.
- max\_depth\(\+Int\): The maximum depth to which the term is written. The default is infinite.

0 comments on commit a5b12bd

Please sign in to comment.