Est. 1983 Advanced

Fril

Fril, the Fuzzy Relational Inference Language from Jim Baldwin's group at the University of Bristol: a Prolog-like logic language with Lisp-style list syntax, fuzzy sets and support-pair probabilities built in.

Created by Jim Baldwin and Trevor Martin (University of Bristol); commercialised by Fril Systems Ltd

Paradigm Logic programming with fuzzy and probabilistic uncertainty
Typing Dynamic (logic-programming terms, lists, and fuzzy sets as data types)
First Appeared 1983 (first papers under the name; implemented in the early 1980s, version 4 in 1989)
Latest Version Version 4 (1989) is the last release with a confirmed date; version 5 was announced for mid-1994

Fril (originally an acronym for Fuzzy Relational Inference Language) is a logic programming language that treats uncertainty as part of the language. It contains Prolog’s semantics as a subset, but it writes everything as Lisp-style lists, following the early micro-PROLOG from Logic Programming Associates. It adds three things standard Prolog lacks: fuzzy sets as data values, “support pairs” that attach probability intervals to facts and rules, and an inference engine that propagates both through a proof. Fril was developed by Jim Baldwin and Trevor Martin at the University of Bristol and sold commercially from 1986 by the company that became Fril Systems Ltd. It was arguably one of the earliest working attempts to combine fuzzy logic and probability in a single logic programming system.

History & Origins

Baldwin’s fuzzy relations

Fril grew out of Jim Baldwin’s work on fuzzy logic and approximate reasoning at Bristol. His papers in Fuzzy Sets and Systems go back to 1979 (“A new approach to approximate reasoning using a fuzzy logic”). The language name first appears in print in 1983, in Baldwin’s IFAC paper “Knowledge Engineering Using a Fuzzy Relational Inference Language”. The fuller description followed in 1984, in Baldwin and S. Q. Zhou’s “A fuzzy relational inference language” (Fuzzy Sets and Systems 14, pp. 155-174).

Trevor Martin’s own history of the language, written in 1994, describes these early stages:

  • Version 1 was implemented “in the early 1980’s using Lisp”. It was a relational language, not a logic programming one. It extended relational algebra with fuzzy operations and could handle uncertainty both in attribute values and in whole tables of facts.
  • Version 2 was written in Forth “at around the same time” so that it could run on an IBM PC. It was used to build a monitoring system for an electricity generating plant.
  • The Lisp version was later extended with a fuzzy Prolog module, FPROLOG, which added more execution strategies and procedural programming.

Some secondary sources, including Wikipedia, date Fril to “around 1980”. The earliest dated sources found for this page are from 1983-84, so this page uses 1983.

Commercialisation

Martin writes that the commercial possibilities of the language became apparent in 1986. Development moved to Equipu A.I. Research, which was later renamed Fril Systems Ltd. In 1994 its address was the Bristol Business Centre. The company released:

VersionYearNotes
Fril 31987Compiler based on the abstract Fril machine; parts of the core system written in Fril
Fril 41989Same architecture; this is the date in the encyclopedia master list
Fril 5announced for summer 1994Planned to let users define their own calculus for combining supports

Martin’s 1994 email describes version 5 as “scheduled for release this summer”. No dated release announcement for it was found, so this page does not say exactly when, or whether, it shipped.

The name

Fril began as an acronym, Fuzzy Relational Inference Language, and is usually written FRIL in the early papers. Later material from Bristol writes it as an ordinary name, “Fril”. By then the language was a general logic programming system and no longer just a fuzzy relational one.

Design Philosophy

Fril’s central claim is that Prolog is the special case of Fril in which nothing is uncertain. A Fril program with no fuzzy sets and no support pairs runs like an ordinary logic program. Uncertainty is added gradually, in the same notation, without switching to a separate expert-system shell or probability package.

The theory behind it is Baldwin’s: support logic, mass assignments and evidential reasoning. Martin’s summary says mass assignments “give a consistent way of manipulating fuzzy and probabilistic uncertainties, enabling different forms of uncertainty to be integrated within a single framework”. The 1995 book Fril - Fuzzy and Evidential Reasoning in Artificial Intelligence by Baldwin, Martin and Pilsworth sets out the theory and the language together.

Key Features

List syntax

Fril has no operator syntax for clauses. Every clause is a list whose head is the conclusion and whose remaining elements are the goals. The usual Prolog member predicate:

1
2
member(E, [E|_]).
member(E, [_|T]) :- member(E, T).

is written in Fril as:

1
2
((member E (E|_)))
((member E (_|T)) (member E T))

Because clauses are already lists, programs can easily be manipulated as data. Fril needs no counterpart to Prolog’s =.. “univ” operator. The cost is readability, which is the same trade-off micro-PROLOG made. Facts with the same predicate and arity can also be grouped into a compact relation:

