Skip to main content

A small research language for access-induced semantic divergence experiments.

Project description

Hiesenoether

A deterministic programming language where reading a variable can change what it returns next.

PyPI: https://pypi.org/project/hiesenoether/

Install

Hiesenoether requires Python 3.10 or newer.

pip install hiesenoether

Run

Create a file called program.hn:

energy[100]

x <- 10

print x
print x
print x

Run it:

hiesenoether program.hn

Output:

10.0
11.1
12.4

x is assigned once. Each read advances its internal state, so the next read returns a different value.

The language is still deterministic. Running the same program with the same sequence of operations produces the same result.

Start the REPL with:

hiesenoether --repl

How it works

Variables are unstable by default:

x <- 10

Stable variables keep the same value:

stable answer <- 42

An unstable variable can be frozen later:

stabilize x

inspect shows the internal state of a variable and affects what it returns later:

inspect x

Programs also have an energy budget:

energy[100]

Inspection, stable variables, functions, and invariants spend energy. Capabilities can be removed permanently in exchange for energy:

remove[inspection]
remove[invariants]
remove[stable_control]

Features

  • Unstable and stable variables
  • Arithmetic and comparisons
  • inspect and stabilize
  • Standard, pure, and unstable functions
  • if statements
  • while loops
  • Invariants
  • Energy queries
  • Capability removal
  • .hn files
  • Interactive REPL
  • Static analysis and validation tools

Run from source

git clone https://github.com/da-taki/Hiesenoether.git
cd Hiesenoether
python -m src.main examples/basic_energy.hn

Run the REPL from source:

python -m src.main --repl

Research

The repository includes experiments on inspection count, nonlinear computation, access order, and program length.

The main experiment battery has 22 configurations with 100,000 executions per configuration.

Results and reproduction instructions are available in:

The repository also includes exact-semantics checks, runtime-correspondence tests, theorem validators, and static-analysis experiments.

Tests

Run the interpreter tests:

python run_tests.py

Run the pytest suite:

python -m pytest tests -q

AI use declaration

AI was used for making some experiments for the project.

Limitations

Hiesenoether is an experimental language.

if statements and while loops work. else, for, and range are not implemented yet.

Numbers use floating-point values. Error messages are basic. There is no module system or standard library.

License

Hiesenoether is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hiesenoether-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hiesenoether-0.1.1-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file hiesenoether-0.1.1.tar.gz.

File metadata

  • Download URL: hiesenoether-0.1.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hiesenoether-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f6cd28bc8bfbfcbdddef6d22ea025c479f70b9f36550fdf54440c0bf0255d8d4
MD5 a2e189f71713de82abc047df8f175ad8
BLAKE2b-256 5d57ac2557b3c480a18daedf9a12e8d62c0ebd9977d30bd8c561f6314e66a4cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for hiesenoether-0.1.1.tar.gz:

Publisher: release.yml on da-taki/Hiesenoether

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hiesenoether-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: hiesenoether-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hiesenoether-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e26466813456cfa8b5ac143386dc09554cdda7fdceae249e6c25e669cf8aa786
MD5 ff8679e83ddd2f57a1909a0fe82768de
BLAKE2b-256 0b687b6ccc9902c9fff5f662c1643f41e4b253fbb186aecfb4ad58c428dc3e3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hiesenoether-0.1.1-py3-none-any.whl:

Publisher: release.yml on da-taki/Hiesenoether

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page