mit-scheme.git
6 years ago...yes, I know how to count.
Taylor R Campbell [Thu, 25 Oct 2018 05:25:37 +0000 (05:25 +0000)]
...yes, I know how to count.

6 years agoCatch more stray `.' loitering around.
Taylor R Campbell [Thu, 25 Oct 2018 05:22:00 +0000 (05:22 +0000)]
Catch more stray `.' loitering around.

6 years agoClarify justification for ditching the denominator.
Taylor R Campbell [Thu, 25 Oct 2018 05:21:46 +0000 (05:21 +0000)]
Clarify justification for ditching the denominator.

6 years agolog(a/b), not log(a)/log(b).
Taylor R Campbell [Thu, 25 Oct 2018 05:20:53 +0000 (05:20 +0000)]
log(a/b), not log(a)/log(b).

6 years agoOmit stray sentence terminator.
Taylor R Campbell [Thu, 25 Oct 2018 05:16:50 +0000 (05:16 +0000)]
Omit stray sentence terminator.

6 years agoThe bounds of Lemma 4 are <=, not <, as is this branch's condition.
Taylor R Campbell [Thu, 25 Oct 2018 05:09:48 +0000 (05:09 +0000)]
The bounds of Lemma 4 are <=, not <, as is this branch's condition.

6 years agoInadvertently substituted d0 for d2. Fix.
Taylor R Campbell [Thu, 25 Oct 2018 05:05:59 +0000 (05:05 +0000)]
Inadvertently substituted d0 for d2.  Fix.

No change in conclusion -- there was no convenient cancellation or
anything as a consequence of this.

6 years agoI accidentally a predicate.
Taylor R Campbell [Thu, 25 Oct 2018 05:02:39 +0000 (05:02 +0000)]
I accidentally a predicate.

6 years agoFix stray line, clarify, and simplify.
Taylor R Campbell [Thu, 25 Oct 2018 04:57:30 +0000 (04:57 +0000)]
Fix stray line, clarify, and simplify.

6 years agoAllow overlap of imports provided that the imported values are eqv?.
Chris Hanson [Thu, 25 Oct 2018 04:26:11 +0000 (21:26 -0700)]
Allow overlap of imports provided that the imported values are eqv?.

6 years agoImplement scheme-report-environment and null-environment.
Chris Hanson [Thu, 25 Oct 2018 02:14:01 +0000 (19:14 -0700)]
Implement scheme-report-environment and null-environment.

6 years agoAdd SRFI libraries.
Chris Hanson [Thu, 25 Oct 2018 01:53:11 +0000 (18:53 -0700)]
Add SRFI libraries.

6 years agoMerge branch 'riastradh-logisticerrbounds'
Taylor R Campbell [Thu, 25 Oct 2018 02:46:45 +0000 (02:46 +0000)]
Merge branch 'riastradh-logisticerrbounds'

6 years agoCompiling stuff depends on the cdecls' *-const.bin files.
Taylor R Campbell [Thu, 25 Oct 2018 02:45:40 +0000 (02:45 +0000)]
Compiling stuff depends on the cdecls' *-const.bin files.

6 years agoTest some more edge cases.
Taylor R Campbell [Thu, 25 Oct 2018 01:47:22 +0000 (01:47 +0000)]
Test some more edge cases.

6 years agoTest some edge cases for logit(near 1/2).
Taylor R Campbell [Thu, 25 Oct 2018 01:44:12 +0000 (01:44 +0000)]
Test some edge cases for logit(near 1/2).

6 years agoUse (assert-<= (relerr ...) bound) for better error messages.
Taylor R Campbell [Thu, 25 Oct 2018 01:43:40 +0000 (01:43 +0000)]
Use (assert-<= (relerr ...) bound) for better error messages.

6 years agoFix sense of test. Do this part only if 1 - p is guaranteed exact.
Taylor R Campbell [Thu, 25 Oct 2018 01:42:22 +0000 (01:42 +0000)]
Fix sense of test.  Do this part only if 1 - p is guaranteed exact.

6 years agoUse and prove bounds for a better formula for logit-exp.
Taylor R Campbell [Thu, 25 Oct 2018 01:41:53 +0000 (01:41 +0000)]
Use and prove bounds for a better formula for logit-exp.

