From 43cec11a0bccb68e43aed177879f9aaee7e36859 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sat, 24 Feb 2024 02:55:01 +0000 Subject: [PATCH] build based on 9244d34 --- dev/.documenter-siteinfo.json | 2 +- dev/ADTs/index.html | 2 +- dev/api/index.html | 2 +- dev/generated/ADTs/index.html | 2 +- dev/generated/json_serialization/index.html | 2 +- dev/index.html | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 6cb799a..c8b4c8b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-17T00:44:02","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-24T02:54:57","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/ADTs/index.html b/dev/ADTs/index.html index 083288d..89a0836 100644 --- a/dev/ADTs/index.html +++ b/dev/ADTs/index.html @@ -1,2 +1,2 @@ -Specification Language · ACSets.jl

Library Reference

The ACSet Specification module with ADTs. This module is not rexported as the function names have not fully stabilized.

ACSets.ADTs.acsetspecMethod
acsetspec(head::Symbol, body::Expr)

processes a Julia Expr specifying the ACSet construction into a the ADT representation. Approximate inverse to show

source
ACSets.ADTs.label2indexMethod
label2index(s::ACSetSpec)

replace symbolic identifiers in an ACSet spec with the indices that have that label. This function assumes that all labels are globally unique across tables. So prefix them with the table name if you want scopes. It also assumes that you don't have any other attributes of type symbol, so use strings instead.

source
ACSets.ADTs.to_dictMethod
to_dict(s::ACSetSpec)

generates a dictionary representation the ACSetSpec (or any sub-term). This dict should be serializable with JSON.json.

source
Base.showMethod
show(io::IO, s::AbstractACSetSpec)

generates a human readable string of the ACSetSpec (or any sub-term).

source
+Specification Language · ACSets.jl

Library Reference

The ACSet Specification module with ADTs. This module is not rexported as the function names have not fully stabilized.

ACSets.ADTs.acsetspecMethod
acsetspec(head::Symbol, body::Expr)

processes a Julia Expr specifying the ACSet construction into a the ADT representation. Approximate inverse to show

source
ACSets.ADTs.label2indexMethod
label2index(s::ACSetSpec)

replace symbolic identifiers in an ACSet spec with the indices that have that label. This function assumes that all labels are globally unique across tables. So prefix them with the table name if you want scopes. It also assumes that you don't have any other attributes of type symbol, so use strings instead.

source
ACSets.ADTs.to_dictMethod
to_dict(s::ACSetSpec)

generates a dictionary representation the ACSetSpec (or any sub-term). This dict should be serializable with JSON.json.

source
Base.showMethod
show(io::IO, s::AbstractACSetSpec)

generates a human readable string of the ACSetSpec (or any sub-term).

source
diff --git a/dev/api/index.html b/dev/api/index.html index d7f183f..c0f221a 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,2 +1,2 @@ -Library Reference · ACSets.jl
+Library Reference · ACSets.jl
diff --git a/dev/generated/ADTs/index.html b/dev/generated/ADTs/index.html index 7db9bee..b8c3739 100644 --- a/dev/generated/ADTs/index.html +++ b/dev/generated/ADTs/index.html @@ -109,4 +109,4 @@ E(src=2,tgt=3) end

The acsetspec function is a good example of embedding your custom language into Julia syntax That save you the trouble of writing your own lexer and parser for your custom language.

construct(LabeledGraph{Symbol}, hspec) == construct(LabeledGraph{Symbol}, gspec)
true

You can export your specification to a dictionary and put that dictionary into a JSON document this gives you a nice way of serializing the ACSet that is machine readable and row oriented. The ACSet serialization is by column oriented which might be inconvenient for your consumers.

to_dict(gspec)
Dict{Symbol, Any} with 2 entries:
   :type => "LabeledGraph{Symbol}"
