Skip to main content

Always Correct Correctness Compilator

Project description

# Always Correct Correctness Compiler
Python implementation of a very basic langage compiler that never throw errors while compiling. (almost)
Its not a big and complex compiler, and its implementation is something like awful.


## Errors
The only errors releved by the compiler is :
- source code contains characters not present in provided alphabet;
- provided vocabulary don't follow conventions of writing;

If these conditions are respected, whatever you give to the __ACCC__, it will always return something valid.
(but it can be an empty code)


## Interests
A compilable source code is a string of characters.
Valid characters are provided at Compiler instanciation.

For example, if you have the alphabet *'01'*,
any string exclusively composed of *'0'* and *'1'* is compilable and will produce something.

Any little modification of the string can lead to heavy or no modification of object code.
In fact, with ACCC you can generate mutation of a source code without problem of compilation error.

Write a code with lots of parameters is another way to do almost the same thing.


## Object code
Currently, current object langage is __very simple__: you can compare things, and do things.
That's all. No loops, variables, functions, objects,… Just conditions and actions.

This is an example of code, not totally illogic, created one time with a source code size of 60 and the alphabet '01':

if parameter1 == parameter2 and haveThat:
do_that
if have_that:
say_this
do_that
if know_that and have_many_things:
do_that
say_this
do_that
if have_many_things:
say_this

Please have a look to docstring of *Compiler* class for more details about that. (notabily used vocabulary)


## I/O speaking
Inputs:
- iterable of characters (doublons are unexpected) that compose the source code
- vocabulary used for compiling

Outputs:
- a python compilable code, according to vocabulary


## Next improvements
In decreasing-priority order:
- [ ] allow lexems to have arguments;
- [ ] create before convert in any langage;
- [ ] allow configuration of output langage;



## Why don't you use…
Someone do the same thing ? Or better ?
Give me the link, i want to see that !


## Why do that ?
1. It's fun
2. I need it for test something in another project (an Evolution simulation named [EvolAcc](http://www.github.com/Aluriak/EvolAcc) ; no surprise)

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

ACCC-0.0.1.tar.gz (18.6 kB view details)

Uploaded Source

File details

Details for the file ACCC-0.0.1.tar.gz.

File metadata

  • Download URL: ACCC-0.0.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ACCC-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5b96439eeda83190aa5c907c935d0a68febbdc181e82234613daa0d1c7355b8b
MD5 3858e2b6895eb127823d68e920d38c65
BLAKE2b-256 ed83df27f35e65438a7fe72ead277d567ebc89b729a939aeedc421b29873b537

See more details on using hashes here.

Supported by

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