6 years agoClarify some of the proofs and logic.
Taylor R Campbell [Thu, 25 Oct 2018 01:40:10 +0000 (01:40 +0000)]
Clarify some of the proofs and logic.

Style: Avoid log1p for anything but the floating-point approximation
just to be extra-clear; write log(1 + ...) in the math otherwise.

Reverse order of branches to make the condition (<= lo x hi) clearer.

6 years agoDon't show compilation dependencies by default.
Chris Hanson [Thu, 25 Oct 2018 00:09:59 +0000 (17:09 -0700)]
Don't show compilation dependencies by default.

6 years agoUse better formulas for logistic(negative) and logit(near 1/2).
Taylor R Campbell [Thu, 25 Oct 2018 00:05:37 +0000 (00:05 +0000)]
Use better formulas for logistic(negative) and logit(near 1/2).

Prove some error bounds in comments.

6 years agoFix up code to clean test subdirs.
Chris Hanson [Wed, 24 Oct 2018 21:03:55 +0000 (14:03 -0700)]
Fix up code to clean test subdirs.

6 years agoGet FFI tests working when run from a build directory.
Chris Hanson [Wed, 24 Oct 2018 20:57:24 +0000 (13:57 -0700)]
Get FFI tests working when run from a build directory.

6 years agoFix capitalization of error messages.
Chris Hanson [Wed, 24 Oct 2018 04:40:42 +0000 (21:40 -0700)]
Fix capitalization of error messages.

6 years agoImplement let-values and let*-values.
Chris Hanson [Wed, 24 Oct 2018 04:28:42 +0000 (21:28 -0700)]
Implement let-values and let*-values.

6 years agoChange scode libraries to carry both imports and imports-used.
Chris Hanson [Wed, 24 Oct 2018 04:26:45 +0000 (21:26 -0700)]
Change scode libraries to carry both imports and imports-used.

6 years agoChange ->environment to work with library names too.
Chris Hanson [Wed, 24 Oct 2018 03:18:48 +0000 (20:18 -0700)]
Change ->environment to work with library names too.

6 years agoRename current-load-library-db to current-library-db.
Chris Hanson [Wed, 24 Oct 2018 00:57:32 +0000 (17:57 -0700)]
Rename current-load-library-db to current-library-db.

6 years agoAdd code to enable x11/x11-screen only if X is available.
Chris Hanson [Wed, 24 Oct 2018 00:47:20 +0000 (17:47 -0700)]
Add code to enable x11/x11-screen only if X is available.

6 years agoMerge branch 'master' into makefile-refactor
Chris Hanson [Tue, 23 Oct 2018 21:12:52 +0000 (14:12 -0700)]
Merge branch 'master' into makefile-refactor

6 years agoChange plugin support to work in uninstalled build directory.
Chris Hanson [Tue, 23 Oct 2018 21:09:47 +0000 (14:09 -0700)]
Change plugin support to work in uninstalled build directory.

6 years agoChange cref/generate-trivial-constructor to default os-types compatibly.
Chris Hanson [Tue, 23 Oct 2018 21:08:56 +0000 (14:08 -0700)]
Change cref/generate-trivial-constructor to default os-types compatibly.

6 years agoSupport running edwin plugins in build directory.
Chris Hanson [Tue, 23 Oct 2018 21:08:35 +0000 (14:08 -0700)]
Support running edwin plugins in build directory.

6 years agoRefactor plugins to simplify compilation.
Chris Hanson [Tue, 23 Oct 2018 21:07:26 +0000 (14:07 -0700)]
Refactor plugins to simplify compilation.

6 years agofind_binding_cell: no bindings in a null environment
Matt Birkholz [Tue, 23 Oct 2018 18:39:51 +0000 (11:39 -0700)]
find_binding_cell: no bindings in a null environment

No need to fail an assert during test-library-loader neither.

6 years agoFix http-get; use binary IO and new open-binary-tcp-stream-socket.
Matt Birkholz [Tue, 23 Oct 2018 06:49:21 +0000 (23:49 -0700)]
Fix http-get; use binary IO and new open-binary-tcp-stream-socket.

