Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
CRANGLER(1)			 User Commands			   CRANGLER(1)

NAME
       crangler	- C source transformation

SYNOPSIS
       crangler	[-?] [-h] [--help]

       crangler	file.json

DESCRIPTION
       crangler	is a command-line utility that makes changes to	a preprocessed
       C file that are prescribed in a JSON configuration file.

       The supported transformations are:

	      Add a contract (pre/post/assigns)	to a named C function.

	      Add  a  loop  contract  to  a loop identified by the name	of the
	      function containing the loop and a loop number.

	      Remove the static	storage	classifier from	a function or a	 vari-
	      able.

	      Replace a	function call by a call	to a stub.

       The  resulting  source  file is written to standard output or to	a file
       specified in the	JSON configuration.

EXAMPLE
       The following JSON configuration	file  makes  crangler  preprocess  re-
       move_static1.c.	 While	processing this	file to	produce	a preprocessed
       result, no non-standard include paths or	defines	reqired.   Transforma-
       tions  configured  here are removing the	static storage classifier from
       all functions matching the regular expression foobar[12], and replacing
       calls to	bar by calls to	a function called bar_stub.   No  objects  are
       listed  that require transformation.  The result	is written to standard
       output.
       {
	 "sources": [
	   "remove_static1.c"
	 ],
	 "includes": [],
	 "defines": [],
	 "functions": [
	   {
	     "foobar[12]": [
	       "remove static"
	     ],
	     "bar": [
	       "stub bar_stub"
	     ]
	   }
	 ],
	 "objects": [],
	 "output": "stdout"
       }

ENVIRONMENT
       All tools honor the TMPDIR environment variable when generating	tempo-
       rary files and directories.

BUGS
       If    you   encounter   a   problem   please   create   an   issue   at
       https://github.com/diffblue/cbmc/issues

COPYRIGHT
       2021, Daniel Kroening

crangler-5.59.0			   June	2022			   CRANGLER(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=crangler&sektion=1&manpath=FreeBSD+Ports+15.0>

home | help