Estimated hours taken: 4
Branches: main
Fix Mantis bug #170.
The problem involved a string switch inlined into the condition of an
if-then-else in the predicate execute_cmd_string. The switched-on variable,
CmdWord, is not used in or after the switch in the condition or the then part,
so it becomes forward dead in the switch, but it IS used in the else part.
This requires it to be made a zombie when it forward dies, so it can be
resurrected at the start of the else part. The initial implementation of
string hash lookup switches did not do that.
compiler/string_switch.m:
Fix the bug by making all variables being made forward dead into
zombies if they are needed by an enclosing resume point.
compiler/lookup_switch.m:
Fix the same bug in switches on atomic types.
compiler/var_locn.m:
Fix the format of some documentation.
ssdb/Mercury.options:
Remove the workaround for bug #170, since it won't be needed
once the diff to the compiler is installed.
tests/hard_coded/lookup_switch_simple_cond.{m,exp}:
A version of the existing lookup_switch_simple test case that puts
the switch in a condition, to test the fix to lookup_switch.m. The
compilation of ssdb/ssdb.m with -O5 is the test case for the fix
to string_switch.m.
tests/hard_coded/Mmakefile:
Enable the new test case.
Branches: main
Make it possible to install and use the csharp.ssdebug grade.
Mmake.workspace:
Never try to link with `mer_rt' in C# grades.
browser/Mmakefile:
mdbcomp/Mmakefile:
ssdb/Mmakefile:
Use `mmc --make' to install these libraries in `csharp' grades.
Don't add C libraries to MLLIBS in non-C or asm grades.
browser/Mercury.options:
ssdb/Mercury.options:
"EXTRA_LIBRARIES-libname" doesn't actually work with `mmc --make',
but "LIBRARIES-name" does.
library/exception.m:
ssdb/ssdb.m:
Handle EXCP events in C# grades.
Trap SIGINT when running ssdb in C# grades.
Add `exit_process' implementation.
browser/declarative_execution.m:
browser/listing.m:
Add stubs for C#.
README.CSharp:
Document the C# backend.
README.DotNet:
Add a pointer to README.CSharp.
README.Erlang:
README.Java:
Remove a non-sensical paragraph.
.INSTALL.in:
configure.in:
Add `--enable-csharp-grade' option.
Make `configure --enable-ssdebug-grades' add `csharp.ssdebug'
to the list of library grades.
Estimated hours taken: 120
Branches: main
There are some modification for the nondet transformation. When a retry of a
nondet procedure A is asked during the execution of the program, a choicepoint
is left behind and the execution start the retry on procedure B. When the retry
on B is finished, the compiler come back at the choicepoint and finish the call
of the procedure A. This give a wrong number of event.
The proposed solution is: when a retry is asked in a nondet procedure named A
at an exit port, the debugger do not execute any operation until it reach the
fail of the procedure A. It is only at this moment that the execution of B
begin.
If user use a predicate like solutions.unsorted_solutions, he will obtain more
than one time the same solution. The use of solutions is right because it
remove the duplicates
Determinism failure tranformed:
% detism_failure:
%
% p(...) :-
% promise_<original_purity> (
% (
% CallVarDescs = [ ... ],
% impure call_port(ProcId, CallVarDescs),
% <original body>
% ;
% % preserve_backtrack_into
% impure fail_port(ProcId, CallVarDescs, DoRetry),
% (
% DoRetry = do_retry,
% p(...)
% ;
% DoRetry = do_not_retry,
% fail
% )
% )
% ).
Determinism erroneous transformed:
% p(...) :-
% promise_<original_purity> (
% (
% CallVarDescs = [ ... ],
% impure call_port(ProcId, CallVarDescs),
% <original body>,
% )
% ).
analysis/Mmakefile:
Delete the LINK_STDLIB_ONLY=yes line as we need to link with the
libmer_ssdb if source-to-source debugging is enabled.
browser/util.m:
At the browser prompt, use io.read_line_as_string instead of
functions in the trace library to read input if the trace library is
not linked in.
compiler/mercury_compile.m:
Move the ssdb transformation to after the higher order specialisation
pass to work around a compiler abort. The higher order specialisation
removes predicates which are used to "force the production of
user-requested type specializations, since they are not called from
anywhere and are no longer needed". Let `p' be such a procedure, and
the specialised version be `p1'. Then remove `p'. But due to the ssdb
transformation, `p1' will contain a call to `p', in order to support
retry.
I'm not sure where the ssdb transform should go. I assume as early as
possible.
compiler/ssdebug.m:
- Transform procedures with `failure' and `erroneous' determinisms.
- Funny modes are not managed
I think we can and should handle `unused' arguments as well, but
later.
profiler/Mmakefile:
Link with the mer_ssdb library.
ssdb/Mercury.options:
Link with the mer_browser library to support browsing of terms.
ssdb/ssdb.m:
- 4 new event for the nondet procedure are now use. They are :
ssdb_call_nondet, ssdb_exit_nondet, ssdb_fail_nondet,
and ssdb_redo_nondet. In the same way, an different event handler
has been created to managed each of them.
The ssdb_redo event was no more useful.
- The old structure debugger_state has been divided in different
mutable variables to allow more flexibility.
- The old breakpoint list are now a map with (module_name, pred_name)
as key and the breakpoint structure as value.
- The depth is now compute with the stack depth, it is easier to manage
and more flexible.
- Some new command have been added: delete/enable/disable breakpoint,
break info, finish N, retry N, browse X
deep_profiler/DEEP_FLAGS.in:
deep_profiler/.mgnuc_copts:
deep_profiler/Mmakefile:
tests/.mgnuc_copts.ws:
tests/WS_FLAGS.ws:
Search in the ssdb directory for files.
analysis/Mmakefile:
browser/util.m:
compiler/mercury_compile.m:
compiler/ssdebug.m:
library/private_builtin.m:
profiler/Mmakefile:
ssdb/Mercury.options:
ssdb/ssdb.m:
tests/.mgnuc_copts.ws:
tests/WS_FLAGS.ws:
Back out Olivier's last change; it broke the compiler.
Estimated hours taken: 1
Branches: main
Final release of version 1 of the ssdb.
analysis/Mmakefile:
browser/util.m:
compiler/mercury_compile.m:
compiler/ssdebug.m:
library/private_builtin.m:
profiler/Mmakefile:
ssdb/Mercury.options:
ssdb/SSDB_FLAGS.in:
ssdb/ssdb.m:
tests/.mgnuc_copts.ws:
tests/WS_FLAGS.ws:
Estimated hours taken: 4
Branches: main
Initial checkin which is all the scaffolding needed to
support the new source to source mercury debugger (ssdb).
The main addition in this change is the ssdb directory,
which will contain the mer_ssdb library.
Mmake.workspace:
Mmakefile:
configure.in:
Handle the new ssdb directory.
compiler/options.m:
Add the --ssdb and --source-to-source-debug options.
compiler/mercury_compile.m:
Add the ssdb pass (it does nothing at the moment).
compiler/modules.m:
Implicitly import ssdb_builtin when compiling with --ssdb.
mdbcomp/prim_data.m:
Handle the ssdb module.
ssdb/Mercury.options:
ssdb/Mmakefile:
ssdb/SSDB_FLAGS.in:
ssdb/.mgnuc_copts:
ssdb/.mgnuc_opts:
ssdb/RESERVED_MACRO_NAMES:
Build system for ssdb directory.
ssdb/mer_ssdb.m:
ssdb/ssdb.m:
The operations which are needed by the source to source
debugger.
tools/bootcheck:
Changes to the bootcheck script to handle the new ssdb module.
browser/Mmakefile:
bytecode/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
runtime/Mmakefile:
trace/Mmakefile:
Add the ALLOW_SSDB_PREFIX rules.