6 years agoEliminate use of 'all arg to cref/generate-constructors.
Chris Hanson [Tue, 23 Oct 2018 02:44:40 +0000 (19:44 -0700)]
Eliminate use of 'all arg to cref/generate-constructors.

6 years agoEliminate obsolete option.
Chris Hanson [Tue, 23 Oct 2018 02:43:51 +0000 (19:43 -0700)]
Eliminate obsolete option.

6 years agoTighten range where it's worthwhile to evaluate this.
Taylor R Campbell [Mon, 22 Oct 2018 16:35:50 +0000 (16:35 +0000)]
Tighten range where it's worthwhile to evaluate this.

6 years agoMore changes so that installation works sort-of right.
Chris Hanson [Mon, 22 Oct 2018 08:06:31 +0000 (01:06 -0700)]
More changes so that installation works sort-of right.

6 years agoGet plugins working using the top-level makefile.
Chris Hanson [Mon, 22 Oct 2018 07:04:11 +0000 (00:04 -0700)]
Get plugins working using the top-level makefile.

Probably still some bugs; note workarounds for interaction between edwin and
blowfish/gdbm.  I'd like to fix those by making new plugins for the parts of
edwin that use those; that way they're installed only if both edwin and the
matching plugin is installed.

6 years agoMerge branch 'makefile-refactor' of git.sv.gnu.org:/srv/git/mit-scheme into makefile...
Chris Hanson [Mon, 22 Oct 2018 00:21:49 +0000 (17:21 -0700)]
Merge branch 'makefile-refactor' of git.sv.gnu.org:/srv/git/mit-scheme into makefile-refactor

6 years agoInitial draft of changes for optional modules.
Chris Hanson [Mon, 22 Oct 2018 00:20:07 +0000 (17:20 -0700)]
Initial draft of changes for optional modules.

6 years agoFix automake library goo.
Taylor R Campbell [Sun, 21 Oct 2018 17:14:34 +0000 (17:14 +0000)]
Fix automake library goo.

- Respect LDFLAGS in configure.
- Let automake figure out the .lo files.
- Specify -lX11 only if no pkg-config.

6 years agoOmit spurious redefinition of SCM in x11.h.
Taylor R Campbell [Sun, 21 Oct 2018 16:30:48 +0000 (16:30 +0000)]
Omit spurious redefinition of SCM in x11.h.

6 years agoSimplify 5*eps and assume the number of digits we wrote down.
Taylor R Campbell [Sun, 21 Oct 2018 07:21:32 +0000 (07:21 +0000)]
Simplify 5*eps and assume the number of digits we wrote down.

6 years agoAdd logistic/logit-family functions.
Taylor R Campbell [Sun, 21 Oct 2018 07:15:32 +0000 (07:15 +0000)]
Add logistic/logit-family functions.

Inverse pairs:

(logistic x) = 1/(1 + e^{-x})
(logit p) = log p/(1 - p)

(log-logistic x) = log 1/(1 + e^{-x})
(logit-exp t) = log e^t/(1 - e^t)

6 years agoDefine log1p and expm1 with no range limitations.
Taylor R Campbell [Sun, 21 Oct 2018 05:43:17 +0000 (05:43 +0000)]
Define log1p and expm1 with no range limitations.

6 years agoFix sloppy change: unintentionally downcased a file name.
Chris Hanson [Sun, 21 Oct 2018 02:13:44 +0000 (19:13 -0700)]
Fix sloppy change: unintentionally downcased a file name.

6 years agoFix C compiler warning of assigning register to itself.
Chris Hanson [Sat, 20 Oct 2018 23:38:25 +0000 (16:38 -0700)]
Fix C compiler warning of assigning register to itself.

6 years agoAdd missing dependency.
Chris Hanson [Sat, 20 Oct 2018 22:07:16 +0000 (15:07 -0700)]
Add missing dependency.

6 years agoFix typo in previous change.
Chris Hanson [Sat, 20 Oct 2018 07:52:23 +0000 (00:52 -0700)]
Fix typo in previous change.

6 years agoDon't use *-w32.* files for LIARC.
Chris Hanson [Sat, 20 Oct 2018 03:23:59 +0000 (20:23 -0700)]
Don't use *-w32.* files for LIARC.

