Administrative normal form

Administrative normal form

In computer science, administrative normal form (abbreviated ANF) is a canonical form of programs, which was introduced by Flanagan et al 1993 to serve as an intermediate representation in functional compilers to make subsequent transformations to machine code more direct.

In ANF, all arguments to a function must be trivial. That is, evaluation of each argument must halt immediately.

This article deals with the basic definition expressed in terms of the λ-calculus with weak reduction and let-expressions, where the restriction is enforced by
# allowing only constants, λ-terms, and variables, to serve as arguments of function applications, and
# require that the result of a non-trivial expression are captured by a let-bound variable or returned from a function.

Grammar

The following BNF grammar describes the pure λ-calculus modified to support the constraints of ANF:

EXP ::= VAL VAL
let VAR = EXP in EXP

VAL ::= λ VAR . EXP
VAR

Variants of ANF used in compilers or in research often allow constants, records, tuples, multiargument functions, primitive operations and conditional expressions as well.

Examples

The expression:

f(g(x),h(y))

is written in ANF as:

let v0 = g(x) in let v1 = h(y) in f(v0,v1)

References

* cite conference
id = Flanagan93
first = Cormac
last = Flanagan
coauthors = Sabry, Amr; Duba, Bruce F.;Felleisen, Matthias
title = The Essence of Compiling with Continuations
booktitle = Proceedings ACM SIGPLAN 1993 Conf. on Programming Language Design and Implementation, PLDI'93
location = Albuquerque, NM, USA
url = http://citeseer.ist.psu.edu/flanagan-essence.html
accessdate = 2007-06-05


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать курсовую

Look at other dictionaries:

  • Administrative reforms against terrorism — are the name given to organizational changes/adaptations performed after the 1980 Coup in the Republic of Turkey. The reforms targeted not only the fight against terrorism, also insurgency with the rise of PKK guerilla activity.In fighting… …   Wikipedia

  • administrative law — the body of rules and principles that governs the duties and operations of federal or state administrative agencies, as commissions and boards. [1890 95] * * * Law regulating the powers, procedures, and acts of public administration. It applies… …   Universalium

  • Administrative divisions of the People's Republic of China — See also: Administrative divisions of the Republic of China This article is part of the series: Administrative divisions of the People s Republic of China Provincial level …   Wikipedia

  • ANF — may mean:* Algebraic normal form, a method of standardizing and normalizing logical formulas * Australian Nursing Federation, the national union for nurses in Australia * Australian Newsagents Federation, a chain of newsagencies in Australia *… …   Wikipedia

  • Continuation-passing style — In functional programming, continuation passing style (CPS) is a style of programming in which control is passed explicitly in the form of a continuation. Gerald Jay Sussman and Guy L. Steele, Jr. coined the phrase in AI Memo 349 (1975), which… …   Wikipedia

  • Functional compiler — External links= A functional compiler is a compiler for a functional programming language. Functional compilers perform such transformation on source code which transform it to continuation passing style or administrative normal form and need to… …   Wikipedia

  • HEBREW LANGUAGE — This entry is arranged according to the following scheme: pre biblical biblical the dead sea scrolls mishnaic medieval modern period A detailed table of contents precedes each section. PRE BIBLICAL nature of the evidence the sources phonology… …   Encyclopedia of Judaism

  • Information security — Components: or qualities, i.e., Confidentiality, Integrity and Availability (CIA). Information Systems are decomposed in three main portions, hardware, software and communications with the purpose to identify and apply information security… …   Wikipedia

  • Byzantine Empire — the Eastern Roman Empire after the fall of the Western Empire in A.D. 476. Cap.: Constantinople. * * * Empire, southeastern and southern Europe and western Asia. It began as the city of Byzantium, which had grown from an ancient Greek colony… …   Universalium

  • heredity — /heuh red i tee/, n., pl. heredities. Biol. 1. the transmission of genetic characters from parents to offspring: it is dependent upon the segregation and recombination of genes during meiosis and fertilization and results in the genesis of a new… …   Universalium

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”