FISH READY REFERENCE
Types

Concrete Syntax

Constants

Mathematical Functions

standard_prelude.fsh

Shell Actions

Modifications

Known Bugs

Benchmarks

Constants

FISh terms are essentially those of the simply typed lambda calculus with a couple of extra constructors and some novel constants. This page lists the constructors and constants (other than datum constants, and their shape equivalents) with their types (stripped of quantifiers). Explanations and syntactic sugar can be found in the tutorial .

Array Constructors

get names the unique entry of a zero-dimensional array. if applied to a variable then the result is a variable: if aplied to an expression then the result is an expression. Hence, get has two typing rules:
   t : var [a]      t : exp [a]
  -------------    -------------
  get t : var a    get t : exp a
Sub-arrays of arrays with one or more dimensions are named by sub. Its two rules are
  t : var [a]  i : int    t : exp [a]   i : int
  --------------------    ---------------------
    sub(t,i) : var a         sub(t,i) : exp a

Shape expressions

d_shape: #d 	
zerodim: #X -> #[X] 			
succdim: size -> #[X] -> #[X] 			
undim: #[X] -> #X 
lendim: #[X] -> size
preddim: #[X] -> #[X] 			
numdim: #[X] -> size
equal: #X -> # X -> fact

Commands

output: X -> comm 			
skip: comm 			
abort: comm 			
assign: var X -> X -> comm 			
seq: comm -> comm -> comm 			
forall: int -> int -> (int-> comm) -> comm 			
whileTrue: bool -> comm-> comm 			
fix: (comm -> comm) -> comm 			
newvar: #X -> (var X -> comm) -> comm			
newexp: #X -> (var [X] -> comm) -> X				

Phrase polymorphic constants

cond: bool -> V -> V -> V 		
primrec: (size -> V -> V) -> V -> size  -> V				
error: V			
shape: V -> #V			 
null: #V -> V		


Page Last Updated: Friday, 07-Aug-1998 21:33:15 EST


Main | Announcement | Latest Paper | Distribution | Tutorial
Ready Reference | Benchmarks | Designer

Please feel free to send any comments.

Copyright Barry Jay © 1998