A problem with standalone apps
Tomasz Primke
tprimke at interia.pl
Thu Aug 31 05:23:31 CEST 2006
I have some problem with standalone applications. I just can't understand,
why the examples from the "Finite Domain Constraint Programming in Oz"
tutorial work fine in this awful Emacs, but refuse to work when transferred
into standalone apps. For example, let's take a look at SEND+MORE=MONEY
problem. If I write the following program:
-------------------------------------------------------------------
functor
import
Application
System
FD
Search
define
{proc Money Root}
<the rest of the stuff here>
end
{System.showInfo {SearchAll Money}}
{Application.exit 0}
end
-------------------------------------------------------------------
it will compile, but it just won't work. All I get is something like:
%***************** Error: illegal field selection ***************
%**
%** In statement: R . searchAll = _<optimized>
%** Expected fields: all allP allS base best object one parallel
%** Record value: 'export'(all:<P/4 All> allP:<P/4 AllP> allS:<P/4 AllS>
base:base(all:<P/2 SearchAll> best:<P/3 SearchBest> one:<P/2 SearchOne>)
best:best(bab:<P/5 BestModule.bab> babP:<P/5 BestModule.babP> babS:<P/5
BestModule.babS> restart:<P/5 BestModule.restart> restartP:<P/5
BestModule.restartP> restartS:<P/5 BestModule.restartS>) object:<C:
SearchObject> one:one(bound:<P/5 OneModule.bound> boundP:<P/5
OneModule.boundP> boundS:<P/5 OneModule.boundS> depth:<P/4 OneModule.depth>
depthP:<P/4 OneModule.depthP> depthS:<P/4 OneModule.depthS> iter:<P/4
OneModule.iter> iterP:<P/4 OneModule.iterP> iterS:<P/4 OneModule.iterS>
lds:<P/4 OneModule.lds> ,,,) parallel:_<readonly quiet>)
%**
%** Call Stack:
%** procedure in file "./Test01.oz", line 1, column 0, PC = 135946992
%** procedure 'RootManager,Pickle/fast' in file
"/home/tpj/src/srcbuilds/robocze/src-mozart/build/mozart-1.3.2.20060615/share/lib/init/Module.oz",
line 244, column 6, PC = 135908160
%** procedure in file
"/usr/staff/raph/devel/trunk/mozart/share/lib/base/Base.oz", line 92,
column 7, PC = 136029388
%**--------------------------------------------------------------
Best regards,
Tomek
More information about the mozart-users
mailing list