whitemech / hoa-utils Goto Github PK
View Code? Open in Web Editor NEWUtilities for the HOA format.
Home Page: https://whitemech.github.io/hoa-utils/
License: GNU Lesser General Public License v3.0
Utilities for the HOA format.
Home Page: https://whitemech.github.io/hoa-utils/
License: GNU Lesser General Public License v3.0
Write first version of a documentation before release 0.1.0
.
As a first step, make the main README.md
richer (e.g. adding brief description, code snippets etc.)
Have a look at cpphoafparser
and jhoafparser
to check whether we do comply to their CLI interface and whether we could support similar functionalities.
I was trying to parse the aut3.2.hoa automaton included in tests/examples, but I found inconsistencies in the grammar definition of label expressions.
In particular, the first transition label is [!0 & !1]
has to be parsed as the conjunction of two negated atoms. Instead, it's parsed as the negation of a conjunction of one atom and a negated atom, which is wrong. The same happens for the third transition label [!0 & 1]
.
I think the problem is a matter of operator precedence in the grammar (i.e. the precedence of negation wrt conjunction).
For reproducibility, below you can find a test snippet:
def test_hoa_body(self):
"""Test that the HOA body is correct."""
state_edges_dict = OrderedDict({})
state_edges_dict[State(0)] = [Edge([0],
label=AndLabelExpression([NotLabelExpression(AtomLabelExpression('0')),
NotLabelExpression(AtomLabelExpression('1'))])),
Edge([0],
label=AndLabelExpression([AtomLabelExpression('0'),
NotLabelExpression(AtomLabelExpression('1'))]),
acc_sig=frozenset({0})),
Edge([0],
label=AndLabelExpression([NotLabelExpression(AtomLabelExpression('0')),
AtomLabelExpression('1')]),
acc_sig=frozenset({1})),
Edge([0],
label=AndLabelExpression([AtomLabelExpression('0'),
AtomLabelExpression('1')]),
acc_sig=frozenset({0, 1}))]
hoa_body = HOABody(state_edges_dict)
assert self.hoa_body == hoa_body
Thanks!
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.