airx 1.24.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
airx-1.24.1/PKG-INFO ADDED
@@ -0,0 +1,87 @@
1
+ Metadata-Version: 2.4
2
+ Name: airx
3
+ Version: 1.24.1
4
+ Summary: Toy symbolic-language experiment built on ASTx and IRx
5
+ License-Expression: Apache-2.0
6
+ Author: Ivan Ogasawara
7
+ Author-email: ivan.ogasawara@gmail.com
8
+ Requires-Python: >=3.10,<4
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Requires-Dist: astx (==1.24.1)
16
+ Requires-Dist: jsonschema (>=4.0.0)
17
+ Requires-Dist: packaging (>=23)
18
+ Requires-Dist: pyirx (==1.24.1)
19
+ Requires-Dist: pyyaml (>=4)
20
+ Requires-Dist: tomli (>=2.0.0) ; python_version < "3.11"
21
+ Requires-Dist: types-pyyaml (>=6.0.12.20250516)
22
+ Description-Content-Type: text/markdown
23
+
24
+ # AIX
25
+
26
+ AIX is a toy symbolic-language experiment built for fun on top of ASTx and IRx.
27
+ It is not a primary ArxLang product or a stability commitment.
28
+
29
+ - PyPI distribution: `airx`
30
+ - Python import: `aix`
31
+ - CLI command: `aix`
32
+ - Source extension: `.aix`
33
+
34
+ > Status: toy project. The lexer, limited parser, CLI inspection modes, and IRx
35
+ > handoff work for the documented subset. The grammar can change freely.
36
+
37
+ ## Install and inspect
38
+
39
+ ```bash
40
+ pip install airx
41
+ aix --help
42
+ aix --show-tokens program.aix
43
+ aix --show-ast program.aix
44
+ aix --show-llvm-ir program.aix
45
+ aix --run program.aix
46
+ ```
47
+
48
+ ## Toy syntax
49
+
50
+ ```aix
51
+ ∴ fib ⟦ n:ℕ ⟧ → ℕ
52
+ ⊢ n ≤ 1 ⇒ n
53
+ ⊢ fib⟦n - 1⟧ + fib⟦n - 2⟧
54
+ ∎
55
+
56
+ ∴ main ⟦⟧ → ∅
57
+ ⟣ fib⟦10⟧
58
+ ∎
59
+ ```
60
+
61
+ Implemented forms:
62
+
63
+ - `∴` function and constant definitions
64
+ - `⟦...⟧` parameters and calls
65
+ - `→` return types
66
+ - `⊢ expr` return and `⊢ condition ⇒ expr` conditional return
67
+ - `⌁ name:T ≔ expr` local bindings
68
+ - `⟣ expr` output through the existing print node
69
+ - `∎` blocks and compact `{...}` / `;` layout
70
+ - `κ⟦...⟧` metadata parsing (ignored after parsing)
71
+ - Unicode identifiers, scalar literals, arithmetic, and comparisons
72
+
73
+ Reserved APL-inspired operators such as `⍴`, `⍳`, `¨`, `↑`, `↓`, `⍋`, and `⍒`
74
+ are tokenized but rejected until semantics and backend mappings exist.
75
+
76
+ ## Scope
77
+
78
+ AIX maps its small supported subset to ASTx and relies on IRx for semantics and
79
+ LLVM. It does not expose Arx imports, classes, templates, Tensors, DataFrames,
80
+ RecordBatches, or other Arrow-backed language types. There is no committed
81
+ feature roadmap.
82
+
83
+ Canonical documentation, including the grammar and lexical reference, is at
84
+ <https://arxlang.org/aix/>.
85
+
86
+ License: Apache-2.0.
87
+
airx-1.24.1/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # AIX
2
+
3
+ AIX is a toy symbolic-language experiment built for fun on top of ASTx and IRx.
4
+ It is not a primary ArxLang product or a stability commitment.
5
+
6
+ - PyPI distribution: `airx`
7
+ - Python import: `aix`
8
+ - CLI command: `aix`
9
+ - Source extension: `.aix`
10
+
11
+ > Status: toy project. The lexer, limited parser, CLI inspection modes, and IRx
12
+ > handoff work for the documented subset. The grammar can change freely.
13
+
14
+ ## Install and inspect
15
+
16
+ ```bash
17
+ pip install airx
18
+ aix --help
19
+ aix --show-tokens program.aix
20
+ aix --show-ast program.aix
21
+ aix --show-llvm-ir program.aix
22
+ aix --run program.aix
23
+ ```
24
+
25
+ ## Toy syntax
26
+
27
+ ```aix
28
+ ∴ fib ⟦ n:ℕ ⟧ → ℕ
29
+ ⊢ n ≤ 1 ⇒ n
30
+ ⊢ fib⟦n - 1⟧ + fib⟦n - 2⟧
31
+ ∎
32
+
33
+ ∴ main ⟦⟧ → ∅
34
+ ⟣ fib⟦10⟧
35
+ ∎
36
+ ```
37
+
38
+ Implemented forms:
39
+
40
+ - `∴` function and constant definitions
41
+ - `⟦...⟧` parameters and calls
42
+ - `→` return types
43
+ - `⊢ expr` return and `⊢ condition ⇒ expr` conditional return
44
+ - `⌁ name:T ≔ expr` local bindings
45
+ - `⟣ expr` output through the existing print node
46
+ - `∎` blocks and compact `{...}` / `;` layout
47
+ - `κ⟦...⟧` metadata parsing (ignored after parsing)
48
+ - Unicode identifiers, scalar literals, arithmetic, and comparisons
49
+
50
+ Reserved APL-inspired operators such as `⍴`, `⍳`, `¨`, `↑`, `↓`, `⍋`, and `⍒`
51
+ are tokenized but rejected until semantics and backend mappings exist.
52
+
53
+ ## Scope
54
+
55
+ AIX maps its small supported subset to ASTx and relies on IRx for semantics and
56
+ LLVM. It does not expose Arx imports, classes, templates, Tensors, DataFrames,
57
+ RecordBatches, or other Arrow-backed language types. There is no committed
58
+ feature roadmap.
59
+
60
+ Canonical documentation, including the grammar and lexical reference, is at
61
+ <https://arxlang.org/aix/>.
62
+
63
+ License: Apache-2.0.
@@ -0,0 +1,123 @@
1
+ [project]
2
+ name = "airx"
3
+ version = "1.24.1" # semantic-release
4
+ description = "Toy symbolic-language experiment built on ASTx and IRx"
5
+ readme = "README.md"
6
+ authors = [
7
+ {name = "Ivan Ogasawara", email = "ivan.ogasawara@gmail.com"}
8
+ ]
9
+ license = "Apache-2.0"
10
+ requires-python = ">=3.10,<4"
11
+ dependencies = [
12
+ "pyyaml >=4",
13
+ "astx == 1.24.1", # semantic-release
14
+ "pyirx == 1.24.1", # semantic-release
15
+ "jsonschema (>=4.0.0)",
16
+ "packaging >=23",
17
+ "types-pyyaml (>=6.0.12.20250516)",
18
+ "tomli >=2.0.0 ; python_version < \"3.11\""
19
+ ]
20
+
21
+ [project.scripts]
22
+ "aix" = "aix.__main__:app"
23
+
24
+ [build-system]
25
+ requires = ["poetry-core>=2"]
26
+ build-backend = "poetry.core.masonry.api"
27
+
28
+ [tool.poetry]
29
+ include = [
30
+ "src/aix",
31
+ "src/aix/builtins/**/*.aix",
32
+ "src/aix/builtins/**/*.x",
33
+ "src/aix/schema/*.json",
34
+ "src/aix/py.typed",
35
+ "src/aix/lexer/syntax.json",
36
+ "src/aix/stdlib/**/*.aix",
37
+ "src/aix/stdlib/**/*.x",
38
+ ]
39
+ exclude = [
40
+ ".git/*",
41
+ ".env*",
42
+ ]
43
+ packages = [
44
+ {include = "aix", from="src"},
45
+ ]
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = [
49
+ "tests/python",
50
+ ]
51
+ filterwarnings = [
52
+ "error::RuntimeWarning",
53
+ "error::typeguard.TypeHintWarning",
54
+ ]
55
+
56
+ [tool.bandit]
57
+ exclude_dirs = ["tests"]
58
+ targets = "./"
59
+
60
+ [tool.vulture]
61
+ exclude = ["tests"]
62
+ ignore_decorators = ["abc.abstractmethod"]
63
+ ignore_names = []
64
+ make_whitelist = true
65
+ min_confidence = 80
66
+ paths = ["./"]
67
+ sort_by_size = true
68
+ verbose = false
69
+
70
+ [tool.ruff]
71
+ target-version = "py310"
72
+ line-length = 79
73
+ force-exclude = true
74
+ src = ["./"]
75
+ exclude = [
76
+ 'docs',
77
+ ]
78
+ fix = true
79
+
80
+ [tool.ruff.lint]
81
+ ignore = [
82
+ "F811",
83
+ "PLR0911",
84
+ "PLR0912",
85
+ "PLR0913",
86
+ "PLR0917",
87
+ "RUF012",
88
+ "PLR0915",
89
+ "PLR2004",
90
+ "PLC0415",
91
+ ]
92
+ select = [
93
+ "E",
94
+ "F",
95
+ "YTT",
96
+ "PL",
97
+ "RUF",
98
+ "I001",
99
+ ]
100
+ extend-select = [
101
+ "UP006",
102
+ "UP007",
103
+ ]
104
+
105
+ [tool.ruff.lint.pydocstyle]
106
+ convention = "numpy"
107
+
108
+ [tool.ruff.lint.isort]
109
+ lines-between-types = 1
110
+
111
+ [tool.ruff.format]
112
+ quote-style = "double"
113
+
114
+ [tool.mypy]
115
+ python_version = "3.10"
116
+ check_untyped_defs = true
117
+ strict = true
118
+ ignore_missing_imports = true
119
+ warn_unused_ignores = true
120
+ warn_redundant_casts = true
121
+ warn_unused_configs = true
122
+ show_error_codes = true
123
+ exclude = ["scripts/"]
@@ -0,0 +1,26 @@
1
+ """
2
+ title: AIX package metadata.
3
+ """
4
+
5
+ from importlib import metadata as importlib_metadata
6
+
7
+ _DISTRIBUTION_NAME = "airx"
8
+
9
+
10
+ def get_version() -> str:
11
+ """
12
+ title: Return the installed package version.
13
+ returns:
14
+ type: str
15
+ """
16
+ try:
17
+ return importlib_metadata.version(_DISTRIBUTION_NAME)
18
+ except importlib_metadata.PackageNotFoundError: # pragma: no cover
19
+ return "1.24.1" # semantic-release
20
+
21
+
22
+ version: str = get_version()
23
+
24
+ __author__: str = "Ivan Ogasawara"
25
+ __email__: str = "ivan.ogasawara@gmail.com"
26
+ __version__: str = version
@@ -0,0 +1,8 @@
1
+ """
2
+ title: Entrypoint module, in case you use `python -m aix`.
3
+ """
4
+
5
+ from aix.cli import app
6
+
7
+ if __name__ == "__main__":
8
+ app()
@@ -0,0 +1,4 @@
1
+ ```
2
+ title: Bundled builtin package
3
+ summary: Root namespace for compiler-provided Arx builtin modules.
4
+ ```
@@ -0,0 +1,27 @@
1
+ ```
2
+ title: Bundled generators builtin module
3
+ summary: >-
4
+ Compiler-provided generator-adjacent helpers shipped inside the Arx package.
5
+ ```
6
+
7
+ # TODO: Expand this module when iterable generators and `yield` land.
8
+ fn range(start: i32, stop: i32, step: i32 = 1) -> list[i32]:
9
+ ```
10
+ title: range
11
+ summary: >-
12
+ Returns the integer values from `start` up to but not including `stop`,
13
+ advancing by `step`. Positive steps count up, negative steps count down,
14
+ and zero step is rejected.
15
+ ```
16
+ assert step != 0, "range() step must not be 0"
17
+ var values: list[i32]
18
+ var current: i32 = start
19
+ if step > 0:
20
+ while current < stop:
21
+ values.append(current)
22
+ current = current + step
23
+ else:
24
+ while current > stop:
25
+ values.append(current)
26
+ current = current + step
27
+ return values