Hi. I have a question.( na(w)_nb(w)) mod3=1 . I have tried alot of ways but I coudn't solve it.I wanted to write regular language - regular-language

I have a question.( na(w)_nb(w)) mod3=1 . I have tried alot of ways but I coudn't solve it. what is your opinion? I wanted to write a regular language

Related

Reading dot files with graphviz package in haskell

For a program i have to reformat a dot file in Haskell to adjust the layout of its tree/content. I decided to use https://hackage.haskell.org/package/graphviz-2999.20.1.0/docs/Data-GraphViz.html , but i cant find simple tutorials and the documentation confuses me, namely:
1 . It contains a function: dotToGraph, which reads: "A pseudo-inverse to graphToDot; "pseudo" in the sense that the original node and edge labels aren't able to be reconstructed."
I do need to retain the names of the nodes and edges, which i suppose are the labels mentioned here? but it seems weird that it cannot do this. It also does not take in a file name or string for the dot text, so i assume this is the wrong function.
2 . There also seems to be a parseDot function/class that comes with the package, but i cant find clear documentation for its use. (see: https://hackage.haskell.org/package/graphviz-2999.20.1.0/docs/Data-GraphViz-Parsing.html#t:ParseDot)
Can you recommend me a simple overview/summary/online example for doing this? Should i be using a different function? I have only recently started using Haskell, so the package documentation is sometimes difficult to decipher for me.
It would help a great deal, thanks!

How can I view the source code for the readline module in nodejs?

I've scored the internet for almost an hour, but I can't find the actual github for readline, nor is it in node_modules. I hear that some are in binary, like events.js, but I found a repo for it. I'm trying to read through readline and learn how it works but I cannot find it. Does anyone know where it is?
You can find it in the libs-directory on the official github-repo:
https://github.com/nodejs/node/blob/master/lib/readline.js

How to use helm-semantic-or-imenu for code navigation with type annotated python code

I would like to use the helm-semantic-or-imenu command to navigate components of type annotated Python code, but whatever code analyzer is used to dentify the components doesn't seem to recognize the type annotated python code. Functions with the return type annotation doesn't get recognized at all and functions with annotated arguments show the type instead of the arguments names in the signatures
The main problem I have is that I do not properly understand the components that is involved in making this work (when it does work). Obviously it might help to somehow update the code analyzer, but in which project do I find that? helm? semantic? imenu? or as someone mentioned somewhere else with regards to code analysis python.el? I could really use some help getting started to solve this. If the code analyzer is found in python.el, can I then try to modify and make emacs use a local version preferentially over the installed one?
EDIT:
After making the initial post I finally made a break through in trying to figure out where the components come from. I searched for python*.el in all of the file systemsystem and discovered these:
./usr/share/emacs/26.2/lisp/cedet/semantic/wisent/python.elc
./usr/share/emacs/26.2/lisp/cedet/semantic/wisent/python-wy.elc
I found the source for emacs 26.2 and discovered that indeed it seems python-el is responsible for parsing python files for semantic. It also internally uses the python-wy for recognizing a large portion of the language components. But unfortunately that is where I hit a brick wall. I was hoping to be able to monkey patch the function that recognizes a function definition via an re or something, but semantic actually solves the problem the right way. So python-wy seems to be auto-generated from a formal grammar definition file (in emacs git admin/grammars/python.wy) and figuring out how to modify that it is unfortunately much beyond my abilities.
The semantic python backend doesn't appear to parse type annotations correctly (and there hasn't been much recent development on those libraries as far as I can tell). Since helm-semantic-or-imenu favors semantic when it is active, you can disable semantic altogether for python buffers unless you use its other features (personally I only use it for C/C++).
When the semantic mode-specific libraries are loaded they set imenu-create-default-create-index and imenu-default-goto-function, causing imenu to use semantic instead of python.el's imenu function.
To disable semantic support for your python files you can customize the semantic-new-buffer-setup-functions, only adding entries for modes you want semantic support for, eg. in your semantic hook (or alternatively with the customize UI),
(setq semantic-new-buffer-setup-functions
'((c-mode . semantic-default-c-setup)
(c++-mode . semantic-default-c-setup)
(srecode-template-mode . srecode-template-setup-parser)
(texinfo-mode . semantic-default-texi-setup)
;; etc.
;; (makefile-automake-mode . semantic-default-make-setup)
;; (makefile-mode . semantic-default-make-setup)
;; (makefile-gmake-mode . semantic-default-make-setup)
))

CountreExample generation in KodKod

I have just switched to working with KodKod I am still trying to understand it. I have wrote a program to help me understand I succeeded to see if the solution is SATISFIABLE or UNSATISFIABLE .
I want to be able to see the CountreExample like we normally do in Alloy, I found the Method proof() of the type solution but it always returns null .
I want to know if there is a way to return the CountreExample or not.
Thank you in advance.
Try to look at this examples of Alloy API usages: https://github.com/kaptoxic/alloy/tree/master/src/edu/mit/csail/sdg/alloy4whole

Razorpad examples and tutorials

Can some one point me to some good tutorials on using Razorpad(http://docs.razorpad.net/index.html)? How to specify a _layout.cshtml, #model, helpers such as #Url.Content, #RenderBody(), #ViewBag, #Layout etc all are throwing errors.
The documentation is very poor.
Thanks in advance.

Resources