Anton: I stumbled on dburg while researching how to modify lcc's md
files to generate rules, and discovering that running against a DAG
rather than a tree isn't quite as straightforward as I'd thought. With
dburg downloaded, I tried running the Prolog provided on swi-prolog
since the recommended Sicstus Prolog costs serious money. swi-prolog
generates an error for nth/3 in
dburg.pl, which is correctable by
adding
nth(N, List, Element):-
N1 is N - 1,
length(Head, N1),
append(Head, [Element|_Rest], List).
prior to its use in op_arg_nt (or by using nth1 which I believe to be
equivalent). Presuming that this is correct -- and I'm not sure -- I
now get error messages on the rules. For instance, running against
proebstring.dburg generates
1 ?-
% library(assoc) compiled into assoc 0.00 sec, 19,640 bytes
% library(oset) compiled into oset 0.02 sec, 9,896 bytes
% library(ordsets) compiled into ordsets 0.02 sec, 21,588 bytes
*************
Error: no optimal rule for addr. Rulesets: [[addr->reg:0],[addr-
>tadd[reg,reg]:1]]
State:
state(ERROR: c:/w32f/dburg/
dburg.pl:548:
</2: Arithmetic: `addr/0' is not a function
Warning: c:/w32f/dburg/
dburg.pl:548:
Goal (directive) failed: user: (main,halt)
%
dburg.pl compiled 0.03 sec, 74,600 bytes
% c:/w32f/dburg/proebsting.dburg compiled 0.03 sec, 76,344 bytes
The same error as reported for addr/0 is reported against mem/0 and so
on in the other dburg files as part of the rules() set. I have a
feeling it's a parse problem. Any clues?
http://www.complang.tuwien.ac.at/papers/ertl99.ps.gz
http://www.complang.tuwien.ac.at/anton/dburg/
http://www.swi-prolog.org/