Package loda

Python implementation of the LODA Language: an assembly language and computational model for integer sequences.

This Python package allows you to read and write LODA programs, to evaluate them to integer sequences, to search for matches in the OEIS database, and to use machine learning from Tensorflow to generate new integer sequence programs.

Installation

You need Python 3.7 or higher. To install the dependencies for LODA, run these commands:

python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

Getting Started

LODA programs are stored in *.asm files. Below you can find the example program fibonacci.asm which computes the Fibonacci numbers. For a comprehensive overview of the language, see the LODA Language Specification.

; A000045: Fibonacci numbers.
mov $3,1
lpb $0
  sub $0,1
  mov $2,$1
  add $1,$3
  mov $3,$2
lpe
mov $0,$1

Check out the sub-modules for working with LODA programs.

Development

To execute the tests, run the following command:

nose2 tests -v
Expand source code
"""
Python implementation of the [LODA Language](https://loda-lang.org/):
an assembly language and computational model for integer sequences.

.. include:: ./documentation.md
"""

Sub-modules

loda.lang

Load and save programs …

loda.mine

Program mining for integer sequences.

loda.ml

Machine learning integration.

loda.oeis

OEIS integration …

loda.runtime

Evaluate programs to integer sequences …