Comments (5)
When this is done, it might be a nice idea to integrate a way to simplify protocols (normal forms are probably useful for this). This would then also allow us to check whether a newly created protocol isn't just the same as an older one.
from elm-gossip.
https://package.elm-lang.org/packages/annaghi/dnd-list/latest/
from elm-gossip.
This'll also end up fixing #24 when I implement the package I mentioned above
from elm-gossip.
(These are basically some notes for myself)
I have a rough draft for a drag-'n-drop system for boolean combinations of gossip protocol constituents that I think is pretty neat, but it needs:
- validation (so
A ∧ B ∨ (C ∧ D)
is valid, butA ∧ ∨ (C ∧ D)
is not)- All constituents or groups must be separated by
And
orOr
- Groups should not contain singletons (so don't allow (or at least warn against)
(A) ∧ (B) ∧ ((C))
- Don't allow groups to self-nest by dragging
- All constituents or groups must be separated by
- (Possibly) valuation checking to warn against (some) constructions that are impossible, e.g.
A ∧ ¬A
- conversion (i.e. parsing) to usable protocol
- A way to make groups (i.e. stuff in parentheses) draggable, probably with drag handles
- A way to restrict grouping depth, so people don't start making protocols like
(A ∧(A ∧(A ∧(A ∧(A ∧(A ∧(A ∧(A ∧(A ∧ B))))))))
– that's hard to render
Then, I need to convert the current predefined protocols to the new format.
Currently, I'm using the following type:
type BoolElement
= And
| Or
| Token Bool Constituent
| Group Bool (List BoolElement)
The Bool
s are negation parameters, so Token True IsEmpty
would mean σₓ = ϵ and Token False IsEmpty
would mean σₓ ≠ ϵ (or ¬(σₓ = ϵ))
Based loosely on the following LL(1) grammar:
Expression -> Token Expression'
Expression' -> or Token Expression' | ε
Token -> Final Token'
Token' -> and Final Token' | ε
Final -> Negation Final'
Negation -> not | ε
Final' -> ( Expression ) | constituent
Note that the use of Group
makes parsing a lot easier. Also, by constraining the type and allowing only certain modifications in the interface, it should be possible to use the validation step to make sure parsing is possible, using a couple of relatively simple rules.
from elm-gossip.
Plan for the showable version: Add a note saying that this is in progress w/ a link to (the cleaned up version of) a live version of the repository mentioned above, and include it in the query as a hypothetical
from elm-gossip.
Related Issues (20)
- Check validity of possible calls for protocols HOT 1
- Fix `isSequencePermitted` function
- Add examples + update text
- Export options HOT 1
- Add help page HOT 1
- Generate execution tree HOT 1
- Call sequence incorrectly not permissible for ANY (still)
- Input validation is too strict
- Clicking a call in the list of possible calls should execute that call
- Information about the graph should be explained more clearly
- Errors show up too quickly when typing in the input fields
- Impossible secret distributions are allowed HOT 1
- Add section on related work
- Successfulness
- Execution tree rendering sometimes looks weird
- Make sure title attributes are set where relevant
- State history
- Show version number in GUI
- Protocol editor is a bit intimidating HOT 1
- App should be usable on mobile devices
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 elm-gossip.