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

Node- and edge-attribute support in DSL #16

Closed
j6k4m8 opened this issue Jan 29, 2019 · 2 comments
Closed

Node- and edge-attribute support in DSL #16

j6k4m8 opened this issue Jan 29, 2019 · 2 comments
Labels
DSL enhancement New feature or request

Comments

@j6k4m8
Copy link
Member

j6k4m8 commented Jan 29, 2019

Proposed syntax concepts:

Nodes

Inline maplike:

Node1 { type="GABA", z<12 } -> Node2

Pros:

  • Succinct

Cons:

  • Possible duplication or conflicting attributes if map is included on multiple lines for the same node

Postfix where-like:

Node1 -> Node2 | Node1.type = "GABA", Node1.z < 12

Pros:

  • Succinct

Cons:

  • Possible duplication or conflicting attributes if attrs are included on multiple lines for the same node

Footnote constraints

Node1 -> Node2

Node1.type = "GABA"
Node1.z < 12

Pros:

  • Reduces possibility of conflicting constraints
  • Clear syntax; can be standalone in its own macro

Cons:

  • Linecount verbose
  • Decouples attributes from connectivity clauses

Edges

Inline maplike:

A ->{type: "excitatory", neurotransmitter: "ACh"} B

Pros:

  • Inline

Cons:

  • Reduces clarity of language

Postfix where-like:

A -> B | [type: "excitatory", neurotransmitter: "ACh"]

Pros:

  • Inline

Cons:

  • Reduces clarity of language

Infix maplike:

A -[type: "excitatory", neurotransmitter: "ACh"]> B

Pros:

  • Inline

Cons:

  • Reduces clarity of language
@j6k4m8 j6k4m8 added enhancement New feature or request DSL labels Jan 29, 2019
@j6k4m8 j6k4m8 changed the title Node attribute support in DSL Node- and edge-attribute support in DSL Jan 29, 2019
@j6k4m8
Copy link
Member Author

j6k4m8 commented Jan 29, 2019

Example of a collision:

macro(x, y) {
    x -> y [type == 1 && area >= 15]
    
    x.type = "ACh"
}

macro(A, B)
A -> B [ type: 2 ]

A.type = "Glu"

This was referenced Jan 30, 2019
@j6k4m8
Copy link
Member Author

j6k4m8 commented Feb 6, 2019

Fixed in #19

@j6k4m8 j6k4m8 closed this as completed Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DSL enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant