-
Notifications
You must be signed in to change notification settings - Fork 5
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
Codom error when using rule with attribute variables #66
Comments
so the anonymous function that is used to assign values in |
Ah ok, thanks! So the length of the list for each |
@kris-brown posting another question here which is related. When trying to do the following rewrite I get an error related to computing the pushout complement. The specific example here is contrived, but it comes up when wanting to do a rewrite that updates a hom, but leaves all the other attributes/homs of something unchanged. Also, happy to contribute to the docs related to rewriting with attribute variables after all this! @present TestSch(FreeSchema) begin
X::Ob
Label::AttrType
x1::Attr(X,Label)
x2::Attr(X,Label)
end
@acset_type TestData(TestSch)
L = @acset TestData{Symbol} begin
X=1
Label=2
x1=[AttrVar(1)]
x2=[AttrVar(2)]
end
I = TestData{Symbol}()
R = @acset TestData{Symbol} begin
X=1
Label=2
x1=[AttrVar(1)]
x2=[AttrVar(2)]
end
l = only(homomorphisms(I, L, monic=true))
r = only(homomorphisms(I, R, monic=true))
rule = Rule(l, r, expr=(Label=[x1 -> first(x1), x2 -> last(x2)], ))
test = @acset TestData{Symbol} begin
X=1
Label=2
x1=[Symbol("a")]
x2=[Symbol("b")]
end
m = get_matches(rule, test)
test1 = rewrite_match(rule, m[1]) |
Here the error is |
Ah, user error! |
If I have an acset and one of the attribute types is being modeled as
Vector{String}
and I make a rewrite rule which is mapped to anotherVector{String}
as follows, I get the following errorERROR: Codom error: Any[Any[["start"], "rule"]] Vector{String} FinSet(0)
example:
The text was updated successfully, but these errors were encountered: