Comments (5)
Yeah! That would be the natural way of supporting intermediate options between the two extremes, kind of like how the monic
keyword in hom search can be boolean or a vector of Ob symbols.
from catlab.jl.
Ok, the keyword is now abstract=[:Name]
(or abstract=false
) for your example. Let me know how it works out for you!
from catlab.jl.
@kris-brown thanks! I am trying it out. Looks great! So, just to be clear, the default behavior when abstract
is not given is as before, when giving abstract=false
we insist on exact agreement of attribute values for all AttrTypes
, and when we give a vector, those AttrTypes
in the vector follow the previous behavior, and those not listed in the vector follow exaxt agreement on attribute behavior? Anyway, I think this is good to close.
julia> subobj = only(maximum_common_subobject([L,R], abstract=false))
julia> subobj[1]
MarkedLabelledPetriNet{Symbol} {T:0, S:1, I:0, O:0, M:1, Name:0}
┌───┬───────┐
│ S │ sname │
├───┼───────┤
│ 1 │ I │
└───┴───────┘
┌───┬───┐
│ M │ m │
├───┼───┤
│ 1 │ 1 │
└───┴───┘
from catlab.jl.
we want
sname
to be:I
in the common subobject
I don't know how to make sense of this as written, as there could be any number of S
elements in the overlap ACSet, which you don't know ahead of time.
My first thought is that a boolean keyword argument could be added to control whether or not the apex of the overlap span should have only AttrVars or attributes. The former is the current behavior, which allows us to find common structure completely ignoring attribute values. The latter is the other extreme, requiring exact agreement on attribute values. Would this work for you?
My second thought is that the rewrite rules that come out of this will still work, even if there is an AttrVar in the intermediate I
ACSet (with concrete :I
attributes in the L
and R
ACSets).
While playing around with your example I noticed an unrelated issue with maximum_common_subobject
, where it can sometimes unexpectedly change the order of the feet of the resulting span, which I'll create a different issue for.
from catlab.jl.
Hi @kris-brown thanks for checking this out!
Yes ignore that, it was poorly written. What I meant to say was that it would be nice to somehow be able to insist on exact agreement on attribute values in some cases, such that the span maximum_common_subobject
returns would have an acset with sname = :I
in this specific case.
Yeah, that idea sounds really good. Would it be possible to independently select from these two behaviors for each attribute?
from catlab.jl.
Related Issues (20)
- Integrate ACSets.NautyInterface
- Reexport GATlab from Catlab
- VarFunction Serialization
- Fix an empty tuple problem ahead of Julia 1.10
- GATs are missing from API docs
- Warnings about cross references from docs build
- Move from JSON.jl to JSON3.jl
- Maximum_common_subobject changes ordering
- Better graphviz support for bipartite graphs HOT 1
- Refactor FinSets from FinSetImpls, etc
- Add features to VM based hom search
- Ambiguities detected from Aqua
- Question about abstract vs. concrete type in `enumerate_paths` HOT 2
- `SigmaMigrationFunctor` method uses an undefined variable HOT 2
- Bug in `product` keyword arguments
- free-floating URLs not parsed well by documenter HOT 1
- Coproduct with looseACSetTransformations HOT 2
- Parameters in queries for attributes that are unions HOT 3
- Keyword argument for sending attrvars to other attrvars
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from catlab.jl.