Changeset 12784 in project for release/3/nemo/trunk/nemo-matlab.scm


Ignore:
Timestamp:
12/05/08 08:36:44 (13 years ago)
Author:
Ivan Raikov
Message:

Completed functor code; some bug fixes in code generator identifier names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/nemo/trunk/nemo-matlab.scm

    r12685 r12784  
    11;;       
    22;;
    3 ;; An extension for translating NEMO models to Matlab code.
     3;; An extension for translating NEMO models to Matlab/Octave code.
    44;;
    55;; Copyright 2008 Ivan Raikov and the Okinawa Institute of Science and Technology
     
    134134
    135135(define (canonicalize-expr/MATLAB expr)
    136   (let ((subst-convert  (subst-driver (lambda (x) (and (symbol? x) x)) binding? identity bind subst-term)))
     136  (let ((subst-convert  (subst-driver (lambda (x) (and (symbol? x) x)) nemo:binding? identity nemo:bind nemo:subst-term)))
    137137    (let* ((expr1 (if-convert expr))
    138138           (expr2 (subst-convert expr1 subst-empty))
     
    228228            (vars     (lookup-def 'vars lst))
    229229            (body     (lookup-def 'body lst)))
    230         (pp indent ,nl (function ,retval = ,n (,(sl\ ", " vars)) ))
     230        (pp indent ,nl (function ,retval = ,(matlab-name n) (,(sl\ ", " vars)) ))
    231231        (let* ((body1 (canonicalize-expr/MATLAB (rhsexpr/MATLAB body)))
    232232               (lbs   (enum-bnds body1 (list))))
     
    429429                                     (and (not (member (first nv) matlab-builtin-consts))
    430430                                          (let ((v1 (canonicalize-expr/MATLAB (second nv))))
    431                                             (list (first nv) v1))))
     431                                            (list (matlab-name (first nv)) v1))))
    432432                                   consts))
    433                 (globals          (delete-duplicates (append (map first imports) exports (map first const-defs))))
     433                (globals          (map matlab-name
     434                                       (delete-duplicates (append (map first imports) exports (map first const-defs)))))
    434435                (poset            (vector->list ((dis 'depgraph->bfs-dist-poset) g)))
    435436                (asgn-eq-defs     (poset->asgn-eq-defs poset sys))
Note: See TracChangeset for help on using the changeset viewer.