Home
_______ _______ __ _ ______ |______ | |______ | \ | | ____ | |_____ |______ | \_| |_____| Version: 3 This software is an implementation of "FLENG", a low level concurrent logic programming language descended from Prolog. A compiler is provided to translate programs written in FLENG into assembly" language which can subsequently be compiled and linked into a binary executable. As FLENG is quite minimal in features, a translator from "Flat Guarded Horn Clauses" (another concurrent logic language) into FLENG is also available. FLENG programs allow for massive parallelism at a very fine grained level - goals are executed concurrently and communicate solely via single-assignment logic variables. The use of logic variables for inter-process communication offers an easy to use and convenient abstraction to implement many common patterns of synchronization and message passing in a natural manner. This implementation additionally can distribute pools of parallel processes over native OS level threads, thus taking advantage of multicore architectures. Locking overhead should be small, as data is normally not shared among processes executing on different threads. Automatic management of memory is provided using a reference-counting scheme of fixed size cells, which avoid fragmentation, avoids garbage collection pauses and keeps the overall memory required to hold live data at any point of time minimal, while providing relatively good locality. Interfacing to native code is straightforward and compiled FLENG code and the run time library support can be linked with other modules written in C or C++ without problems. The compilation tools allow cross compilation, provided the architecture is supported. The compiler generates native code, but does currently not perform a lot of optimizations, so performance-sensitive code should probably be written in C or another language. FLENG should be particularly well suited as a coordination language for providing intercommunication and synchronization with reasonable overhead while calling out to C or C++ code for low-level or speed-critical operations. This is a first release of FLENG, so expect bugs, lack of performance tuning and missing features. Suggestions for improvement or patches providing enhancements and corrections are very welcome, see the user's manual for information on how to contact the author. The software is open source and released under the 3-clause BSD license. Installation instructions
User's Manual
Get the code
Release History: Version 3: * Added support of AArch64. * Several bugfixes in Linux event-handling code. * Corrected detection of "-no-pie" to only apply to x86-64 in configuration script. * Fixed installation when used in combination with SWI Prolog. * Fixed incorrect translation of "otherwise" FGHC guards when combined with other guards. * Added primitives "string_to_byte_list/3", "cancel_timer/2", "chdir/2", "file_exists/2", "getcwd/1", "getenv/2", "file_type/2", "readlink/2", "get_global/2" and "put_global/3". * Changed "timer/2" to "timer/3', which produces an additional identfier result. * Increased message-port size to 4kb. * Added support for detached message ports (see "sys.ghc" for more information). * Fixed "length/2", which was totally broken for lists (doh). * Threads could sometimes terminate too early, even with inter-thread messages still being in flight, a more robust algorithm tries to ensure that threads never shut down while messages are still pending processing. * The empty lists is now treated as a empty (null) string, when used as argument to a primitive that requires a string or character list. * Character lists were not correctly dereferenced when containing variable references in primitives that require strings or character lists. Version 2: * Typo fix in "configure" script (reported by Mario Goulart). * Added missing "VERSION" and "fleng.mdoc" files to distribution archive (reported by "sytse"). * "-no-pie" is added when generating executables on all platforms if the C compiler supports it (reported by "sytse"). Version 1: * Initial release
gopher://schinkel.bevuta.com/1/fleng/fleng | gemini://schinkel.bevuta.com/fleng/fleng.gmi