Skip to contentSkip to conversation

main changes in 1.0.0-rc22

Cocci Julia Lawall 3 participants 12 messages Sep 30, 2014 – Oct 1, 2014

lore
Share & tools
lore
#0 lore raw

Options:

The option --include-headers-for-types has been added. With this, you can use eg --all-includes and it will parse the header files to collect type information, but not try to do any subsequent matching or transformation in the header files. If you need type information, but don't anticipate that any matching or transformation is needed that crosses the boundary between the header files and the .c file, then using this option can give a big performance improvement.

--keep-comments: This option existed before, but did not work properly. With this option, all comments will be kept. Without this option, when a block of code is specified to be removed in a semantic patch, then comments within the code matched by the block will be removed.

--force-diff: This option existed before, but did not work properly. With this option, a patch will be generated if there is any change in the matched code. Without this option, no patch will be generated if the change is only in whitespace.

--parse-handler: This new option makes it possible to give a file name containing OCaml code to invoke on a parse error. It allows displaying the parse error in a custom format.

Some other changes:

Various improvements in pretty printing.

Some improvements in the handling of PCRE regular expressions to avoid strange crashes.

Some improvements in the handling of variable declarations that involve multiple variables, when the types are complex (eg arrays).

The tools directory now contains an interactive tool named sgen, developed by Chi Pham, for generating semantic patches in the form required by the Linux kernel. That is, it adds the required headers, virtual rules, and rule variants. There is a makefile in tools/sgen, and documentation in tools/sgen/documentation. Basic usage is, for the semantic patch foo.cocci:

sgen foo.cocci

I hope that this will make it easier to submit semantic patches for integration into the Linux kernel.

julia

#1 lore raw

[Cocci] Further ideas from the release "1.0.0-rc22"

I thank you very much for your software improvements.

Quoted 3 lines

If you need type information, but don't anticipate that any matching or transformation is needed that crosses the boundary between the header files and the .c file, then using this option can give a big performance improvement.

Would anybody like to publish any run time statistics for comparison of effects from the added parameter "include-headers-for-types"?

Quoted 3 lines

--parse-handler: This new option makes it possible to give a file name containing OCaml code to invoke on a parse error. It allows displaying the parse error in a custom format.

Can other programming languages be eventually also reused here for special error reporting?

Quoted 2 lines

Some improvements in the handling of PCRE regular expressions to avoid strange crashes.

I like this software correction. I have tried it out with my big regular expression in a SmPL constraint for a patch approach on current Linux source files a moment ago.

Quoted 3 lines

The tools directory now contains an interactive tool named sgen, developed by Chi Pham, for generating semantic patches in the form required by the Linux kernel.

Should I rewrite the approach "Deletion of unnecessary checks before specific function calls" which I posted to Linux mailing lists on 2014-03-05 according to this interface?

I would like to clarify another implementation detail because of more surprising error messages:
?
kpathsea: Running mktextfm ptmr8t
/usr/share/texmf/web2c/mktexnam: Could not map source abbreviation for ptmr8t. /usr/share/texmf/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t
This is METAFONT, Version 2.718281 (TeX Live 2013/TeX Live for SUSE Linux)

kpathsea: Running mktexmf ptmr8t
! I can't find file `ptmr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Transcript written on mfput.log.
grep: ptmr8t.log: Datei oder Verzeichnis nicht gefunden
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t' failed to make ptmr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/ptm/m/n/10=ptmr8t at 10.0pt not loadable: Metric (TFM) file not found .
<to be read again>
relax
l.85 \begin{document}

! ==> Fatal error occurred, no output PDF file produced! Transcript written on manual.log.
?

Which software package should provide the needed font files for the documentation generation process?

Regards,
Markus

#2 lore raw

[Cocci] Further ideas from the release "1.0.0-rc22"

Quoted 6 lines
Quoted 3 lines

--parse-handler: This new option makes it possible to give a file name containing OCaml code to invoke on a parse error. It allows displaying the parse error in a custom format.

Can other programming languages be eventually also reused here for special error reporting?

Not currently.

Quoted 31 lines

