-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: Validation and valid
expressions
#944
Comments
Feel free to contribute the docs. I remember I am using this feature for pretty long time. |
This is awesome. I didn't spend much time looking into the code. Is a "reverse solver" in service for valid-expressions to yield imperative meaning? This would be great! And definitely a useful replacement for an exception throwing mechanism. If so, I'll adjust the text for my following documentation PR. |
I don't fully understand what you mean. Do you mean serialization? Automatic serialization is not yet implemented. |
Yes, I meant using Generally, formula satisfaction is difficult because predicate logic satisfaction complexity is in PSpace but I believe most practical cases are not worst-case complex. All types in Kaitai-Struct are finite at a point of time so that it is decidable at runtime. |
It is one of the long-term goals to automatically derive serialization code. See #27 for more info. |
I forked Kaitai Struct Doc and pushed my branch to it. What do I need to do now? Here it is: New branch name is Btw, I didn't succeed in building the doc with Makefile because of missing |
Yes, a complicated topic. But it's possible at the moment to just save the Kaitai struct representation to a file and throwing an exception if it doesn't verify the parsing rules, right? |
Currently serialization to some very minor extent is implemented only for Java target (if I remember right - in a separate branch) + python Construct library has something like that, and there is a target for emitting code for Construct. But IDK if dependencies between fields are implemented and I guess they are not, so if you modify an array which length is |
In an internet search I found the Github issue that proposed the
valid
key and looked into the code to ensure it is there.I used
valid
to ensure that a file offset is 16-byte aligned. (Btw, if there is a way of doing it in an imperative manner, please tell me.)Is the lacking documentation intended, because experimental feature, or could people just try to PR addtions to the documentation?
At the moment, there are five specific expression keywords used in ValidationSpec.scala :
min
,max
,eq
,any-of
,expr
.The text was updated successfully, but these errors were encountered: