Recall Isabelle's "Go to the definition" command. (Isar, JEdit) - isabelle

There exists a shortcut or command which allows one to go straight to the definition of symbol or lemma. (Like "ALT+," in GTAGS for Emacs)
It is quite handy contrary (just imho) to the Coq's one, where one have to do Search command in an IDE.
I forget which combination of keys should I press to look up the definition in standard Isabelle IDE based on jEdit.
Could you please remind me?

It's the Control key on Windows and Linux systems and the Command key on macOS systems. See Section 1.2 in the Isabelle/jEdit documentation.

Related

errExit not available in CLion?

I am trying to use errExit function on CLion IDE but it seems gives this error.
"cant resolve errExit variable" . I cant find anything about it,which header to use? I simply use text book example and included all headers from there still nothing?
You are seeing these error messages, because errExit is not a standard API function.
The camelCaseNotation is a good indicator of this. As a rule of thumb, the standard bodies of POSIX, UNIX and BSD -- which define most of the standard utilities and functions present on conforming GNU/Linux systems today -- specify functions using underscore_notation.
My guess is that the authors of the books you follow provide a definition for that function for their readers to use. Try looking for it in an earlier chapter, in the index, or in the supplementary material. But you won't find it in the systems standard include files.

Atom keymap combos dont work with arrow keys

I have this in my keymap.cson file:
'body':
'ctrl-alt-left': 'editor:select-to-first-character-of-line'
But it doesn't work (there is no effect).
The following keymaps do work:
'body':
'ctrl-alt-a': 'editor:move-to-beginning-of-line'
'ctrl-alt-e': 'editor:move-to-end-of-line'
'ctrl-alt-shift-s': 'editor:select-to-first-character-of-line'
'ctrl-alt-shift-w': 'editor:select-to-end-of-line'
But I would like to be able to use the arrow keys.
I'm not sure where you got the body selector from. You should use atom-text-editor for maps like this, as in the examples in the default keymap.cson in your .atom folder. This should do what you want:
'atom-text-editor':
'ctrl-alt-left': 'editor:move-to-beginning-of-line'
'ctrl-alt-right': 'editor:move-to-end-of-line'
'ctrl-alt-shift-left': 'editor:select-to-first-character-of-line'
'ctrl-alt-shift-right': 'editor:select-to-end-of-line'
When debugging issues like this, you must also keep a couple of other things in mind.
First, the meaning of alt varies by platform. On macOS, it means the Option key. On Windows or Linux, I believe it means the key labeled Alt, but your keyboard may be a bit different (especially non-US layouts).
Second, if a higher layer of the system (the OS itself, i.e. the window manager) is capturing a key combination, then it will never reach Atom at all. You can detect this situation using the Key Binding Resolver. You can activate it using Cmd. on macOS. I am not sure about other platforms, but usually Cmd on macOS maps to Ctrl on Windows and Linux, so I would suggest Ctrl..
While the Key Binding resolver is active, any keys or key combinations you press are listed in the resolver, along with the action (if any) within Atom that is taken. You can use this to determine what Atom thinks a given key is, and you can also use it to detect whether a given key combination is not reaching Atom in the first place.

ACSL set logic / frama-c syntax error

I am using the Nitrogen version of Frama-c on Mac, and can't seem able to use
the "set" logic, as documented in the ACSL manual, e.g., I can't declare
a ghost variable as in "//# ghost set<integer> someSet;".
The frama-c program always complains about a syntax error in the line where a set is declared, no matter what.
I also tried "Set" instead of "set", other types in place of "integer" (e.g. "char*")and specifying "//# open set;" to import the module.
Maybe I need to specify some command line option? Executing "frama-c -kernel-help" it's not clear what that would be though.
Or maybe the Mac version (I downloaded the Intel binary version) is outdated and I should compile the latest source code ?
Thanks, best regards,
Eduardo
ACSL is an annotation language that exists independently of Frama-C, although some of the same persons work on both. From the point of view of usage of ACSL in a Frama-C plug-in, there are three levels of definition/implementation, and you need all three to be able to use a feature:
The feature must be part of the ACSL language.
It must be made available by the current Frama-C front-end. Not all features of the ACSL language are immediately implemented in the front-end.
The plug-in you intend to use must take advantage of it.
Another explanation of the same distinction is here.
I can't declare a ghost variable as in "//# ghost set someSet;".
In your case, it appears that the partially implemented feature is not so much sets (which seem implemented in the front-end after a quick look) but ghost code, which can currently only use C constructs and types.
Or maybe the Mac version (I downloaded the Intel binary version) is
outdated and I should compile the latest source code ?
You have the latest version at this time.

How can I have history completion / filtering when running R in Windows using the up/down arrows (like MATLAB)?

I'm used to using R in Linux, which is wonderful. However, I really need to be using Windows. I've been using Rgui.exe that comes with the R installation and the history completion feature is missing. By this, I mean that I can start to type a command and then press the up-arrow to browse through the history for commands that start with what is typed (similar to the way MATLAB handles the history).
The closest thing I've found is to use RStudio, which allows this functionality with "Ctrl+Up Arrow" (which is a livable solution). It would be nice to be able to do this with just the arrow keys and to do it in Rgui.exe or other minimal R interface. Any suggestions?
If you run R from Cygwin, you can use reverse-i-search to cycle through commands that match the given pattern and which have been executed during the current R session.
Hit CTRL-r to initiate the reverse search, then as you type the pattern to be matched against the history, the most recently executed match will dynamically appear. Keep pressing CTRL-r to cycle through the matching items.
In the example depicted below, I've initiated a reverse search for 'LET'.
Use RTerm.exe, as this includes tab completion (its very strange that RGUI on Windows doesn't, especially as the Mac GUI does).

Taking up/down arrow as input to a program in Unix

I am implementing my own shell. But to supprt for command history, I need to use monitor up/down arrow key as in standard shells. Please tell me how to handle arrow keys as input or does these keys generate signals? Please elaborate.
Arrows and other special keys send you special strings that depend on the terminal being used or emulated. To deal with this most simply, you could use a library such as termcap. Even simpler, given your stated purpose (command history support), would be to use readline, which basically does it for you (and lets the user customize aspects of their preferred mode of working across the many applications that link to the same library).
It depends on how gnarly you're expected to go. Worse case, you're writing the keyboard interrupt handler. Best case, something like readline.
Check with your prof for direction here. Also check your course materials to see if the prof has given links/examples regarding this.
Does the assignment specifically say you need to have a "cursor key driven" command history?
Simple option is to mimic the shells fc e.g.
$ ls
... file listing ...
$ fc -l
1 ls
2 fc -l
$ fc -r 1
... file listing ...
and (while I'm presenting established ideas as my own, might as well go all the way) to be able to edit the command line you could use
fc -e start end
to write the history from start to end into a file, launch an editor and then execute the resulting file as a script. This way your shell is not using a library, but launching commands and executing scripts, which is what shells are supposed to do anyway.

Resources