Bitte benutzen Sie diese Referenz, um auf diese Ressource zu verweisen:
doi:10.22028/D291-38951
Titel: | FIT-PROLOG : a functional/relational language comparison |
VerfasserIn: | Boley, Harold |
Sprache: | Englisch |
Erscheinungsjahr: | 1983 |
Erscheinungsort: | Kaiserslautern |
DDC-Sachgruppe: | 004 Informatik |
Dokumenttyp: | Forschungsbericht (Report zu Forschungsprojekten) |
Abstract: | The programming languages FIT and PROLOG are compared as examples of functional and relational programming, respectively. This leads to some proposals concerning both languages. As an introductory tutorial, PROLOG facts, questions, variables, conjunctions, and rules are reformulated in FIT. A natural equivalence between functions and relations is exploited for their interchangeable FIT use. An ESCVAL operator is proposed which causes relation calls to return values of request variables and thus permits their function-like nesting. Function calls with request variables are introduced, showing a sense in which FIT functions are more general than PROLOG relations. Higher-order functions and relations are demonstrated to be available in FIT but not in PROLOG. PROLOG structures and FIT compounds differ mainly in the fixed arity of the former and the variable length of the latter. FIT's compounds can also be interpreted as function calls that return themselves in normalized form. Pattern matching in PROLOG [FIT] treats list heads and tails asymmetrically [symmetrically] and doesn't [does] allow for non-deterministic results. While PROLOG generalizes pattern-data matching to pattern-pattern unification. FIT generalizes it to adapter-data fitting. PROLOG's Horn clauses in FIT become implicit fitters: Facts become special implicit adapters and rules become special implicit transformers; for PROLOG II constraints, transformers with LOCAL bodies or invocation adapters with COM[POSE-TRA]FO expressions can be used. While PROLOG interprets clauses in textual order, FIT interprets them in a specificity order which is modifiable by a SECURE operator. Although PROLOG's cut operator is not used in FIT, a proposal is made to distinguish the specification of clause ordering [by FIT's SECURE operator] and the specification of clause abandoning [by an EXCLUSIVE operator corresponding to 'initial'-restricted cuts]. EXCLUSIVE-marked COMFO-constrained rules are then used for functional and relational representations of guarded commands. A comparison of the list processing capabilities of both languages exemplifies how FIT's adapters can make relational programming more concise than PROLOG’s Horn clauses. The representation of sets as lists without duplicates leads to difficulties with PROLOG's standard intersection and union predicates, which can be overcome by representing them as the self-normalizing CLASS data structure in FIT. Possible reasons for the poor readability of Warren's PROLOG serialise predicate are discussed and an alternative FIT function is formulated which shows the inherent simplicity of this problem. McDermott's PROLOG quadrat predicate is transformed into a more concise and readable ESCVAL form, which in turn is transformed into a corresponding FIT ESCVAL form and into a functional FIT form. Fermat's equation is formulated relationally, showing that for principal reasons some relations can not be used in all ways allowed by PROLOG's notation, a problem that does not arise in a corresponding functional FIT formulation. |
Link zu diesem Datensatz: | urn:nbn:de:bsz:291--ds-389515 hdl:20.500.11880/35464 http://dx.doi.org/10.22028/D291-38951 |
Schriftenreihe: | Memo SEKI : SEKI-Projekt / Deutsches Forschungszentrum für Künstliche Intelligenz, DFKI |
Band: | 83,14 |
Datum des Eintrags: | 20-Mär-2023 |
Fakultät: | SE - Sonstige Einrichtungen |
Fachrichtung: | SE - DFKI Deutsches Forschungszentrum für Künstliche Intelligenz |
Professur: | SE - Sonstige |
Sammlung: | SciDok - Der Wissenschaftsserver der Universität des Saarlandes |
Dateien zu diesem Datensatz:
Datei | Beschreibung | Größe | Format | |
---|---|---|---|---|
SEKI-MEMO-83-14_Boley_FIT-PROLOG-A-Functional-Relational-Language-Comparison.pdf | 66,22 MB | Adobe PDF | Öffnen/Anzeigen |
Alle Ressourcen in diesem Repository sind urheberrechtlich geschützt.