1
2
3
4
(my-less-than
    (2 3)
    (8 23)
    (42 69))

Fuzzy sets as values

Fril has two kinds of fuzzy set literal. A continuous fuzzy set (an “itype”) is a list of points that are linearly interpolated, which produces a trapezoid or another piecewise-linear shape:

1
2
(tall [68:0 72:1 74:1 76:0])
((height John tall))

A discrete fuzzy set (a “dtype”) lists values and their membership degrees (Martin’s original separates the entries with commas; this follows the space-separated syntax Wikipedia gives):

1
{cola:0.8 lager:1.0 wine:0.3}

When two fuzzy values partially match, the match succeeds to a degree. Martin’s example: if John is known to be tall, a query asking for people “around 70” inches tall returns John, with a support calculated from how well the two fuzzy sets match.

Support pairs

Any fact or rule can carry a support pair :(min max), which bounds the probability that it holds:

1
2
((Comfortable-speed Mini 50)) :(0.8 0.8)
((top-speed Mini 90)) :(0.8 1)

The second fact says “at least 80% of Minis have a top speed of 90 mph”, or a support between 0.8 and 1.

Uncertain rules

Rules carry supports too, and Fril calculates the support for a conclusion when its conditions are only partly satisfied:

1
2
3
4
((illness of X is flu)
    (temp of X is high)
    (strength of X is weak)
    (throat of X is sore)) : (0.9 1)

Martin’s 1994 description names three rule types:

  1. the basic rule (shown above);
  2. the extended rule, which generalises the basic rule. Both use an interval version of Jeffrey’s rule derived from mass assignment theory;
  3. the evidential logic rule, which can draw a conclusion from a weighted set of features even when some features are absent. The conclusion then gets a lower support.

By default supports combine probabilistically. Martin wrote that version 4 users could change this with a meta-program, and that version 5 was meant to make the calculus user-definable.

Systems programming

Fril was sold as a complete development system, not only as a research notation. The 1994 description lists:

  • a dialog compiler that builds GUI dialog boxes from declarative descriptions, with Fril procedures attached to the controls;
  • linking to code in other high-level languages, either tightly (one application) or loosely through an inter-application communication package;
  • an application generator that packages Fril code with the core so that end users never see the underlying system.

Interaction model

Fril’s shell accepts the same input from a file and at the prompt: rules, relations and queries all work in both places. The shell does not print variable bindings automatically the way a Prolog top level does. Queries use a “direct mode” syntax (? goal), and programs print any results they want shown.

Platforms and Pricing (1994)

According to Trevor Martin’s March 1994 description, Fril ran on Unix, Macintosh, MS-DOS and Windows 3.1. Example list prices, excluding VAT, were:

EditionPrice
Small DOS version (no extended memory)£195
Macintosh£595
Sun workstation£2,500

Fril was proprietary software. Martin said it was “not available as share/free ware”. The 1995 book came with two disks; Martin’s 1994 email described the planned book disk as a demo for the Macintosh and Windows 3, and that was presumably the easiest way to try Fril without buying a licence.

Evolution

Fril++

In the late 1990s the Bristol group added objects. Fril++ has fuzzy objects: an object can belong to a class to a degree. It allows multiple inheritance, and it includes a library of defuzzification methods for choosing among several answers to a message. The main papers are:

  • Baldwin, Martin and Vargas-Vera, “Fril++: a Language for Object-Oriented Programming with Uncertainty”, LNCS 1566 (1999);
  • Baldwin, Martin, Cao and Rossiter, “Implementing Fril++ for Uncertain Object-Oriented Logic Programming” (2000);
  • Martin, “On the Implementation of Fril++ for Object-Oriented Logic Programming with Uncertainty and Fuzziness” (Springer, 2001);
  • Rossiter, Cao and Ma, “Fril++ and Its Applications” (Idea Group, 2005).

Later distribution

Around 1999, Fril Systems published a preliminary online reference manual. Later the University of Bristol’s Engineering Mathematics AI group hosted a “Fril - downloadable resources” page. Both survive only in web archives. Wikipedia’s infobox gives a version 4.984 dated 23 August 2011. That release could not be confirmed from any primary source for this page, so it is not used here.

Current Relevance

Fril is historical. No current vendor, open-source release or maintained implementation was found, and the Bristol pages that distributed it are offline. It survives mainly in the literature. The 1984 Fuzzy Sets and Systems paper, the 1995 book and the Fril++ papers are still cited in work on fuzzy logic programming, soft computing and uncertain object-oriented systems.

