Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000270 | mercury | Bug | public | 2012-12-30 05:58 | 2012-12-31 00:22 |
Reporter | maurojh | ||||
---|---|---|---|---|---|
Assigned To | juliensf | ||||
Priority | urgent | Severity | crash | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Platform | PC Intel Core I7 2.8GHz, 2.9GB m | OS | Ubuntu Linux | OS Version | 10.04 |
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000270: When one uses fact_table, the mercury compiler crashes if there is an error in the fact_table. | ||||
Description | Here is a small program without errors: % dic.m wrd("cat", "catus"). wrd("dog", "canis"). wrd("horse", "equus"). wrd("person","homo sapiens"). % bug.m :- module bug. :- interface. :- import_module io. :- pred main(io::di, io::uo) is cc_multi. :- implementation. :- import_module string, list, char. :- pred wrd( string::in, string::out) is nondet. :- pragma fact_table( wrd/2, "dic.m"). main(!IO) :- ( wrd("horse", X) -> print(X,!IO), nl(!IO) ; true ). The command below compiles the above program flawlessly: > mmc --infer-all --use-subdirs --rebuild bug However, If I introduce an error in the fact_table, the compiler freezes. For example, let us forget the comma between "horses" and "equus": % dic.m wrd("cat", "catus"). wrd("dog", "canis"). wrd("horse" "equus"). wrd("person","homo sapiens"). Now, instead of reporting the error, the compiler freezes. | ||||
Steps To Reproduce | In the description of the bug, you will find the steps to reproduce the bug. I tried it in different machines, and I always was able to reproduce the freezing of the compiler. Since I am writing large programs that requires fact_tables I would like that the compiler report errors, instead of crashing or freezing. % Correct fact_table % dic.m wrd("cat", "catus"). wrd("dog", "canis"). wrd("horse", "equus"). wrd("person","homo sapiens"). % Fact_table that freezes the compiler % dic.m wrd("cat", "catus"). wrd("dog", "canis"). wrd("horse" "equus"). wrd("person","homo sapiens"). | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | bug.m (317) 2012-12-30 05:58 https://bugs.mercurylang.org/file_download.php?file_id=166&type=bug |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2012-12-30 05:58 | maurojh | New Issue | |||
2012-12-30 05:58 | maurojh | File Added: bug.m | |||
2012-12-30 13:47 | juliensf | Note Added: 0000487 | |||
2012-12-30 13:47 | juliensf | Assigned To | => juliensf | ||
2012-12-30 13:47 | juliensf | Status | new => feedback | ||
2012-12-30 13:58 | juliensf | Note Added: 0000488 | |||
2012-12-30 13:58 | juliensf | Status | feedback => confirmed | ||
2012-12-31 00:22 | edu500ac | Note Added: 0000489 |