source: project/wiki/eggref/4/flsim @ 25999

Last change on this file since 25999 was 25999, checked in by Ivan Raikov, 9 years ago

flsim version history update

File size: 4.3 KB
Line 
1[[tags:egg]]
2
3== flsim
4
5Definition and code generators for a simple applicative language for numerical simulation.
6
7[[toc:]]
8
9== Usage
10
11(require-extension flsim)
12
13== Documentation
14
15The {{flsim}} library provides definitions for a simple applicative
16language capable of expressing finite state machines, code generators
17for Scheme and Standard ML, as well as a library implementing explicit
18Runge-Kutta solvers for ordinary differential equations.
19
20=== Data types
21
22{{(define-datatype value value? ...)}}
23
24Representation of values in the language. The value definitions are:
25
26; {{(V:C const)}} : Constant values. Currently supported are numeric and symbolic constants.
27; {{(V:Var name)}} : Variable name. {{NAME}} must be a symbol.
28; {{(V:Rec fields)}} : Record constructor. {{FIELDS}} is a list of elements of the form {{(NAME VALUE)}}.
29; {{(V:Sel field value)}} : Record field selector. {{FIELD}} is a field name (symbol), and {{VALUE}} must be a record value.
30; {{(V:Vec (value ...))}} : Vector constructor.
31; {{(V:Sub index value)}} : Vector element selector. {{INDEX}} must be a positive integer, {{VALUE}} must be a vector value.
32; {{(V:Fn args body)}} : Parametric expression. {{ARGS}} must be a list of symbols, {{BODY}} must be an expression (see below for definition).
33; {{(V:Prim name args)}} : Primitive procedure application. {{NAME}} must be a symbol, {{ARGS}} must be a list of values.
34; {{(V:Ifv test iftrue iffalse)}} : Conditional value.
35
36{{(define-datatype expr expr? ...)}}
37
38Representation of expressions in the language. The expression definitions are:
39
40; {{(E:Val name value)}} : Creates a binding that associates the given name with the given value
41; {{(E:Ife test iftrue iffalse)}} : Conditional expression.
42; {{(E:Let bindings body)}} : An expression with bindings.   
43; {{(E:Ret value)}} : Returns the given value.
44; {{(E:Noop)}} : Null expression.
45
46
47
48=== Language constants
49
50The language defined in this library assumes the presence in the host
51language of the standard ANSI C floating-point arithmetic and
52mathematical functions.
53
54
55=== Procedures
56
57==== Scheme code generator
58
59<procedure>name/scheme :: NAME -> NAME</procedure>
60
61Converts a given name (symbol) to a valid Scheme identifier.
62
63<procedure>prelude/scheme :: VOID -> FRAGMENTS</procedure>
64
65Returns a set of definitions needed by the Scheme code
66generator. {{FRAGMENTS}} is a list of strings, symbols, or fragments.
67
68<procedure>expr->scheme :: EXPRESSION -> FRAGMENTS </procedure>
69
70Generates a representation of the given expression in Scheme.
71
72<procedure>value->scheme :: VALUE -> FRAGMENTS </procedure>
73
74Generates a representation of the given value in Scheme.
75
76
77==== ML code generator
78
79<procedure>name/ML :: NAME -> NAME </procedure>
80
81Converts a given name (symbol) to a valid Standard ML identifier.
82
83<procedure>prelude/ML :: VOID -> FRAGMENTS</procedure>
84
85Returns a set of definitions needed by the Standard ML code
86generator. {{FRAGMENTS}} is a list of strings, symbols, or fragments.
87
88<procedure>expr->ML :: EXPRESSION -> FRAGMENTS  </procedure>
89
90Generates a representation of the given value in Standard ML.
91
92<procedure>value->ML :: VALUE -> FRAGMENTS  </procedure>
93
94Generates a representation of the given value in Standard ML.
95
96
97== About this egg
98
99=== Author
100
101[[/users/ivan-raikov|Ivan Raikov]]
102
103=== Version history
104
105; 2.3 : Using make egg instead of setup-api for make macro
106; 2.1 : Better support for LSODE solver in Octave
107; 2.0 : Removed pointer operations (Ldv/Stv/Set) and Seq
108; 1.7 : Fixes and extensions to the Octave code generator
109; 1.6 : Changes in the integrator interface
110; 1.5 : Install RK library files in Chicken shared directory
111; 1.4 : Bug fixes in the Octave code generator
112; 1.1 : Initial code generator for Octave; some streamlining of the integrator interface
113; 1.0 : Initial release
114
115=== License
116
117
118 Copyright 2010-2012 Ivan Raikov.
119 
120 This program is free software: you can redistribute it and/or modify
121 it under the terms of the GNU General Public License as published by
122 the Free Software Foundation, either version 3 of the License, or
123 (at your option) any later version.
124 
125 This program is distributed in the hope that it will be useful, but
126 WITHOUT ANY WARRANTY; without even the implied warranty of
127 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
128 General Public License for more details.
129 
130 A full copy of the GPL license can be found at
131 <http://www.gnu.org/licenses/>.
132
Note: See TracBrowser for help on using the repository browser.