Why It Matters

  • Uncertainty built into the language. Many 1980s expert-system tools added certainty factors to rule engines. Fril made fuzzy sets and probability intervals first-class parts of a general-purpose logic language, and kept plain Prolog as the zero-uncertainty case.
  • A working implementation of mass assignment theory. Baldwin’s support logic and mass assignment ideas were implemented and used in a commercial product, not only described on paper.
  • Programs as lists. Fril kept the micro-PROLOG style of logic programs written as Lisp-like lists after most of the Prolog world had moved to Edinburgh syntax.
  • Fuzzy objects. Fril++ was among the early concrete attempts to combine fuzzy membership with class inheritance in a running language.

Sources and Verification Notes

  • Trevor Martin, “Re: FRIL”, email to Mark Kantrowitz, 10 March 1994. This is in the CMU AI Repository at ai-repository/ai/areas/fuzzy/com/fril/fril.txt and was read directly. It is the source for the version history (v1 Lisp, v2 Forth, FPROLOG, 1986 commercialisation, v3 1987, v4 1989, v5 announced), the plant-monitoring use, the rule types, the system features, the platforms and the prices. All code examples apart from member and my-less-than are taken from it.
  • Crossref metadata confirms Baldwin, “Knowledge Engineering Using a Fuzzy Relational Inference Language”, IFAC Proceedings Volumes 16 (1983), pp. 15-20; Baldwin and Zhou, Fuzzy Sets and Systems 14 (1984), pp. 155-174; the Fuzzy Sets and Systems 25 (1988) software note, pp. 384-387; and Baldwin and Pilsworth, Int. J. Intelligent Systems 7 (1992), pp. 61-69.
  • University of Bristol research portal entries confirm the 1994 evidential reasoning paper, the 1995 book (library catalogues, e.g. KIT, record it as 388 pages plus two disks, ISBN 0863801595), and the Fril++ papers from 1999, 2000, 2001 and 2005. The Utah LNCS bibliography confirms the 1999 Fril++ paper is LNCS 1566, pp. 62-78.
  • Wikipedia’s Fril article is the source for the member and relation examples and the shell behaviour. Neither the “around 1980” origin nor the “4.984, 23 August 2011” release could be checked against a primary source, so this page does not use them.
  • Not verified: whether Fril 5 shipped, and when; which platforms the book’s two disks were for; the client of the power-plant monitoring system; when Fril Systems Ltd stopped trading.

Timeline

1983
Jim Baldwin publishes "Knowledge Engineering Using a Fuzzy Relational Inference Language" in IFAC Proceedings Volumes, vol. 16. It is the earliest dated publication found that names the language
1984
Baldwin and S. Q. Zhou publish "A fuzzy relational inference language" in Fuzzy Sets and Systems 14, pp. 155-174. This first Fril was a relational language with fuzzy extensions to the relational algebra, implemented in Lisp, with a separate Forth version for the IBM PC
1986
Commercial development passes to Equipu A.I. Research, the company later renamed Fril Systems Ltd
1987
Fril Systems releases Fril version 3, a compiler built on an abstract "Fril machine" with parts of the core system written in Fril itself
1988
Fuzzy Sets and Systems (vol. 25) runs a software-products note, "FRIL - A support logic programming system"
1989
Fril version 4 is released, according to Trevor Martin's 1994 account. This is the year the encyclopedia master list gives for the language
1994
In a March 1994 email to the CMU AI Repository, Trevor Martin lists Fril for Unix, Macintosh, MS-DOS and Windows 3.1, and says version 5, with a user-definable uncertainty calculus, is scheduled for that summer
1995
Baldwin, Martin and Pilsworth publish "Fril - Fuzzy and Evidential Reasoning in Artificial Intelligence" (Research Studies Press), issued with two 3.5-inch disks. Martin's 1994 email had promised a demo disk for the Macintosh and Windows 3
1999
Baldwin, Martin and M. Vargas-Vera describe Fril++, an object-oriented extension with fuzzy objects, in Springer's Lecture Notes in Computer Science vol. 1566

Notable Uses & Legacy

Electricity generating plant monitoring

Trevor Martin's 1994 history says the early Forth-based IBM PC version of Fril was used to build a monitoring system for an electricity generating plant. The client and the site are not named

University of Bristol AI research

Fril was the implementation language for Jim Baldwin's research on support logic, mass assignments and evidential reasoning. This includes the 1994 paper "Evidential reasoning in Artificial Intelligence using FRIL" and the 1992 International Journal of Intelligent Systems paper "Semantic unification with fuzzy concepts in FRIL" (Baldwin and Pilsworth)

Fril++ object-oriented research

Baldwin, Martin, T. H. Cao and J. M. Rossiter built Fril++ on top of Fril to model fuzzy objects with multiple inheritance. Implementation papers appeared in 2000 and 2001, and Rossiter, Cao and Ma wrote an applications chapter (Idea Group, 2005)

Language Influence

Influenced By

Prolog micro-PROLOG

Influenced

Fril++

Running Today

Run examples using the official Docker image:

docker pull
Last updated: