Syntax of LLF

Concrete syntax

The LLF terms rendered on the leftmost column are written using the concrete syntax on the right. Dependent terms and the linear arrow can be written in different forms.

Kinds
type type
Pi x:A.K {x:A}K A -> K K <- A
Types
P M P M
T (top) <T>
A & B A & B
A -o B A -o B B o- A
Pi x:A.B {x:A}B A -> B B <- A
Objects
<> ()
<M, N> (M, N)
fst M <fst> M
snd M <snd> M
lambda^ x:A. M [x^A]M
M ^ N M ^ N
lambda x:A. M [x:A]M
M N M N

Precedence of the operators

The following table indicates the precedence and the associativity of the LLF operators in the concrete syntax. Use parenthesis for grouping.

highest <fst> <snd> prefix
(juxtaposition) ^ left associative
& right associative
-> -o right associative
<- o- left associative
{} [] [^] prefix
lowest , right associative

Conventions

The verbosity of an LLF signature can be cut by more than half in average by adopting simple conventions and by relying on automatic methods to reconstruct information kept implicit. This has major benefits in terms of readability of an LLF program, and in terms of usability of the language.

Last modified: 14 December 1995


Iliano Cervesato () and Frank Pfenning ()