You are looking at historical revision 25520 of this page. It may differ significantly from its current revision.
Definition and code generators for a simple applicative language for numerical simulation.
The flsim library provides definitions for a simple applicative language capable of expressing finite state machines, code generators for Scheme and Standard ML, as well as a library implementing explicit Runge-Kutta solvers for ordinary differential equations.
(define-datatype value value? ...)
Representation of values in the language. The value definitions are:
- (V:C const)
- Constant values. Currently supported are numeric and symbolic constants.
- (V:Var name)
- Variable name. NAME must be a symbol.
- (V:Rec fields)
- Record constructor. FIELDS is a list of elements of the form (NAME VALUE).
- (V:Sel field value)
- Record field selector. FIELD is a field name (symbol), and VALUE must be a record value.
- (V:Vec (value ...))
- Vector constructor.
- (V:Sub index value)
- Vector element selector. INDEX must be a positive integer, VALUE must be a vector value.
- (V:Fn args body)
- Parametric expression. ARGS must be a list of symbols, BODY must be an expression (see below for definition).
- (V:Prim name args)
- Primitive procedure application. NAME must be a symbol, ARGS must be a list of values.
- (V:Ifv test iftrue iffalse)
- Conditional value.
(define-datatype expr expr? ...)
Representation of expressions in the language. The expression definitions are:
- (E:Val name value)
- Creates a binding that associates the given name with the given value
- (E:Ife test iftrue iffalse)
- Conditional expression.
- (E:Let bindings body)
- An expression with bindings.
- (E:Ret value)
- Returns the given value.
- Null expression.
The language defined in this library assumes the presence in the host language of the standard ANSI C floating-point arithmetic and mathematical functions.
Scheme code generator[procedure] name/scheme :: NAME -> NAME
Converts a given name (symbol) to a valid Scheme identifier.[procedure] prelude/scheme :: VOID -> FRAGMENTS
Returns a set of definitions needed by the Scheme code generator. FRAGMENTS is a list of strings, symbols, or fragments.[procedure] expr->scheme :: EXPRESSION -> FRAGMENTS
Generates a representation of the given expression in Scheme.[procedure] value->scheme :: VALUE -> FRAGMENTS
Generates a representation of the given value in Scheme.
ML code generator[procedure] name/ML :: NAME -> NAME
Converts a given name (symbol) to a valid Standard ML identifier.[procedure] prelude/ML :: VOID -> FRAGMENTS
Returns a set of definitions needed by the Standard ML code generator. FRAGMENTS is a list of strings, symbols, or fragments.[procedure] expr->ML :: EXPRESSION -> FRAGMENTS
Generates a representation of the given value in Standard ML.[procedure] value->ML :: VALUE -> FRAGMENTS
Generates a representation of the given value in Standard ML.
About this egg
- Better support for LSODE solver in Octave
- Removed pointer operations (Ldv/Stv/Set) and Seq
- Fixes and extensions to the Octave code generator
- Changes in the integrator interface
- Install RK library files in Chicken shared directory
- Bug fixes in the Octave code generator
- Initial code generator for Octave; some streamlining of the integrator interface
- Initial release
Copyright 2010-2011 Ivan Raikov. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.