SVG logo by Gaëtan Tapon (Paris, France)

RefPerSys, a free software symbolic artificial general intelligence project

 French flag RefPerSys (voir est un projet (en 2020 à 2022, bénévole) de recherches et un logiciel libre en intelligence artificielle, inspiré par les travaux de feu Jacques Pitrat (1934 - oct.2019). Voir la journée d'hommage à J.Pitrat. Le lecteur est supposé capable de lire l'anglais.
Nous recherchons une source de financement possible (via des applications), par exemple non-exhaustif (en 2021) via l'Agence Nationale pour la Recherche - en s'intégrant dans un montage de projet -, appel AAPG2021, axes §2.1 (sciences de base pour l'énergie), §2.2 (Une énergie durable, propre, sûre et efficace), §3.8 Neurosciences intégratives et cognitives, §5.2 Intelligence Artificielle, §8.5 Mathématiques et sciences du numérique pour la biologie et la santé, §8.6 Révolution numérique : rapports au savoir et à la culture. Une autre possibilité serait de faire partie d' un projet innovant collaboratif BPI France ou HorizonEurope or ECS collaboration tool ou CLAIRE. Veuillez alors contacter Basile Starynkevitch par courriel vers, et diffuser cette page A4

 Russian flag RefPerSys (см. сайт свободное программное обеспечение (ПСОК под лицензией GPLv3), для системы Linux/x86-64, в области симболицеского искусственного интеллекта (рефлексы, самоанализ, метазнание ...) по идеям Jacques Pitrat мы ищем партнеров в контексте это работа в стадии разработки. А также ищем потенциальных приложений и пользователей. Пожалуйста, свяжитесь со мной, (Василий Дмитриевич Старынкевич), который плохо читает и плохо говорит по-русски, но свободно владеет английским и французским языками. Jacques Pitrat был директором моего докторского жюри (в области искусственного интеллекта) защищенного в 1990 году (в Университете Paris 6).

  European flag RefPerSys (see is a free software research artificial intelligence project and open source software (work in progress) for Linux, inspired by the works of the late Jacques Pitrat (1934 - oct.2019). See his blog on and read his book Artificial Beings, the Conscience of a Conscious Machine (ISBN 978-1848211018). We are looking for potential applications, partnerships, collaboration and some funding for working on this project. European R&D projects and calls for proposals like ITEA3 or HorizonEurope or ECS collaboration tool or CLAIRE comes to mind. Contact Basile Starynkevitch by email to (home).

RefPerSys -

An acronym for Reflexive Persistent System. This is an ambitious research project (still unfunded, in 2019 - 2022 it is a hobby project; also very risky!), done on spare time with an open science mindset and ethics.

Early work in progress

We have in 2019 - 2022 a lot of ideas, and some code for Linux; in april 2021: 42KLOC measured by Wheeler's sloccount software. That code is on gitlab and preferably on and Done by passionate developers on their spare time. Volunteers wanted; please send an email (introducing yourself) to (near Paris, France, homepage here) and to for more.

The RefPerSys development team

The following persons are working (in 2019 - 2022) on RefPerSys on their spare time from their home and are the copyright owners of the embryonic software.

The RefPerSys team of developers
who where email home page role
Basile Starynkevitch
(born in 1959, PhD in AI),
resume here
France, Europe

or project leader and architect
Abhishek Chakravarti Kolkota,
West Bengal, India
software developer
Nimesh Neema Indore,
Madhya Pradesh, India software developer

design ideas

A draft document giving some design ideas is downloadable as refpersys-design.pdf. We are improving it in 2019-2022.

The currently temporary existing (in 2019 or 2021), on gitlab code base is a bit disappointing (since in summer 2020 most of it is still hand-coded by us, not yet generated), even to the Refpersys team. But we have a lot of fun doing it. It is constantly improving, publicly available, still unreleased, α-stage. We are aware of the replication crisis. We hope to generate most of RefPerSys C++ code in 2021. The external libraries used by RefPerSys may evolve with time, with the hope to provide some partial semi-formal description of their properties to the system. We are aware of Rice's theorem.

The major insight of RefPerSys is to generate most of (and hopefully all) its C++ or C code from higher level representations, based upon a cyclic graph of objects in virtual memory. That entire graph, called the persistent heap, is loaded at startup, and dumped at shutdown, from textual files (and later, external databases). It is garbage-collected.

values and objects in RefPerSys

The persistent heap contains immutable values and mutable objects. Each value is practically speaking a 64 bits word, often a pointer (which can refer to an object in memory, or to a small memory zone holding some data, conceptually some tagged union). Values are hashed and ordered, and are a The nil pointer usually represents a missing value.
Immutable values include:

Only objects are mutable. Since RefPerSys is multi-threaded, access to or update of objects require some synchronization (with mutexes etc...). Objects have each a (hopefully) globally unique objid which is textually representable, for example _8J6vNYtP5E800eCr5t. Objects are quite heavy but flexible data structures containing: Some of the above fields are std::atomic in C++, for performance reasons (to avoid locking the entire object). Even the object's class or space or payload or internal function pointers could change during runtime.

Most (but not all) objects are persistent (so reloaded at startup and dumped to disk or databases at shutdown).

metaprogramming and introspection in RefPerSys

An important feature of RefPerSys is meta-programming and code generation. During its runtime, the multi-threaded refpersys process should generate C++ or C code, compile that code into some shared library, then dlopen that generated shared object, and get function pointers inside it using then dlsym. See also the Program Library HOWTO, and the C++ dlopen mini HOWTO and the manydl.c example. Generated C++ code could be temporary or persistent (in that later case, it is version-controlled).

Another important feature of RefPerSys is introspection coupled with runtime profiling (see also time(7)...) which is reasonably possible in generated C++ code with the help of the garbage collector (explicit GC-ed call frames being singly-linked lists) and/or Ian Taylor's libbacktrace library and the dladdr(3) function. During its runtime, RefPerSys can inspect most of its call stacks. We later hope to use machine learning techniques on the profiling data and get some dynamic optimization, tailored to the concrete problems approached and actual applications of RefPerSys.

declarative knowledge and bootstrapping in RefPerSys

The insight of RefPerSys is to represent high-level expert system rules, fact bases and machine learning artefacts as collections of objects. The C++ (or C) generator should be described by meta-rules compiled by itself to C++ (or C) code. So we are taking a bootstrapping approach, first generating C++ or C) code by hand-written C++ (or C) code, then replacing some of it by generated C++ or C code from higher-level knowledge representations, then progressively and incrementally improving these representations by higher-level and more abstract constructs. This should be worked on in 2021.

In practice, RefPerSys requires some graphical user interface with autocompletion facilities, and displaying graphically small parts of its heap (perhaps as abstract syntax trees or nested boxes), inspired by the past Centaur system.. It is well known that GUI toolkits like Qt or FLTK are more easily used with C++ code generators, which are parts of RefPerSys. So we need to work a lot.

a rewrite in C effort started (for political reasons) in fall 2021. See code on


RefPerSys has been presented at a seminar organized by AFIA in Paris, on March 6th, 2020, dedicated to the memory of Jacques Pitrat, who died in october 2019. Contact Basile Starynkevitch for details. Slides are here in PDF. The video of the talk in French is here.

Please suggest by email to any AI conference, meeting, or workshop where this project could be presented.



The RefPerSys software depends on many other common stuff, notably a recent GCC compiler (in practice, GCC 10 in summer 2021), for C++17 with its standard library, a recent Linux kernel and C standard library (e.g. GNU glibc or Musl Libc), the JsonCPP library (for persistence) and the Qt or soon FLTK graphical toolkit, and the Onion HTTP server library, the libbacktrace library. The GPP preprocessor is useful for some documentation. The AddressSanitizer facilities of GCC are sometimes useful.

A multi-core x86-64 Linux computer with more than 16Gbytes of RAM and at least 100Gbytes of free disk space is recommended. Qt is being replaced by FLTK, more friendly to RefPerSys garbage collector (since Qt, unlike FLTK, is creating threads without notice).

download α-stage source code

The GPLv3+ licensed α-stage embryonic free software source code of RefPerSys is on
We practically are using git as a centralized version control system, because we are very few and sill don't understand well in 2019 or 2020 how a genuinely distributed version control system could play nice with a reflexive, orthogonally persistent, homoiconic, bootstrapped, self-generating Quine system.

Daily snapshot with source and binary

A daily snapshot (of the master git branch) could be downloadable on refpersys-snapshot.tar.bz2. It is usually but not always automatically generated every day, so could be broken or very buggy. That bzip2 tar archive contains both source files, some log files of build, and binary ELF executable refpersys for Linux/x86-64. It is made in good faith, but could be very buggy and might do wrong things if you run that executable (daily built on Debian/Sid/x86-64). So use the refpersys executable in that snapshot, provided with no warranty, at your own risk. For cyber-security reasons, avoid running ./refpersys as root.
Use ./refpersys --help to understand the program arguments and environment variables, if any (they would be conventionally prefixed RPS_ or REFPERSYS_, see environ(7) for more) that could be relevant.

It is preferable to download RefPerSys from and look into the active git branches, then to build it on your Linux computer. The build time with make could last one or a few minutes.

Rewrite in C

For non-technical reasons, RefPerSys is being rewritten in C in october 2021 to spring 2022. That software (GPLv3+) is downloadable from


A low-traffic forum hosted in France by FramaSoft (a non-profit association) is available on Please subscribe if interested. Be polite and civil there. Only for public technical discussion in written English about implementation, architecture, or running issues of RefPerSys, including building problems (so not for philosophical discussions about AGI or singularity). If you have issues in subscribing, contact by email. A typical message could have been this one. If you have built some RefPerSys executable and have tried to run it, that forum is the right place to ask help. Mention the output of the ./refpersys --version command in your message.

Thanks to Niklas Rozencrantz, a Slack channel for RefPerSys exists on


The RefPerSys project needs more volunteers to actively contribute to it, and welcome any person having tried to build and run it (even some intern student in programming, if he/she is willing to contribute). At last, some team members are severely under-equiped and would welcome any 4 to 16 cores x86-64, Linux capable, working, PC with 32 gigabytes of RAM and at least a 240 Gb SSD disk. Sponsorship for traveling costs could also be welcome, to facilitate face to face meetings. Opportunities to present this project in face to face meetings are desired, and more generally a limited funding is welcome (but we have no legal organization for that in 2021). Mention potential relevant funding opportunities (e.g. HorizonEurope calls) or any technical issues in building or running it to us by email. Contact for more.

Contributing to RefPerSys

If you want to contribute to this RefPerSys project, please compile it, and send the output of ./refpersys --version by email (in written English, UTF-8 encoded, HTML5 formatted) to and to Do introduce yourself (give your geographical location and country, education, experience in programming on Linux, past open source projects you contributed to, approximate age, and motivations) and explain the applications you have in mind, etc... Feel free to also give a mobile phone number.

potential applications

The RefPerSys project welcome potential future applications (if in return they provide some sponsorship, contributions, or funding). Since it can be viewed as a high-level declarative programming environment based upon a metaprogramming and at end of 2021 some machine learning techniques, we believe it may become useful... However, the priority in 2021 is to generate most (hopefully all) of the C++ code of the RefPerSys system. Contact

Of course, any real-world potential concrete application of RefPerSys (e.g. health sector, smart cities, smart grids, smart web, perhaps robot planning, civilian autonomous vehicles or drones, etc....) would require some support and a little bit of funding. We all are excited by this project, and we all want to have some read-world application for it and expect such applications to fund partly our research work.

An incomplete list of future applications (assuming a budget of a few hundreds k€ or US$ and close cooperation with other software developers and domain specific experts during a few years, with computer access to some industry or domain-specific open data or proprietary data or communication in open format) might include:

possibly relevant Horizon Europe calls

It could happen (contact by email and that the following European calls (see this) could be relevant (if my employer allows it) for using and deploying RefPerSys (with of course a lot of efforts, to be funded!):

Health cluster of HorizonEurope

Any potential partner in some HORIZON-HLTH submission should be aware that RefPerSys has an agile development, runs on Linux only, and would require trustful cooperation with medical experts and many partners. If interested in submitting a proposal to HORIZON-HLTH calls, email

Be aware that any technical documentation will be produced (probably) using the LaTeX preparation system (and explicitly not any Microsoft Word processor) in PDF format.

Democracy and Governance cluster of HorizonEurope

It could happen (contact by email that the following European calls (see this) could be relevant (if my employer allows it) for using and deploying RefPerSys (with of course a lot of efforts, to be funded!):

European Smart Networks and Services Joint Undertaking programme

see here for details.

Contact by email

Be aware that any technical documentation will be produced (probably) using the LaTeX preparation system (and explicitly not any Microsoft Word processor) in PDF format.

We are aware that there is no silver bullet and RefPerSys is a software tool only. If interested by submitting a proposal on HORIZON-CL2-HERITAGE or smart networks and services joint undertaking calls, please contact by email

In no particular order:

Please contact to suggest related projects, and have an hyperlink to them. We would appreciate a reverse link.

research questions

Several research questions are unanswered, including:

Helping the RefPerSys project

You can help the RefPerSys project by emailing with your first and last or family name, email, geographical location, then: