{"id":16718049,"url":"https://github.com/drup/lilis","last_synced_at":"2025-10-04T06:26:27.874Z","repository":{"id":2179720,"uuid":"3126934","full_name":"Drup/LILiS","owner":"Drup","description":"L-system interpreter in OCaml","archived":false,"fork":false,"pushed_at":"2015-12-10T01:14:35.000Z","size":2967,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T08:08:12.194Z","etag":null,"topics":["lsystem","ocaml"],"latest_commit_sha":null,"homepage":"https://drup.github.io/LILiS/dev/","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Drup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-07T22:00:24.000Z","updated_at":"2024-11-05T00:04:01.000Z","dependencies_parsed_at":"2022-08-06T12:01:12.730Z","dependency_job_id":null,"html_url":"https://github.com/Drup/LILiS","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drup%2FLILiS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drup%2FLILiS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drup%2FLILiS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drup%2FLILiS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Drup","download_url":"https://codeload.github.com/Drup/LILiS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190403,"owners_count":21062276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lsystem","ocaml"],"created_at":"2024-10-12T21:34:56.319Z","updated_at":"2025-10-04T06:26:27.787Z","avatar_url":"https://github.com/Drup.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LILiS [![Build Status](https://travis-ci.org/Drup/LILiS.svg?branch=master)](https://travis-ci.org/Drup/LILiS)\n\nLILiS is a *Library to Interpret Lindenmayer Systems*.\n\n![Von Koch](http://drup.github.io/LILiS/dev/vonkoch.svg)\n\n## L-system\n\n[L-systems](http://en.wikipedia.org/wiki/L-system) are a kind of formal grammar defined by Lindermayer.\n\n## Description of LILiS\n\nThe goal of this library is to evaluate L-systems and to visualise them (in 2D only).\nThe emphasis is put on high speed, static verifications and optimizations, modularity and pretty drawings.\n\nThis project is partially inspired by [Lpy](http://openalea.gforge.inria.fr/dokuwiki/doku.php?id=packages:vplants:lpy:main).\n\nThe project is split in 4 parts:\n- A small library to calculate arithmetic expressions;\n- A library to parse and evaluate L-systems;\n- A graphic library to draw such L-systems;\n- An executable.\n\nThe documentation for the various libraries can be found [here](http://drup.github.io/LILiS/dev/).\n\nThe executable can be used to draw any L-system like those in [`bank_lsystem`](bank_lsystem) for examples.\n\nComputing L-systems happens to be a very nice way to stress the flatMap operation on some data structures. If you have any stream library (or other data structures) you want to test, feel free to ask.\n\n## Get started!\n\nDo\n\n    $ opam install cairo2 lablgtk cmdliner lilis\n\nand head over [there](http://drup.github.io/LILiS/0.2/).\n\n## Dependencies\n\n- The parser depends on `menhir`.\n- [cppo](https://github.com/mjambon/cppo) is a building dependency.\n- The engine implementation depends on [Containers](https://github.com/c-cube/ocaml-containers).\n- There are currently two graphical backends :\n  - The png and gtk one depends on [Cairo's Ocaml binding](https://forge.ocamlcore.org/projects/cairo/).\n  - The SVG one depends on [tyxml](http://ocsigen.org/tyxml/) (version \u003e= 3.0.0).\n- `Cmdliner` is used by the executable `glilis_ex`.\n\nYou can install most of it with :\n\n\t$ opam install cppo containers cairo2 lablgtk cmdliner menhir\n\n### Optional dependencies\n\nSome stream library are used if they are available :\n- [CFStream](https://github.com/biocaml/cfstream)\n- [Core.Sequence](https://github.com/janestreet/core_kernel)\n- The various stream-like data structure in [Batteries](https://github.com/ocaml-batteries-team/batteries-included).\n\nFor the benchmarks, the [Benchmark](http://ocaml-benchmark.sourceforge.net/) package is needed.\n\n## How to\n\nTo build, just do :\n\n\t$ make\n\nThe optional dependencies can be controlled by configure flags. See `configure --help` for a complete list.\n\nTo produce the documentation :\n\n\t$ make docs\n\nYou can also install the various libraries with :\n\n\t$ make install\n\nIf you used `configure` with the flag `--enable-executable` and both graphical backends, it will produce an executable `glilis_ex.native`. See `glilis_ex.native --help` for more information.\n\nYou can also enable benchmarks and tests with the flag `--enable-tests`. The benchmarks will be built if the relevant libraries are available.\n\n## Architecture of the project\n\nThis project has five parts :\n- `calc`, a very small library to evaluate arithmetic expression;\n- `lilis`, the core engine;\n- `glilis`, the graphical stuff;\n- `streams`, various stream implementation;\n- `test`, some benchmarks.\n\n## TODO\n\nCurrent potential goals:\n\n- Performance related :\n  - Find a way to group arithmetic expressions. First in a given symbol `F(x*2,x*2)` and, more interesting : `rule F(x) = F(x/2) + F(x/2)`.\n  - Symbol grouping : `F(x) F(y)` → `F(x+y)`. Be **very** careful as this is not always true. Already done for \"constant\" symbols.\n  - Allow simple expressions to be pre-computed :\n\t  `rule S(n) = S(n+1)`. This may be very hard in general.\n  - Work on the trigo stuff in the drawing part of the library.\n  - Investigate the idea \"Compute the size of the result in advance, allocate a huge array, copy the result of each rule, ???, profit.\" It may be a good way to parallelize lilis.\n  - Play with Parmap a bit more, use the fact that the last operation is an iter (like for drawing) since we don't have to do the last (and very costly) concat in this case.\n\n- Improve the verification some more, especially in relation to :\n  - Token redefinition\n  - Reusability (be able to recover the definition environment)\n\n- New data structures! I'm always very happy to test them!\n- Implement something by using a graph as a stream. The results may be quite interesting.\n\n- Drawing :\n  - New drawing engines!\n  - Allow new drawing constructs. All the typing and modularity parts are in places, just need to implement.\n\n- Make a pretty GUI, maybe a web one.\n\n- Add some benchmarks for drawing backends.\n\n- Implement a better error handling for the parser.\n\n- Work on the combinator approach for the front end.\n- Currently, the definition environment disappears after the front end and only post rules remain. On one hand, we can't let the environment, as we can't trust it when it's given independently by the user, on the other hand, this prevents completing optional arguments from the library side. A solution (maybe with some abstract types), may be interesting. Beware of leaking abstractions.\n\n![Dragon](http://drup.github.io/LILiS/dev/dragon.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrup%2Flilis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrup%2Flilis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrup%2Flilis/lists"}