Commit Graph

81 Commits

Author SHA1 Message Date
Zoltan Somogyi
81a9c6adcf Fix references to COMPACT_ARGS and to obsolete stack layout macros.
Estimated hours taken: 0.2

extras/exceptions/exception.m:
	Fix references to COMPACT_ARGS and to obsolete stack layout macros.
1999-06-09 07:12:55 +00:00
Zoltan Somogyi
566cec5b30 Prefix everything defined in runtime/mercury_{stacks,tags}.h MR_.
Estimated hours taken: 3

Prefix everything defined in runtime/mercury_{stacks,tags}.h MR_.
In the process, get rid of the grade component MR_DEBUG_NONDET_STACK,
since this makes the update to mercury_stacks.h simpler and its use is
long obsolete.

runtime/mercury_tags.h:
	Put MR_ prefixes in front of everything defined here.

runtime/mercury_stacks.h:
	Put MR_ prefixes in front of everything defined here.

	Remove support for MR_DEBUG_NONDET_STACK. Replace most of the
	lost functionality by calling an updated mkframe_msg.

	Remove the definitions of push() and pop(). Their use conflicts with
	the idea that everything on the det stack is part of a frame, which
	the RTTI stuff depends on.

runtime/mercury_bootstrap.h:
	Add backward compatibility macros for the old names in the above two
	files.

	Remove some old entries in this file which are no longer needed.

runtime/mercury_wrapper.c:
	Remove the only uses of push() and pop().

	Put MR_ in front of some things that need them.

runtime/mercury_engine.c:
	Put MR_ in front of some things that need them.

runtime/mercury_misc.[ch]:
	Make mkframe_msg get the name of the procedure that owns the stack
	frame from an explicitly passed argument, rather than the prednm slot
	(which no longer exists). This actually improves low-level debugging
	support without MR_DEBUG_NONDET_STACK.

	Remove unnecessary return statements.

runtime/mercury_debug.h:
	Pass on the new arg of mkframe_msg.

	Fix long lines.

runtime/mercury_conf_param.h:
	Remove the documentation of MR_DEBUG_NONDET_STACK.

runtime/mercury_grade.h:
	Remove the grade component of MR_DEBUG_NONDET_STACK.

doc/reference_manual.texi:
	Document the MR_ prefixed versions of list_empty, list_cons etc.

library/io.m:
library/std_util.m:
library/string.m:
	Add prefixes to some references to the runtime.
1999-04-30 04:25:43 +00:00
Fergus Henderson
305cb6a17d Document the need to link with a version of libgc that was
Estimated hours taken: 0.25
	(+ lots of work to find the bug in the first place).

extras/graphics/mercury_tcltk/HOWTO:
	Document the need to link with a version of libgc that was
	compiled with `-DALL_INTERIOR_POINTERS'.
1999-04-09 05:35:59 +00:00
Fergus Henderson
6cf5a976b7 Rename base_type* as type_ctor*, using Tyson's sed script,
Estimated hours taken: 0.25

extras/exceptions/exception.m:
extras/clpr/cfloat.m:
	Rename base_type* as type_ctor*, using Tyson's sed script,
	to match Tyson's changes to runtime/* and elsewhere.
1999-03-24 08:53:54 +00:00
Fergus Henderson
ffe227fad5 Document the stuff in this new directory.
Estimated hours taken: 16

extras/README:
extras/lazy_evaluation/README:
	Document the stuff in this new directory.

extras/lazy_evaluation/lazy.m:
	New module for lazy evaluation.

extras/lazy_evaluation/lazy_list.m:
extras/lazy_evaluation/lazy_list_test.m:
	A demo of using lazy lists.
1999-03-15 08:56:59 +00:00
Fergus Henderson
55ffc62ed3 Add support for exceptions to the debugger, and
Estimated hours taken: 8

Add support for exceptions to the debugger, and
add support for debugging to the exception module.

browser/debugger_interface.m:
	Add `exception' to the trace_port_type enumeration.

runtime/mercury_trace_base.h:
	Add MR_PORT_EXCEPTION to the MR_Trace_Port enumeration.

