Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set factories #10194

Closed
nthiery opened this issue Oct 31, 2010 · 87 comments
Closed

Set factories #10194

nthiery opened this issue Oct 31, 2010 · 87 comments

Comments

@nthiery
Copy link
Contributor

nthiery commented Oct 31, 2010

At Sage days 30, a long brainstorm seems to have finalized the design. Here is a excerpt from the documentation:

A set factory F is device, whose goal is to construct parent P
which models subsets of a big set S. Typically, the P s are constructed
within families obtained by putting a bunch of constraints cons on the
elements of the set S. In such a hierarchy of subsets, one needs to have a
fine and easy control on the elements construction. That is, one often needs
that P constructs elements in a subclass of its usual class for element. On
the contrary, one also often needs P to be a facade parent, meaning that P
construct element whose actual parent is not P itself.

The role of a set factory is twofold:

  • manage a database of constructors for the different parents P = F(cons)
    depending on the various kinds of constraints cons. Note: currently there
    is no real support for that. We are gathering use case before fixing the
    interface.

  • ensure that the elements e = P(...) created by the different parents
    follows a consistent policy concerning their class and parent.

The patch implement this idea while trying to leave as much as possible space
for further improvement. In particular, I tried to specify the few possible
things about constraints. I'm even not completely sure about add_constraints.
Please comment and review.

Florent

CC: @sagetrac-sage-combinat @hivert

Component: combinatorics

Keywords: factories, days30, Cernay2012, days57

Author: Florent Hivert

Branch/Commit: 763f93c

Reviewer: Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/10194

@nthiery
Copy link
Contributor Author

nthiery commented Oct 31, 2010

comment:1

Patch under development on the Sage-Combinat patch server.

@hivert

This comment has been minimized.

@hivert hivert changed the title Enumerated set factories Set factories May 9, 2011
@hivert
Copy link

hivert commented May 9, 2011

Changed keywords from none to factories, days30

@hivert
Copy link

hivert commented Feb 6, 2012

Changed keywords from factories, days30 to factories, days30, Cernay2012

@hivert hivert added this to the sage-5.0 milestone Feb 12, 2012
@hivert

This comment has been minimized.

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Apr 6, 2012

Work Issues: doctest failures

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Apr 6, 2012

comment:7

Attachment: trac_10194-factories_policy-fh.patch.gz

This fails doctests on every version tested -- see patchbot logs

@loefflerd loefflerd mannequin added s: needs work and removed s: needs review labels Apr 6, 2012
@hivert
Copy link

hivert commented Apr 6, 2012

comment:8

Replying to @loefflerd:

This fails doctests on every version tested -- see patchbot logs

I forgot a dependency to #10963. Thanks for pointing this out.

@hivert
Copy link

hivert commented Apr 6, 2012

Dependencies: #10963

@loefflerd
Copy link
Mannequin

loefflerd mannequin commented Apr 6, 2012

comment:9

There is no patch at #10963. I don't think this can be meaningfully tagged as "needs review" when one of its dependencies doesn't exist yet.

@loefflerd loefflerd mannequin added s: needs info and removed s: needs review labels Apr 6, 2012
@hivert
Copy link

hivert commented Apr 6, 2012

comment:10

Replying to @loefflerd:

There is no patch at #10963. I don't think this can be meaningfully tagged as "needs review" when one of its dependencies doesn't exist yet.

As you can see on #10963, the patch is far for being inexistent as Simon and Christian started to review it. Of course it is on the Sage-Combinat queue. I need to ping Nicolas to have him finish it. Now, I don't see why having Nicolas's patch unfinished forbid me to have some feedback on this one. And asking for such a feedback seems to be a perfectly meaningful reason for putting "needs review"... The only reason I can see for not doing it is that it can trouble the patchbot. Do you have another one ?

@nthiery
Copy link
Contributor Author

nthiery commented Apr 7, 2012

comment:11

Salut Florent!

Why is there a dependency on 10963? In the queue, this patch is much lower than 10963.

@nthiery
Copy link
Contributor Author

nthiery commented Apr 7, 2012

comment:12

Ah, I see, it's about the glitch Sets().Facade() <-> Sets().Facades().

Since anyway the patch is up the queue, I suggest we finish commuting the two patches. Just use Sets().Facades() (we will need to keep the backward compatibility anyway).

With that, the tests pass up to to trivially failing doctests:

File "/opt/sage-5.0.beta11/devel/sage-combinat/sage/structureset_factories.py", line 644:
    sage: P2.category()
Expected:
    Join of Category of facade finite enumerated sets and Policy category with facade parent AllPairs
Got:
    Join of Category of finite enumerated sets and Policy category with facade parent AllPairs
**********************************************************************
File "/opt/sage-5.0.beta11/devel/sage-combinat/sage/structure/set_factories.py", line 972:
    sage: P.category()
Expected:
    Join of Category of facade finite enumerated sets and Policy category with facade parent AllPairs
Got:
    Join of Category of finite enumerated sets and Policy category with facade parent AllPairs

Cheers,

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 8, 2015

Changed commit from 20f17b3 to 52550e0

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 8, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

52550e0Merge branch 'develop' into t/10194/public/ticket/10194

@fchapoton
Copy link
Contributor

comment:57

9 failing doctests, see patchbot report

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 12, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

ab1507cRe-reading set factories

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 12, 2015

Changed commit from 52550e0 to ab1507c

@hivert
Copy link

hivert commented May 12, 2015

comment:59

Replying to @fchapoton:

9 failing doctests, see patchbot report

Hi Frederic,

I should have fixed most of the problems (including comment 53). I still need a last pass of re-reading before putting it as needs review.

Florent

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 18, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

586248eVarious cleanup in the documentation

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 18, 2015

Changed commit from ab1507c to 586248e

@hivert
Copy link

hivert commented May 18, 2015

comment:61

This should be ready for review

Florent

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

763f93cMerge tag '6.7' into t/10194/factories_policy

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 19, 2015

Changed commit from 586248e to 763f93c

@fchapoton
Copy link
Contributor

comment:63

Was there any need for a merge ?
By the way, I usually do the merge in the other direction. This gives much smaller commits,
as you can see in the commit list.

@fchapoton fchapoton modified the milestones: sage-6.4, sage-6.8 May 19, 2015
@hivert
Copy link

hivert commented May 19, 2015

comment:64

Replying to @fchapoton:

Was there any need for a merge ?
By the way, I usually do the merge in the other direction. This gives much smaller commits,
as you can see in the commit list.

No there wasn't, but my goal is to update trees to use factories and ultimately to do computation in operads. As you merged 6.7 in operads I also merged this one to avoid going back and forth.

There is not diff before and after the merge so that you can review on the unmerged version.

@fchapoton
Copy link
Contributor

comment:65

ok, let this get in. There are several combinatorial tickets on top of it.

@fchapoton

This comment has been minimized.

@fchapoton

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Aug 1, 2015

Changed branch from public/ticket/10194 to 763f93c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants