https://github.com/althonos/kmachine

A toy compiler that produces Kappa code from Counter Machine instructions.

https://github.com/althonos/kmachine

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.0%) to scientific vocabulary

Keywords

bioinformatics compiler kappa-language modeling-dynamic-systems rust turing-machine-simulator

Keywords from Contributors

hack bruteforce
Last synced: 5 months ago · JSON representation

Repository

A toy compiler that produces Kappa code from Counter Machine instructions.

Basic Info
  • Host: GitHub
  • Owner: althonos
  • License: mit
  • Language: Rust
  • Default Branch: master
  • Homepage:
  • Size: 977 KB
Statistics
  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Topics
bioinformatics compiler kappa-language modeling-dynamic-systems rust turing-machine-simulator
Created almost 7 years ago · Last pushed over 6 years ago
Metadata Files
Readme License

README.md

κmachine

A toy compiler that produces Kappa code from counter machine instructions.

Syntax

The syntax is heavily inspired by the AT&T syntax of the GNU Assembler. The following example program copies the content of register %rax to register %rbx using a temporary register %rcx:

asm ; clear content of %rcx clr %rcx cpy1: ; move %rax to both %rbx and %rcx inc %rcx inc %rbx dec %rax jz %rax, cpy2 jmp cpy1 cpy2: ; move %rcx back into %rax inc %rax dec %rcx jz %rcx, cpy3 jmp cpy2 cpy3:

Usage

Provide the compiler with a pseudo-assembly program, and it will generate a self-sufficient Kappa source: console $ cargo run -- examples/loop.S

This program can then be run with KaSim through the command line: console $ KaSim examples/loop.ka

Or you can open it with the KUI to inspect the generated agents and rules: KaSim agents

Instructions

| Instruction | Supported | Emulated | Example | | :---------: | :-------: | :------: | :---------------- | | add | ✓ | | add %rax, %rbx | | add * | | ✓ | add $0x12, %rbx | | clr | ✓ | | clr %rax | | cpy | | ✓ | cpy %rax, %rbx | | inc | ✓ | | inc %rcx | | jmp | ✓ | | jmp label | | jnz | ✓ | | jnz %rax, label | | jz | ✓ | | jz %rax, label | | mov | ✓ | | mov %rax, %rbx | | mov * | | ✓ | mov $5, %rax | | mul | | ✓ | mul %rax, %rbx | | swp | ✓ | | swp %rax, %rbx |

About

This program was developed by Martin Larralde as the final project for the Biochemical Programming course (2.19) of the MPRI.

Owner

  • Name: Martin Larralde
  • Login: althonos
  • Kind: user
  • Location: Heidelberg, Germany
  • Company: EMBL / LUMC, @zellerlab

PhD candidate in Bioinformatics, passionate about programming, SIMD-enthusiast, Pythonista, Rustacean. I write poems, and sometimes they are executable.

GitHub Events

Total
Last Year

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 89
  • Total Committers: 2
  • Avg Commits per committer: 44.5
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Martin Larralde m****e@e****r 88
ImgBotApp I****p@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 3 minutes
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • imgbot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels