Coder Social home page Coder Social logo

Comments (1)

ArielG-NV avatar ArielG-NV commented on June 3, 2024

How abstract atoms work:

  • abstract: an abstract capability does not introduce an actual atom. Primarily used to
    make disjunctions using the following rules:
    1. Each type of abstract atom defines a "keyhole". target and stage are distinct "keyholes".
    2. Any atom immediately derived off of an abstract atom is a "keyAtom".
    3. Every conjunction may only populate each "keyhole" once, else the set is incompatible.
      • If joining ('+') incompatible sets, an invalid capability is made.
      • If Inclusive joining ('|') incompatible sets, a disjunction is made.
    4. ex: hlsl + glsl both populate the same "keyhole" of target, this is incompatible.
    5. ex: hlsl + _sm_6_0 both populate same keyholes of hlsl and hlsl, this is compatible.
    6. ex: hlsl | glsl creates a disjunction of 2 sets: hlsl and glsl. This is due to the
      2 sets being incompatible.
    7. Having a not populated "keyhole" means your set is compatible with any "keyAtom" of
      distinct "keyhole".
    8. ex: vertex + glsl works because 'vertex' has a unpopulated target "keyhole", and
      therefore is compatible with all target "keyAtoms"

Changes:

  1. We will allow an inclusive join
  2. behavior of union will be modified

operators:
+: 'join', precedence = 0

  • LS and RS add all elements together. Incompatible sets being joined will result with a empty set. If LS and RS are fully incompatible, error.
  • glsl + hlsl => glsl | hlsl
  • glsl + EXT => glsl + EXT
  • glsl + hlsl + glsl => glsl
  • _sm_6_5 + fragment + vertex => err
    • notice: fragment + vertex => incompatible, try splitting this into alias tmp = fragment | vertex _sm_6_5+tmp
  • GL_1 + GL_2 + fragment | GL_1 + GL_3 + fragment; => err
    • error since you are union'ing disjoint sets
  • GL_1 + GL_2 + fragment | GL_1 + fragment; => GL_1 + GL_2 + fragment
    • notice: set 1 is not disjoint from set2, set1 is a super set. This is allowed and compacted into 1 set due to how JOIN works.

|: 'inclusive join', precedence = 1

  • This is a inclusive join of sets. Left operand will join with all conjunction sets on the right operand through distribution. Incompatible sets will be added as is.
  • glsl + EXT1 | glsl + EXT2 => glsl + EXT1 + EXT2
  • _sm_4_1 |& _sm_4_0 + compute_fragment => _sm_4_1 + fragment | _sm_4_1 + compute
    • notice: set{_sm_4_1} distributes into set{_sm_4_0 + compute_fragment}.
  • SPV_EXT_1 | glsl | SPV_EXT2 | SPV_EXT3 => SPV_EXT_1 + SPV_EXT2 + SPV_EXT3 | glsl.

note: precedence follows arithmetic evaluation rules 'left to right'.

from slang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.