[Gecode] Namespaces

Christian Schulte schulte at imit.kth.se
Mon Jul 12 15:11:07 CEST 2004


A good starting point. I have some comments though:

- Is a namespace for the Kernel needed? I don't think so.
- Iterators: I think the implementation for the rangelists proper should not
be part of the generic iterators as it depends on the kernel (memory
management!). So here should only go the iterator combinatoirs which are
truly generic,
- Views versus variables: here there are three different kinds
	+ Variable Implementations (subcalss of Variable, currently called
core)
		We should call them Variable (for variable implementations)
			Gecode::Int::Variable
	+ Views
		We should call them views, for example
			Gecode::Int::View::Base
			Gecode::Int::View::Constant
			Gecode::Int::View::Offset
			...
	+ Modelling variables (currently and wrongly the same as views)
			Maybe put them on the toplevel (under Gecode?)
			Gecode::IntVar
			Gecode::BoolVar
			Gecode::SetVar
- Similarly, also the arrays need reconsideration. We need to distinguish
arrays used as
	+ Arguments			Gecode::IntVarArgs
					Gecode::BoolVarArgs
					Gecode::IntArgs
	+ Used in propagtors	Gecode::Int::ViewArray<View>
	+ Used in models		Gecode::IntVarArray
					Gecode::BoolVarArray
					...


Anything else?

Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: gecode-bounces at ps.uni-sb.de [mailto:gecode-bounces at ps.uni-sb.de] On
Behalf Of Guido Tack
Sent: Wednesday, July 07, 2004 4:06 PM
To: Technical Discussions about Gecode
Subject: [Gecode] Namespaces


Hi.

Attached to this mail you find a diagram showing a possible reorganization
of 
the namespaces in Gecode. This won't solve our problems with the API,
though: 
A Gecode user should see a special variable view (which doesn't allow
posting 
basic constraints or messing up the variable in any other way), propagator 
post functions, and the usual Space interface. Gabor and I came to the 
conclusion that, with our current design, we cannot really enforce this, the

user will always be able to mess things up if he really wants to. So the 
namespaces will give a hint on which interfaces one should use and which one

shouldn't touch.

Comments?

-- 
Guido Tack
Programming Systems Lab
http://www.ps.uni-sb.de/~tack





More information about the gecode-users mailing list