Oops ! I had left too many debug statements in the previous
release ...
(a) it was slowing things down
(b) in one case it could create a flow of printf :-(
I have cleaned my act :-) CLAIRE v3.3.4 is there
Cheers,
-- Yves Caseau
--- In
claireprogramminglanguage@yahoogroups.com, "sportingaprimera2002"
<sportingaprimera2002@y...> wrote:
> Hi all, I'm a Spanish student who is currently developing a project
> and I would like to take a look to some algorithms, but I can't
find
> them. I have read this extract from Journal of Heuristics, 5, 305-
325
> (1999): "The constraint propagation techniques presented in
Section 4
> have been integrated in CLAIRE SCHEDULE, a library for preemptive
and
> non-preemptive scheduling (Le Pape and Baptiste, 1997b). The source
> code of the DFS and LDS algorithms is available as an example of
use
> of CLAIRE SCHEDULE, on the CLAIRE web site."
>
> But I couldn't find this source code, do you know where to find
it? I
> would be very pleased to get the DFS and LDS algorithms. Thank you.
CLAIRE Schedule is no longer available nor maintained. You may want
to look at choco, a freeware constraint solver developped by
Francois Laburthe & all, which is available and include some
scheduling libraries
-- Yves
Hello everyone,
I have been quiet for a long time ... for 2 reasons:
(a) No nasty bugs were reported :-)
(b) I was writing a book this summer
Anyway, I have returned to my PC, solved 4 pending bugs and included
some improvements proposed by Sylvain Benilan.
You may now find (in the Files section) CLAIRE v3.3.36:
- solves a gc protection overflow problem that may occur with break
(...) inside a while
- uses a new set of tests for float alignment which is supposed to
be more portable (let me know :-))
- fixes a bug with but(s,x) found by FXJ
- the C++ name for error is now ClaireError
- a gc_protection bug found by Sylvain (l := list(...) inside a
GCLOOP) is solved.
Cheers,
-- Yves Caseau
--- In claireprogramminglanguage@yahoogroups.com, "lkammogne2000"
<lkammogne2000@y...> wrote:
> hello how are you
> i am a new member of claireprogramminglanguage and i want have
any
> document of "claire"(documentation, programming language)
> please excuse my english i am francophone
You may download the documentation in the Files section (look at the
bar on the right)
Cheers,
-- Yves
Hello,
I am very keen to learn claire programming language. Please tell me
the pointers where tutorial and manuals are available. I am also
looking for some examples.
P L Patodia
hello how are you
i am a new member of claireprogramminglanguage and i want have any
document of "claire"(documentation, programming language)
please excuse my english i am francophone
Hi all, I'm a Spanish student who is currently developing a project
and I would like to take a look to some algorithms, but I can't find
them. I have read this extract from Journal of Heuristics, 5, 305-325
(1999): "The constraint propagation techniques presented in Section 4
have been integrated in CLAIRE SCHEDULE, a library for preemptive and
non-preemptive scheduling (Le Pape and Baptiste, 1997b). The source
code of the DFS and LDS algorithms is available as an example of use
of CLAIRE SCHEDULE, on the CLAIRE web site."
But I couldn't find this source code, do you know where to find it? I
would be very pleased to get the DFS and LDS algorithms. Thank you.
Hello everyone,
a new release is available (3.3.34). It solves a long list of bugs
that have been found in the past 3 month (sorry, my ADSL connection
was not working :-( ) :
- compilation of error(...)
- using the proper class designation in a GC_PROTECT
- GC_ANY is now using a function for UNIX platform ... to avoid the
errors caused by a compiler that is too smart :-)
- Arnaud Linz wish is implemented : l[F()] :+ 1 does not call F()
twice any more
- a few protection bugs
- type equality is used for uniform?(p) (cf. Sylvain's message)
- a set of GC bugs found by Sylvain have been solved
- the handler stack overflow is taken care of, thanks to Nicolas
Museux.
It also includes the improvement made by Sylvain Benilan while using
the system functions memcpy/memmove. It turns out that with the new
processor architecture that we have today, these functions are much
faster than the equivalent C code, which was not true 10 years ago.
Many thanks to Sylvain, for pointing out a few nasty GC bugs, and
for providing with such an improvement !
Enjoy,
-- Yves
Hi,
You must have a C++ compiler available from the command line.
-> add the path to cl.exe and nmake.exe to your PATH environement
variable (something like C:\Program Files\Microsoft Visual
Studio .NET\Vc7\bin)
Your LIB and INCLUDE variables may need to be updated too.
Thierry
--- In claireprogramminglanguage@yahoogroups.com, "picander77"
<picander77@y...> wrote:
> Hello to all of you:
>
> I got a quite simple but naive problm, i think:
>
> I do have windows xp and downloaded claire version 3.3
>
> 1. I unzipped the files on "C:\CLAIRE3_HOME"
>
> 2. I created under windows xp an environment variable:
> - control panel\system\advanced\environment variables\
> CLAIRE3_HOME = C:\CLAIRE3_HOME
>
> 3. I do an nmake and get the following error:
> "
> C:\CLAIRE>nmake -f makefile.nt
>
> Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
> Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
>
> cl -c /IC:\CLAIRE\include /DCLWIN /DCLPC /O2 /FoC:\CLAIRE\
> bj /Tp C:\CLAIRE\csrc\Clalloc.cpp
> 'cl' is not recognized as an internal or external command,
> operable program or batch file.
> NMAKE : fatal error U1077: 'cl' : return code '0x1'
> Stop.
> "
>
> Maybe I did something wrong...
> Help!!!
Hello to all of you:
I got a quite simple but naive problm, i think:
I do have windows xp and downloaded claire version 3.3
1. I unzipped the files on "C:\CLAIRE3_HOME"
2. I created under windows xp an environment variable:
- control panel\system\advanced\environment variables\
CLAIRE3_HOME = C:\CLAIRE3_HOME
3. I do an nmake and get the following error:
"
C:\CLAIRE>nmake -f makefile.nt
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cl -c /IC:\CLAIRE\include /DCLWIN /DCLPC /O2 /FoC:\CLAIRE\
bj /Tp C:\CLAIRE\csrc\Clalloc.cpp
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.
"
Maybe I did something wrong...
Help!!!
OK,
testmod :: module( part_of = claire, source = ".",made_of =
list<string>("test") )
or maybe setting source to your full
path: "c:\\myDirectory\\sources" would be safer.
Thierry
--- In claireprogramminglanguage@yahoogroups.com, nmuseux
<no_reply@y...> wrote:
> Hi,
>
> Think to specify the source module's attribute :
>
> testmod :: module( part_of = claire, source = "." , made_of =
> list<string>("test") )
>
> The default value of testmod.source could be the root directory...
Ah! I see.
---- ERROR: princ @ string implies using Kernel !
Fixed with:
testmod :: module(
part_of = claire,
source = ".",
made_of = list<string>("test"),
uses = list(claire)
)
Two questions:
1)
testmod> main()
eval[0]> hello world!unknown
Why is 'unknown' printed?
2) Is there a way to use a compiled module without going to a CLAIRE
prompt? As though it were a C++ or VB exe?
best wishes, Isaac
Hi,
Think to specify the source module's attribute :
testmod :: module( part_of = claire, source = "." , made_of =
list<string>("test") )
The default value of testmod.source could be the root directory...
--- In claireprogramminglanguage@yahoogroups.com, igouy2
<no_reply@y...> wrote:
> --- In claireprogramminglanguage@yahoogroups.com, thbenoist
> <no_reply@y...> wrote:
> > testmod :: module( part_of = claire, made_of = list<string>
> ("test") )
>
> Thanks that's let me take a step forward.
>
> I:\pls\Claire>claire -cm testmod
> -- CLAIRE run-time library v 3.3.28 [os: ntv, C++:MS VC++ ] --
> this is a init file for cclaire for OS: ntv -------------------
> init.cl is ok -------------------------------------------------
> ---- [load CLAIRE file: \test.cl]
> **** An error has occurred.
> [120] the file \test.cl cannot be opened
>
> But if I try this:
> testmod> load("test")
> eval[0]> ---- [load CLAIRE file: test]
> true
--- In claireprogramminglanguage@yahoogroups.com, thbenoist
<no_reply@y...> wrote:
> testmod :: module( part_of = claire, made_of = list<string>
("test") )
Thanks that's let me take a step forward.
I:\pls\Claire>claire -cm testmod
-- CLAIRE run-time library v 3.3.28 [os: ntv, C++:MS VC++ ] --
this is a init file for cclaire for OS: ntv -------------------
init.cl is ok -------------------------------------------------
---- [load CLAIRE file: \test.cl]
**** An error has occurred.
[120] the file \test.cl cannot be opened
But if I try this:
testmod> load("test")
eval[0]> ---- [load CLAIRE file: test]
true
> Just define your module in the init.cl file:
> testmod :: module( part_of = claire, made_of list("test") )
It didn't seem to like that?
I:\pls\Claire>claire -cm testmod
-- CLAIRE run-time library v 3.3.28 [os: ntv, C++:MS VC++ ] --
this is a init file for cclaire for OS: ntv -------------------
---- Syntax Error[line: 14]:
**** An error has occurred.
[152] Separation missing between made_of
and list("test") [none?]
Were is the "standard" place in init.cl to put these module
definitions? Does it matter?
Hi,
Just define your module in the init.cl file:
testmod :: module( part_of = claire, made_of list("test") )
And remove the begin/end lines, these instruction are only useful
when you want to change the current namespace (usually in
interpreted mode)
Note also that no method will be called when launching your compiled
module. You will have to call main() from the "testmod>" prompt that
will appear.
Thierry
--- In claireprogramminglanguage@yahoogroups.com, igouy2
<no_reply@y...> wrote:
> Please help explain what things I'm doing wrong.
> (using unchanged init.cl from distribution release-3-3-28.zip
>
> file testmod.cl
> test :: module( part_of = claire, made_of list("test") )
>
> file test.cl
> begin(test)
> main() -> printf("hello world!")
> end(test)
>
> I:\pls\Claire>claire -cm testmod
> -- CLAIRE run-time library v 3.3.28 [os: ntv, C++:MS VC++ ] --
> this is a init file for cclaire for OS: ntv -------------------
> init.cl is ok -------------------------------------------------
> **** An error has occurred.
> testmod is not a module
Please help explain what things I'm doing wrong.
(using unchanged init.cl from distribution release-3-3-28.zip
file testmod.cl
test :: module( part_of = claire, made_of list("test") )
file test.cl
begin(test)
main() -> printf("hello world!")
end(test)
I:\pls\Claire>claire -cm testmod
-- CLAIRE run-time library v 3.3.28 [os: ntv, C++:MS VC++ ] --
this is a init file for cclaire for OS: ntv -------------------
init.cl is ok -------------------------------------------------
**** An error has occurred.
testmod is not a module
I was having problems installing CLAIRE on Windows XP even though
the environment variables were defined correctly.
I:\Program Files\Claire\release>nmake /F Makefile.nt
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
NMAKE : fatal error U1071: cycle in dependency tree for
target '"I:\Program Files\Claire\release"'
Stop.
FIXES (this worked for me on Windows XP):
- don't install under 'Program Files'
- replace the references to ROOT in Makefile.nt with an absolute path
- create the folders needed:
bin\public\ntv
bin\debug\ntv
objs
Hello everyone,
Please find here a new version of CLAIRE: v3.3.26.
It fixes the bug reported by Sylvain (safety 1 => seg fault) and
includes a few goodies, since it turns out that I will not produce a
v3.4 soon:
(1) print_in_string can be called recursively, with no limits!
(2) MAX_INTEGER is defined
(3) the -os option is added to modify compiler.safety in the command
line
I also took Sylvain's correction for RANDOM on unix
Enjoy,
--- In claireprogramminglanguage@yahoogroups.com, ycaseau
<no_reply@y...> wrote:
> --- In claireprogramminglanguage@yahoogroups.com, "paidi_creed"
> <paidi_creed@y...> wrote:
> > Not quite as brief as the other ones but they do the job.
> >
> > Another question, is it possible to get a list representation of
> the
> > range of a table. I tried to cast the table to a list but got a
> > segmentation fault.
> >
>
> Hi,
>
> a couple of things:
>
> (1) getting a seg fault is a bug. If you can isolate your code
> please report it as a bug (clairebugs@y...) (unless you wrote a
> program and compiled it with safety 5 without runing it under the
> interpreter first :-) )
>
> (2) using table is fine, but have you considered using arrays ?
>
> (3) there is no easy code for converting a table into a list,
> especially because a table encapsulate various methods for storing a
> set of value, from a h-table to an array. You may look at the source
> code and start from the graph attribute of the table. If all you
> need is the set of values contained in the table (set of y for which
> there exists an x such that R[x] = y), you should be able to write
> this code yourself.
>
> Cheers,
>
> -- Yves
Thanks for the advice Yves. I don't think an array would do the job
here, I'm using the table as a dictionary. Would it be better to use
an array and a hash function instead
Thanks,
Paidi
--- In claireprogramminglanguage@yahoogroups.com, "paidi_creed"
<paidi_creed@y...> wrote:
> Not quite as brief as the other ones but they do the job.
>
> Another question, is it possible to get a list representation of
the
> range of a table. I tried to cast the table to a list but got a
> segmentation fault.
>
Hi,
a couple of things:
(1) getting a seg fault is a bug. If you can isolate your code
please report it as a bug (clairebugs@...) (unless you wrote a
program and compiled it with safety 5 without runing it under the
interpreter first :-) )
(2) using table is fine, but have you considered using arrays ?
(3) there is no easy code for converting a table into a list,
especially because a table encapsulate various methods for storing a
set of value, from a h-table to an array. You may look at the source
code and start from the graph attribute of the table. If all you
need is the set of values contained in the table (set of y for which
there exists an x such that R[x] = y), you should be able to write
this code yourself.
Cheers,
-- Yves
Hi,
you do not need to do anything. The unknown that you see is the last
result that is printed by the interpreter. If you print in a file,
or if you call your printing code many times, you will not see this
unknown.
To make things nicer at the top level, it is a good practice to end
your last print statement with a \n
Cheers,
-- Yves
--- In claireprogramminglanguage@yahoogroups.com, "paidi_creed"
<paidi_creed@y...> wrote:
> Hi,
>
> Whenever I use any of the print functions in CLAIRE the word
unknown
> is printed at the end of the output.
> Is this normal? Do I need to put in some instruction to say that I
am
> finished my output?
>
> for example,
>
> [test()
> -> let p := choco/makeProblem("Test Problem", 10),
> vars := list{choco/makeIntVar(p, "v", 1, i) | i in (2 ..
11)},
> obj := makeMapColouringObjective(list<integer>(1))
> in
> ( printf("This is a test")
> )
> ]
>
> gives
>
> gamecsp> test()
> eval[0]> This is a testunknown
> gamecsp>
>
> Thanks,
>
> Paidi
I solved my problem. I discovered make_table and used that to write
the methods
[makePreferencesObjective(prob:choco/Problem): PreferencesObjective
-> // Seed the random number generator with the size of the problem
random!(length(prob.vars)),
// Generate the preferences for each variable and return the objective
let prefTable := make_table(choco/IntVar, table, nil)
in
( for var in prob.vars
( //prefTable[var] := makePreferenceList(var),
//self_print(prefTable[var] as list<integer>)
self_print(makePreferenceList(var))
),
PreferencesObjective(preferences = prefTable)
)
]
// Return a list with a random number between 0 and domain size less 1
for each value
// in the domain of the variable.
[makePreferenceList(var:choco/IntVar) : table
-> let scores := make_table(integer, integer, 0),
domainSize := choco/getDomainSize(var)
in
( printf("Generating preferences for variable ~S\n", var),
for val in choco/domainSet(var.choco/bucket)
( scores[val] := random(domainSize)
),
scores
)
]
Not quite as brief as the other ones but they do the job.
Another question, is it possible to get a list representation of the
range of a table. I tried to cast the table to a list but got a
segmentation fault.
Thanks,
Paidi
--- In claireprogramminglanguage@yahoogroups.com, "paidi_creed"
<paidi_creed@y...> wrote:
> Hi,
>
> I'm trying to implement an object representing an objective in a map
> colouring problem with a set of preferences for each colour at each
> node. I want to be able to have several objectives existing at the
> same time each with their own list of preferences.
>
> This requires a table[range = choco/IntVar, domain = table]
> and an inner table[range = integer, domain = integer]
>
> In the example for tables in the manual it uses
> square[x:(0 .. 20)] : integer := (x * x)
>
> this populates the table.
>
> Would it be possible to say
>
> [makePreferenceObjective(prob:choco/Problem) : PreferenceObjective
> -> preferenceTable[var:prob.vars] : table := makePreferenceList(var),
> PreferenceObjective(preferences = preferenceTable)
> ]
>
> where prob is the problem containing the variables to create a table
> mapping each variable in the problem to a table containing his
> preference for eahc value in that variables domain?
>
> Then can I write
>
> [makePreferenceList(var:choco/IntVar) : table
> -> scores[value: {set of values in the domain}] : integer :=
> random(choco/getDomainSize(var))
> ]
>
> to return a mapping from each value in the variables domain to a
> random number?
>
> When I try to run this I get error message the symbol var is unbound
> and if I just try to run makePreferenceList
> I get an error that value is unbound.
>
> I ran the example in the manual by typing it in to the interpreter and
> it worked fine.
> Am I doing something wrong when I use it inside my own methods.
>
> Thanks,
>
> Paidi
Hi,
I'm trying to implement an object representing an objective in a map
colouring problem with a set of preferences for each colour at each
node. I want to be able to have several objectives existing at the
same time each with their own list of preferences.
This requires a table[range = choco/IntVar, domain = table]
and an inner table[range = integer, domain = integer]
In the example for tables in the manual it uses
square[x:(0 .. 20)] : integer := (x * x)
this populates the table.
Would it be possible to say
[makePreferenceObjective(prob:choco/Problem) : PreferenceObjective
-> preferenceTable[var:prob.vars] : table := makePreferenceList(var),
PreferenceObjective(preferences = preferenceTable)
]
where prob is the problem containing the variables to create a table
mapping each variable in the problem to a table containing his
preference for eahc value in that variables domain?
Then can I write
[makePreferenceList(var:choco/IntVar) : table
-> scores[value: {set of values in the domain}] : integer :=
random(choco/getDomainSize(var))
]
to return a mapping from each value in the variables domain to a
random number?
When I try to run this I get error message the symbol var is unbound
and if I just try to run makePreferenceList
I get an error that value is unbound.
I ran the example in the manual by typing it in to the interpreter and
it worked fine.
Am I doing something wrong when I use it inside my own methods.
Thanks,
Paidi
Hi,
Whenever I use any of the print functions in CLAIRE the word unknown
is printed at the end of the output.
Is this normal? Do I need to put in some instruction to say that I am
finished my output?
for example,
[test()
-> let p := choco/makeProblem("Test Problem", 10),
vars := list{choco/makeIntVar(p, "v", 1, i) | i in (2 .. 11)},
obj := makeMapColouringObjective(list<integer>(1))
in
( printf("This is a test")
)
]
gives
gamecsp> test()
eval[0]> This is a testunknown
gamecsp>
Thanks,
Paidi