
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
Zebrajs is a symbolic computation query system, given a set of computational definitions it will answer questions about them, therefor Zebrajs is better suited for software validation and constraint satisfaction problems.
Zebrajs system consists of two parts the definitions and the query, both parts share the same language of zebra-system terms, which is defined by a certain formal syntax, and a set of transformation rules.
The zebra language is very simple, it only has constants, variables, tuples and negation.
A math function can be represented as a set of tuples, so on zebra language you can think of tuples has functions, for example, the binary function and:
Where operatar & can be defined as a table:
On zebra language we define such function like this:
The 0, 1, & and = are just simbols (constants) and have no meaning to zebra-system, when we perform the query:
zebra-system is going to match query with all definitons and will unify variables 'p, 'q and 'r with the values found, on this example we will get the all & table.
So if we do another query like this:
All symbol can be variables, lets define another function:
Now we ask the system what operations would give us the result of 1: ?('p 'o 'q = 1), and the result would be:
Now lets make a query with a negation:
On this query the negation is ^('p & 'q = 1), all negations starts with ^, they always negate a tuple, and they are hidden witch means they are considered for unification.
So the result of this query would be:
So we are excluding (1 | 1 = 1) because ^(1 & 1 = 1) exists, witch means negation doesn't fail and so it can't be true.
This are the basics of zebra-system, but because its hard to explain how it works, I will do it with more examples:
Try it online: https://fsvieira.github.io/raindropz/ (Raindropz IDE git: https://github.com/fsvieira/raindropz)
Definitions, are considered facts they are always tuples and always global.
Queries, are questions to the system definitions (facts),
Queries, may also be inner tuples of queries or definitions
Negation, its true if a negated query doesn't exist, negation queries are hidden and are not considered for unification,
Thats it.
The is a new repository that contains zebrajs examples and a console program to run them.
https://github.com/fsvieira/zebrajs-examples
A great source of examples are the test file https://github.com/fsvieira/zebrajs/tree/master/test
FAQs
variable constrain lib
We found that zebrajs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.