Skip to main content

PReFScript:

Partial Recursive Functions for Scripting

Author: Jose Luis Balcazar, ORCID 0000-0003-4248-4528

Project started: mid Germinal 2003.

Current version: 1.2, mid Messidor 2026.

Copyleft: MIT License (https://en.wikipedia.org/wiki/MIT_License)

A Python-based environment to explore and experiment with partial recursive functions; naturally doubles as a (purely functional) programming language, but it is not intended to be used much as such.

Scripts

In PReFScript, a script is a sequence of functions defined in terms of each other and of a few basic functions via the partial recursion rules of composition and minimization. All functions are from the natural numbers into the natural numbers and may be undefined for some inputs. In order to handle tuples or sequences of natural numbers, a Cantor-like encoding is used. The always available basic functions include: k_1, the constant 1 function; id, the identity function; addition and multiplication, add and mul respectively, that interpret the single number received as the Cantor encoding of a pair <x.y> and compute the corresponding operation on x and y; modified difference diff that receives likewise a Cantor-encoded pair <x.y> and computes max(0, x - y) so that we always stay within the natural numbers; and two functions related to projections of Cantor-encoded sequences.

Scripts are maintained in objects of the class PReFScript, that can be imported into your own Python program. Alternatively, a stand-alone interpreter is also provided. Thus, you have available two main ways of programming in PReFScript.

Installation and ways to use PReFScript functions

See doc.md.

Download files

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

Source Distribution

prefscript-1.2.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

prefscript-1.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file prefscript-1.2.tar.gz.

File metadata

  • Download URL: prefscript-1.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for prefscript-1.2.tar.gz
Algorithm Hash digest
SHA256 9d3e49747d4b311e0fda24a5f5590c0e992be956df6b2dce32e257aea61c7052
MD5 cf5567dc0c1e104fa10f782134dc58a7
BLAKE2b-256 d7bd89a2ceb459feb79e98c2fa900aedca8ec6f03bcb8a3939d9324ed20391b6

See more details on using hashes here.

File details

Details for the file prefscript-1.2-py3-none-any.whl.

File metadata

  • Download URL: prefscript-1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for prefscript-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa17f614a5e0ce90012b2775aacbee6575858877dd2c254535e81e383e2f2328
MD5 303a4d303126cc8c088262abd825ec83
BLAKE2b-256 492adfd1f0922c1eb99a5ad7346e051b153cfa47901937ea51c021f93b19d9ba

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.5

2 files

2.0.2

2 files

This release

1.2 This release

2 files

1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page