giucamp / liquid Goto Github PK
View Code? Open in Web Editor NEWC++ tensor symbolic algebra & compiler
License: Boost Software License 1.0
C++ tensor symbolic algebra & compiler
License: Boost Software License 1.0
Domains
A (scalar) range is composed by a lower bound, an upper bound, and two flags specifying whether bounds are inclusive or not.
Invariant: ranges are always canonicalized, that is: lower bound <= upper bound.
A domain is a union of ranges, stored in a vector.
Invariant: domains are always canonicalized, that is ranges are sorted and cannot overlap.
example of domain:
real x where 1 < x <= 2 || 4 <= x < 7
(two separated finite ranges)
real x where -inf <= x < 0 || 0 < x= < inf
(all numbers but 0)
Both Range and Domain should support
Domain Propagation
An expression can have a domain. All the scalars of the expression lie in the domain (in miu6 this is a corollary)
Every operator defines its way to compute a domain based on the domains of operands. For example:
corollary: Domain(x + y where 0 <= x <= 1 && 0 <= y <= 1) == (0 <= x + y <= 2)
the operator Domain returns the domain as bool expression.
Constant propagation
Operators can exploit the range of operands during constant propagation. For example :
x < 0 where x > 6
evaluates to:
false
Operators may trigger a panic whenever the range of an operand includes singularities.
For example:
Log(real x) where x > -1
should panic.
The pattern matching algorithm must be aware of associative and commutative operators
Tensor-to-string currently has a stub implmentation.
std::ostream & operator << (std::ostream & i_dest, const Tensor & i_tensor) { i_dest << "to_do"; return i_dest; }
It should output a minimal and canonical representation, that includes comments and tensor names.
Canonicalization can produce unaesthetic syntax tree, for example it transforms a / b to a * Pow(b, -1).
Tensor-to-string should use pattern matching to recognize common sentences, and transform them.
Also NatvisFile.natvis should implement a human friendly string-representation of tenors.
Operators have the capability of computing the gradient of an operand, given the gradient of itself
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.