Comments (3)
First, a comment about design. Coincidentally, Mike Shulman has recently published a preprint about a type theory for symmetric monoidal categories. There is a lot going on there, much of which I haven't fully understood, but the discussion in Section 1 is good food for thought.
One relevant issue that Shulman raises is how to deal with monoidal products in the codomain. Suppose you have morphisms f: W -> X x Y and g: X x Y -> Z. How do you write the composite of f with g? Shulman proposes an indexing notation inspired by Sweedler notation, but I think in Julia it will be more natural to write
x, y = f(w)
g(x,y)
(in the spirit of what Shulman calls "covariables") or simply
g(f(w))
Ordinarily, in Julia, only one of these invocations would be allowed. This is the difference between g(x,y)
and g((x,y))
. For the purpose of parsing Julia programs into morphisms, I think we should allow both. We can do so unambiguously because the morphisms are statically typed. If I understand correctly, Shulman also allows both styles of composition, albeit using the Sweedler notation (see the last two term constructors in Fig 4).
Apart from this subtlety about multiple outputs, and a similar one about nullary outputs (monoidal units), I think we can stick to the ordinary semantics of Julia code.
from catlab.jl.
One way to implement this is to rewrite the Julia program so that:
- variables carry ports in a wiring diagram
- function calls create a new box and return its output ports.
The program can then be executed by the Julia run-time and the result will be a wiring diagram.
from catlab.jl.
This issue is now mostly resolved. The only outstanding feature is recovering morphism expressions from traditional expression trees (Formula
), but I'll defer that to another issue.
from catlab.jl.
Related Issues (20)
- Preferred arrow directions in models of composite objects
- Overlap Maps is not an iterator HOT 2
- Slow construction of `SymmetricGraph`.
- The Chase with domain attributes
- Schema for schemas
- Uniqueness of names in schemas HOT 2
- Migrate FinSet types to ACSets.jl
- Migrate `@relation` to use the ADT approach
- ACSetTransformation mapping attributes to nothing in StockFlow.jl no longer works after upgrading to Catlab 15 HOT 4
- Migrations with code HOT 1
- Develop a KnowledgeGraph Engine on top of CatElements
- Spin out DataMigrations.jl HOT 2
- Sketches via data migrations
- More features for migration action on morphisms
- `NamedGraph` and presentations HOT 2
- Docs Warnings HOT 1
- Compute colimit of empty diagram for DynamicACSets HOT 1
- Integrate ACSets.NautyInterface
- Reexport GATlab from Catlab
- VarFunction Serialization
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.