6 years agoAttempt to make LIARC lap files more readable.
Chris Hanson [Sat, 20 Oct 2018 03:23:42 +0000 (20:23 -0700)]
Attempt to make LIARC lap files more readable.

6 years agoFix problem: MODULE_CFLAGS no longer exists.
Chris Hanson [Sat, 20 Oct 2018 03:23:02 +0000 (20:23 -0700)]
Fix problem: MODULE_CFLAGS no longer exists.

6 years agoFor --with-scheme-build, no need to make pathname absolute.
Chris Hanson [Sat, 20 Oct 2018 03:22:26 +0000 (20:22 -0700)]
For --with-scheme-build, no need to make pathname absolute.

6 years agoImplement MIT_SCHEME_COMPILER_TARGET for TL and microcode configuration.
Chris Hanson [Sat, 20 Oct 2018 03:21:29 +0000 (20:21 -0700)]
Implement MIT_SCHEME_COMPILER_TARGET for TL and microcode configuration.

6 years agoFix bug in LIARC that tried to compile unused code.
Chris Hanson [Sat, 20 Oct 2018 03:19:07 +0000 (20:19 -0700)]
Fix bug in LIARC that tried to compile unused code.

6 years agoFix bug in LIARC code generator.
Chris Hanson [Sat, 20 Oct 2018 03:18:08 +0000 (20:18 -0700)]
Fix bug in LIARC code generator.

6 years agoAdapt LIARC to use new strings.
Chris Hanson [Sat, 20 Oct 2018 03:16:29 +0000 (20:16 -0700)]
Adapt LIARC to use new strings.

6 years agoAdd --with-scheme-build to simplify building from another build.
Chris Hanson [Thu, 18 Oct 2018 23:05:17 +0000 (16:05 -0700)]
Add --with-scheme-build to simplify building from another build.

6 years agoAnother major refactoring, to split up cross host/target.
Chris Hanson [Thu, 18 Oct 2018 08:25:27 +0000 (01:25 -0700)]
Another major refactoring, to split up cross host/target.

Primary testing so far is for SVM.  To build SVM from 9.2 x86-64, do the
following:

1. Generate a new build with an SVM compiler:
     ./configure --with-compiler-target=svm
     make

2. Create a second build configured with:
     ./configure --enable-native-code=svm --enable-cross-compiling
     make
     make cross-target

6 years agoUpdate MacOSX -> macOS.
Chris Hanson [Thu, 18 Oct 2018 08:24:21 +0000 (01:24 -0700)]
Update MacOSX -> macOS.

6 years agoAdd "run-build" shell script to simplify working with uninstalled builds.
Chris Hanson [Wed, 17 Oct 2018 21:47:46 +0000 (14:47 -0700)]
Add "run-build" shell script to simplify working with uninstalled builds.

6 years agoBump version number coming into release.
Chris Hanson [Wed, 17 Oct 2018 21:47:24 +0000 (14:47 -0700)]
Bump version number coming into release.

6 years agoSplit handling of compiler target from host architecture.
Chris Hanson [Wed, 17 Oct 2018 02:28:14 +0000 (19:28 -0700)]
Split handling of compiler target from host architecture.

6 years agoMerge branch 'master' into makefile-refactor
Chris Hanson [Tue, 16 Oct 2018 04:22:23 +0000 (00:22 -0400)]
Merge branch 'master' into makefile-refactor

6 years agoLoad macros needed by machines/svm/machine.
Chris Hanson [Tue, 16 Oct 2018 04:14:55 +0000 (21:14 -0700)]
Load macros needed by machines/svm/machine.

6 years agoForgot to make changes to other compiler.pkg files.
Chris Hanson [Tue, 16 Oct 2018 04:14:06 +0000 (21:14 -0700)]
Forgot to make changes to other compiler.pkg files.

One of these days this stuff will be shared.

6 years agoEliminate warning about old-style function declaration.
Chris Hanson [Tue, 16 Oct 2018 04:07:20 +0000 (21:07 -0700)]
Eliminate warning about old-style function declaration.

6 years agoLoad macros needed by machines/svm/machine.
Chris Hanson [Mon, 15 Oct 2018 06:18:15 +0000 (23:18 -0700)]
Load macros needed by machines/svm/machine.

