formform is a modular Clojure/ClojureScript library all about the 4-valued logic of cognition first introduced 2017 by Ralf Peyn in uFORM iFORM. In its core, the purpose of the library is to enable the representation, evaluation and algebraic simplification of all (undetermined, imaginary, unclear, …) FORMs that have been introduced in the book.
Please note that this library is still in an alpha state and things are changing all the time, so do not rely on it for your projects yet. It is a complete rewrite of my previous (stable-ish) JavaScript version, which is still available here. Prior to this (final) one, I have attempted a rewrite in ReScript, which is also still available, for historical reasons.
The main goals of formform are:
- to be correct and complete with regards to the calculus
- to be flexible and extendable enough for any imaginable application
- to provide a clear, simple and efficient API
- to provide reliable output that can be easily transformed and shared
Although I constantly try to improve performance, it is not a main goal and I am not qualified enough for sophisticated optimizations. You are very welcome to contribute in this area and correct my mistakes.
The library is divided into 3 core modules:
calc
: calculate with the 4 value constants or create and transform value structures such as value tables/maps and what I call formDNAexpr
: construct, simplify and evaluate various FORM expressions or define and use powerful abstractions I call symbolic expressionsio
: read and print strings in FORMula notation, which is easier for end users to read and write
Work in progress:
alg
: define substitution rules using a pattern language to represent and perform stepwise algebraic deductions
It is extendable with more specialized modules for different tasks such as visualization or simulation/analysis with cellular automata.
As a helpful tool for researchers and enthusiasts and as a demonstration of the library's capabilities I have also created the FORM tricorder (it still uses an old, but stable version of formform). It can calculate, represent and visualize FORMs using my own formula
syntax, which is explained in the app (click on Show explanations
). Further applications (like a cellular automaton) are listed on the formform website.
If you want to learn more about the calculus, ideas and theories formform is based upon, here are some helpful resources:
- About uFORM iFORM (mostly German as is the language of the book by Ralf Peyn, but you can try DeepL to translate the gist of it)
- Here is a list of links on the theoretical background behind uFORM iFORM (mostly German resources, but you can just translate the keywords and google them)
- 3-dimensional FORM animations and FORM-builder (a project I made back in 2017 that greatly influenced my approach to formform)
- Blog s y s t e m z e i t by Gitta Peyn – German and English articles about systemic research based on uFORM iFORM
- About FORMWELT – a coding language for language and meaning founded on the logic of cognition introduced in uFORM iFORM (by the way, we appreciate any support for the development of FORMWELT Online!)
This library has become my personal project since I first began studying uFORM iFORM, published by Ralf Peyn in 2017. Ralf's “SelFis” (visual interpretation of a partial System of the self-referential System of the FORM) inspired me to develop my own cellular automaton in the programming environment Processing to dig deeper and gain a fuller unterstanding of these systems.
Working with lookup-tables for FORM calculations was okay for a while, but also very tedious and impractical for my research, so I began working on some functions that would do the calculations for me. In 2018 I was finally able to implement an algorithm to calculate all self-equivalent re-entry FORMs as described in uFORM iFORM. I immediately did countless calculations by hand and let Ralf also check that the algorithm is solid and its results are correct.
As soon as I was able to automate calculation with undetermined FORMs, I saw that there was much more potential in this and that it could be very helpful for other people who want to work with FORM logic as well. So I began working on a JavaScript library to elaborate my ideas, which gradually became formform. Since its early development, formform has always evolved in a fruitful interplay with the applications built on top of it.
A first application that I have developed in parallel from the beginning was the FORM tricorder – a swiss army knife for FORM calculation, representation and visualization. In September 2019 I was finally able to develop a new cellular automaton for FORM logic SelFis with formform that is much more user-friendly and much more versatile than what I have done two years earlier. My experimentation with rule extraction by bitmasking in CAs led me to a code format I call formDNA that is an abstraction of the value table. It not only made my CA faster and more flexible, it also inspired me to create the vmap: a recursive variable/value map to visualize formDNA, that has great potential for pattern recognition in FORMs.
If you want to support my work, consider buying me a coffee. ☕
(c) 2018–2024 by Peter Hofmann
License: MIT