encyclopegia.org

Fril

Fril is a programming language for first-order predicate calculus.[src] It includes the semantics of Prolog as a subset, but takes its syntax from the of Logic Programming Associates and adds support for fuzzy sets, support logic, and metaprogramming.[src] Fril was originally developed by Trevor Martin and Jim Baldwin at the University of Bristol around 1980.[src] In 1986, it was picked up and further developed by Equipu A.I.[src] Research, which later became Fril Systems Ltd.[src] The name Fril was originally an acronym for Fuzzy Relational Inference Language.[src]

Fril is a programming language for first-order predicate calculus.[src] It includes the semantics of Prolog as a subset, but takes its syntax from the of Logic Programming Associates and adds support for fuzzy sets, support logic, and metaprogramming.[src] Fril was originally developed by Trevor Martin and Jim Baldwin at the University of Bristol around 1980.[src] In 1986, it was picked up and further developed by Equipu A.I.[src] Research, which later became Fril Systems Ltd.[src] The name Fril was originally an acronym for Fuzzy Relational Inference Language.[src] ==Prolog and Fril comparison== Aside from the uncertainty-management features of Fril, there are some minor differences in Fril's implementation of standard Prolog features.[src] ===Types=== The basic types in Fril are similar to those in Prolog, with one important exception: Prolog's compound data type is the term, with lists defined as nested terms using the .[src] functor; in Fril, the compound type is the list itself, which forms the basis for most constructs.[src] Variables are distinguished by identifiers containing only uppercase letters and underscores (whereas Prolog only requires the first character to be uppercase).[src] As in Prolog, the name _ is reserved to mean "any value", with multiple occurrences of _ replaced by distinct variables.[src] ===Syntax=== Prolog has a syntax with a typical amount of punctuation, whereas Fril has an extremely simple syntax similar to that of Lisp.[src] A (propositional) clause is a list consisting of a predicate followed by its arguments (if any).[src] Among the types of top-level constructs are rules and direct-mode commands.[src] ====Rule==== A rule is a list consisting of a conclusion followed by the hypotheses (goals).[src] The general forms look like this: (fact) (conclusion goal_1 ...[src] goal_n) These are equivalent to the respective Prolog constructions: fact.[src] conclusion :- goal_1, ..., goal_n.[src] For example, consider the member predicate in Prolog: member(E, [E|_]).[src] member(E, [_|T]) :- member(E, T).[src] In Fril, this becomes: ((member E (E|_))) ((member E (_|T)) (member E T)) ====Relation==== Some data can be represented in the form of relations.[src] A relation is equivalent to a set of facts with the same predicate name and of constant arity, except that none of the facts can be removed (other than by kill ing the relation); such a representation consumes less memory internally.[src] A relation is written literally as a list consisting of the predicate name followed by one or more tuples of the relation (all of the arguments of the equivalent fact without the predicate name).[src] A predicate can also be declared a relation by calling the def_rel predicate; this only works if the proposed name does not already exist in the knowledge base.[src] Once a predicate is a relation, anything that would ordinarily add a rule (and does not violate the restrictions of relations) automatically adds a tuple to the relation instead.[src] Here is an example.[src] The following set of facts: ((my-less-than 2 3)) ((my-less-than 8 23)) ((my-less-than 42 69)) can be rewritten as the relation: (my-less-than (2 3) (8 23) (42 69)) ====Direct mode==== A predicate may be called with exactly one argument using the syntax: predicate argument Queries are submitted using this syntax, with predicate being ?[src] (or one of the other query-related predicates).[src] ====Fuzzy sets==== Fril supports both continuous and discrete fuzzy sets, each with their own special syntaxes.[src] A discrete set (dtype) lists discrete values and their degrees of membership, with this syntax: {value:dom value:dom ...[src] value:dom} value is an atom or number, and dom is a value in the interval [0, 1].[src] A continuous set (itype) lists real numbers and their degrees of membership; the degree-of-membership function is the linear interpolation over these mappings.[src] The syntax is thus: [value:dom value:dom ...[src] value:dom] where the values must be given in non-decreasing order.[src] Each dtype and itype may be constrained to a universe (a set of allowable values).[src] Fril has predicates for fuzzy set operations (but does not directly support control through fuzzy logic).[src] It is even possible to combine dtypes and itypes through some operations, as long as the dtypes contain only real numbers.[src] ====Support pairs==== Any rule may have a probability interval (called a support pair) associated with it by appending :(min max) to it, where min and max are the minimum and maximum probabilities.[src] Fril includes predicates that calculate the support for a given query.[src] ====Disjunction==== While Prolog uses punctuation — namely ; — for disjunction within clauses, Fril instead has a built-in predicate orr .[src] ====Merits==== There are advantages and disadvantages to this simpler syntax.[src] On the positive side, it renders predicates such as Prolog's =..[src] (which maps between lists and clauses) unnecessary, as a clause is a list.[src] On the other hand, it is more difficult to read.[src] ===Behavior=== As a logic programming environment, Fril is very similar to Prolog.[src] Here are some of the differences: Both Prolog and Fril have shell applications, which serve as the standard way of interacting with them.[src] Prolog reads commands in two modes: in source file-reading mode, it accepts directives and clauses; in user interaction mode, it accepts only queries (although it is possible to tell Prolog to read directives and clauses from standard input by using consult(user).[src] ).[src] Fril makes no distinction: all types of commands can be given both from source files and on the command line.[src] The Prolog shell automatically prints the values of all instantiated variables that appear in a query, along with a yes or no answer.[src] The Fril shell only gives the answer; it is the user's responsibility to print variables if desired.[src] ==References== Martin, T.[src] P.[src] (electronic mail to M.[src] Kantrowitz, March 10, 1994).[src] Re: FRIL.[src] Retrieved October 18, 2005.[src] Archived copy in November 27, 2014 Pilsworth, B.[src] W.[src] (n.d.).[src] The Programming Language Fril .[src] Retrieved October 18, 2005.[src] Fril Systems Ltd (1999).[src] Fril - Online Reference Manual - Preliminary Version (incomplete) .[src] Retrieved October 20, 2005.[src] ==External links== Fril - downloadable resources, the official download site for Fril [Logic Programming (Fril) and Artificial Intelligence Lab], Zengchang Qin[src]

72 sentences · 72 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Fril." encyclopegia.org, 2026, https://encyclopegia.org/wiki/fril. Accessed 25 November 2026.

Chicago

"Fril." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/fril.

APA

encyclopegia.org. (2026). Fril. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/fril

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1376673988 · 0.5 · snapshot enwiki-001376673988

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.