6 years agoAdd back guarantee since it's needed for compiling svm.
Chris Hanson [Mon, 15 Oct 2018 04:54:12 +0000 (21:54 -0700)]
Add back guarantee since it's needed for compiling svm.

6 years agoGuarantee that SF is loaded by compiler.sf.
Chris Hanson [Mon, 15 Oct 2018 04:53:52 +0000 (21:53 -0700)]
Guarantee that SF is loaded by compiler.sf.

6 years agoEliminate a bunch of now-unnecessary stuff from host-adapter.
Chris Hanson [Mon, 15 Oct 2018 03:50:20 +0000 (20:50 -0700)]
Eliminate a bunch of now-unnecessary stuff from host-adapter.

6 years agoRefactor top-level Makefile to use a single pass.
Chris Hanson [Mon, 15 Oct 2018 02:48:43 +0000 (19:48 -0700)]
Refactor top-level Makefile to use a single pass.

6 years agoFix bug where the result of char-upcase is multibyte.
Chris Hanson [Mon, 15 Oct 2018 01:46:32 +0000 (18:46 -0700)]
Fix bug where the result of char-upcase is multibyte.

This was previously hidden because the compiler isn't doing range checking on
the third argument to bytevector-u8-set!.

6 years agoRemove redundant clause from test for unquoted symbols.
Chris Hanson [Sun, 14 Oct 2018 04:38:16 +0000 (21:38 -0700)]
Remove redundant clause from test for unquoted symbols.

6 years agoDon't print "program" for R7RS top-level.
Chris Hanson [Sun, 14 Oct 2018 03:03:39 +0000 (20:03 -0700)]
Don't print "program" for R7RS top-level.

6 years agoExtensive work to get compiler to work with R7RS libraries.
Chris Hanson [Sun, 14 Oct 2018 02:54:58 +0000 (19:54 -0700)]
Extensive work to get compiler to work with R7RS libraries.

The bulk of the work is to refactor the debugging info so that it's generated
and consumed properly; this required upgrading the version and introducing a new
top-level info form.

I also eliminated the now-ancient and unused BSM file support, which was making
things more difficult than necessary.

The compiler top level required only to detect an R7RS input file and to compile
each part separately, plus collecting all of the debugging information from the
parts.  Some tweaks were used to make RTL/LAP files work right with multiple
roots.

Finally, the runtime system was modified so that compiled-code blocks and
entries now show the R7RS library name if there is one, both when printed and in
various other places.

6 years agoFix bug: reference caches weren't working right without global env.
Chris Hanson [Sun, 14 Oct 2018 02:44:40 +0000 (19:44 -0700)]
Fix bug: reference caches weren't working right without global env.

The problem arises when there's a compiled file that does something like this:

    (define foo ...)
    ...
    foo

What happens is that the linker creates a cache for 'foo' before evaluating
code; there's no binding for 'foo' yet but one is needed for the cache.  In the
case where the evaluation environment extends to the global environment, this is
handled by making a placeholder in the global environment.

However, if the topmost frame is not the global environment, it was creating a
dummy cell that wasn't connected to any environment.  Consequently, when the
definition was evaluated, it created a new binding, but since there was no old
binding in the environment chain, the dummy cache wasn't updated to the new
binding's cell.

I've fixed this by forcing the creation of an unbound cell in the outermost
environment (i.e. the one with the null environment as its parent).  This is
essentially the same solution that's used when the global environment is
present, with the outermost environment playing the role of global.

6 years agoRefactor compiler top level to do info-file dump as late as possible.
Chris Hanson [Fri, 12 Oct 2018 22:49:43 +0000 (15:49 -0700)]
Refactor compiler top level to do info-file dump as late as possible.

This is to support compiling R7RS libraries as if they were independent files,
and gathering all their debug info together before writing it out.

6 years agoInstall plugin html/pdf documentation in project docdir.
Matt Birkholz [Sat, 13 Oct 2018 06:32:26 +0000 (23:32 -0700)]
Install plugin html/pdf documentation in project docdir.

Override docdir.  Enhance the update-html-index procedure to look for
PROJECT-PLUGIN.html as well as PLUGIN.html.