-  :data => Dict{Symbol, Any}[Dict(:table=>:V, :fields=>Dict(:label=>:a)), Dict(…
+ :data => Dict{Symbol, Any}[Dict(:table=>:V, :fields=>Dict(:label=>:a)), Dict(… diff --git a/dev/generated/json_serialization/index.html b/dev/generated/json_serialization/index.html index c964446..7d6cb9a 100644 --- a/dev/generated/json_serialization/index.html +++ b/dev/generated/json_serialization/index.html @@ -45,4 +45,4 @@ lg = VELabeledGraph{Symbol}() add_parts!(lg, :V, 4, vlabel=[:a, :b, :c, :d]) -add_parts!(lg, :E, 2, src=[1,2], tgt=[2,3], elabel=[:e₁, :e₂])
1:2

This Graph is represented by the following JSON. Now you can see that the vertices have their vlabels

JSON3.print(generate_json_acset(lg), 2)
OrderedCollections.OrderedDict{Symbol, Any}(:V => @NamedTuple{_id::Int64, vlabel::Symbol}[(_id = 1, vlabel = :a), (_id = 2, vlabel = :b), (_id = 3, vlabel = :c), (_id = 4, vlabel = :d)], :E => @NamedTuple{_id::Int64, src::Int64, tgt::Int64, elabel::Symbol}[(_id = 1, src = 1, tgt = 2, elabel = :e₁), (_id = 2, src = 2, tgt = 3, elabel = :e₂)], :Label => @NamedTuple{_id::Int64}[])2
+add_parts!(lg, :E, 2, src=[1,2], tgt=[2,3], elabel=[:e₁, :e₂])
1:2

This Graph is represented by the following JSON. Now you can see that the vertices have their vlabels

JSON3.print(generate_json_acset(lg), 2)
OrderedCollections.OrderedDict{Symbol, Any}(:V => @NamedTuple{_id::Int64, vlabel::Symbol}[(_id = 1, vlabel = :a), (_id = 2, vlabel = :b), (_id = 3, vlabel = :c), (_id = 4, vlabel = :d)], :E => @NamedTuple{_id::Int64, src::Int64, tgt::Int64, elabel::Symbol}[(_id = 1, src = 1, tgt = 2, elabel = :e₁), (_id = 2, src = 2, tgt = 3, elabel = :e₂)], :Label => @NamedTuple{_id::Int64}[])2
diff --git a/dev/index.html b/dev/index.html index f85862f..8f5b0ea 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -ACSets.jl · ACSets.jl

ACSets.jl

Acsets ("attributed C-sets") are a family of data structures generalizing both graphs and data frames. They are an efficient in-memory implementation of a category-theoretic formalism for relational databases.

ACSets.jl is a lightweight package that provides

  • data structures for acset schemas, acsets, and tabular columns
  • serialization of acset schemas and acsets

Catlab.jl extends this package to offer many more features, beginning with homomorphisms between acsets and including limits and colimits of acsets, functorial data migration, and automated homomorphism finding. AlgebraicRewriting.jl goes further still to provide declarative rewriting for acsets.

Citation

The ideas behind this package are described in the paper:

Patterson, Lynch, Fairbanks. Categorical data structures for technical computing. Compositionality 4, 5 (2022). arXiv:2106.04703. DOI:10.32408/compositionality-4-5.

+ACSets.jl · ACSets.jl

ACSets.jl

Acsets ("attributed C-sets") are a family of data structures generalizing both graphs and data frames. They are an efficient in-memory implementation of a category-theoretic formalism for relational databases.

ACSets.jl is a lightweight package that provides

  • data structures for acset schemas, acsets, and tabular columns
  • serialization of acset schemas and acsets

Catlab.jl extends this package to offer many more features, beginning with homomorphisms between acsets and including limits and colimits of acsets, functorial data migration, and automated homomorphism finding. AlgebraicRewriting.jl goes further still to provide declarative rewriting for acsets.

Citation

The ideas behind this package are described in the paper:

Patterson, Lynch, Fairbanks. Categorical data structures for technical computing. Compositionality 4, 5 (2022). arXiv:2106.04703. DOI:10.32408/compositionality-4-5.