ixjf / logic-rs Goto Github PK
View Code? Open in Web Editor NEWA parser of relational predicate logic & truth tree solver, written in Rust.
Home Page: https://ixjf.github.io/logic-rs/
License: MIT License
A parser of relational predicate logic & truth tree solver, written in Rust.
Home Page: https://ixjf.github.io/logic-rs/
License: MIT License
Around 5MB right now. Mostly fonts, I guess. Any way I can remove them if I don't need them?
Since the algorithm doesn't foresee any patterns and always follows the same rules in the same order, some inputs may lead to trees that become stuck in an infinite EQ->UQ cycle. No clue how to solve. Haven't given it much thought yet. I mean, if it ends up in an infinite cycle, then the tree is open. The problem is: how do I know if I'm in an infinite loop?
Specific instances where it fails:
(∀x)(L¹x ⊃ (∃y)(F¹y & (∃z)(T¹z & P³xyz))),
(∃x)(L¹x)
∴ (∃x)(F¹x & (∃y)(T¹y & (∃z)(L¹z & P³zxy)))
{∀x((A¹x & B¹x) ⊃ ∀y(~C¹y ⊃ ∃z(A²zy & B¹z)))}
∀x(S¹x ⊃ (∃y)(F¹y & M²xy)),
F¹b
∴ ∃x(S¹x & H²bx)
∃x(C¹x & ~(∃y)(G¹y & E²xy))
TextEncoder is not supported (necessary for rustwasm).
There is a redundant if check there.
The call is there because for some reason without it the tree doesn't appear, but it should be unnecessary because the tree is automatically redrawn when resizing the container of the canvas.
CodeMirror seems to be keeping the text input via keyboard selected, so clicking on one of the editor toolbar's buttons replaces the text rather than append. Only happens on mobile.
& whatever is needed for docs.rs
...and then add docs.rs and crates.io badges to the README.
Take out all the arguments/statement sets/statements that are in the solutions of Meaning and Argument and Formal Logic and have a truth tree or whose validity/consistency/whatever is known to serve as integration tests and examples of how the library works.
While not a part of Meaning and Argument, it can be handy, writing the same thing twice is not nclean especially if it's a long expression.
∀x∀y(R²xy ⊃ ~R²yx)
∴ ~∀x∀y(R²xy ⊃ R²yx)
∀x((P¹x & B¹x) ⊃ ∀y((P¹y & O¹y) ⊃ H²xy)),
P¹e
∴ ∀x((P¹x & B¹x) ⊃ H²xe)
(∀x)(S¹x ⊃ (∀y)(A¹y ⊃ (∀z)(T¹z ⊃ (S³xyz ⊃ ~F²xz))))
∴ (∀x)(∀z)((S¹x & ((∃y)(A¹y & T¹z & S³xyz))) ⊃ ~F²xz)
∀x(A ⊃ B)
Tested Chrome and Samsung Internet. Need to try to reproduce on PC.
vis.js currently requires rendering the tree multiple times to position it accurately. It also requires hacks to work for this particular type of tree, and it sometimes overlaps nodes. A custom renderer could easily solve all of these problems.
In TruthTree.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.