6 years agoMake Edwin and Imail separately installable projects.
Matt Birkholz [Wed, 10 Oct 2018 06:56:34 +0000 (23:56 -0700)]
Make Edwin and Imail separately installable projects.

Do not build them with the core.  Build them after certain plugins are
installed.

6 years agoruntime/optiondb: Document new arg for further-load-options.
Matt Birkholz [Wed, 10 Oct 2018 04:05:03 +0000 (21:05 -0700)]
runtime/optiondb: Document new arg for further-load-options.

6 years agoFix bug in test-rgxcmp: was using iso-8859-1 coding, not utf-8.
Chris Hanson [Wed, 10 Oct 2018 02:53:29 +0000 (19:53 -0700)]
Fix bug in test-rgxcmp: was using iso-8859-1 coding, not utf-8.

6 years agoFix thinko in string reader: first octal digit is in range 0-3.
Chris Hanson [Wed, 10 Oct 2018 02:52:46 +0000 (19:52 -0700)]
Fix thinko in string reader: first octal digit is in range 0-3.

6 years agoAdd stubs for R7RS library support so that SF works.
Chris Hanson [Mon, 8 Oct 2018 23:11:55 +0000 (16:11 -0700)]
Add stubs for R7RS library support so that SF works.

6 years agoSplit library scode to a package; raise abstraction level.
Chris Hanson [Mon, 8 Oct 2018 05:56:24 +0000 (22:56 -0700)]
Split library scode to a package; raise abstraction level.

6 years agoDon't wrap a compiled-expression object in scode-quote.
Chris Hanson [Mon, 8 Oct 2018 05:55:24 +0000 (22:55 -0700)]
Don't wrap a compiled-expression object in scode-quote.

It only causes confusion when expecting a bare expression and instead see it as
quoted.

6 years agoGet loader to work with R7RS files processed with SF.
Chris Hanson [Mon, 8 Oct 2018 01:07:19 +0000 (18:07 -0700)]
Get loader to work with R7RS files processed with SF.

6 years agoFix typo.
Chris Hanson [Mon, 8 Oct 2018 01:07:09 +0000 (18:07 -0700)]
Fix typo.

6 years agoMake better abstraction for scode-library files.
Chris Hanson [Sun, 7 Oct 2018 22:16:40 +0000 (15:16 -0700)]
Make better abstraction for scode-library files.

6 years agoChange printer to prefix scode types with "scode-".
Chris Hanson [Sun, 7 Oct 2018 22:15:48 +0000 (15:15 -0700)]
Change printer to prefix scode types with "scode-".

6 years agoGet SF working on R7RS files. Loader needs to be modified to load them.
Chris Hanson [Sun, 7 Oct 2018 20:27:04 +0000 (13:27 -0700)]
Get SF working on R7RS files.  Loader needs to be modified to load them.

6 years agoChange automatic-properties to support multiple values.
Chris Hanson [Sun, 7 Oct 2018 04:12:45 +0000 (21:12 -0700)]
Change automatic-properties to support multiple values.

6 years agoChange the loader so that it can load R7RS source files.
Chris Hanson [Sun, 7 Oct 2018 00:06:49 +0000 (17:06 -0700)]
Change the loader so that it can load R7RS source files.

Now to make compiled files work.  :)

6 years agoAnother rewrite, this time to treat programs as anonymous libraries.
Chris Hanson [Sat, 6 Oct 2018 23:28:42 +0000 (16:28 -0700)]
Another rewrite, this time to treat programs as anonymous libraries.

This change simplifies handling programs since they can now use the machinery
developed for libraries.  So now r7rs-source is just a combination of some
libraries and an optional program.

Also added property 'imports-environment to get the environment prior to
evaluation.

6 years agoMajor rewrite of library support.
Chris Hanson [Sat, 6 Oct 2018 05:31:21 +0000 (22:31 -0700)]
Major rewrite of library support.

New design is organized around adding properties to a library as they are
computed, coupled with "automatic" properties that can compute themselves from
existing ones.

Basic stuff all works, and I'm able to get the R7RS example running.

6 years agoImplement test-library-standard and fix bugs.
Chris Hanson [Fri, 5 Oct 2018 03:35:45 +0000 (20:35 -0700)]
Implement test-library-standard and fix bugs.