A library to represent a subset of Julia programs.
Author: Michael Hanus
Version: November 2020
Julia types.
Constructors:
JLBoolType
:: JLType
JLInt32
:: JLType
JLInt64
:: JLType
JLFloat64
:: JLType
JLStringType
:: JLType
JLStruct
:: String -> JLType
JLArray
:: [JLType] -> JLType
Julia expressions.
Constructors:
JLBool
:: Bool -> JLExp
JLInt
:: Int -> JLExp
JLFloat
:: Float -> JLExp
JLString
:: String -> JLExp
JLIVar
:: Int -> JLExp
JLSVar
:: String -> JLExp
JLArrayAcc
:: JLExp -> JLExp -> JLExp
JLArrayInit
:: [JLExp] -> JLExp
JLStructAcc
:: JLExp -> String -> JLExp
JLOp
:: String -> JLExp -> JLExp -> JLExp
JLFCall
:: String -> [JLExp] -> JLExp
Julia statements.
Constructors:
JLAssign
:: JLExp -> JLExp -> JLStm
JLIf
:: JLExp -> [JLStm] -> [JLStm] -> JLStm
JLWhile
:: JLExp -> [JLStm] -> JLStm
JLFor
:: Int -> JLExp -> JLExp -> [JLStm] -> JLStm
JLPCall
:: String -> [JLExp] -> JLStm
JLReturn
:: JLExp -> JLStm
Julia top-level entities occurring in scripts. These are function declarations or statements. A function declaration consists of a name, indexed arguments with optional types, an optional result type and the body represented by a list of statements.
Constructors:
JLFDecl
:: String -> [(Int,Maybe JLType)] -> (Maybe JLType) -> [JLStm] -> JLTop
JLStat
:: JLStm -> JLTop
Julia module consisting of the module name, exported names, imported modules, and a list of top-level entities.
Constructors:
JLModule
:: String -> [String] -> [String] -> [JLTop] -> JLModule