1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
#| -*- Scheme -*-
Copyright (c) 1987, 1988, 1989, 1990, 1991, 1995, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
2015, 2016, 2017, 2018, 2019, 2020
Massachusetts Institute of Technology
This file is part of MIT scmutils.
MIT scmutils 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 2 of the License, or (at
your option) any later version.
MIT scmutils 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.
You should have received a copy of the GNU General Public License
along with MIT scmutils; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
USA.
|#
;;;; Scmutils top-level loader
(load-option 'synchronous-subprocess)
(load-option 'edwin)
(load-option 'x11-screen)
(set! load-debugging-info-on-demand? #t)
(ge user-initial-environment)
(add-subsystem-identification! "ScmUtils" '("Mechanics" "Spring 2023"))
(define scmutils-base-environment user-initial-environment)
(environment-define scmutils-base-environment
'*environment*
'scmutils-base-environment)
(load "general/comutils" scmutils-base-environment)
(start-canonicalizing-symbols!)
(environment-define scmutils-base-environment
'derivative-symbol
(string->symbol "D"))
(define (in-scmutils-directory relative-path thunk)
(with-working-directory-pathname
(merge-pathnames (pathname-as-directory relative-path)
(directory-pathname (current-load-pathname)))
thunk))
;;; (load-option 'hash-table)
(load-option 'synchronous-subprocess)
;(load-option 'x11)
(load-option 'edwin)
(in-scmutils-directory "./general"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./kernel"
(lambda ()
(load "load" scmutils-base-environment)))
;;; kernel/genenv.scm defines the generic environment
(environment-define system-global-environment 'generic-environment
(access generic-environment scmutils-base-environment))
(environment-define system-global-environment 'user-generic-environment
(extend-top-level-environment
(access generic-environment scmutils-base-environment)))
(environment-define user-generic-environment
'*environment*
'user-generic-environment)
(in-scmutils-directory "./simplify"
(lambda ()
(load "load" scmutils-base-environment)))
(environment-define system-global-environment
'symbolic-environment
(access symbolic-environment scmutils-base-environment))
(environment-define system-global-environment
'rule-environment
(access rule-environment scmutils-base-environment))
(define symbolic-operators
(hash-table/key-list symbolic-operator-table))
(in-scmutils-directory "./display"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./enclose"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./numerics"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./poly"
(lambda ()
(load "load" scmutils-base-environment)))
(start-preserving-case!)
(in-scmutils-directory "./kernel"
(lambda ()
(load "litfun" scmutils-base-environment)))
(in-scmutils-directory "./solve"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./units"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./mechanics"
(lambda ()
(load "load" scmutils-base-environment)))
(in-scmutils-directory "./calculus"
(lambda ()
(load "load" scmutils-base-environment)))
;;; Should be a place to put useful stuff like this.
(define (Sigma a b proc)
(g:sigma proc a b))
(in-scmutils-directory "./general"
(lambda ()
(load "let-macro"
user-generic-environment)))
;;; To fix the problem that students cannot change find-path.
(in-scmutils-directory "./mechanics"
(lambda ()
(load "find-path-patch"
user-generic-environment)))
#|
;;; To fix bugs, e.g. in X11graphics
(in-scmutils-directory "."
(lambda ()
(load "patch"
user-initial-environment)))
|#
(start-scmutils-print)
(init-amb)
(ge user-generic-environment)
|