Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I played around with Z3 after reading the excellent tutorial at https://www.rise4fun.com/Z3/tutorial. But now I would like to get an overview over all commands available in Z3's dialect of SMTLIB2.
Unfortunately I only found reference manuals for the different languages bindings, but not for SMTLIB2 itself.
You can read all about SMTLib in http://smtlib.cs.uiowa.edu/
In particular, the document http://smtlib.cs.uiowa.edu/papers/smt-lib-reference-v2.6-r2017-07-18.pdf is the "official" document on all SMTLib commands.
For logics, you want to browse: http://smtlib.cs.uiowa.edu/logics.shtml
Now, this document is not Z3 specific. But to a large extent, it captures all the SMT commands/logics supported by Z3, and Z3 is one of the most "compliant" solvers out there in terms of implementing the specs. There are a few differences of course: For instance, the spec never talks about optimization and Z3 does support that, likewise for set operations and a few other "extras." As Malte pointed out the documentation for these are available, but maybe not easy to navigate. My favorite links are:
https://ericpony.github.io/z3py-tutorial/guide-examples.htm (Python specific, but also tons of info on Z3 features.)
Programming in Z3: https://theory.stanford.edu/~nikolaj/programmingz3.html This is a wonderful document detailing how z3 works internally with most of its features demonstrated. Again, it uses Python, but for the most part you can find the corresponding commands in SMTLib more or less directly.
API documentation in various languages: https://z3prover.github.io/api/html/index.html Eventually you'll need these as you get to program z3; but you can keep this as a "reference" only for later use.
If there is a specific piece of info you're looking for that's not covered in one of these documents, then that's what this forum is for! Best of luck..
I'm not aware of any such reference manual, browsing the source code is probably your best option currently.
I might of course be wrong regarding the existence of such a manual, but the fact that questions regarding Z3's SMT-LIB dialect are often asked via the Z3 issue tracker (e.g.#4549, #4536, #4460), suggests that there is no reference manual. The developers' responses also do not hint at any such manual.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am trying to build a string theory solver and one of the ideas that came up was to write the code inside the z3 prover but that requires understanding the whole z3 code, I am wondering if there is a tutorial on how to do that? I have checked thoroughly but I don't seem to find anything.
You can't really integrate a custom theory with z3 without getting more or less intimately familiar with the internals, and unfortunately this process isn't all that well documented. This is hardly surprising: Z3 is a big and a research(-y) project and there are many moving parts.
Having said that, see the stack-overflow question on prior advice from Nikolaj, who is the main author of z3: SMT solver with custom theories?
This resource is a nice write-up about how to understand theory solvers are architected: http://theory.stanford.edu/~nikolaj/z3navigate.html
No matter which path you go, you'll have a lot of questions. The best place to ask them would be the "discussions" forum of the z3 GitHub site: https://github.com/Z3Prover/z3/discussions
Best of luck!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
In the process of converting the OCaml Format module to F# I find that I need to understand the initialization process in detail. For F# this is explained in section 12.5 Program Execution of the F# spec. While the OCaml documentation page list several good documents, I am unable to find any document that gives the same level of detail as found in the F# spec.
Are there any documents that give the corresponding level of detail for OCaml initialization?
In short, is there a specification manual for OCaml like the one for F#? No
I spent an hour today looking and still could not find one. I goggled, check some OCaml mailing list and looked over all of the documents from the OCaml site. Others in an OCaml mailing list also noted the lack of an OCaml specification manual.
As always with these no answers, if someone does answer here with a reference to the OCaml spec manual like the one for F# then I will gladly give them the accept vote.
I can't offer any information about OCaml module initialization, but I did port the Format module to F# as part of my FSharp.Compatibility project. If you want to have a look, it's available here:
https://github.com/jack-pappas/FSharp.Compatibility/tree/master/FSharp.Compatibility.OCaml.Format
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've found several posts on hubFS of people asking if there is, or will be, offline documentation for F#. These posts haven't been answered. So I want to give it a shot and ask the same question here on SO.
Where I've looked for offline documentation so far:
The April 2010 CTP release of Visual F# (version 2.0) is available for VS 2008, but it comes without an offline help.
There's a question on SO about offline documentation for various programming languages, but F# isn't mentioned there at the time of this writing.
There is of course Microsoft's F# language reference documentation (available on MSDN), which could be downloaded for offline browsing using e.g. wget.
Question:
Does anyone know whether any "official" offline documentation is on the way, anytime soon?
(And related to this, even tough it might be hard to answer objectively: Would it be reasonable to expect that F# won't undergo ECMA or ISO standardization, ie. there likely won't be a standards document describing the language?)
Doesn't directly answer the question but the F# language specifications are here:
F# 3.0 (PDF, HTML)
F# 2.0 (PDF, HTML)
These links are taken from the F# team blog post "Updated F# Language Specification for F# 3.0 Now Available".
Apparently, it is now: https://github.com/Microsoft/visualfsharpdocs
I'm hoping this will easily convert to a Dash docset or that there's some local-hosting solution for snappy offline indexing and search.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I've been teaching myself F# for a while now. I've read Programming F# by Chris Smith (great book) and I've written a few small scripts for getting the job done here and there.
But IMO the best way to learn a new programming language—and more importantly, the idioms that come with it—is to read a good open source codebase written in that language. Naturally, writing code in that language is crucial, but in the beginning, you're basically struggling with your own ignorance about how things should be done. You could perform certain tasks one way or the other, but it takes experience to realize the flaws and virtues of each. Even after you've gotten a firm grasp of how things work, reading the code of people who have an even firmer one helps a great deal.
Most would agree that the most insightful parts of any learn-a-programming-language book are the code examples, and reading a well-written open source codebase is the next level of that.
So are there any out there for F#?
Ref this question.
IMO, F# PowerPack is the best code base there.
Here are a few additional links that you may find interesting:
If you download F# for Visual Studio 2008, it also comes with sources of the entire F# library. This is sometimes a bit difficult code and it uses some internal tricks in a few places, but it is sometimes very good resource for learning (for example, Map type is a great example of a tree data structure).
There are some official F# Samples and some F# Community Samples (which includes my 3D fractal, example of working with quotations and a few shorter examples).
You can also look at the source code of samples from my Real-World Functional Programming book. Especially later chapters contain relatively complex sample applications (parallel simulations of animas, rectangle drawing application, etc.) The code has quite a lot of comments, so this may be useful for learning F#.
I would say that the WPF F# control codebase at http://wpffsharp.codeplex.com/ is a good place to start. One of the least trivial aspects of F# is UI and this is an excellent start to UI in F#. Also, since the code base is written by someone also learning F#, you have the benefit of seeing the iterations they go through.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
There are lots of parsers and lexers for scripts (i.e. structured computer languages). But I'm looking for one which can break a (almost) non-structured text document into larger sections e.g. chapters, paragraphs, etc.
It's relatively easy for a person to identify them: where the Table of Contents, acknowledgements, or where the main body starts and it is possible to build rule based systems to identify some of these (such as paragraphs).
I don't expect it to be perfect, but does any one know of such a broad 'block based' lexer / parser? Or could you point me in the direction of literature which may help?
Many lightweight markup languages like markdown (which incidentally SO uses), reStructured text and (arguably) POD are similar to what you're talking about. They have minimal syntax and break input down into parseable syntactic pieces. You might be able to get some information by reading about their implementations.
Define the annotation standard, which indicates how you would like to break things up.
Go on to Amazon Mechanical Turk and ask people to label 10K documents using your annotation standard.
Train a CRF (which is like an HMM, but better) on this training data.
If you actually want to go this route, I can elaborate on the details. But this will be a lot of work.
Most of the lex/yacc kind of programs work with a well defined grammar. if you can define your grammar in terms of a BNF like format (which most of the parsers accept similar syntax) then you can use any of them. That may be stating the obvious. However you can still be a little fuzzy around the 'blocks' (tokens) of text which would be part of your grammar. After all you define the rules for your tokens.
I have used Parse-RecDescent Perl module in the past with varying levels of success for similar projects.
Sorry, it may not be a good answer but more sharing my experiences on similar projects.
try: pygments, geshi, or prettify
They can handle just about anything you throw at them and are very forgiving of errors in your grammar as well as your documents.
References:
gitorius uses prettify,
github uses pygments,
rosettacode uses geshi,