trace/mercury_trace_internal.c:
trace/mercury_trace.h:
trace/mercury_trace.c:
	Modify the code to handle MR_PORT_EXCEPTION.

extras/exceptions/exception.m:
	- Define stack layout structures for the hand-written procedures
	  `builtin_throw' and `builtin_catch'.
	- Use mktempframe() rather than mkframe() to allocate the temporary
	  frames used to prevent hijacking of the exception-catching frame
	  (this is more efficient, and avoids the need to give a stack
	  layout for those frames).
	- Change the code for builtin_throw/1 so that if MR_trace_enabled
	  is true, it calls a new function trace_throw(), which calls
	  MR_trace(..., MR_PORT_EXCEPTION, ...) for each stack frame.
	- Fix some type errors occurring for non-GC grades.
	- Fix some uses of obsolete names (e.g. replace `hp' with `MR_hp').

runtime/mercury_trace_base.c:
compiler/trace.m:
	Add some comments relating to the above changes.
1998-12-14 16:05:20 +00:00
Fergus Henderson
73d2b7c251 Describe the contents of the new `dynamic_linking' subdirectory.
Estimated hours taken: 0.25

extras/README:
	Describe the contents of the new `dynamic_linking' subdirectory.
1998-12-07 01:55:01 +00:00
Simon Taylor
5fea676a9f The C code part of the Aditi interface.
Estimated hours taken: 0.1

(Note: the actual time taken for this is included in the time
taken for the compiler part of the interface, committed earlier today).

extras/aditi/aditi.m:
	The C code part of the Aditi interface.

extras/aditi/LIMITATIONS:
	Document some missing features.
1998-12-07 01:32:38 +00:00
Fergus Henderson
8a29f3f391 New module, containing support for dynamic linking
Estimated hours taken: 5

extras/dynamic_linking/dl.m:
	New module, containing support for dynamic linking
	(i.e. a binding to dlopen(), dlsym(), and dlclose()).

extras/dynamic_linking/name_mangle.m:
	New module, containing a representation for Mercury procedure
	specifiers and a function for mangling them into symbol names.

extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test.exp:
extras/dynamic_linking/hello.m:
	A test case (and sample program) for the use of dynamic linking.

extras/dynamic_linking/README:
	A brief README file describing the files in this directory.

extras/dynamic_linking/Mmakefile:
	A simple Mmakefile to build it all and test it.

NEWS:
	Mention the new dynamic linking support.

compiler/llds_out.m:
	Add some comments warning about code duplication
	between the code here and that in extras/dynamic_linking/name_mangle.m
	(and also profiler/demangle.m and util/mdemangle.c).
1998-12-06 06:17:07 +00:00
Simon Taylor
392445a6e3 Remove ", I think" from the correct expansion of the ODBC acronym.
Estimated hours taken: 0.1

extras/README:
	Remove ", I think" from the correct expansion of the ODBC acronym.
1998-12-04 02:37:53 +00:00
Fergus Henderson
7ef2a5f753 Update the reference to the paper on database transactions
Estimated hours taken: 0.25

extras/odbc/odbc.m:
	Update the reference to the paper on database transactions
	to include the published version, and to include the URL of
	the cover page of the tech report.
1998-11-26 10:06:52 +00:00
Fergus Henderson
0a70f11335 Fix a compilation error: need to import the
Estimated hours taken: 0.25

extras/complex_numbers/samples/fft.m:
	Fix a compilation error: need to import the
	parent module `complex_numbers' before importing
	the child module `complex_numbers:complex'.
1998-11-18 16:29:40 +00:00
Fergus Henderson
10de5678fc Fix various gcc warnings.
Estimated hours taken: 1

Fix various gcc warnings.

library/std_util.m:
library/benchmarking.m:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test_2.m:
	Add some casts -- without these, the code might not compile
	with compilers other than gcc.

library/private_builtin.m:
	Avoid the use of nested extern declarations, by moving
	the declarations out of the enclosing function.

runtime/mercury_array_macros.h:
	Initialize `element' in MR_bsearch().
	Without this, gcc reports lots of spurious warnings when
	compiling trace/*.c.
1998-11-05 16:35:29 +00:00
Tyson Dowd
b588cf818b Fix a few problems in the Mercury cgi library.
Estimated hours taken: 1

Fix a few problems in the Mercury cgi library.

extras/cgi/cgi.m:
	Add cgi__maybe_get_form which processes forms
	if they are called using POST, otherwise it will return "no".
	This allows the form to handle the error itself, perhaps
	by giving the input form.

	Also fix a bug in printing the error message -- the
	content type must be set even for error messages.
1998-10-13 04:32:32 +00:00
Tyson Dowd
1b3227a1d3 Update the README file to accurately describe the directory.
Estimated hours taken: 0.5

extras/README:
	Update the README file to accurately describe the directory.

samples/maze/globals.m:
	Add the copyright message.
1998-09-29 05:57:19 +00:00
Tyson Dowd
1ddd0039be Added a new example.
Estimated hours taken: 5

graphics/samples/pent/*:
        Added a new example.
1998-09-29 05:33:49 +00:00
Fergus Henderson
b1d6623383 Fix a typo (s/both a complete/both are complete/).
Estimated hours taken: 0.05

extras/graphics/README:
	Fix a typo (s/both a complete/both are complete/).
1998-09-24 15:04:53 +00:00
Tyson Dowd
037e0a752f Clean up samples to use the library versions of the graphics
Estimated hours taken: 3

samples/calc/Mmakefile:
samples/maze/Mmakefile:
samples/maze/globals.m:
samples/maze/maze.m:
	Clean up samples to use the library versions of the graphics
	packages.
1998-09-06 08:22:10 +00:00
Fergus Henderson
6e8e66f269 Various changes to the README files, in preparation for the next release.
Estimated hours taken: 1

Various changes to the README files, in preparation for the next release.

.README.in:
	Update version numbers and copyright dates.
	Update the list of README.* files.

README.HPUX:
	New file.

README.AIX:
	Update to reflect recent bug fix.

README.Linux:
	Delete an obsolete patch at the end of this file;
	the text describing this patch had been removed already.

README.MS-Windows:
	Mention that we haven't tested it on Windows 98.

NEWS:
	We've updated to Boehm GC version 4.13alpha2.

extras/README:
	Add descriptions of each subdirectory.
1998-09-04 07:10:36 +00:00
Fergus Henderson
62da652a68 Add support for exception handling, in extras/exceptions.
Estimated hours taken: 80

Add support for exception handling, in extras/exceptions.

extras/exceptions/README:
	Describes the files in this directory.

extras/exceptions/exception.m:
	Contains the exception handling interface and implementation.

extras/exceptions/test_exceptions.m:
extras/exceptions/test_exceptions.exp:
extras/exceptions/test_uncaught_exception.m:
extras/exceptions/test_uncaught_exception.exp:
extras/exceptions/test_exceptions_func.m:
extras/exceptions/test_exceptions_func.exp:
	Test cases.

extras/exceptions/Mmakefile:
	The Mmakefile for building and running the test cases.
1998-07-22 14:32:02 +00:00
Warwick Harvey
9cbccbd5dc This change adds a new extras directory, "references".
Estimated hours taken: 70 (plus whatever pets spent when he wrote the
original version of this)

This change adds a new extras directory, "references".  This directory
contains two impure reference type modules and a module that allows scoped
non-backtrackable update, along with examples of using them and tests.
These modules are intended to be useful when HAL is retargetted to Mercury,
for implementing global variables (backtracking and non-backtracking), and
may also be useful for the debugger.

In order to implement these features, a new memory zone "global heap" was
added to the runtime system, for a heap which is not reclaimed on failure,
along with a pair of functions for copying terms to this heap.

runtime/mercury_deep_copy.c:
runtime/mercury_deep_copy.h:
	Added two functions, MR_make_permanent() and
	MR_make_partially_permanent(), which essentially do a deep copy of a
	term to the global heap.
	(In conservative GC grades, these functions actually do nothing).

runtime/mercury_engine.c:
runtime/mercury_engine.h:
	Added fields global_heap_zone and e_global_hp (for the global heap
	and its heap pointer) to the MR_mercury_engine_struct, along with
	appropriate initialisation, etc.
	Defined MR_heap_zone, MR_solutions_heap_zone, and
	MR_global_heap_zone for convenient access to the corresponding field
	of the relevant Mercury engine.

runtime/mercury_memory.c:
	Added code for handling the size and zone size of the global heap.

runtime/mercury_regorder.h:
runtime/mercury_regs.h:
	Defined MR_global_hp (the global heap pointer for general use),
	along with corresponding other changes.

runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
	Added declarations and initialisation of the size and zone_size of
	the global_heap.
	Added an entry for MR_GLOBAL_HP_RN to print_register_usage_counts()
	(plus missing entries for MR_SOL_HP_RN, MR_MIN_HP_REC and
	MR_MIN_SOL_HP_REC).

New files:

extras/references/Mmakefile:
	Mmakefile for building and testing these modules.

extras/references/README:
	Description of contents of this directory.

extras/references/global.m:
	A wrapper module for building a library containing the nb_reference,
	reference and scoped_update modules.

extras/references/nb_reference.m:
	Implements references which are not backtracked on failure.

extras/references/reference.m:
	Implements references which *are* backtracked on failure.

extras/references/scoped_update.m:
	Allows nested scoping of non-backtracking references.

extras/references/samples/Mmakefile:
extras/references/samples/max_of.m:
extras/references/samples/max_test.exp:
extras/references/samples/max_test.m:
	An example of using a non-backtracking reference (to find the
	maximum of the solutions generated by a predicate), with tests.

extras/references/tests/Mmakefile:
extras/references/tests/ref_test.exp:
extras/references/tests/ref_test.m:
	Some tests of references (backtracking and non-backtracking) and
	scoping.
1998-06-18 04:30:48 +00:00
Fergus Henderson
35c4988f2b Fix a bug: use MR_compare_type_info instead of ML_compare_type_info.
Estimated hours taken: 0.25

extras/trailed_update/tr_store.m:
        Fix a bug: use MR_compare_type_info instead of ML_compare_type_info.
1998-06-17 06:17:46 +00:00
Fergus Henderson
aeb0f440b1 Add rules for mmake clean' and mmake realclean'
Estimated hours taken: 0.25

extras/trailed_update/Mmakefile:
	Add rules for `mmake clean' and `mmake realclean'
	which invoke the respective targets in the subdirectories.
	This should hopefully avoid some failures in the
	trailed_update/tests subdirectory caught by the nightly test
	script that were due to trying to rebuild in a different grade
	without having done `mmake clean' in that subdirectory.
1998-06-06 11:18:24 +00:00
Simon Taylor
98c2fbf51b Bug fixes.
Estimated hours taken: 12

Bug fixes.

tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.

compiler/simplify.m
	Don't produce singleton disjunctions, since the code generator
	barfs on them. Use a `some' instead.
	Test case: tests/general/partition.m compiled with --deforestation.

compiler/unused_args.m
	Deconstructions where the arguments included `any' insts were
	not being handled correctly, due to inst_matches_binding
	failing for any->any.
	Test case: extras/trailed_update/samples/vqueens.m at -O3.
	Don't warn about predicates from `.opt' files having unused
	arguments, because in most cases the warning will be generated
	when compiling the imported module.

compiler/higher_order.m
	Fix a bug that caused compiler/modules.m to be miscompiled at
	-O3 --intermodule-optimization, due to curried arguments for
	multiple known higher-order arguments being passed to a
	specialised version in the wrong order.
	Test case: tests/hard_coded/ho_order2.m

compiler/mercury_compile.m
	Call intermod__update_pred_import_status when compiling to
	C at the same stage of the compilation as the `.opt' file
	was written to ensure that the same information is being used.
	Test case: tests/hard_coded/rational_test.m compiled with
	--intermodule-optimization failed because of a link error.
	Make sure polymorphism has been run before doing unused argument
	checking with --errorcheck-only. Otherwise the argument indices
	read in from `.opt' files are incorrect.

compiler/intermod.m
	Use code_util__compiler_generated to test if a called predicate
	is compiler generated, rather than looking for a call_unify_context
	(function calls have a call_unify_context).
	Add a progress message for updating the import status of predicates
	exported to `.opt' files.
	Fix a bug where the unused_args pragmas read in from the current
	module's `.opt' file were given an import_status of `imported' rather
	than `opt_imported' resulting in an error message from make_hlds.m.

compiler/dead_proc_elim.m
	Ensure that predicates used by instance declarations and
	`:- pragma export's are not eliminated by the dead_pred_elim
	pass before typechecking.
	Test case: most of the typeclass tests compiled with
	--intermodule-optimization.

compiler/hlds_goal.m
	Remove obsolete comments about the modes of a higher-order
	unification being incorrect after polymorphism, since that
	was fixed months ago.

compiler/options.m
	Reenable deforestation.
	Enable --intermodule-optimization and --intermod-unused-args
	at -O5 so they get tested occasionally.

compiler/handle_options.m
	Disable deforestation if --typeinfo-liveness is set, since
	there are bugs in the folding code if extra typeinfos are
	added to a new predicate's arguments by hlds_pred__define_new_pred.
	Disable higher_order.m if --typeinfo-liveness is set, since
	higher_order.m currently does not pass all necessary typeinfos
	to specialised versions or update the typeinfo_varmap of
	specialised versions.
	Test case: tests/valid/agc_ho_pred.m

tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
	Test case for higher_order.m.

tools/test_mercury
	Added --intermod-unused-args to the options for murlibobo.

extras/trailed_update/{samples,tests}/Mmakefile
	Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
	is #included in c_header_code read from unsafe.opt.
1998-06-03 00:44:04 +00:00
Fergus Henderson
7370e9117d Fix some bugs in code generation for nondet disjunctions and
Estimated hours taken: 4.5

Fix some bugs in code generation for nondet disjunctions and
if-then-elses.  The compiler was incorrectly releasing the temp stack
slots used to save the heap pointer and trail pointer at the start
of the else or the last clauses, thus allowing them to be reused not
only in the else case or the last clause, but also by goals following the
disjunction or if-then-else, even though the values in these slots might
be needed again on backtracking into the condition or the earlier
disjunctions.

Thanks to Warwick Harvey for reporting this bug.

compiler/code_info.m:
	Add new predicate `code_info__maybe_reset_and_pop_ticket',
	which is like `code_info__maybe_reset_and_discard_ticket',
	except that it does not release the temp stack slot.

compiler/disj_gen.m:
compiler/ite_gen.m:
	When generating code for nondet goals that save
	and restore the hp and trail, if the saved
	values might be needed again on backtracking
	into the current goal from one that follows
	(i.e. in nondet disjunctions and in if-then-elses
	with nondet conditions), make sure we use
	`code_info__maybe_reset_and_pop_ticket' and
	`code_info__reset_hp' instead of
	`code_info__maybe_reset_and_discard_ticket' and
	`code_info__reset_and_discard_hp'.

compiler/code_info.m:
	Include the temp_avail_slots in the set of things
	that slap_code_info does not update.  Temp slots
	that were acquired (and not released) in one branch
	of a branched goal need to be still reserved at the
	end of the branched goal.

extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tests/var_test.exp:
	Add a new subdirectory `tests' in extras/trailed_update,
	and move the test case `tests.{m,exp}' from the samples
	subdirectory into the tests subdirectory, at the same
	time renaming it as `var_test.{m,exp}'.

extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test.exp:
extras/trailed_update/tests/func_trail_test_2.m:
extras/trailed_update/tests/func_trail_test_2.exp:
	Add a couple of regression tests for the bug mentioned above.
	These tests need to go here rather than somewhere in the
	main `tests' directory (e.g. `tests/hard_coded'), because
	they only work in trailing grades, and the normal tests are
	compiled in lots of grades, many of which don't have
	corresponding trailing grades installed.
	(I suppose we could put them in the main `tests' directory,
	and only enable them for trailing grades, but it just seemed
	easier to put them here.)
1998-06-02 05:32:26 +00:00
Fergus Henderson
ae9150f1a1 Use sub-modules to package up the modules in extras/complex_numbers
Estimated hours taken: 0.25

Use sub-modules to package up the modules in extras/complex_numbers
into a single module.

extras/complex_numbers/complex_numbers.m:
	I forgot to `cvs add' this file before committing my last change.

extras/complex_numbers/samples/fft.m:
	I forgot to change the `import_module' declaration here
	to import `complex_numbers:complex' instead of `complex'.
1998-05-30 12:10:19 +00:00
Fergus Henderson
d23f11ac33 Use sub-modules to package up the modules in extras/complex_numbers
Estimated hours taken: 0.75

Use sub-modules to package up the modules in extras/complex_numbers
into a single module.

extras/complex_numbers/complex_lib.m:
extras/complex_numbers/complex_numbers.m:
	Rename complex_lib.m as complex_numbers.m,
	and modify it to use sub-modules.

extras/complex_numbers/*.m:
extras/complex_numbers/tests/complex_test.m:
extras/complex_numbers/samples/fft.m:
	Add `complex_numbers:' to all of the `:- module'
	and `:- import_module' declarations.

extras/complex_numbers/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
	Modify to reflect the renaming from `complex_lib' to
	`complex_numbers'.
1998-05-29 09:08:43 +00:00
Fergus Henderson
21290a0a49 Temporarily disable the test of `interpreter',
Estimated hours taken: 0.1

tests/trailed_update/samples/Mmakefile:
	Temporarily disable the test of `interpreter',
	since this test fails in some grades.
1998-03-12 02:48:50 +00:00
Tyson Dowd
0f6cc435ed Removed old versions of Tcl/Tk interface, and OpenGL interface.
Estimated hours taken: 0.05

extras/graphics/*.m:
	Removed old versions of Tcl/Tk interface, and OpenGL interface.
1998-03-10 06:35:16 +00:00
Tyson Dowd
45cc7b34c0 Add mercury_opengl as a library.
Estimated hours taken: 3

Add mercury_opengl as a library.

extras/graphics/mercury_opengl/COPYING.LIB:
extras/graphics/mercury_opengl/HOWTO:
extras/graphics/mercury_opengl/LICENSE.TK:
extras/graphics/mercury_opengl/LICENSE.TOGL:
extras/graphics/mercury_opengl/Mmakefile:
extras/graphics/mercury_opengl/README:
extras/graphics/mercury_opengl/mercury_opengl.m:
extras/graphics/mercury_opengl/mglu.m:
extras/graphics/mercury_opengl/mogl.m:
extras/graphics/mercury_opengl/mtogl.m:
extras/graphics/mercury_opengl/tkConsole.c:
extras/graphics/mercury_opengl/tkFont.h:
extras/graphics/mercury_opengl/tkInt4.0.h:
extras/graphics/mercury_opengl/tkInt4.1.h:
extras/graphics/mercury_opengl/tkInt4.2.h:
extras/graphics/mercury_opengl/tkInt8.0.h:
extras/graphics/mercury_opengl/tkInt8.0p2.h:
extras/graphics/mercury_opengl/tkPort.h:
extras/graphics/mercury_opengl/tkWin.h:
extras/graphics/mercury_opengl/tkWinInt.h:
extras/graphics/mercury_opengl/tkWinPort.h:
extras/graphics/mercury_opengl/togl.c:
extras/graphics/mercury_opengl/togl.h:
	Same old .m files (except mercury_opengl.m), new Mmakefile,
	new LICENSEs, updated version of Togl.

	The old .m files will be removed from the extras/graphics
	directory.


Estimated hours taken: _____

<overview or general description of changes>

<directory>/<file>:
	<detailed description of changes>
1998-03-10 06:32:06 +00:00
Tyson Dowd
c613e5f4d7 A few fixes.
Estimated hours taken: 0.5

A few fixes.

extras/graphics/mercury_tcltk/mtcltk.m:
	Fix the use of LVALUE_CAST - it was buggy.
	Remove references to gravity wars stuff which is
	no longer necessary (thanks to Tom for helping find this
	out quickly).
1998-03-05 03:09:31 +00:00
Fergus Henderson
bf979cf38f Fix some "missing interface import" bugs detected by the
Estimated hours taken: 0.5

profiler/call_graph.m:
profiler/read.m:
extras/trailed_update/var.m:
	Fix some "missing interface import" bugs detected by the
	latest version of the compiler.
1998-03-04 19:59:56 +00:00
Tyson Dowd
61255ef860 Fix bugs uncovered/introduced by recent changes to ml.
Estimated hours taken: 1.0

Fix bugs uncovered/introduced by recent changes to ml.

extras/clpr/samples/Mmakefile:
extras/trailed_update/samples/Mmakefile:
	Use MLFLAGS += --shared, rather than redefining ML, and
	rather than using --mercury-libs shared.
	Similar changes for doing static linking.
1998-03-03 00:55:07 +00:00
Fergus Henderson
437689a6b2 In the rule for creating *.res, swap the order in
Estimated hours taken: 0.1

extras/trailed_update/samples/Mmakefile:
	In the rule for creating *.res, swap the order in
	which the .out and .exp files are passed to diff,
	so that the diff properly reflects how the actual
	output differs from the expected output rather than
	vice versa.
1998-02-18 10:31:54 +00:00
Tyson Dowd
20380986db Add mercury_tcltk as a library.
Estimated hours taken: 1

Add mercury_tcltk as a library.

extras/graphics/mercury_tcltk/COPYING.LIB:
extras/graphics/mercury_tcltk/HOWTO:
extras/graphics/mercury_tcltk/Mmakefile:
extras/graphics/mercury_tcltk/README:
extras/graphics/mercury_tcltk/mercury_tcltk.m:
extras/graphics/mercury_tcltk/mtcltk.m:
extras/graphics/mercury_tcltk/mtk.m:
	New location for these files, new Mmakefile, updated README
	and HOWTO, added LGPL license.
1998-02-17 06:33:38 +00:00
Fergus Henderson
c5f6bfa162 Document that the interface to freeze/{2,3} is not stable.
Estimated hours taken: 0.25

extras/trailed_update/var.m:
	Document that the interface to freeze/{2,3} is not stable.
1998-02-15 21:48:28 +00:00
Fergus Henderson
a1ea46ee92 Work around a (spurious) unique mode error, which was
Estimated hours taken: 1

extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/interpreter.exp:
	Work around a (spurious) unique mode error, which was
	caused by the recent changes to make unique mode checking
	of higher-order terms and lambda expressions more strict.
	The work-around is to avoid the use of the higher-order
	pred unsorted_aggregate/4, and instead use impure code (ugh).

	In the long term, a better solution would be to add support
	for `call-once' higher-order modes.
1998-02-15 06:23:47 +00:00
Fergus Henderson
ee8ac8ac11 Avoid mode errors in debug_freeze/{3,4} which were caused by the use
Estimated hours taken: 1

extras/trailed_update/var.m:
	Avoid mode errors in debug_freeze/{3,4} which were caused by the use
	of a variable of inst `any' as the curried argument in a higher-order
	term.  The fix was to replace `unsafe_perform_io(dump_var(Var))'
	with `unsafe_dump_var(Var)' where unsafe_dump_var/1 is a new impure
	version of dump_var/3.
	(The mode errors were detected as a result of Andrew Bromage's
	recent change to fix mode checking for lambda expressions.
	In this particular case, as it happens, there is no genuine error,
	becaused dump_var/1 does not instantiate its argument.
	However, there's no way for the mode checker to know that,
	so it is correct to report an error.)
1998-02-14 15:06:41 +00:00
Fergus Henderson
2cd35f6d23 Use GRADEFLAGS += --use-trail' instead of GRADEFLAGS = --use-trail',
Estimated hours taken: 0.25

extras/clpr/Mmakefile:
extras/clpr/samples/Mmakefile:
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
	Use `GRADEFLAGS += --use-trail' instead of `GRADEFLAGS = --use-trail',
	so that the definition of GRADEFLAGS doesn't override the default
	definition `GRADEFLAGS = --use-grade $(GRADE)'.  This means that
	the specified GRADEFLAGS will modify the GRADE, rather than
	replacing it.
1998-02-11 09:10:30 +00:00
Fergus Henderson
5041f01094 Make use of impure' and semipure' declarations.
Estimated hours taken: 0.75

extras/trailed_update/var.m:
extras/trailed_update/unsafe.m:
	Make use of `impure' and `semipure' declarations.
1997-12-11 21:23:32 +00:00
Fergus Henderson
99048a131e Ignore the `.c' files and executables corresponding to the
Estimated hours taken: 0.1

extras/trailed_update/samples/.cvsignore:
	Ignore the `.c' files and executables corresponding to the
	`.m' files in this directory.
1997-12-10 15:23:55 +00:00
Simon Taylor
ba0ff8fa2d s/imp.h/mercury_imp.h/g
Estimated hours taken: 0.1

extras/odbc/odbc.m
	s/imp.h/mercury_imp.h/g
1997-11-26 01:05:45 +00:00
Fergus Henderson
c2f8b6db6d Use GRADEFLAGS = --use-trail' rather than GRADE=asm_fast.gc.tr'.
Estimated hours taken: 0.1

extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
	Use `GRADEFLAGS = --use-trail' rather than `GRADE=asm_fast.gc.tr'.
1997-11-21 08:11:36 +00:00
Fergus Henderson
49372cc152 Add new predicate var__is_ground/2.
Estimated hours taken: 2

extras/trailed_update/var.m:
	Add new predicate var__is_ground/2.
	Also fix a bug: it was not handling unifications between
	already-aliased variables correctly.

extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
	Add some more test cases.
1997-11-13 17:15:10 +00:00
Fergus Henderson
4a9e2ae3bb Add new predicate var__is_ground/2.
Estimated hours taken: 2

extras/trailed_update/var.m:
	Add new predicate var__is_ground/2.
	Also fix a bug: it was not handling unifications between
	already-aliased variables correctly.

extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/samples/tests.out:
	Add some more test cases.
1997-11-13 17:14:58 +00:00
Fergus Henderson
b7be1dc8d2 Fix a bug (I had changed a function name in but forgotten
Estimated hours taken: 1

extras/trailed_update/var.m:
	Fix a bug (I had changed a function name in but forgotten
	to change the caller).

extras/trailed_update/Mmakefile:
	Add `-Werror' to MGNUCFLAGS, to prevent reoccurrence of bugs
	like the one above.
	Fix the rule for `mmake depend' so that it makes the
	dependencies in the `samples' subdirectory too.

tools/test_mercury:
	Test the trailed_update library.
1997-11-11 10:26:00 +00:00
Thomas Conway
e44ced7ff5 :1,$s/Id+1/Id + 1/g
Estimated hours taken: 0.1

extras/graphics/mtk.m:
	:1,$s/Id+1/Id + 1/g
1997-11-11 03:57:20 +00:00
Thomas Conway
dde1a7d3e3 Fix the code to work with the changes to the handling of
Estimated hours taken: 2

extras/graphics/mtcltk.m:
	Fix the code to work with the changes to the handling of
	IO states in pragma c_code.

extras/graphics/mtk.m:
	Add several bits of functionality that were missing.
1997-11-11 03:43:13 +00:00
Fergus Henderson
ef70effdae Fix a typo in a comment: s/unindex/unindexed/.
Estimated hours taken: 0.1

extras/trailed_update/samples/interpeter.m:
	Fix a typo in a comment: s/unindex/unindexed/.
1997-10-12 13:39:20 +00:00
Fergus Henderson
541d1167ce Dectect floundering in solutions/2 and nondet if-then-else.
Estimated hours taken: 4

Dectect floundering in solutions/2 and nondet if-then-else.

library/std_util.m:
	Change the code for builtin_aggregate to (a) check for
	floundering and (b) reset the trail properly.

compiler/code_gen.m:
	Change the code for if-then-elses with nondet conditions
	so that it checks for floundering.

runtime/mercury_trail.h:
compiler/llds.m:
compiler/llds_out.m:
	Add new alternative `MR_solve' to MR_untrail_reason.
	This is used to for checking for floundering in the
	above-mentioned two cases.

extras/clpr/cfloat.m:
extras/trailed_update/var.m:
	Handle the MR_solve case.

doc/reference_manual.texi:
	Document MR_solve.

NEWS:
	Delete the mention of the limitation that we didn't
	dectect floundering in solutions/2 and nondet if-then-else.
1997-10-12 13:32:58 +00:00