I would like to clarify another implementation detail because of more surprising error messages:
?
kpathsea: Running mktextfm ptmr8t
/usr/share/texmf/web2c/mktexnam: Could not map source abbreviation for ptmr8t. /usr/share/texmf/web2c/mktexnam: Need to update ?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t
This is METAFONT, Version 2.718281 (TeX Live 2013/TeX Live for SUSE Linux)

kpathsea: Running mktexmf ptmr8t
! I can't find file `ptmr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t

Transcript written on mfput.log.
grep: ptmr8t.log: Datei oder Verzeichnis nicht gefunden
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input ptmr8t' failed to make ptmr8t.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font T1/ptm/m/n/10=ptmr8t at 10.0pt not loadable: Metric (TFM) file not found .
<to be read again>
relax
l.85 \begin{document}

Quoted 6 lines

! ==> Fatal error occurred, no output PDF file produced! Transcript written on manual.log.
?

Which software package should provide the needed font files for the documentation generation process?

I don't know about the installation of latex on Suse. Perhaps google for the error and see what comes up.

julia

#3 lore raw

[Cocci] Documentation generation for the release "1.0.0-rc22"

Quoted 1 line

I don't know about the installation of latex on Suse.

Which software package does provide the needed font file "ptmr8t" for your software development system?

I have searched a bit in a few archives. Would you like to suggest any special installation source so that I can also regenerate the corresponding documentation for your software release here?

Regards,
Markus

#4 lore raw

[Cocci] Documentation generation for the release "1.0.0-rc22"

Quoted 8 lines · SF Markus Elfring
Quoted 1 line

I don't know about the installation of latex on Suse.

Which software package does provide the needed font file "ptmr8t" for your software development system?

I have searched a bit in a few archives. Would you like to suggest any special installation source so that I can also regenerate the corresponding documentation for your software release here?

Perhaps the solution is here:

http://tex.stackexchange.com/questions/155309/mktextfm-ptmr8t-errors

Otherwise, I have no idea.

julia

#5 lore raw

[Cocci] Documentation generation for the release "1.0.0-rc22"

Quoted 3 lines

Perhaps the solution is here:

http://tex.stackexchange.com/questions/155309/mktextfm-ptmr8t-errors

Thanks for your link on the topic "mktextfm ptmr8t errors". The involved variations for package names might be interesting.
https://packages.debian.org/wheezy/texlive-fonts-recommended

Now I have also installed the package "texlive-times 2013.72.svn28614-11.2.1" for my openSUSE system.
https://software.opensuse.org/package/texlive-times

I am sorry that I did not find it earlier.

Regards,
Markus

#6 lore raw

[Cocci] Documentation generation for the release "1.0.0-rc22"

In reply to SF Markus Elfring
Quoted 2 lines

I have searched a bit in a few archives.

Really? This is what my search found in approx. 3 seconds (assuming SUSE):

http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/tex%28ptmr8t.tfm%29

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20140930/af1f225d/attachment.asc>

#8 lore raw

[Cocci] Documentation generation for the release "1.0.0-rc22"

Quoted 2 lines

The tool "RPM PBone Search" was not on my "radar screen" for a while.

It was the first hit for me when it googled "suse" and the font name :)

Anyway, glad it works now...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20140930/1c303923/attachment.asc>

#9 lore raw
In reply to Julia Lawall
Quoted 4 lines

The option --include-headers-for-types has been added. With this, you can use eg --all-includes and it will parse the header files to collect type information, but not try to do any subsequent matching or transformation in the header files.

Would you like to mention this parameter also in the documentation source file "spatch_options.tex"?

Regards,
Markus

#10 lore raw
Quoted 7 lines · SF Markus Elfring
Quoted 4 lines

The option --include-headers-for-types has been added. With this, you can use eg --all-includes and it will parse the header files to collect type information, but not try to do any subsequent matching or transformation in the header files.

Would you like to mention this parameter also in the documentation source file "spatch_options.tex"?

Added. Thanks.

julia

#11 lore raw
In reply to Julia Lawall
Quoted 3 lines

--parse-handler: This new option makes it possible to give a file name containing OCaml code to invoke on a parse error. It allows displaying the parse error in a custom format.

Would you like to mention this parameter also in the documentation source file "spatch_options.tex"?
https://github.com/coccinelle/coccinelle/blob/9c0c494202d06b2687b6e3ef00df42e7abce5632/docs/manual/spatch_options.tex#L57

Regards,
Markus