[docs 1/5] Port existing HTML manual to doxygen
* The existing HTML documentation under doc/html-manual has been converted to Markdown. This was done automatically using Pandoc, plus some manual work to give identifiers to sections and changing internal links to point to those sections with \ref. * The Doxygen front page now contains some content: a link to the doxygen-ated HTML manual, and a note about the API documentation. The intention here is that the entire Doxygen site could be hosted publicly, serving both users of and contributors to CBMC from a single site. * The doxyfile is updated to enable these changes.
|
@ -0,0 +1 @@
|
|||
exclude_files=.*
|
|
@ -0,0 +1,24 @@
|
|||
CProver Documentation
|
||||
=====================
|
||||
|
||||
These pages contain both user tutorials and automatically-generated API
|
||||
documentation. Users can download CProver tools from the
|
||||
<a href="http://www.cprover.org/">CProver website</a>; contributors
|
||||
should use the <a href="https://github.com/diffblue/cbmc">repository</a>
|
||||
hosted on GitHub.
|
||||
|
||||
### For users:
|
||||
|
||||
* The \ref cprover-manual "CProver Manual" details the capabilities of
|
||||
CBMC and SATABS and describes how to install and use these tools. It
|
||||
also covers the underlying theory and prerequisite concepts behind how
|
||||
these tools work.
|
||||
|
||||
### For contributors:
|
||||
|
||||
* If you already know exactly what you're looking for, the API reference
|
||||
is generated from the codebase. You can search for classes and class
|
||||
members in the search bar at top-right or use one of the links in the
|
||||
sidebar.
|
||||
|
||||
\defgroup module_hidden _hidden
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -1,323 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>The CPROVER API Reference</h2>
|
||||
|
||||
<p class="justified">
|
||||
The following sections summarize the functions available to programs
|
||||
that are passed to the CPROVER tools.
|
||||
</p>
|
||||
|
||||
<h3>Functions</h3>
|
||||
|
||||
<h4>__CPROVER_assume, __CPROVER_assert, assert</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
void __CPROVER_assume(_Bool assumption);<br>
|
||||
void __CPROVER_assert(_Bool assertion, const char *description);<br>
|
||||
void assert(_Bool assertion);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_assume</b> adds an expression as a constraint
|
||||
to the program. If the expression evaluates to false, the execution
|
||||
aborts without failure. More detail on the use of assumptions is
|
||||
in the section on <a href="modeling-assertions.shtml">Assumptions
|
||||
and Assertions</a>.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_same_object, __CPROVER_POINTER_OBJECT,
|
||||
__CPROVER_POINTER_OFFSET,
|
||||
__CPROVER_DYNAMIC_OBJECT</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
_Bool __CPROVER_same_object(const void *, const void *);<br>
|
||||
unsigned __CPROVER_POINTER_OBJECT(const void *p);<br>
|
||||
signed __CPROVER_POINTER_OFFSET(const void *p);<br>
|
||||
_Bool __CPROVER_DYNAMIC_OBJECT(const void *p);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_same_object</b> returns true
|
||||
if the two pointers given as arguments point to the same
|
||||
object.
|
||||
The function <b>__CPROVER_POINTER_OFFSET</b> returns
|
||||
the offset of the given pointer relative to the base
|
||||
address of the object.
|
||||
The function <b>__CPROVER_DYNAMIC_OBJECT</b>
|
||||
returns true if the pointer passed
|
||||
as arguments points to a dynamically allocated object.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_is_zero_string,
|
||||
__CPROVER_zero_string_length,
|
||||
__CPROVER_buffer_size</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
_Bool __CPROVER_is_zero_string(const void *);<br>
|
||||
__CPROVER_size_t __CPROVER_zero_string_length(const void *);<br>
|
||||
__CPROVER_size_t __CPROVER_buffer_size(const void *);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_initialize</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
void __CPROVER_initialize(void);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_initialize</b> computes the initial
|
||||
state of the program. It is called prior to calling the
|
||||
main procedure of the program.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_input, __CPROVER_output</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
void __CPROVER_input(const char *id, ...);<br>
|
||||
void __CPROVER_output(const char *id, ...);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The functions <b>__CPROVER_input</b> and <b>__CPROVER_output</b>
|
||||
are used to report an input or output value. Note that they do not generate
|
||||
input or output values. The first argument is a string constant
|
||||
to distinguish multiple inputs and outputs (inputs are typically
|
||||
generated using nondeterminism, as described
|
||||
<a href="modeling-nondet.shtml">here</a>).
|
||||
The string constant is followed by an arbitrary number of values of
|
||||
arbitrary types.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_cover</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
void __CPROVER_cover(_Bool condition);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p>This statement defines a custom coverage criterion, for usage
|
||||
with the <a href="cover.shtml">test suite generation feature</a>.</p>
|
||||
|
||||
<p class="justified">
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_isnan, __CPROVER_isfinite, __CPROVER_isinf,
|
||||
__CPROVER_isnormal, __CPROVER_sign</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
_Bool __CPROVER_isnan(double f);<br>
|
||||
_Bool __CPROVER_isfinite(double f);<br>
|
||||
_Bool __CPROVER_isinf(double f);<br>
|
||||
_Bool __CPROVER_isnormal(double f);<br>
|
||||
_Bool __CPROVER_sign(double f);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_isnan</b> returns true if the double-precision
|
||||
floating-point number passed as argument is a
|
||||
<a href="http://en.wikipedia.org/wiki/NaN">NaN</a>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_isfinite</b> returns true if the double-precision
|
||||
floating-point number passed as argument is a
|
||||
finite number.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
This function <b>__CPROVER_isinf</b> returns true if the double-precision
|
||||
floating-point number passed as argument is plus
|
||||
or minus infinity.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_isnormal</b> returns true if the double-precision
|
||||
floating-point number passed as argument is a
|
||||
normal number.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
This function <b>__CPROVER_sign</b> returns true if the double-precision
|
||||
floating-point number passed as argument is
|
||||
negative.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_abs, __CPROVER_labs, __CPROVER_fabs, __CPROVER_fabsl, __CPROVER_fabsf</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
int __CPROVER_abs(int x);<br>
|
||||
long int __CPROVER_labs(long int x);<br>
|
||||
double __CPROVER_fabs(double x);<br>
|
||||
long double __CPROVER_fabsl(long double x);<br>
|
||||
float __CPROVER_fabsf(float x);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
These functions return the absolute value of the given
|
||||
argument.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_array_equal, __CPROVER_array_copy, __CPROVER_array_set</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
_Bool __CPROVER_array_equal(const void array1[], const void array2[]);<br>
|
||||
void __CPROVER_array_copy(const void dest[], const void src[]);<br>
|
||||
void __CPROVER_array_set(const void dest[], value);
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The function <b>__CPROVER_array_equal</b> returns true if the values
|
||||
stored in the given arrays are equal.
|
||||
The function <b>__CPROVER_array_copy</b> copies the contents of
|
||||
the array <b>src</b> to the array <b>dest</b>.
|
||||
The function <b>__CPROVER_array_set</b> initializes the array <b>dest</b> with
|
||||
the given value.
|
||||
</p>
|
||||
|
||||
<h4>Uninterpreted Functions</h4>
|
||||
|
||||
<p class="justified">
|
||||
Uninterpreted functions are documented <a href="modeling-nondet.shtml">here</a>.
|
||||
</p>
|
||||
|
||||
<h3>Predefined Types and Symbols</h3>
|
||||
|
||||
<h4>__CPROVER_bitvector</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
__CPROVER_bitvector [ <i>expression</i> ]
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
This type is only available in the C frontend. It is used
|
||||
to specify a bit vector with arbitrary but fixed size. The
|
||||
usual integer type modifiers <b>signed</b> and <b>unsigned</b>
|
||||
can be applied. The usual arithmetic promotions will be
|
||||
applied to operands of this type.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_floatbv</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
__CPROVER_floatbv [ <i>expression</i> ] [ <i>expression</i> ]
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
This type is only available in the C frontend. It is used
|
||||
to specify an IEEE-754 floating point number with arbitrary
|
||||
but fixed size. The first parameter is the total size (in bits)
|
||||
of the number, and the second is the size (in bits) of the
|
||||
mantissa, or significand (not including the hidden bit, thus for
|
||||
single precision this should be 23).
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_fixedbv</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
__CPROVER_fixedbv [ <i>expression</i> ] [ <i>expression</i> ]
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
This type is only available in the C frontend. It is used
|
||||
to specify a fixed-point bit vector with arbitrary
|
||||
but fixed size. The first parameter is the total size (in bits)
|
||||
of the type, and the second is the number of bits after the radix
|
||||
point.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_size_t</h4>
|
||||
|
||||
<p class="justified">
|
||||
The type of sizeof expressions.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_rounding_mode</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
extern int __CPROVER_rounding_mode;
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
This variable contains the IEEE floating-point
|
||||
arithmetic rounding mode.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_constant_infinity_uint</h4>
|
||||
|
||||
<p class="justified">
|
||||
This is a constant that models a large unsigned
|
||||
integer.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_integer, __CPROVER_rational</h4>
|
||||
|
||||
<p class="justified">
|
||||
<b>__CPROVER_integer</b> is an unbounded, signed integer type.
|
||||
<b>__CPROVER_rational</b> is an unbounded, signed rational
|
||||
number type.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER_memory</h4>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
extern unsigned char __CPROVER_memory[];
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
This array models the contents of integer-addressed memory.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER::unsignedbv<N> (C++ only)</h4>
|
||||
|
||||
<p class="justified">This type is the equivalent of <b>unsigned __CPROVER_bitvector[N]</b> in the C++ front-end.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER::signedbv<N> (C++ only)</h4>
|
||||
|
||||
<p class="justified">This type is the equivalent of <b>signed __CPROVER_bitvector[N]</b> in the C++ front-end.
|
||||
</p>
|
||||
|
||||
<h4>__CPROVER::fixedbv<N> (C++ only)</h4>
|
||||
|
||||
<p class="justified">This type is the equivalent of <b>__CPROVER_fixedbv[N,m]</b> in the C++ front-end.
|
||||
</p>
|
||||
|
||||
<h3>Concurrency</h3>
|
||||
|
||||
<p class="justified">
|
||||
Asynchronous threads are created by preceding an instruction with a label with the prefix <b>__CPROVER_ASYNC_</b>.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,93 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Architectural Settings</h3>
|
||||
|
||||
<p class="justified"> The behavior of a C/C++ program depends on a number of
|
||||
parameters that are specific to the architecture the program was compiled
|
||||
for. The three most important architectural parameters are:</p>
|
||||
|
||||
<ul>
|
||||
<li>The width of the various scalar types; e.g., compare the value
|
||||
of <code>sizeof(long int)</code> on various machines.</li>
|
||||
|
||||
<li>The width of pointers; e.g., compare the value
|
||||
of <code>sizeof(int *)</code> on various machines.</li>
|
||||
|
||||
<li>The <a href="http://en.wikipedia.org/wiki/Endianness">endianness</a>
|
||||
of the architecture.</li>
|
||||
</ul>
|
||||
|
||||
<p class="justified">
|
||||
In general, the CPROVER tools attempt to adopt the settings of the
|
||||
particular architecture the tool itself was compiled for. For example,
|
||||
when running a 64 bit binary of CBMC on Linux, the program will be processed
|
||||
assuming that <code>sizeof(long int)==8</code>.</p>
|
||||
|
||||
<p class="justified">
|
||||
As a consequence of these architectural parameters,
|
||||
you may observe different verification results for an identical
|
||||
program when running CBMC on different machines. In order to get
|
||||
consistent results, or when aiming at validating a program written
|
||||
for a different platform, the following command-line arguments can
|
||||
be passed to the CPROVER tools:</p>
|
||||
|
||||
<ul>
|
||||
<li>The word-width can be set with <code>--16</code>,
|
||||
<code>--32</code>, <code>--64</code>.</li>
|
||||
<li>The endianness can be defined with
|
||||
<code>--little-endian</code> and <code>--big-endian</code>.</li>
|
||||
</ul>
|
||||
|
||||
<p class="justified">
|
||||
When using a goto binary, CBMC and the other tools read the configuration
|
||||
from the binary, i.e., the setting when running goto-cc is the one that
|
||||
matters; the option given to the model checker is ignored in this case.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In order to see the effect of the options <code>--16</code>,
|
||||
<code>--32</code> and <code>--64</code>, pass
|
||||
the following program to CBMC:</p>
|
||||
|
||||
<hr>
|
||||
<code>
|
||||
#include <stdio.h><br>
|
||||
#include <assert.h><br>
|
||||
<br>
|
||||
int main() {<br>
|
||||
printf("sizeof(long int): %d\n", (int)sizeof(long int));<br>
|
||||
printf("sizeof(int *): %d\n", (int)sizeof(int *));<br>
|
||||
assert(0);<br>
|
||||
}
|
||||
</code>
|
||||
<hr>
|
||||
|
||||
<p class="justified">
|
||||
The counterexample trace contains the strings printed by the
|
||||
<code>printf</code> command.</p>
|
||||
|
||||
<p class="justified">
|
||||
The effects of endianness are
|
||||
more subtle. Try the following program with <code>--big-endian</code>
|
||||
and <code>--little-endian</code>:</p>
|
||||
|
||||
<hr>
|
||||
<pre><code>
|
||||
#include <stdio.h><br>
|
||||
#include <assert.h><br>
|
||||
<br>
|
||||
int main() {<br>
|
||||
int i=0x01020304;<br>
|
||||
char *p=(char *)&i;<br>
|
||||
printf("Bytes of i: %d, %d, %d, %d\n",<br>
|
||||
p[0], p[1], p[2], p[3]);<br>
|
||||
assert(0);<br>
|
||||
}
|
||||
</code></pre>
|
||||
<hr>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,233 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<link rel="stylesheet" href="highlight/styles/default.css">
|
||||
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>CBMC: Bounded Model Checking for C/C++ and Java</h2>
|
||||
|
||||
<h3>Understanding Loop Unwinding</h3>
|
||||
|
||||
<h4>Iteration-based Unwinding</h4>
|
||||
|
||||
<p class="justified">
|
||||
The basic idea of CBMC is to model the computation of the programs up to a
|
||||
particular depth. Technically, this is achieved by a process that
|
||||
essentially amounts to <i>unwinding loops</i>. This concept is best
|
||||
illustrated with a generic example:
|
||||
</p>
|
||||
|
||||
<pre><code>int main(int argc, char **argv) {
|
||||
while(cond) {
|
||||
<font color="#3030f0">BODY CODE</font>
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
A BMC instance that will find bugs with up to five iterations of the loop would
|
||||
contain five copies of the loop body, and essentially corresponds to checking
|
||||
the following loop-free program:
|
||||
</p>
|
||||
|
||||
<pre><code>int main(int argc, char **argv) {
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 1</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 2</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 3</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 4</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 5</font>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Note the use of the <code>if</code> statement to prevent the execution of
|
||||
the loop body in the case that the loop ends before five iterations are executed.
|
||||
The construction above is meant to produce a program that is trace equivalent
|
||||
with the original programs for those traces that contain up to five iterations
|
||||
of the loop.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In many cases, CBMC is able to automatically determine an upper bound on the
|
||||
|
||||
number of loop iterations. This may even work when the number of loop
|
||||
unwindings is not constant. Consider the following example:
|
||||
</p>
|
||||
|
||||
<pre><code>_Bool f();
|
||||
|
||||
int main() {
|
||||
for(int i=0; i<100; i++) {
|
||||
if(f()) break;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The loop in the program above has an obvious upper bound on the number of
|
||||
iterations, but note that the loop may abort prematurely depending on the
|
||||
value that is returned by <code>f()</code>. CBMC is nevertheless able to
|
||||
automatically unwind the loop to completion.</p>
|
||||
|
||||
<p class="justified">
|
||||
This automatic detection of the unwinding
|
||||
bound may fail if the number of loop iterations is highly data-dependent.
|
||||
Furthermore, the number of iterations that are executed by any given
|
||||
loop may be too large or may simply be unbounded. For this case,
|
||||
CBMC offers the command-line option <code>--unwind B</code>, where
|
||||
<code>B</code> denotes a number that corresponds to the maximal number
|
||||
of loop unwindings CBMC performs on any loop.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Note that the number of unwindings is measured by counting the number of
|
||||
<i>backjumps</i>. In the example above, note that the condition
|
||||
<code>i<100</code> is in fact evaluated 101 times before the loop
|
||||
terminates. Thus, the loop requires a limit of 101, and not 100.</p>
|
||||
|
||||
<h4>Setting Separate Unwinding Limits</h4>
|
||||
|
||||
<p class="justified">
|
||||
The setting given with <code>--unwind</code> is used globally,
|
||||
that is, for all loops in the program. In order to set individual
|
||||
limits for the loops, first use
|
||||
</p>
|
||||
|
||||
<code>
|
||||
--show-loops
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
to obtain a list of all loops in the program. Then identify the loops
|
||||
you need to set a separate bound for, and note their loop ID. Then
|
||||
use
|
||||
</p>
|
||||
|
||||
<code>
|
||||
--unwindset L:B,L:B,...
|
||||
</code>
|
||||
|
||||
<p>
|
||||
where <code>L</code> denotes a loop ID and <code>B</code> denotes
|
||||
the bound for that loop.</p>
|
||||
|
||||
<p class="justified">
|
||||
As an example, consider a program with two loops in the function
|
||||
main:
|
||||
</p>
|
||||
|
||||
<code>
|
||||
--unwindset c::main.0:10,c::main.1:20
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
This sets a bound of 10 for the first loop, and a bound of 20 for
|
||||
the second loop.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
What if the number of unwindings specified is too small? In this case, bugs
|
||||
that require paths that are deeper may be missed. In order to address this
|
||||
problem, CBMC can optionally insert checks that the given unwinding bound is
|
||||
actually sufficiently large. These checks are called <i>unwinding
|
||||
assertions</i>, and are enabled with the option
|
||||
<code>--unwinding-assertions</code>. Continuing the generic example above,
|
||||
this unwinding assertion for a bound of five corresponds to checking the
|
||||
following loop-free program:
|
||||
</p>
|
||||
|
||||
<pre><code>int main(int argc, char **argv) {
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 1</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 2</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 3</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 4</font>
|
||||
if(cond) {
|
||||
<font color="#3030f0">BODY CODE COPY 5</font>
|
||||
<font color="#ff3030">assert(!cond);</font>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The unwinding assertions can be verified just like any other generated
|
||||
assertion. If all of them are proven to hold, the given loop bounds are
|
||||
sufficient for the program. This establishes a <a
|
||||
href="http://en.wikipedia.org/wiki/Worst-case_execution_time"><i>high-level
|
||||
worst-case execution time</i></a> (WCET).
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In some cases, it is desirable to cut off very deep loops in favor
|
||||
of code that follows the loop. As an example, consider the
|
||||
following program:
|
||||
</p>
|
||||
|
||||
<pre><code>int main() {
|
||||
for(int i=0; i<10000; i++) {
|
||||
<font color="#3030f0">BODY CODE</font>
|
||||
}
|
||||
|
||||
assert(0);
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
In the example above, small values of <code>--unwind</code> will
|
||||
prevent that the assertion is reached. If the code in the loop
|
||||
is considered irrelevant to the later assertion, use the option
|
||||
</p>
|
||||
|
||||
<code>
|
||||
--partial-loops
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
This option will allow paths that execute loops only partially,
|
||||
enabling a counterexample for the assertion above even for
|
||||
small unwinding bounds. The disadvantage of using this option
|
||||
is that the resulting path may be spurious, i.e., may not
|
||||
exist in the original program.
|
||||
</p>
|
||||
|
||||
<h4>Depth-based Unwinding</h4>
|
||||
|
||||
<p class="justified">
|
||||
The loop-based unwinding bound is not always appropriate. In particular,
|
||||
it is often difficult to control the size of the generated formula
|
||||
when using the <code>--unwind</code> option. The option
|
||||
</p>
|
||||
|
||||
<code>
|
||||
--depth <i>nr</i>
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
specifies an unwinding bound in terms of the number of instructions that are
|
||||
executed on a given path, irrespectively of the number of loop iterations.
|
||||
Note that CBMC uses the number of instructions in the control-flow graph
|
||||
as the criterion, not the number of instructions in the source code.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,377 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<link rel="stylesheet" href="highlight/styles/default.css">
|
||||
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>CBMC: Bounded Model Checking for C/C++ and Java</h2>
|
||||
|
||||
<h3>A Short Tutorial</h3>
|
||||
|
||||
<h4>First Steps</h4>
|
||||
|
||||
<p class="justified">
|
||||
We assume you have already installed CBMC and the necessary support files
|
||||
on your system. If not so, please follow <a href="installation-cbmc.shtml">
|
||||
these instructions</a>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Like a compiler, CBMC takes the names of .c files as command line
|
||||
arguments. CBMC then translates the program and merges the function
|
||||
definitions from the various .c files, just like a linker. But instead
|
||||
of producing a binary for execution, CBMC performs symbolic simulation on
|
||||
the program.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
As an example, consider the following simple program, named
|
||||
<a href="file1.c">file1.c</a>:
|
||||
</p>
|
||||
|
||||
<pre><code class="c">int puts(const char *s) { }
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
puts(argv[2]);
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Of course, this program is faulty, as the <code>argv</code> array might have fewer
|
||||
than three elements, and then the array access <code>argv[2]</code> is out of bounds.
|
||||
Now, run CBMC as follows:
|
||||
</p>
|
||||
|
||||
<code>
|
||||
cbmc file1.c --show-properties --bounds-check --pointer-check
|
||||
</code>
|
||||
|
||||
<p class="justified">The two options <code>--bounds-check</code> and <code>--pointer-check</code>
|
||||
instruct CBMC to look for errors related to pointers and array bounds.
|
||||
CBMC will print the list of properties it checks. Note that it lists,
|
||||
among others, a property labeled with "object bounds in argv" together with
|
||||
the location of the faulty array access. As you can see, CBMC largely
|
||||
determines the property it needs to check itself. This is realized by means
|
||||
of a preliminary static analysis, which relies on computing a fixed point on
|
||||
various <a
|
||||
href="http://en.wikipedia.org/wiki/Abstract_interpretation">abstract
|
||||
domains</a>. More detail on automatically generated properties is provided
|
||||
<a href="properties.shtml">here</a>.</p>
|
||||
|
||||
<p class="justified">
|
||||
Note that these automatically generated properties need not necessarily
|
||||
correspond to bugs – these are just <i>potential</i> flaws, as
|
||||
abstract interpretation might be imprecise. Whether these properties
|
||||
hold or correspond to actual bugs needs to be determined by further analysis.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
CBMC performs this analysis using <i>symbolic simulation</i>, which
|
||||
corresponds to a translation of the program into a formula. The formula is
|
||||
then combined with the property. Let's look at the formula that is
|
||||
generated by CBMC's symbolic simulation:</p>
|
||||
|
||||
<code>
|
||||
cbmc file1.c --show-vcc --bounds-check --pointer-check
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
With this option, CBMC performs the symbolic simulation and prints the
|
||||
verification conditions on the screen. A verification condition needs
|
||||
to be proven to be valid by a <i><a href="http://en.wikipedia.org/wiki/Decision_problem">
|
||||
decision procedure</a></i> in order to assert that the corresponding property
|
||||
holds. Let's run the decision procedure:</p>
|
||||
|
||||
<code>
|
||||
cbmc file1.c --bounds-check --pointer-check
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
CBMC transforms the equation you have seen before into CNF and passes it to
|
||||
a SAT solver (more background on this step is in the book on <a
|
||||
href="http://www.decision-procedures.org/">Decision Procedures</a>). It
|
||||
then determines which of the properties that it has generated for the
|
||||
program hold and which do not. Using the SAT solver, CBMC detects that the
|
||||
property for the object bounds of <code>argv</code> does not hold, and will
|
||||
thus print a line as follows:
|
||||
</p>
|
||||
|
||||
<code>
|
||||
[main.pointer_dereference.6] dereference failure: object bounds in argv[(signed long int)2]: FAILURE
|
||||
</code>
|
||||
|
||||
<h3>Counterexample Traces</h3>
|
||||
|
||||
<p class="justified">
|
||||
Let us have a closer look at this property and why it fails. To aid the
|
||||
understanding of the problem, CBMC can generate a <i>counterexample
|
||||
trace</i> for failed properties. To obtain this trace, run
|
||||
</p>
|
||||
|
||||
<code>
|
||||
cbmc file1.c --bounds-check --trace
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
CBMC then prints a counterexample trace, i.e., a program trace that begins
|
||||
with <code>main</code> and ends in a state which violates the property. In
|
||||
our example, the program trace ends in the faulty array access. It also
|
||||
gives the values the input variables must have for the bug to occur. In
|
||||
this example, <code>argc</code> must be one to trigger the out-of-bounds
|
||||
array access. If you add a branch to the example that requires that
|
||||
<code>argc>=3</code>, the bug is fixed and CBMC will report that the
|
||||
proofs of all properties have been successful.</p>
|
||||
|
||||
<h3>Verifying Modules</h3>
|
||||
|
||||
<p class="justified">
|
||||
In the example above, we used a program that starts with a <code>main</code>
|
||||
function. However, CBMC is aimed at embedded software, and these
|
||||
kinds of programs usually have different entry points. Furthermore, CBMC
|
||||
is also useful for verifying program modules. Consider the following example,
|
||||
called <a href="file2.c">file2.c</a>:
|
||||
</p>
|
||||
|
||||
<pre><code>int array[10];
|
||||
int sum() {
|
||||
unsigned i, sum;
|
||||
|
||||
sum=0;
|
||||
for(i=0; i<10; i++)
|
||||
sum+=array[i];
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
In order to set the entry point to the <code>sum</code> function, run
|
||||
</p>
|
||||
|
||||
<code>
|
||||
cbmc file2.c --function sum --bounds-check
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
It is often necessary to build a suitable <i>harness</i> for the function
|
||||
in order to set up the environment appropriately.
|
||||
</p>
|
||||
|
||||
<h3>Loop Unwinding</h3>
|
||||
|
||||
<p class="justified">
|
||||
When running the previous example, you will have noted that CBMC unwinds the
|
||||
<code>for</code> loop in the program. As CBMC performs Bounded Model
|
||||
Checking, all loops have to have a finite upper run-time bound in order to
|
||||
guarantee that all bugs are found. CBMC can optionally check that enough
|
||||
unwinding is performed. As an example, consider the program <a
|
||||
href="binsearch.c">binsearch.c</a>:
|
||||
</p>
|
||||
|
||||
<pre><code>int binsearch(int x) {
|
||||
int a[16];
|
||||
signed low=0, high=16;
|
||||
|
||||
while(low<high) {
|
||||
signed middle=low+((high-low)>>1);
|
||||
|
||||
if(a[middle]<x)
|
||||
high=middle;
|
||||
else if(a[middle]>x)
|
||||
low=middle+1;
|
||||
else // a[middle]==x
|
||||
return middle;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
If you run CBMC on this function, you will notice that the unwinding
|
||||
does not stop on its own. The built-in simplifier is not able to determine
|
||||
a run time bound for this loop. The unwinding bound has to be given as a
|
||||
command line argument:</p>
|
||||
|
||||
<code>
|
||||
cbmc binsearch.c --function binsearch --unwind 6 --bounds-check --unwinding-assertions
|
||||
</code>
|
||||
|
||||
<p class="justified">
|
||||
CBMC verifies that verifies the array accesses are within the bounds; note
|
||||
that this actually depends on the result of the right shift. In addition,
|
||||
as CBMC is given the option
|
||||
<nobr><code>--unwinding-assertions</code></nobr>, it also checks that enough
|
||||
unwinding is done, i.e., it proves a run-time bound. For any lower
|
||||
unwinding bound, there are traces that require more loop iterations. Thus,
|
||||
CBMC will report that the unwinding assertion has failed. As usual, a counterexample
|
||||
trace that documents this can be obtained with the option
|
||||
<code>--property</code>.
|
||||
</p>
|
||||
|
||||
<h3>Unbounded Loops</h3>
|
||||
|
||||
<p class="justified">
|
||||
CBMC can also be used for programs with unbounded loops. In this
|
||||
case, CBMC is used for bug hunting only; CBMC does not attempt to find
|
||||
all bugs. The following program
|
||||
(<a href="lock-example.c">lock-example.c</a>) is an example
|
||||
of a program with a user-specified property:</p>
|
||||
|
||||
<pre><code>_Bool nondet_bool();
|
||||
_Bool LOCK = 0;
|
||||
|
||||
_Bool lock() {
|
||||
if(nondet_bool()) {
|
||||
assert(!LOCK);
|
||||
LOCK=1;
|
||||
return 1; }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void unlock() {
|
||||
assert(LOCK);
|
||||
LOCK=0;
|
||||
}
|
||||
|
||||
int main() {
|
||||
unsigned got_lock = 0;
|
||||
int times;
|
||||
|
||||
while(times > 0) {
|
||||
if(lock()) {
|
||||
got_lock++;
|
||||
/* critical section */
|
||||
}
|
||||
|
||||
if(got_lock!=0)
|
||||
unlock();
|
||||
|
||||
got_lock--;
|
||||
times--;
|
||||
} }
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The <code>while</code> loop in the <code>main</code> function has no
|
||||
(useful) run-time bound. Thus, a bound has to be set on the amount of
|
||||
unwinding that CBMC performs. There are two ways to do so:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>The <code>--unwind</code> command-line parameter can to be used to limit
|
||||
the number of times loops are unwound.</li>
|
||||
|
||||
<li>The <code>--depth</code> command-line parameter can be used to limit
|
||||
the number of program steps to be processed.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
Given the option <code>--unwinding-assertions</code>, CBMC checks whether
|
||||
the arugment to <code>--unwind</code> is large enough to cover all program
|
||||
paths. If the argument is too small, CBMC will detect that not enough
|
||||
unwinding is done reports that an unwinding assertion has failed.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Reconsider the example. For a loop unwinding bound of one, no bug is found.
|
||||
But already for a bound of two, CBMC detects a trace that violates an
|
||||
assertion. Without unwinding assertions, or when using the <code>--depth</code>
|
||||
command line switch, CBMC does not prove the program correct, but it can be
|
||||
helpful to find program bugs. The various command line options that CBMC
|
||||
offers for loop unwinding are described in the section on
|
||||
<a href="cbmc-loops.shtml">understanding loop unwinding</a>.</p>
|
||||
|
||||
<h3>A Note About Compilers and the ANSI-C Library</h3>
|
||||
|
||||
<p class="justified">
|
||||
Most C programs make use of functions provided by a library; instances are
|
||||
functions from the standard ANSI-C library such as <code>malloc</code> or
|
||||
<code>printf</code>. The verification of programs that use such functions
|
||||
has two requirements:</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>Appropriate header files have to be provided. These header files
|
||||
contain <i>declarations</i> of the functions that are to be used.
|
||||
</li>
|
||||
|
||||
<li>Appropriate <i>definitions</i> have to be provided.</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
Most C compilers come with header files for the ANSI-C library functions.
|
||||
We briefly discuss how to obtain/install these library files.
|
||||
</p>
|
||||
|
||||
<h4>Linux</h4>
|
||||
|
||||
<p class="justified">
|
||||
Linux systems that are able to compile software are usually equipped with
|
||||
the appropriate header files. Consult the documentation of your distribution
|
||||
on how to install the compiler and the header files. First try to compile
|
||||
some significant program before attempting to verify it.
|
||||
</p>
|
||||
|
||||
<h4>Windows</h4>
|
||||
|
||||
<p class="justified">
|
||||
On Microsoft Windows, CBMC is pre-configured to use the compiler that is
|
||||
part of Microsoft's Visual Studio. Microsoft's <a
|
||||
href="http://www.visualstudio.com/en-us/products/visual-studio-community-vs">
|
||||
Visual Studio Community</a> is fully featured and available for download for
|
||||
free from the Microsoft webpage. Visual Studio installs the usual set of
|
||||
header files together with the compiler. However, the Visual Studio
|
||||
compiler requires a large set of environment variables to function
|
||||
correctly. It is therefore required to run CBMC from the <i>Visual Studio
|
||||
Command Prompt</i>, which can be found in the menu <i>Visual Studio
|
||||
Tools</i>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Note that in both cases, only header files are available. CBMC only
|
||||
comes with a small set of definitions, which includes functions such as
|
||||
<code>malloc</code>. Detailed information about the built-in definitions is
|
||||
<a href="libraries.shtml">here</a>.</p>
|
||||
|
||||
<h3>Command Line Interface</h3>
|
||||
|
||||
<p class="justified">
|
||||
This section describes the command line interface of CBMC. Like a C
|
||||
compiler, CBMC takes the names of the .c source files as arguments.
|
||||
Additional options allow to customize the behavior of CBMC. Use
|
||||
<code>cbmc --help</code> to get a full list of the available options.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Structured output can be obtained from CBMC using the option <code>--xml-ui</code>.
|
||||
Any output from CBMC (e.g., counterexamples) will then use an XML
|
||||
representation.
|
||||
</p>
|
||||
|
||||
<div class="box1">
|
||||
<div class="caption">Further Reading</div>
|
||||
|
||||
<ul>
|
||||
<li><a href="cbmc-loops.shtml">Understanding Loop Unwinding</a></li>
|
||||
<li><a target=_top href="http://www-2.cs.cmu.edu/~svc/papers/view-publications-ck03.html">
|
||||
Hardware Verification using ANSI-C Programs as a Reference</a></li>
|
||||
<li><a target=_top href="http://www-2.cs.cmu.edu/~svc/papers/view-publications-cky03.html">
|
||||
Behavioral Consistency of C and Verilog Programs Using Bounded Model
|
||||
Checking</a></li>
|
||||
<li><a target=_top href="http://www-2.cs.cmu.edu/~svc/papers/view-publications-ckl2004.html">A
|
||||
Tool for Checking ANSI-C Programs</a></li>
|
||||
</ul>
|
||||
|
||||
<p class="justified">
|
||||
We also have a <a href="http://www.cprover.org/cbmc/applications/">list of
|
||||
interesting applications of CBMC</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
module top(input clk);
|
||||
|
||||
reg [3:0] counter;
|
||||
|
||||
initial counter=0;
|
||||
|
||||
always @(posedge clk)
|
||||
counter=counter+1;
|
||||
|
||||
endmodule
|
|
@ -1,276 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<link rel="stylesheet" href="highlight/styles/default.css">
|
||||
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Automatic Test Suite Generation with CBMC</h2>
|
||||
|
||||
<h3>A Small Tutorial with A Case Study</h3>
|
||||
|
||||
<p class="justified">
|
||||
We assume that CBMC is installed on your system. If not so, follow
|
||||
<a href="installation-cbmc.shtml">these instructions</a>.</p>
|
||||
|
||||
<p class="justified">
|
||||
CBMC can be used to automatically generate test cases that satisfy a certain <a
|
||||
href="https://en.wikipedia.org/wiki/Code_coverage">code coverage</a>
|
||||
criterion. Common coverage criteria include branch coverage, condition
|
||||
coverage and <a
|
||||
href="https://en.wikipedia.org/wiki/Modified_condition/decision_coverage">Modified
|
||||
Condition/Decision Coverage (MC/DC)</a>. Among others, MC/DC is required
|
||||
by several avionics software development guidelines to ensure adequate testing
|
||||
of safety critical software. Briefly, in order to satisfy MC/DC,
|
||||
for every conditional statement containing boolean decisions, each Boolean
|
||||
variable should be evaluated one time to "true" and one time to "false",
|
||||
in a way that affects the outcome of the decision.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In the following, we are going to demonstrate how to apply the test suite
|
||||
generation functionality in CBMC, by means of a case study. The program
|
||||
<a href="pid.c">pid.c</a> is an excerpt from a real-time embedded benchmark <a
|
||||
href="https://www.irit.fr/recherches/ARCHI/MARCH/rubrique.php3?id_rubrique=97">PapaBench</a>,
|
||||
and implements part of a fly-by-wire autopilot for an Unmanned Aerial Vehicle (UAV).
|
||||
It is adjusted mildly for our purposes.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The aim of function <code>climb_pid_run</code> is to control the vertical climb of the UAV.
|
||||
Details on the theory behind this operation are documented in the <a
|
||||
href="https://wiki.paparazziuav.org/wiki/Theory_of_Operation">wiki</a> for the Paparazzi UAV project.
|
||||
The behaviour of this simple controller, supposing that the desired speed is 0.5 meters per second,
|
||||
is plotted in the Figure below.
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<!--<embed src="pid.pdf" width="400px" height="250px" /> -->
|
||||
<img src="pid.png" width="400px" height="250px" alt="The pid controller">
|
||||
|
||||
</center>
|
||||
|
||||
<pre><code class="c numbered">01: // CONSTANTS:
|
||||
02: #define MAX_CLIMB_SUM_ERR 10
|
||||
03: #define MAX_CLIMB 1
|
||||
04:
|
||||
05: #define CLOCK 16
|
||||
06: #define MAX_PPRZ (CLOCK*600)
|
||||
07:
|
||||
08: #define CLIMB_LEVEL_GAZ 0.31
|
||||
09: #define CLIMB_GAZ_OF_CLIMB 0.75
|
||||
10: #define CLIMB_PITCH_OF_VZ_PGAIN 0.05
|
||||
11: #define CLIMB_PGAIN -0.03
|
||||
12: #define CLIMB_IGAIN 0.1
|
||||
13:
|
||||
14: const float pitch_of_vz_pgain=CLIMB_PITCH_OF_VZ_PGAIN;
|
||||
15: const float climb_pgain=CLIMB_PGAIN;
|
||||
16: const float climb_igain=CLIMB_IGAIN;
|
||||
17: const float nav_pitch=0;
|
||||
18:
|
||||
19: /** PID function INPUTS */
|
||||
20: // The user input: target speed in vertical direction
|
||||
21: float desired_climb;
|
||||
22: // Vertical speed of the UAV detected by GPS sensor
|
||||
23: float estimator_z_dot;
|
||||
24:
|
||||
25: /** PID function OUTPUTS */
|
||||
26: float desired_gaz;
|
||||
27: float desired_pitch;
|
||||
28:
|
||||
29: /** The state variable: accumulated error in the control */
|
||||
30: float climb_sum_err=0;
|
||||
31:
|
||||
32: /** Computes desired_gaz and desired_pitch */
|
||||
33: void climb_pid_run()
|
||||
34: {
|
||||
35:
|
||||
36: float err=estimator_z_dot-desired_climb;
|
||||
37:
|
||||
38: float fgaz=climb_pgain*(err+climb_igain*climb_sum_err)+CLIMB_LEVEL_GAZ+CLIMB_GAZ_OF_CLIMB*desired_climb;
|
||||
39:
|
||||
40: float pprz=fgaz*MAX_PPRZ;
|
||||
41: desired_gaz=((pprz>=0 && pprz<=MAX_PPRZ) ? pprz : (pprz>MAX_PPRZ ? MAX_PPRZ : 0));
|
||||
42:
|
||||
43: /** pitch offset for climb */
|
||||
44: float pitch_of_vz=(desired_climb>0) ? desired_climb*pitch_of_vz_pgain : 0;
|
||||
45: desired_pitch=nav_pitch+pitch_of_vz;
|
||||
46:
|
||||
47: climb_sum_err=err+climb_sum_err;
|
||||
48: if (climb_sum_err>MAX_CLIMB_SUM_ERR) climb_sum_err=MAX_CLIMB_SUM_ERR;
|
||||
49: if (climb_sum_err<-MAX_CLIMB_SUM_ERR) climb_sum_err=-MAX_CLIMB_SUM_ERR;
|
||||
50:
|
||||
51: }
|
||||
52:
|
||||
53: int main()
|
||||
54: {
|
||||
55:
|
||||
56: while(1)
|
||||
57: {
|
||||
58: /** Non-deterministic input values */
|
||||
59: desired_climb=nondet_float();
|
||||
60: estimator_z_dot=nondet_float();
|
||||
61:
|
||||
62: /** Range of input values */
|
||||
63: __CPROVER_assume(desired_climb>=-MAX_CLIMB && desired_climb<=MAX_CLIMB);
|
||||
64: __CPROVER_assume(estimator_z_dot>=-MAX_CLIMB && estimator_z_dot<=MAX_CLIMB);
|
||||
65:
|
||||
66: __CPROVER_input("desired_climb", desired_climb);
|
||||
67: __CPROVER_input("estimator_z_dot", estimator_z_dot);
|
||||
68:
|
||||
69: climb_pid_run();
|
||||
70:
|
||||
71: __CPROVER_output("desired_gaz", desired_gaz);
|
||||
72: __CPROVER_output("desired_pitch", desired_pitch);
|
||||
73:
|
||||
74: }
|
||||
75:
|
||||
76: return 0;
|
||||
77: }
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
In order to test the PID controller, we construct a main control loop,
|
||||
which repeatedly invokes the function <code>climb_pid_run</code> (line 69).
|
||||
This PID function has two input variables: the desired speed <code>desired_climb</code>
|
||||
and the estimated speed <code>estimated_z_dot</code>.
|
||||
In the beginning of each loop iteration, values of the inputs are assigned non-deterministically.
|
||||
Subsequently, the <code>__CPROVER_assume</code> statement in lines 63 and 64 guarantees that
|
||||
both values are bounded within a valid range.
|
||||
The <code>__CPROVER_input</code> and <code>__CPROVER_output</code> will help clarify the inputs
|
||||
and outputs of interest for generating test suites.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
To demonstrate the automatic test suite generation in CBMC,
|
||||
we call the following command and we are going to explain the command line options one by one.
|
||||
</p>
|
||||
|
||||
<pre><code>cbmc pid.c --cover mcdc --unwind 6 --xml-ui
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The option <code>--cover mcdc</code> specifies the code coverage criterion.
|
||||
There are four conditional statements in the PID function: in line 41, line 44,
|
||||
line 48 and line 49.
|
||||
To satisfy MC/DC, the test suite has to meet multiple requirements.
|
||||
For instance, each conditional statement needs to evaluate to <em>true</em> and <em>false</em>.
|
||||
Consider the condition <code>"pprz>=0 && pprz<=MAX_PPRZ"</code> in line 41. CBMC
|
||||
instruments three coverage goals to control the respective evaluated results of <code>"pprz>=0"</code> and
|
||||
<code>"pprz<=MAX_PPRZ"</code>.
|
||||
We list them in below and they satisfy the MC/DC rules.
|
||||
Note that <code>MAX_PPRZ</code> is defined as 16 * 600 in line 06 of the program.
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
<code>!(pprz >= (float)0) && pprz <= (float)(16 * 600) id="climb_pid_run.coverage.1"
|
||||
pprz >= (float)0 && !(pprz <= (float)(16 * 600)) id="climb_pid_run.coverage.2"
|
||||
pprz >= (float)0 && pprz <= (float)(16 * 600) id="climb_pid_run.coverage.3"
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The "id" of each coverage goal is automatically assigned by CBMC. For every
|
||||
coverage goal, a test suite (if there exists) that <!-- the program execution that-->
|
||||
satisfies such a goal is printed out in XML format, as the parameter
|
||||
<code>--xml-ui</code> is given. Multiple coverage goals can share a
|
||||
test suite, when the corresponding execution of the program satisfies all these
|
||||
goals at the same time. <!--Each trace corresponds to a test case.-->
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In the end, the following test suites are automatically generated for testing the PID controller.
|
||||
A test suite consists of a sequence of input parameters that are
|
||||
passed to the PID function <code>climb_pid_run</code> at each loop iteration.
|
||||
For example, Test 1 covers the MC/DC goal with id="climb_pid_run.coverage.1".
|
||||
The complete output from CBMC is in
|
||||
<a href="pid_test_suites.xml">pid_test_suites.xml</a>, where every test suite and the coverage goals it is for
|
||||
are clearly described.
|
||||
|
||||
<pre><code>Test suite:
|
||||
Test 1.
|
||||
(iteration 1) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
|
||||
Test 2.
|
||||
(iteration 1) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 2) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
|
||||
Test 3.
|
||||
(iteration 1) desired_climb=0.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 2) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
|
||||
Test 4.
|
||||
(iteration 1) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 2) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 3) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 4) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 5) desired_climb=0.000000f, estimator_z_dot=-1.000000f
|
||||
(iteration 6) desired_climb=1.000000f, estimator_z_dot=-1.000000f
|
||||
|
||||
Test 5.
|
||||
(iteration 1) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 2) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 3) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 4) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 5) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
(iteration 6) desired_climb=-1.000000f, estimator_z_dot=1.000000f
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The option <code>--unwind 6</code> unwinds the loop inside the main
|
||||
function body six times. In order to achieve the complete coverage on all the instrumented goals
|
||||
in the PID function <code>climb_pid_run</code>, the loop must be unwound sufficient enough times.
|
||||
For example, <code>climb_pid_run</code> needs to be called at least six times for evaluating the
|
||||
condition <code>climb_sum_err>MAX_CLIMB_SUM_ERR</code> in line 48 to <em>true</em>.
|
||||
This corresponds to the Test 5.
|
||||
An introduction to the use of loop unwinding can be found
|
||||
in <a href="cbmc-loops.shtml">Understanding Loop Unwinding</a>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In this small tutorial, we present the automatic test suite generation
|
||||
functionality of CBMC, by applying the MC/DC code coverage criterion to a
|
||||
PID controller case study. In addition to <code>--cover mcdc</code>, other
|
||||
coverage criteria like <code>branch</code>, <code>decision</code>,
|
||||
<code>path</code> etc. are also available when calling CBMC.
|
||||
</p>
|
||||
|
||||
<h3>Coverage Criteria</h3>
|
||||
|
||||
<p class="justified">
|
||||
The table below summarizes the coverage criteria that CBMC supports.
|
||||
</p>
|
||||
|
||||
<table class="fancy">
|
||||
|
||||
<tr><th>Criterion</th><th>Definition</th></tr>
|
||||
|
||||
<tr><td>assertion</td>
|
||||
<td>For every assertion, generate a test that reaches it</td></tr>
|
||||
|
||||
<tr><td class="alt">location</td>
|
||||
<td class="alt">For every location, generate a test that reaches it</td></tr>
|
||||
|
||||
<tr><td>branch</td>
|
||||
<td>Generate a test for every branch outcome</td></tr>
|
||||
|
||||
<tr><td class="alt">decision</td>
|
||||
<td class="alt">Generate a test for both outcomes of every Boolean expression
|
||||
that is not an operand of a propositional connective</td></tr>
|
||||
|
||||
<tr><td>condition</td>
|
||||
<td>Generate a test for both outcomes of every Boolean expression</td></tr>
|
||||
|
||||
<tr><td class="alt">mcdc</td>
|
||||
<td class="alt">Modified Condition/Decision Coverage (MC/DC)</td></tr>
|
||||
|
||||
<tr><td>path</td>
|
||||
<td>Bounded path coverage</td></tr>
|
||||
|
||||
<tr><td class="alt">cover</td>
|
||||
<td class="alt">Generate a test for every <code>__CPROVER_cover</code> statement
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,877 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<link rel="stylesheet" href="highlight/styles/default.css">
|
||||
<script src="highlight/highlight.pack.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>The CPROVER Source Code Reference</h2>
|
||||
|
||||
<p class="justified">
|
||||
The following sections provide an introduction for anybody who
|
||||
wishes to modify CBMC or build new tools on top of the APIs used
|
||||
by CBMC. They summarize key components, data structures and APIs
|
||||
that are used to build the CPROVER tools.
|
||||
</p>
|
||||
|
||||
<h3>Source Code Availability and Compilation</h3>
|
||||
|
||||
<p class="justified">
|
||||
The most recent source code of CBMC and the CPROVER infrastructure can be obtained
|
||||
via git at <a
|
||||
href="https://github.com/diffblue/cbmc.git">https://github.com/diffblue/cbmc.git</a>.
|
||||
Tar balls for releases are available at <a
|
||||
href="https://github.com/diffblue/cbmc/releases">https://github.com/diffblue/cbmc/releases</a>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
Detailed instructions on how to build CBMC from source are given
|
||||
in the file <a href="https://raw.githubusercontent.com/diffblue/cbmc/master/COMPILING">COMPILING</a>.
|
||||
</p>
|
||||
|
||||
<h3>Components</h3>
|
||||
|
||||
<center><img src="c_to_ir.svg" width=500></center>
|
||||
<center>From C source code file to CPROVER's IR</center>
|
||||
|
||||
<p class="justified">
|
||||
The sources of the C frontend are located in the "src/ansi-c" directory. It
|
||||
uses a standard Flex/Bison setup for scanning and parsing the files. The
|
||||
Flex scanner produces a token sequence, which is turned into a tree
|
||||
representation of the input program using the Bison grammar. The
|
||||
typechecker subsequently annotates this parse tree with types and generates
|
||||
a symbol table. The symbol table is a map from identifiers (functions,
|
||||
variables and types) to their definitions.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The following example illustrates how to use the frontend for parsing files and
|
||||
for translating them into a symbol table. A call to <i>parse</i> generates
|
||||
the parse tree of the program. The conversion into the symbol table is
|
||||
performed during type checking, which is done by a call to the
|
||||
<i>typecheck</i> method. The symbol table is a map from identifiers to the
|
||||
<i>symbolt</i> data structure.
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <ansi-c/ansi_c_language.h>
|
||||
#include <util/cmdline.h>
|
||||
#include <util/config.h>
|
||||
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
// Command line: parse -I incl_dir file1 ...
|
||||
cmdlinet cmdl;
|
||||
cmdl.parse(argc, argv, "I:");
|
||||
|
||||
config.init();
|
||||
|
||||
if(cmdl.isset('I'))
|
||||
config.ansi_c.include_paths=cmdl.get_values('I');
|
||||
|
||||
// Set language to C
|
||||
std::auto_ptr<languaget> clang=new_ansi_c_language();
|
||||
|
||||
// Symbol table
|
||||
symbol_tablet my_symbol_table;
|
||||
|
||||
for(const auto & arg : cmdl.args)
|
||||
{
|
||||
// Source code stream
|
||||
std::ifstream in(arg.c_str());
|
||||
|
||||
// Parse
|
||||
clang->parse(in, "", std::cerr);
|
||||
|
||||
// Typecheck
|
||||
clang->typecheck(my_symbol_table, arg, std::cerr);
|
||||
}
|
||||
|
||||
// Do some final adjustements
|
||||
clang->final(my_symbol_table, std::cerr);
|
||||
|
||||
my_symbol_table.show(std::cout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The parse trees are implemented using a class called <i>irept</i>. Its
|
||||
declaration and definiton can be found in the files "src/util/irep.h" and
|
||||
"src/util/irep.cpp", respectively.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The excerpt below gives some details of the class <i>irept</i>:
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">class irept
|
||||
{
|
||||
public:
|
||||
typedef std::vector<irept> subt;
|
||||
typedef std::map<irep_name_string, irept> named_subt;
|
||||
...
|
||||
|
||||
public:
|
||||
class dt
|
||||
{
|
||||
public:
|
||||
unsigned ref_count;
|
||||
dstring data;
|
||||
named_subt named_sub;
|
||||
named_subt comments;
|
||||
subt sub;
|
||||
...
|
||||
};
|
||||
|
||||
protected:
|
||||
dt *data;
|
||||
...
|
||||
};
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Every node of any tree is an object of class <i>irept</i>. Each node has a
|
||||
pointer to an object of class <i>dt</i>. The <i>dt</i> objects are used
|
||||
for storing the actual content of nodes. Objects of class <i>dt</i> are
|
||||
dynamically allocated and can be shared between nodes. A reference-counter
|
||||
mechanism is implemented to automatically free unreachable <i>dt</i>
|
||||
objects. A shallow copy of a tree is an <i>O</i>(1) operation.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The field <i>data</i> of class <i>dt</i> is a (hashed) string
|
||||
representing the label of the nodes. The fields <i>named_sub</i>,
|
||||
<i>comments</i> and <i>sub</i> are links to childs. Edges are either
|
||||
labeled with a string or ordered. The string-labeled edges are stored in the
|
||||
map <i>comments</i> if their first character is '#'. Otherwise, they are
|
||||
stored in the map <i>named_sub</i>. The labels of edges are unique for a
|
||||
given node; however, their ordering is not preserved. The field <i>sub</i>
|
||||
is a vector of nodes that is used for storing the ordered children. The order
|
||||
of edges of this kind is preserved during copy.
|
||||
</p>
|
||||
|
||||
<center><img src="ireptree.svg" width=350></center>
|
||||
<center>Tree for the expression <i>a+b</i> with <i>int a; char
|
||||
b;</i>.</center>
|
||||
|
||||
<h4>Interface of Class <i>irept</i></h4>
|
||||
|
||||
<h5>id</h5>
|
||||
|
||||
<pre><code class="c++">const irep_idt &id();
|
||||
void id(const irep_idt &_data);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first method returns a constant reference to the label of the node. The
|
||||
second method sets the label of the node.
|
||||
</p>
|
||||
|
||||
<h5>is_nil and is_not_nil</h5>
|
||||
|
||||
<pre><code class="c++">virtual bool is_nil() const;
|
||||
virtual bool is_not_nil() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first method returns true if the label of the node is equal to "nil".
|
||||
The second method returns false if the label of the node is equal to "nil".
|
||||
</p>
|
||||
|
||||
<h5>find, add and get</h5>
|
||||
|
||||
<pre><code class="c++">const irept &find(const irep_namet &name) const;
|
||||
irept &add(const irep_namet &name);
|
||||
const irep_idt &get(const irep_namet &name) const;
|
||||
</code></pre>
|
||||
|
||||
<ol>
|
||||
|
||||
<li>The first method looks for an edge with label <i>name</i>
|
||||
and returns the corresponding child. If no edge with label <i>name</i>
|
||||
is found, then <i>nil_rep</i> is returned.</li>
|
||||
|
||||
<li>The second method does the same as the first except that if
|
||||
no edge with label <i>name</i> if found, then a new child is created
|
||||
and returned.
|
||||
</li>
|
||||
|
||||
<li>The third method does the same as the first except that the label
|
||||
of the child is returned (instead of a reference).
|
||||
If no edge with label <i>name</i> is found, then an empty
|
||||
string is returned.
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<h5>set</h5>
|
||||
|
||||
<pre><code class="c++">void set(const irep_namet &name,
|
||||
const irep_idt &value);
|
||||
void set(const irep_namet &name, const long value);
|
||||
void set(const irep_namet &name, const irept &irep);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
These methods create a new edge with label <i>name</i>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
If the second argument is an object of class <i>irept</i>, then it is
|
||||
assigned to the new child.
|
||||
|
||||
<p class="justified">
|
||||
If the second argument is a string, then it is set as node-label of the new child.
|
||||
|
||||
<p class="justified">
|
||||
If the second argument is a number, then it is converted to a
|
||||
string and set as node-label of the new child.
|
||||
|
||||
<h5>remove</h5>
|
||||
|
||||
<pre><code class="c++">void remove(const irep_namet &name);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
This method looks for an edge with label <i>name</i>
|
||||
and removes it.
|
||||
|
||||
<h5>move_to_sub and move_to_named_sub</h5>
|
||||
|
||||
<pre><code class="c++">void move_to_sub(irept &irep);
|
||||
void move_to_named_sub(const irep_namet &name, irept &irep);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first method creates a new ordered edge with a child equal to
|
||||
<i>irep</i>. Then it sets <i>irep</i> to <i>nil</i>. The index of the
|
||||
edge is equal to the size of vector <i>sub</i> before the call.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The second method does the same but for labeled edges.
|
||||
</p>
|
||||
|
||||
<h5>swap</h5>
|
||||
|
||||
<pre><code class="c++">void swap(irept &irep);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Exchange the content of the invoked node with the one of <i>irep</i>.
|
||||
</p>
|
||||
|
||||
<h5>make_nil</h5>
|
||||
|
||||
<pre><code class="c++">void make_nil();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Set the label of the node to "nil" and remove all outgoing edges.
|
||||
</p>
|
||||
|
||||
<h5>get_sub and get_named_sub and get_comments</h5>
|
||||
|
||||
<pre><code class="c++">const subt &get_sub();
|
||||
const named_subt &get_named_sub();
|
||||
const named_subt &get_comments();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Return a constant reference to
|
||||
<i>sub</i>, <i>named_sub</i>, and <i>comments</i>, respectively.
|
||||
</p>
|
||||
|
||||
<h3>Types</h3>
|
||||
|
||||
<p class="justified">
|
||||
The class <i>typet</i> inherits from <i>irept</i>. Types may have
|
||||
subtypes. This is modeled with two edges named "subtype" and "subtypes". The
|
||||
class <i>typet</i> only add specialized methods for accessing the subtype
|
||||
information to the interface of <i>irept</i>.
|
||||
</p>
|
||||
|
||||
<h4>Interface of class <i>typet</i></h4>
|
||||
|
||||
<h5>has_subtype and has_subtypes</h5>
|
||||
|
||||
<pre><code class="c++">bool has_subtype() const;
|
||||
bool has_subtypes() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first method returns true if the a subtype node exists. is not
|
||||
<i>nil</i>. The second method returns true is a subtypes node exists.
|
||||
</p>
|
||||
|
||||
<h5>subtype and subtypes</h5>
|
||||
|
||||
<pre><code class="c++">typet &subtype();
|
||||
typest &subtypes();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first method returns a reference to the 'subtype' node.
|
||||
The second method returns a reference to the vector of subtypes.
|
||||
</p>
|
||||
|
||||
<h4>Subtypes of <i>typet</i></h4>
|
||||
|
||||
<p class="justified">
|
||||
A number of subtypes of <code>typet</code> exist which allow convenient
|
||||
creation and manipulation of <code>typet</code> objects for special types.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr><th>Class</th><th>Description</th></tr>
|
||||
|
||||
<tr><td valign=top><code>bool_typet</code></td>
|
||||
<td>Boolean type</td></tr>
|
||||
|
||||
<tr><td valign=top><code>symbol_typet</code></td>
|
||||
<td>Symbol type. Has edge "identifier" to a string value, which can be accessed with <code>get_identifier</code> and <code>set_identifier</code>.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>struct_typet</code>, <code>union_typet</code></td>
|
||||
<td>Represent a struct, resp. union types. Convenience functions to access components <code>components()</code>.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>code_typet</code></td>
|
||||
<td>The type of a function/procedure. Convenience functions to access <code>arguments()</code> and <code>return_type()</code>. </td></tr>
|
||||
|
||||
<tr><td valign=top><code>array_typet</code></td>
|
||||
<td>Convenience function <code>size()</code> to access size of the array.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>pointer_typet</code></td>
|
||||
<td>Pointer type, subtype stores the type of the object pointed to.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>reference_typet</code></td>
|
||||
<td>Represents a reference type, subtype stores the type of the object referenced to. </td></tr>
|
||||
|
||||
<tr><td valign=top><code>bv_typet</code></td>
|
||||
<td>Represents a bit vector type with variable width.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>fixed_bv_typet</code></td>
|
||||
<td>Represents a bit vector that encodes a fixed-point number.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>floatbv_typet</code></td>
|
||||
<td>Represents a bit vector that encodes a floating-point number.</td></tr>
|
||||
|
||||
<tr><td valign=top><code>string_typet</code></td>
|
||||
<td>Represents a string type.</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h3>Source Locations</h3>
|
||||
|
||||
<p class="justified">
|
||||
The class <i>source_locationt</i> inherits from the class <i>irept</i>. It
|
||||
is used to store locations in text files. It adds specialized methods to
|
||||
manipulate the edges named "file", "line", "column", "function".
|
||||
</p>
|
||||
|
||||
<h3>Expressions</h3>
|
||||
|
||||
<p class="justified">
|
||||
The class <i>exprt</i> inherits from class <i>irept</i>. Expressions
|
||||
have operands and a type. This is modeled with ordered edges for the
|
||||
operands and an edge labeled"type", respectively. The class <i>exprt</i>
|
||||
only adds specialized methods for accessing operands and type information
|
||||
to the interface of <i>irept</i>.
|
||||
</p>
|
||||
|
||||
<center><img src="expr.svg" width=150></center>
|
||||
<center>Representation of a binary expression</center>
|
||||
|
||||
<h4>Interface of class <i>exprt</i></h4>
|
||||
|
||||
<h5>constructors</h5>
|
||||
|
||||
<pre><code class="c++">explicit exprt(const irep_idt &id);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Creates an <i>exprt</i> object with a given label and no type.
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">exprt(const irep_idt &id, const typet &type);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Creates an <i>exprt</i> object with a given label and type.
|
||||
</p>
|
||||
|
||||
<h5>type</h5>
|
||||
|
||||
<pre><code class="c++">const typet &type() const;
|
||||
typet &type();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Return a reference to the 'type' node
|
||||
</p>
|
||||
|
||||
<h5>has_operands</h5>
|
||||
|
||||
<pre><code class="c++">bool has_operands() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Return true if the expression has at least one operand.
|
||||
</p>
|
||||
|
||||
<h5>operands</h5>
|
||||
|
||||
<pre><code class="c++">const operandst &operands() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Return a reference to the vector of operands.
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">const exprt &op0();
|
||||
const exprt &op1();
|
||||
const exprt &op2();
|
||||
const exprt &op3();
|
||||
exprt &op0();
|
||||
exprt &op1();
|
||||
exprt &op2();
|
||||
exprt &op3();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Return a reference to a specific operand. Avoid calling
|
||||
if the operand does not exist.
|
||||
</p>
|
||||
|
||||
<h5>Constructing common expressions</h5>
|
||||
|
||||
<pre><code class="c++">void make_true();
|
||||
void make_false();
|
||||
void make_bool(bool value);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Turn the current <i>exprt</i> instance into a expression of type "bool"
|
||||
with label "constant" and a single edge labeled "value", which points to
|
||||
a new node with label either "true" or "false".
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">void make_typecast(const typet &_type);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Turns the current <i>exprt</i> instance into a typecast. The old value of
|
||||
the instance is appended as the single operand of the typecast, i.e., the
|
||||
result is a typecast-expression of the old expression to the indicated type.
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">void make_not();
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Turns the current <i>exprt</i> instance into an expression with label
|
||||
"not" of the same type as the original expression. The old value of the
|
||||
instance is appended as the operand of the "not"-node. If the original
|
||||
expression is of type "bool", the result represents the negation of the
|
||||
original expression with the following simplifications possibly applied:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>¬ ¬ f = f</li>
|
||||
<li>¬ <i>true</i> = <i>false</i></li>
|
||||
<li>¬ <i>false</i> = <i>true</i></li>
|
||||
</ul>
|
||||
|
||||
<pre>
|
||||
void negate();
|
||||
</pre>
|
||||
|
||||
<p class="justified">
|
||||
Turns the current <i>exprt</i> instance into a negation of itself, depending
|
||||
on its type:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
||||
<li>For boolean expressions, <code>make_not</code> is called.</li>
|
||||
|
||||
<li>For integers, the current instance is turned into a numeric negation
|
||||
expression "unary-" of its old value. Chains of "unary-" nodes and
|
||||
negations of integer constants are simplified.</li>
|
||||
|
||||
<li>For all other types, <code>irept::make_nil</code> is called.</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<pre><code class="c++">bool sum(const exprt &expr);
|
||||
bool mul(const exprt &expr);
|
||||
bool subtract(const exprt &expr);
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Expect the "this" object and the function argument to be constants of the
|
||||
same numeric type. Turn the current <code>exprt</code> instance into a
|
||||
constant expression of the same type, whose "value" edge points to the
|
||||
result of the sum, product, or difference of the two expressions. If the
|
||||
operation fails for some reason (e.g., the types are different),
|
||||
<code>true</code> is returned.
|
||||
</p>
|
||||
|
||||
<h5>Testing common expressions</h5>
|
||||
|
||||
<pre><code class="c++">bool is_constant() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Returns true if the expression label is "constant".
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">bool is_boolean() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Returns true if the label of the type is "bool".
|
||||
|
||||
<pre><code class="c++">bool is_false() const;
|
||||
bool is_true() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first function returns true if the expression is a boolean constant with
|
||||
value "false". The second function returns true for any boolean constant
|
||||
that is not of value "false".
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">bool is_zero() const;
|
||||
bool is_one() const;
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
The first function returns true if the expression represents a zero numeric
|
||||
constant, or if the expression represents a null pointer. The second
|
||||
function returns true if the expression represents a numeric constant with
|
||||
value "1".
|
||||
</p>
|
||||
|
||||
<h4>Subtypes of <i>exprt</i></h4>
|
||||
|
||||
<p class="justified">
|
||||
A number of subtypes of <code>exprt</code> provide further convenience functions
|
||||
for edge access or other specialized behaviour:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
|
||||
<tr><th>Class</th><th>Description</th></tr>
|
||||
|
||||
<tr><td valign=top><code>transt</code></td>
|
||||
<td valign=top>Represents an SMV-style transition system with invariants
|
||||
<code>invar()</code>, initial state <code>init()</code> and transition
|
||||
function <code>trans()</code>.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>true_exprt</code></td>
|
||||
<td valign=top>Boolean constant true expression.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>false_exprt</code></td>
|
||||
<td valign=top>Boolean constant false expression.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>symbol_exprt</code></td>
|
||||
<td valign=top>Represents a symbol (e.g., a variable occurrence), convenience function for manipulating "identifier"-edge <code>set_identifier</code> and <code>get_identifier</code></td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>predicate_exprt</code></td>
|
||||
<td valign=top>Convenience constructors to create expressions of type "bool".</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>binary_relation_exprt : predicate_exprt</code></td>
|
||||
<td valign=top>Convenience functions to create and manipulate binary expressions of type "bool".</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>equality_exprt : binary_relation_exprt</code></td>
|
||||
<td valign=top>Convenience functions to create and manipulate equality expressions such as "a == b".</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>ieee_float_equal_exprt : binary_relation_exprt</code></td>
|
||||
<td valign=top>Convenience functions to create and manipulate equality expressions between floating-point numbers.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>index_exprt</code></td>
|
||||
<td valign=top>Represents an array access expression such as "a[i]". Convenience functions <code>array()</code> and <code>index()</code> for accessing the array expressions and indexing expression.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>typecast_exprt</code></td>
|
||||
<td valign=top>Represents a cast to the type of the expression.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top>
|
||||
<code>and_exprt</code>,
|
||||
<code>implies_exprt</code>,
|
||||
<code>or_exprt</code>,
|
||||
<code>not_exprt</code></td>
|
||||
<td valign=top>Representations of logical operators with convenience constructors.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>address_of_exprt</code></td>
|
||||
<td>Representation of a C-style <code>&a</code> address-of operation. Convenience function <code>object()</code> for accessing operand.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>dereference_exprt</code></td>
|
||||
<td>Representation of a C-style <code>*a</code> pointer-dereference operation. Convenience function <code>object()</code> for accessing operand.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>if_exprt</code></td>
|
||||
<td>Representation of a conditional expresion, with convenience functions <code>cond()</code>, <code>true_case()</code> and <code>false_case()</code> for accessing operands.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>member_exprt</code></td>
|
||||
<td>Represents a <code>some_struct.some_field</code> member access.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>codet</code></td>
|
||||
<td>Represents a segment of code.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h3>Symbols and the Symbol Table</h3>
|
||||
|
||||
<h4>Symbol</h4>
|
||||
|
||||
<p class="justified">
|
||||
A symbol is an object of class <code>symbolt</code>. This class
|
||||
is declared in "util/symbol.h". The code below shows a partial
|
||||
declaration of the interface:
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">class symbolt
|
||||
{
|
||||
public:
|
||||
typet type;
|
||||
exprt value;
|
||||
std::string name;
|
||||
std::string base_name;
|
||||
...
|
||||
};
|
||||
</code></pre>
|
||||
|
||||
<p class="justified">
|
||||
Symbol names are unique. Scopes are handled by adding prefixes
|
||||
to symbols:
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">int main(int argc, char* argv[]) {
|
||||
|
||||
// Symbol name: c::main::0::alice
|
||||
char alice = 0; // Symbol base: alice
|
||||
|
||||
{
|
||||
// Symbol name: c::main::1::alice
|
||||
int alice = 0; // Symbol base: alice
|
||||
}
|
||||
}</code></pre>
|
||||
|
||||
<h4>Symbol Table</h4>
|
||||
|
||||
<p class="justified">
|
||||
A symbol table is an object of class <code>contextt</code>. This class
|
||||
is declared in "util/context.h". The code below shows a partial
|
||||
declaration of the interface:
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">class symbol_tablett
|
||||
{
|
||||
public:
|
||||
// Insert the symbol
|
||||
bool add(const symbolt &symb);
|
||||
// Insert symb into the
|
||||
// table and erase it.
|
||||
// New_symbol points to the
|
||||
// newly inserted element.
|
||||
bool move(symbolt &symbol, symbolt *&new_symbol);
|
||||
|
||||
// Insert symb into the
|
||||
// table. Then symb is erased.
|
||||
bool move(symbolt &syb);
|
||||
|
||||
// Return the entry of the
|
||||
// symbol with given name.
|
||||
const irept &value(const std::string &name) const;
|
||||
};
|
||||
</code></pre>
|
||||
|
||||
<h2>Goto Programs</h2>
|
||||
|
||||
<p class="justified">
|
||||
Goto programs are a representation of the control flow graph of a program
|
||||
that uses only guarded goto and assume statements to model non-sequential
|
||||
flow. The main definition can be found in
|
||||
"src/goto-programs/goto_program_template.h", which is a template class. The
|
||||
concrete instantiation of the template that is used in the framework can be
|
||||
found in "src/goto-programs/goto_program.h". A single instruction in a goto
|
||||
program is represented by the class <i>goto_programt::instructiont</i>
|
||||
whose definition can be found again in
|
||||
"goto-programs/goto_program_template.h".
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In the class <code>goto_programt</code>, the control flow graph is represented
|
||||
as a mixture of sequential transitions between nodes, and non-sequential
|
||||
transitions at goto-nodes. The sequential flow of the program is captured
|
||||
by the list <code>instructions</code> that is a field of the class
|
||||
<code>goto_programt</code>. Transitions via goto statements are represented in
|
||||
the list <code>targets</code>, which is a field of the class
|
||||
<code>goto_programt::instructiont</code>, i.e., each goto-instruction carries a
|
||||
list of possible jump destinations. The latter list <code>targets</code> is a
|
||||
list of iterators which point to elements of the list <code>instructions</code>.
|
||||
An illustration is given in the figure below.
|
||||
</p>
|
||||
|
||||
<center><img src="goto_program.svg" width=500></center>
|
||||
<center>Representation of program flow in <i>goto_programt</i></center>
|
||||
|
||||
<p class="justified">
|
||||
Instructions can have a number of different types as represented by
|
||||
<code>enum goto_program_instruction_typet</code> and can be accessed via the
|
||||
field <code>type</code> in <code>instructiont</code>. These include:
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr><td valign=top><code>GOTO</code></td>
|
||||
<td>Represents a non-deterministic branch to the instructions given in the
|
||||
list <code>targets</code>. Goto statements are guarded, i.e., the
|
||||
non-deterministic branch is only taken if the expression in
|
||||
<code>guard</code> evaluates to true, otherwise the program continues
|
||||
sequentially. Guarded gotos can be used, for example, to model if
|
||||
statements. The guard is then set to the negated condition of the
|
||||
statement, and goto target is set to bypass the conditionally executed code
|
||||
if this guard evaluates to true.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>ASSUME</code></td>
|
||||
<td>An assumption statement that restricts viable paths reaching the
|
||||
instruction location to the ones that make the expression <code>guard</code>
|
||||
evaluate to true.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>ASSERT</code></td>
|
||||
<td>An assertion whose <code>guard</code> is checked for validity when the instruction is
|
||||
reached.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>RETURN</code></td>
|
||||
<td>A return statement in a function.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>END_FUNCTION</code></td>
|
||||
<td>Denotes the end of a function.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>ASSIGN</code></td>
|
||||
<td>A variable assignment.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>SKIP</code></td>
|
||||
<td>No operation.</td>
|
||||
</tr>
|
||||
|
||||
<tr><td valign=top><code>OTHER</code></td>
|
||||
<td>Any operation not covered by <code>enum
|
||||
goto_program_instruction_typet</code>.</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<p class="justified">
|
||||
A number of convenience functions in <code>instructiont</code>, such as
|
||||
<code>is_goto()</code>, <code>is_assume()</code>, etc., simplify type queries.
|
||||
The following code segment gives a partial interface declaration of
|
||||
<code>goto_program_template</code> and <code>instructiont</code>.
|
||||
</p>
|
||||
|
||||
<pre><code class="c++">template <class codeT, class guardT>
|
||||
class goto_program_templatet
|
||||
{
|
||||
public:
|
||||
//list of instruction type
|
||||
typedef std::list<class instructiont> instructionst;
|
||||
|
||||
//a reference to an instruction in the list
|
||||
typedef typename
|
||||
std::list<class instructiont>::iterator targett;
|
||||
|
||||
//Sequential list of instructions,
|
||||
//representing sequential program flow
|
||||
instructionst instructions;
|
||||
|
||||
typedef typename
|
||||
std::map<const_targett, unsigned> target_numberst;
|
||||
|
||||
//A map containing the unique number of each target
|
||||
target_numberst target_numbers;
|
||||
|
||||
//Get the successors of a given instruction
|
||||
void get_successors(targett target, targetst &successors);
|
||||
|
||||
...
|
||||
|
||||
|
||||
class instructiont
|
||||
{
|
||||
public:
|
||||
codeT code;
|
||||
|
||||
//identifier of enclosing function
|
||||
irep_idt function;
|
||||
|
||||
//location in the source file
|
||||
locationt location;
|
||||
|
||||
//type of instruction?
|
||||
goto_program_instruction_typet type;
|
||||
|
||||
//Guard statement for gotos, assume, assert
|
||||
guardT guard;
|
||||
|
||||
//targets for gotos
|
||||
targetst targets;
|
||||
|
||||
//set of all predecessors (sequential, and gotos)
|
||||
std::set<targett> incoming_edges;
|
||||
|
||||
// a globally unique number to identify a
|
||||
// program location. It is guaranteed to be
|
||||
// ordered in program order within one
|
||||
// goto_program
|
||||
unsigned location_number;
|
||||
|
||||
// a globally unique number to identify loops
|
||||
unsigned loop_number;
|
||||
|
||||
// true if this is a goto jumping back to an
|
||||
// earlier instruction in the sequential program
|
||||
// flow
|
||||
bool is_backwards_goto() const;
|
||||
};
|
||||
|
||||
}
|
||||
</code></pre>
|
||||
|
||||
<!--
|
||||
<h3>Data Structures</h3>
|
||||
-->
|
||||
|
||||
<!-- <h3>APIs</h3>
|
||||
-->
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,5 +0,0 @@
|
|||
</div> <!-- main -->
|
||||
</div> <!-- wrap -->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,69 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Example: Extracting Models from the Apache HTTPD</h3>
|
||||
|
||||
<p class="justified">
|
||||
The <a href="http://httpd.apache.org/">Apache HTTPD</a> is still the most
|
||||
frequently used web server. Together with the relevant libraries, it
|
||||
consists of around 0.4 million lines of C code. In the following, we show
|
||||
how to extract models from Apache HTTPD 2.4.2.
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li><p class="justified">
|
||||
First of all, we download the sources of Apache HTTPD and two supporting
|
||||
libraries and uncompress them:</p>
|
||||
|
||||
<p>
|
||||
<code>lwp-download http://www.mirrorservice.org/sites/ftp.apache.org/apr/apr-1.4.6.tar.bz2</code><br>
|
||||
<code>lwp-download http://www.mirrorservice.org/sites/ftp.apache.org/apr/apr-util-1.4.1.tar.bz2</code><br>
|
||||
<code>lwp-download http://mirror.catn.com/pub/apache/httpd/httpd-2.4.2.tar.bz2</code><br>
|
||||
<br>
|
||||
<code>bunzip2 < apr-1.4.6.tar.bz2 | tar x</code><br>
|
||||
<code>bunzip2 < apr-util-1.4.1.tar.bz2 | tar x</code><br>
|
||||
<code>bunzip2 < httpd-2.4.2.tar.bz2 | tar x</code>
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now compile
|
||||
<a href="gcc-wrap.c">gcc-wrap.c</a> and put the resulting binary
|
||||
into a directory that is in your PATH variable:</p>
|
||||
<p>
|
||||
<code>lwp-download http://www.cprover.org/cprover-manual/gcc-wrap.c</code><br>
|
||||
<code>gcc gcc-wrap.c -o gcc-wrap</code><br>
|
||||
<code>cp gcc-wrap ~/bin/</code><br>
|
||||
</p>
|
||||
<p class="justified">This assumes that the directory <code>~/bin</code>
|
||||
exists and is in your PATH variable.</p>
|
||||
</li>
|
||||
|
||||
<li><p>We now build the sources with gcc:</p>
|
||||
|
||||
<p>
|
||||
<code>(cd apr-1.4.6; ./configure; make CC=gcc-wrap)</code><br>
|
||||
<code>(cd apr-util-1.4.1; ./configure --with-apr=../apr-1.4.6 ; make CC=gcc-wrap)</code><br>
|
||||
<code>(cd httpd-2.4.2; ./configure --with-apr=../apr-1.4.6 --with-apr-util=../apr-util-1.4.1 ; make CC=gcc-wrap)</code>
|
||||
</p>
|
||||
|
||||
<li><p class="justified">You can now compile the preprocessed
|
||||
source files with goto-cc as follows:</p>
|
||||
<p>
|
||||
<code>find ./ -name *.i > source-file-list</code><br>
|
||||
<code>for a in `cat source-file-list` ; do</code><br>
|
||||
<code> goto-cc -c $a -o $a.gb</code><br>
|
||||
<code>done</code></p>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
The resulting <code>.gb</code> files can be passed to any
|
||||
of the CPROVER tools.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Example: Extracting Models from the Linux Kernel</h3>
|
||||
|
||||
<p class="justified">
|
||||
|
||||
The Linux kernel code consists of more than 11 million lines of low-level C
|
||||
and is frequently used to evaluate static analysis techniques. In the
|
||||
following, we show how to extract models from Linux 2.6.39.
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li><p class="justified">
|
||||
First of all, you will need to make sure you have around 100 GB
|
||||
of free disc space available.</p></li>
|
||||
|
||||
<li><p class="justified">Download the Kernel sources at
|
||||
<a href="http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2">
|
||||
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.39.tar.bz2
|
||||
</a>.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now do</p>
|
||||
<p>
|
||||
<code>bunzip2 linux-2.6.39.tar.bz2</code><br>
|
||||
<code>tar xvf linux-2.6.39.tar</code><br>
|
||||
<code>cd linux-2.6.39</code>
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now ensure that you can actually
|
||||
compile a kernel by doing</p>
|
||||
<p>
|
||||
<code>make defconfig</code><br>
|
||||
<code>make</code></p>
|
||||
<p class="justified">
|
||||
These steps need to succeed before you can try to extract
|
||||
models from the kernel.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now compile
|
||||
<a href="gcc-wrap.c">gcc-wrap.c</a> and put the resulting binary
|
||||
into a directory that is in your PATH variable:</p>
|
||||
<p>
|
||||
<code>lwp-download http://www.cprover.org/cprover-manual/gcc-wrap.c</code><br>
|
||||
<code>gcc gcc-wrap.c -o gcc-wrap</code><br>
|
||||
<code>cp gcc-wrap ~/bin/</code><br>
|
||||
</p>
|
||||
<p class="justified">This assumes that the directory <code>~/bin</code>
|
||||
exists and is in your PATH variable.</p>
|
||||
</li>
|
||||
|
||||
<li><p class="justified">Now change the variable CC in the kernel
|
||||
Makefile as follows:</p>
|
||||
<p>
|
||||
<code> CC = ~/bin/gcc-wrap</code>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li><p class="justified">Now do</p>
|
||||
<p>
|
||||
<code>make clean</code><br>
|
||||
<code>make</code></p>
|
||||
<p class="justified">
|
||||
This will re-compile the kernel, but this time retaining the
|
||||
preprocessed source files.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">You can now compile the preprocessed
|
||||
source files with goto-cc as follows:</p>
|
||||
<p>
|
||||
<code>find ./ -name .tmp_*.i > source-file-list</code><br>
|
||||
<code>for a in `cat source-file-list` ; do</code><br>
|
||||
<code> goto-cc -c $a -o $a.gb</code><br>
|
||||
<code>done</code></p>
|
||||
|
||||
<p class="justified">Note that it is important that the
|
||||
word-size of the kernel configuration matches that of goto-cc.
|
||||
Otherwise, compile-time assertions will fail, generating
|
||||
the error message "bit field size is negative". For a kernel
|
||||
configured for a 64-bit word-width, pass the option
|
||||
<nobr>--64</nobr> to goto-cc.</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
The resulting <code>.gb</code> files can be passed to any
|
||||
of the CPROVER tools.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Example: Extracting Models from the Rockbox</h3>
|
||||
|
||||
<p class="justified">
|
||||
The <a href="http://www.rockbox.org/">Rockbox</a> is an open-source software
|
||||
package for common MP3 players, with about 1 million lines of code in total.
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
<li><p class="justified">
|
||||
First of all, you will need to install one of the cross-compilers. Follow
|
||||
the instructions <a href="http://www.rockbox.org/wiki/CrossCompiler">here</a>.
|
||||
</p></li>
|
||||
|
||||
<li><p>
|
||||
You will then need to check out the Rockbox sources with GIT, and
|
||||
configure and compile the code. Follow <a href="http://www.rockbox.org/wiki/HowToCompile">
|
||||
these instructions</a>. The build must succeed.
|
||||
We will assume that one of the ARM-based targets
|
||||
is used, and that the ARM cross-compiler is installed
|
||||
at /usr/local/bin/arm-elf-eabi-gcc.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now download
|
||||
<a href="gcc-wrap.c">gcc-wrap.c</a>:</p>
|
||||
<p>
|
||||
<code>lwp-download http://www.cprover.org/cprover-manual/gcc-wrap.c</code><br>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
<li><p class="justified">Open gcc-wrap.c in your favorite editor,
|
||||
and adjust the path to gcc (in the first line) to
|
||||
/usr/local/bin/arm-elf-eabi-gcc (it is important that the
|
||||
full path is given).
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">Now compile gcc-wrap:</p>
|
||||
<p>
|
||||
<code>gcc gcc-wrap.c -o gcc-wrap-arm-elf-eabi-gcc</code><br>
|
||||
<code>cp gcc-wrap-arm-elf-eabi-gcc ~/bin/</code><br>
|
||||
</p>
|
||||
<p class="justified">This assumes that the directory <code>~/bin</code>
|
||||
exists and is in your PATH variable.</p>
|
||||
</li>
|
||||
|
||||
<li><p class="justified">Now re-compile the Rockbox code as follows:</p>
|
||||
<p>
|
||||
<code>make clean</code><br>
|
||||
<code>make CC=gcc-wrap-arm-elf-eabi-gcc</code></p>
|
||||
<p class="justified">
|
||||
This will re-compile the Rockbox, but this time retaining the
|
||||
preprocessed source files.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified">You can now compile the preprocessed
|
||||
source files with goto-cc as follows:</p>
|
||||
<p>
|
||||
<code>find ./ -name \*.i > source-file-list</code><br>
|
||||
<code>for a in `cat source-file-list` ; do</code><br>
|
||||
<code> goto-cc -std=gnu99 -m32 -c $a -o $a.gb</code><br>
|
||||
<code>done</code></p>
|
||||
|
||||
<p class="justified">Note that it is important that the
|
||||
word-size of the target platform matches that of goto-cc.
|
||||
For a 32-bit target, pass the option
|
||||
<nobr>-m32</nobr> to goto-cc.</p>
|
||||
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
The resulting <code>.gb</code> files can be passed to any
|
||||
of the CPROVER tools.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Variants of goto-cc</h3>
|
||||
|
||||
<p class="justified">
|
||||
The goto-cc utility comes in several variants, summarised in the following table.
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<table cellpadding=5 cellspacing=0>
|
||||
<tr bgcolor="#e0e0e0">
|
||||
<th>Executable</th><th>Environment</th><th>Preprocessor</th></tr>
|
||||
<tr bgcolor="#e0f0f0"><td>goto-cc</td>
|
||||
<td><a href="http://gcc.gnu.org/">gcc</a> (control-flow graph only)</td>
|
||||
<td>gcc -E</td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td>goto-gcc</td>
|
||||
<td><a href="http://gcc.gnu.org/">gcc</a> ("hybrid" executable)</td>
|
||||
<td>gcc -E</td></tr>
|
||||
<tr bgcolor="#e0f0f0"><td>goto-armcc</td>
|
||||
<td><a href="http://arm.com/products/tools/software-tools/rvds/index.php">ARM RVDS</a></td>
|
||||
<td>armcc -E</td></tr>
|
||||
<tr bgcolor="#f0f0f0"><td>goto-cl</td>
|
||||
<td><a href="http://www.microsoft.com/visualstudio/">Visual Studio</a></td>
|
||||
<td>cl /E</td></tr>
|
||||
<tr bgcolor="#e0f0f0"><td>goto-cw</td>
|
||||
<td><a href="http://www.freescale.com/webapp/sps/site/homepage.jsp?code=CW_HOME">Freescale CodeWarrior</a></td>
|
||||
<td>mwcceppc</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p class="justified">
|
||||
|
||||
The primary difference between the variants is the preprocessor called.
|
||||
Furthermore, the language recognized varies slightly. The variants can be
|
||||
obtained by simply renaming the goto-cc executable. On Linux/MacOS, the
|
||||
variants can be obtained by creating a symbolic link.</p>
|
||||
|
||||
<p class="justified">
|
||||
The "hybrid"
|
||||
executables contain both the control-flow graph for verification purposes
|
||||
and the usual, executable machine code.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,57 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Integration into Visual Studio 2008 to 2012</h3>
|
||||
|
||||
<p class="justified">
|
||||
Visual Studio version 2008 onwards comes with a new XML-based
|
||||
build system called <a href="http://msdn.microsoft.com/en-us/library/ms171452(v=vs.90).aspx">MSBuild</a>.
|
||||
The MSBuild system is also activated when triggering a build from the Visual Studio GUI.
|
||||
The project files created by the Visual Studio GUI are used as input by the MSBuild tool.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The MSBuild system can be used to generate goto-binaries from your Visual Studio project
|
||||
as follows:
|
||||
</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li><p>
|
||||
Install the <code>goto-cl.exe</code> and <code>goto-link.exe</code> binaries
|
||||
in some directory that is contained in the PATH environment
|
||||
variable.</p></li>
|
||||
|
||||
<li><p>Add a configuration for the goto-cc build for your project
|
||||
in the configuration manager, named "goto-cc".</p></li>
|
||||
|
||||
<li><p>Open the Visual Studio Command Prompt (in the Tools menu).</p></li>
|
||||
|
||||
<li><p>Locate the directory that contains the project. Change into this
|
||||
directory using "CD".</p></li>
|
||||
|
||||
<li><p>Type</p>
|
||||
<p>
|
||||
<code>
|
||||
msbuild /p:CLToolExe=goto-cl.exe /p:LinkToolExe=goto-link.exe<br>
|
||||
/p:Flavor=goto-cc /p:Platform=x86
|
||||
</code>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The platform can be adjusted as required; the "Flavor" given should match
|
||||
the configuration that was created earlier.
|
||||
</p></li>
|
||||
|
||||
</ol>
|
||||
|
||||
<p class="justified">
|
||||
Note that the recent versions of goto-cc also support file names with
|
||||
non-ASCII (Unicode) characters on Windows platforms.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
<!--#include virtual="header.inc" -->
|
||||
|
||||
<p><a href="./">CPROVER Manual TOC</a></p>
|
||||
|
||||
<h2>Build Systems and Libraries</h2>
|
||||
|
||||
<h3>Integration into Build Systems with goto-cc</h3>
|
||||
|
||||
<p class="justified">
|
||||
Existing software projects usually do not come in a single source file that
|
||||
may simply be passed to a model checker. They rather come in a multitude of
|
||||
source files in different directories and refer to external libraries and
|
||||
system-wide options. A <i>build system</i> then collects the configuration options
|
||||
from the system and compiles the software according to build rules.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The most prevalent build tool on Unix (-based) systems surely is the
|
||||
<code>make</code> utility. This tool uses build rules given in a
|
||||
<i>Makefile</i> that comes with the software sources. Running software
|
||||
verification tools on projects like these is greatly simplified by a
|
||||
compiler that first collects all the necessary models into a single
|
||||
model file. <a href="http://www.cprover.org/goto-cc/">goto-cc</a>
|
||||
is such a model file extractor, which can seamlessly replace <code>gcc</code>
|
||||
and <code>cl.exe</code> in Makefiles. The normal build system for the
|
||||
project may be used to build the software, but the outcome will be a
|
||||
model file with suitable detail for verification, as opposed to a
|
||||
flat executable program. Note that goto-cc comes in different variants
|
||||
depending on the compilation environment. These variants
|
||||
are described <a href="goto-cc-variants.shtml">here</a>.
|
||||
</p>
|
||||
|
||||
<h4>Example: Building wu-ftpd</h4>
|
||||
|
||||
<p class="justified">This example assumes a Unix-like machine.</p>
|
||||
|
||||
<ol>
|
||||
|
||||
<li><p class="justified"> Download the sources of wu-ftpd from
|
||||
<a href="ftp://ftp.wu-ftpd.org/pub/wu-ftpd/wu-ftpd-current.tar.gz">
|
||||
here</a>.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified"> Unpack the sources by running
|
||||
<code> tar xfz wu-ftpd-current.tar.gz</code>
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified"> Change to the source directory, by entering, e.g.,
|
||||
<code> cd wu-ftpd-2.6.2</code>
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified"> Configure the project for verification by running
|
||||
</p>
|
||||
<center>
|
||||
<code>./configure YACC=byacc CC=goto-cc --host=none-none-none</code>
|
||||
</center>
|
||||
</li>
|
||||
|
||||
<li><p class="justified"> Build the project by running
|
||||
<code>make</code>.
|
||||
This creates multiple model files in the <code>src</code> directory. Among
|
||||
them is a model for the main executable <code>ftpd</code>.
|
||||
</p></li>
|
||||
|
||||
<li><p class="justified"> Run a model-checker, e.g., <a href="cbmc.shtml">CBMC</a>,
|
||||
on the model file:
|
||||
</p>
|
||||
<center>
|
||||
<code>cbmc src/ftpd</code>
|
||||
</center>
|
||||
<p class="justified">CBMC automatically recognizes that the file
|
||||
is a goto binary.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
|
||||
<h4>Important Notes</h4>
|
||||
|
||||
<p class="justified">
|
||||
More elaborate build or configuration scripts often make use of
|
||||
features of the compiler or the system library to detect configuration
|
||||
options automatically, e.g., in a <code>configure</code> script.
|
||||
Replacing <code>gcc</code> by goto-cc at this stage may confuse the script,
|
||||
or detect wrong options. For example, missing library functions do not
|
||||
cause goto-cc to throw an error (only to issue a warning). Because of
|
||||
this, configuration scripts sometimes falsely assume the availability
|
||||
of a system function or library.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
In the case of this or similar problems, it is more advisable to
|
||||
configure the project using the normal routine, and replacing the
|
||||
compiler setting manually in the generated Makefiles, e.g., by
|
||||
replacing lines like <code>CC=gcc</code> by <code>CC=goto-cc</code>.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
A helpful command that accomplishes this task successfully for many
|
||||
projects is the following:
|
||||
</p>
|
||||
|
||||
<code>
|
||||
for i in `find . -name Makefile`; do<br>
|
||||
sed -e 's/^\(\s*CC[ \t]*=\)\(.*$\)/\1goto-cc/g' -i $i<br>
|
||||
done
|
||||
</code>
|
||||
|
||||
<p class="justified">Here are additional examples on how to use goto-cc:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="goto-cc-linux.shtml">Linux Kernel</a></li>
|
||||
<li><a href="goto-cc-apache.shtml">Apache HTTPD</a></li>
|
||||
</ul>
|
||||
|
||||
<p class="justified">A description
|
||||
of how to integrate goto-cc into Microsoft's Visual Studio
|
||||
is <a href="goto-cc-visual-studio.shtml">here</a>.</p>
|
||||
|
||||
<h4>Linking Libraries</h4>
|
||||
|
||||
<p class="justified">
|
||||
Some software projects come with their own libraries; also, the goal may be
|
||||
to analyze a library by itself. For this purpose it is possible to use
|
||||
goto-cc to link multiple model files into a library of model files. An
|
||||
object file can then be linked against this model library. For this purpose,
|
||||
goto-cc also features a linker mode.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
To enable this linker mode, create a link to the goto-cc binary by the
|
||||
name of goto-ld (Linux and Mac) or copy the goto-cc binary to goto-link.exe
|
||||
(Windows). The goto-ld tool can now be used as a seamless replacement
|
||||
for the <code>ld</code> tool present on most Unix (-based) systems and
|
||||
for the <code>link</code> tool on Windows.
|
||||
</p>
|
||||
|
||||
<p class="justified">
|
||||
The default linker may need to be replaced by <code>goto-ld</code> or
|
||||
<code>goto-link.exe</code> in the build
|
||||
script, which can be achieved in much the same way as replacing the compiler.
|
||||
</p>
|
||||
|
||||
<!--#include virtual="footer.inc" -->
|
|
@ -1,23 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
|
||||
<html><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="/style/cprover.css">
|
||||
<title>CPROVER Manual</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!--#include virtual="../style/full-sidebar.html" -->
|
||||
|
||||
<div id="wrap">
|
||||
<div id="main">
|
||||
|
||||
<div id="nav">
|
||||
<ul>
|
||||
<li>SV Group Home</li>
|
||||
<li><a href="/software/">Software Verification</a></li>
|
||||
<li><a href="/hardware/">Hardware Verification</a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,24 +0,0 @@
|
|||
Copyright (c) 2006, Ivan Sagalaev
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of highlight.js nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,150 +0,0 @@
|
|||
# Highlight.js
|
||||
|
||||
[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
|
||||
|
||||
Highlight.js is a syntax highlighter written in JavaScript. It works in
|
||||
the browser as well as on the server. It works with pretty much any
|
||||
markup, doesn’t depend on any framework and has automatic language
|
||||
detection.
|
||||
|
||||
## Getting Started
|
||||
|
||||
The bare minimum for using highlight.js on a web page is linking to the
|
||||
library along with one of the styles and calling
|
||||
[`initHighlightingOnLoad`][1]:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="/path/to/styles/default.css">
|
||||
<script src="/path/to/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
```
|
||||
|
||||
This will find and highlight code inside of `<pre><code>` tags; it tries
|
||||
to detect the language automatically. If automatic detection doesn’t
|
||||
work for you, you can specify the language in the `class` attribute:
|
||||
|
||||
```html
|
||||
<pre><code class="html">...</code></pre>
|
||||
```
|
||||
|
||||
The list of supported language classes is available in the [class
|
||||
reference][2]. Classes can also be prefixed with either `language-` or
|
||||
`lang-`.
|
||||
|
||||
To disable highlighting altogether use the `nohighlight` class:
|
||||
|
||||
```html
|
||||
<pre><code class="nohighlight">...</code></pre>
|
||||
```
|
||||
|
||||
## Custom Initialization
|
||||
|
||||
When you need a bit more control over the initialization of
|
||||
highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
|
||||
functions. This allows you to control *what* to highlight and *when*.
|
||||
|
||||
Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
|
||||
jQuery:
|
||||
|
||||
```javascript
|
||||
$(document).ready(function() {
|
||||
$('pre code').each(function(i, block) {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
You can use any tags instead of `<pre><code>` to mark up your code. If
|
||||
you don't use a container that preserve line breaks you will need to
|
||||
configure highlight.js to use the `<br>` tag:
|
||||
|
||||
```javascript
|
||||
hljs.configure({useBR: true});
|
||||
|
||||
$('div.code').each(function(i, block) {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
```
|
||||
|
||||
For other options refer to the documentation for [`configure`][4].
|
||||
|
||||
|
||||
## Web Workers
|
||||
|
||||
You can run highlighting inside a web worker to avoid freezing the browser
|
||||
window while dealing with very big chunks of code.
|
||||
|
||||
In your main script:
|
||||
|
||||
```javascript
|
||||
addEventListener('load', function() {
|
||||
var code = document.querySelector('#code');
|
||||
var worker = new Worker('worker.js');
|
||||
worker.onmessage = function(event) { code.innerHTML = event.data; }
|
||||
worker.postMessage(code.textContent);
|
||||
})
|
||||
```
|
||||
|
||||
In worker.js:
|
||||
|
||||
```javascript
|
||||
onmessage = function(event) {
|
||||
importScripts('<path>/highlight.pack.js');
|
||||
var result = self.hljs.highlightAuto(event.data);
|
||||
postMessage(result.value);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Getting the Library
|
||||
|
||||
You can get highlight.js as a hosted, or custom-build, browser script or
|
||||
as a server module. Right out of the box the browser script supports
|
||||
both AMD and CommonJS, so if you wish you can use RequireJS or
|
||||
Browserify without having to build from source. The server module also
|
||||
works perfectly fine with Browserify, but there is the option to use a
|
||||
build specific to browsers rather than something meant for a server.
|
||||
Head over to the [download page][5] for all the options.
|
||||
|
||||
**Don't link to GitHub directly.** The library is not supposed to work straight
|
||||
from the source, it requires building. If none of the pre-packaged options
|
||||
work for you refer to the [building documentation][6].
|
||||
|
||||
**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
|
||||
too big. If you don't see the language you need in the ["Common" section][5],
|
||||
it can be added manually:
|
||||
|
||||
```html
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
|
||||
```
|
||||
|
||||
**On Almond.** You need to use the optimizer to give the module a name. For
|
||||
example:
|
||||
|
||||
```
|
||||
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Highlight.js is released under the BSD License. See [LICENSE][7] file
|
||||
for details.
|
||||
|
||||
## Links
|
||||
|
||||
The official site for the library is at <https://highlightjs.org/>.
|
||||
|
||||
Further in-depth documentation for the API and other topics is at
|
||||
<http://highlightjs.readthedocs.io/>.
|
||||
|
||||
Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
|
||||
|
||||
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
|
||||
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
|
||||
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
|
||||
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
|
||||
[5]: https://highlightjs.org/download/
|
||||
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
|
||||
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
|
|
@ -1,142 +0,0 @@
|
|||
# Highlight.js
|
||||
|
||||
Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает
|
||||
и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
|
||||
зависит от каких-либо фреймворков и умеет автоматически определять язык.
|
||||
|
||||
|
||||
## Начало работы
|
||||
|
||||
Минимум, что нужно сделать для использования highlight.js на веб-странице — это
|
||||
подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="/path/to/styles/default.css">
|
||||
<script src="/path/to/highlight.pack.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
```
|
||||
|
||||
Библиотека найдёт и раскрасит код внутри тегов `<pre><code>`, попытавшись
|
||||
автоматически определить язык. Когда автоопределение не срабатывает, можно явно
|
||||
указать язык в атрибуте class:
|
||||
|
||||
```html
|
||||
<pre><code class="html">...</code></pre>
|
||||
```
|
||||
|
||||
Список поддерживаемых классов языков доступен в [справочнике по классам][2].
|
||||
Класс также можно предварить префиксами `language-` или `lang-`.
|
||||
|
||||
Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
|
||||
|
||||
```html
|
||||
<pre><code class="nohighlight">...</code></pre>
|
||||
```
|
||||
|
||||
## Инициализация вручную
|
||||
|
||||
Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
|
||||
использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом
|
||||
можно управлять тем, *что* и *когда* подсвечивать.
|
||||
|
||||
Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
|
||||
с использованием jQuery:
|
||||
|
||||
```javascript
|
||||
$(document).ready(function() {
|
||||
$('pre code').each(function(i, block) {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
Вы можете использовать любые теги разметки вместо `<pre><code>`. Если
|
||||
используете контейнер, не сохраняющий переводы строк, вам нужно сказать
|
||||
highlight.js использовать для них тег `<br>`:
|
||||
|
||||
```javascript
|
||||
hljs.configure({useBR: true});
|
||||
|
||||
$('div.code').each(function(i, block) {
|
||||
hljs.highlightBlock(block);
|
||||
});
|
||||
```
|
||||
|
||||
Другие опции можно найти в документации функции [`configure`][4].
|
||||
|
||||
|
||||
## Web Workers
|
||||
|
||||
Подсветку можно запустить внутри web worker'а, чтобы окно
|
||||
браузера не подтормаживало при работе с большими кусками кода.
|
||||
|
||||
В основном скрипте:
|
||||
|
||||
```javascript
|
||||
addEventListener('load', function() {
|
||||
var code = document.querySelector('#code');
|
||||
var worker = new Worker('worker.js');
|
||||
worker.onmessage = function(event) { code.innerHTML = event.data; }
|
||||
worker.postMessage(code.textContent);
|
||||
})
|
||||
```
|
||||
|
||||
В worker.js:
|
||||
|
||||
```javascript
|
||||
onmessage = function(event) {
|
||||
importScripts('<path>/highlight.pack.js');
|
||||
var result = self.hljs.highlightAuto(event.data);
|
||||
postMessage(result.value);
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Установка библиотеки
|
||||
|
||||
Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
|
||||
индивидуальную сборку, а также установив модуль на сервере. На
|
||||
[странице загрузки][5] подробно описаны все варианты.
|
||||
|
||||
**Не подключайте GitHub напрямую.** Библиотека не предназначена для
|
||||
использования в виде исходного кода, а требует отдельной сборки. Если вам не
|
||||
подходит ни один из готовых вариантов, читайте [документацию по сборке][6].
|
||||
|
||||
**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера.
|
||||
Если нужного вам языка нет в [категории "Common"][5], можно дообавить его
|
||||
вручную:
|
||||
|
||||
```html
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
|
||||
```
|
||||
|
||||
**Про Almond.** Нужно задать имя модуля в оптимизаторе, например:
|
||||
|
||||
```
|
||||
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
|
||||
```
|
||||
|
||||
|
||||
## Лицензия
|
||||
|
||||
Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
|
||||
[LICENSE][7].
|
||||
|
||||
|
||||
## Ссылки
|
||||
|
||||
Официальный сайт билиотеки расположен по адресу <https://highlightjs.org/>.
|
||||
|
||||
Более подробная документация по API и другим темам расположена на
|
||||
<http://highlightjs.readthedocs.io/>.
|
||||
|
||||
Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file.
|
||||
|
||||
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
|
||||
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
|
||||
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
|
||||
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
|
||||
[5]: https://highlightjs.org/download/
|
||||
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
|
||||
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
|
||||
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
|
|
@ -1,108 +0,0 @@
|
|||
/*!
|
||||
* Agate by Taufik Nurrohman <https://github.com/tovic>
|
||||
* ----------------------------------------------------
|
||||
*
|
||||
* #ade5fc
|
||||
* #a2fca2
|
||||
* #c6b4f0
|
||||
* #d36363
|
||||
* #fcc28c
|
||||
* #fc9b9b
|
||||
* #ffa
|
||||
* #fff
|
||||
* #333
|
||||
* #62c8f3
|
||||
* #888
|
||||
*
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-code,
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #62c8f3;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ade5fc;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet {
|
||||
color: #a2fca2;
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-attribute,
|
||||
.hljs-quote,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #ffa;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #d36363;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal {
|
||||
color: #fcc28c;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-deletion,
|
||||
.hljs-code {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #c6b4f0;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #fc9b9b;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #fc9b9b;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #a2fca2;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.hljs a:focus,
|
||||
.hljs a:hover {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
Date: 24 Fev 2015
|
||||
Author: Pedro Oliveira <kanytu@gmail . com>
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
color: #a9b7c6;
|
||||
background: #282b2e;
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #6897BB;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-deletion {
|
||||
color: #cc7832;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link {
|
||||
color: #629755;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #bbb529;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-attribute,
|
||||
.hljs-addition {
|
||||
color: #6A8759;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-title,
|
||||
.hljs-type {
|
||||
color: #ffc66d;
|
||||
}
|
||||
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #e8bf6a;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
|
||||
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #434f54;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
color: #00979D;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #D35400;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #00979D;
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-string,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #005C5F;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #880000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: rgba(149,165,166,.8);
|
||||
}
|
||||
|
||||
.hljs-meta-keyword {
|
||||
color: #728E00;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #728E00;
|
||||
color: #434f54;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-function {
|
||||
color: #728E00;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #8A7B52;
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
Date: 17.V.2011
|
||||
Author: pumbur <pumbur@pumbur.net>
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #222;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.hljs-section {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-regexp {
|
||||
color: #ffcc33;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-addition {
|
||||
color: #00cc66;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-link {
|
||||
color: #32aaee;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #6644aa;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-variable,
|
||||
.hljs-deletion,
|
||||
.hljs-template-tag {
|
||||
color: #bb1166;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-doctag,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
|
||||
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-section,
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-link {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta,
|
||||
.hljs-deletion {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-section,
|
||||
.hljs-name,
|
||||
.hljs-type,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
/* Base16 Atelier Cave Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Cave Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #7e7887;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #be4678;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #aa573c;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #2a9292;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #576ddb;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #955ae7;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #19171c;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #be4678;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #2a9292;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #19171c;
|
||||
color: #8b8792;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
/* Base16 Atelier Cave Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Cave Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #655f6d;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #be4678;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #aa573c;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #2a9292;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #576ddb;
|
||||
}
|
||||
|
||||
/* Atelier-Cave Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #955ae7;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #19171c;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #be4678;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #2a9292;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #efecf4;
|
||||
color: #585260;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Dune Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Dune Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #999580;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #d73737;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #b65611;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #60ac39;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #6684e1;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #b854d4;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #20201d;
|
||||
color: #a6a28c;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Dune Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Dune Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #7d7a68;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #d73737;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #b65611;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #60ac39;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #6684e1;
|
||||
}
|
||||
|
||||
/* Atelier-Dune Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #b854d4;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #fefbec;
|
||||
color: #6e6b5e;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Estuary Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Estuary Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #878573;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ba6236;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #ae7313;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #7d9726;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #36a166;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #5f9182;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #22221b;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #ba6236;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #7d9726;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #22221b;
|
||||
color: #929181;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Estuary Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Estuary Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #6c6b5a;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ba6236;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #ae7313;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #7d9726;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #36a166;
|
||||
}
|
||||
|
||||
/* Atelier-Estuary Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #5f9182;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #22221b;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #ba6236;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #7d9726;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f4f3ec;
|
||||
color: #5f5e4e;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Forest Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Forest Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #9c9491;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #f22c40;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #df5320;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #7b9726;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #407ee7;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6666ea;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #1b1918;
|
||||
color: #a8a19f;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Forest Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Forest Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #766e6b;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #f22c40;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #df5320;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #7b9726;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #407ee7;
|
||||
}
|
||||
|
||||
/* Atelier-Forest Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6666ea;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f1efee;
|
||||
color: #68615e;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Heath Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Heath Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #9e8f9e;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ca402b;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #a65926;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #918b3b;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #516aec;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #7b59c0;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #1b181b;
|
||||
color: #ab9bab;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Heath Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Heath Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #776977;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ca402b;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #a65926;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #918b3b;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #516aec;
|
||||
}
|
||||
|
||||
/* Atelier-Heath Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #7b59c0;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f7f3f7;
|
||||
color: #695d69;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Lakeside Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Lakeside Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #7195a8;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #d22d72;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #935c25;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #568c3b;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #257fad;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6b6bb8;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #161b1d;
|
||||
color: #7ea2b4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Lakeside Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Lakeside Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #5a7b8c;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #d22d72;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #935c25;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #568c3b;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #257fad;
|
||||
}
|
||||
|
||||
/* Atelier-Lakeside Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6b6bb8;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #ebf8ff;
|
||||
color: #516d7b;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Plateau Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Plateau Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #7e7777;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ca4949;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #b45a3c;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #4b8b8b;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #7272ca;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #8464c4;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #1b1818;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #ca4949;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #4b8b8b;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #1b1818;
|
||||
color: #8a8585;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Plateau Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Plateau Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #655d5d;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #ca4949;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #b45a3c;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #4b8b8b;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #7272ca;
|
||||
}
|
||||
|
||||
/* Atelier-Plateau Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #8464c4;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #1b1818;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #ca4949;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #4b8b8b;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f4ecec;
|
||||
color: #585050;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Savanna Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Savanna Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #78877d;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #b16139;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #9f713c;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #489963;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #478c90;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #55859b;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #171c19;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #b16139;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #489963;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #171c19;
|
||||
color: #87928a;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
/* Base16 Atelier Savanna Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Savanna Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #5f6d64;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #b16139;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #9f713c;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #489963;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #478c90;
|
||||
}
|
||||
|
||||
/* Atelier-Savanna Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #55859b;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-addition {
|
||||
color: #171c19;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #b16139;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #489963;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #ecf4ee;
|
||||
color: #526057;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Seaside Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Seaside Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #809980;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #e6193c;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #87711d;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #29a329;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #3d62f5;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #ad2bee;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #131513;
|
||||
color: #8ca68c;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Seaside Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Seaside Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #687d68;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #e6193c;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #87711d;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #29a329;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #3d62f5;
|
||||
}
|
||||
|
||||
/* Atelier-Seaside Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #ad2bee;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f4fbf4;
|
||||
color: #5e6e5e;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Sulphurpool Dark - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Sulphurpool Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #898ea4;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #c94922;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #c76b29;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #ac9739;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #3d8fd1;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6679cc;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #202746;
|
||||
color: #979db4;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/* Base16 Atelier Sulphurpool Light - Theme */
|
||||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
|
||||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
|
||||
|
||||
/* Atelier-Sulphurpool Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #6b7394;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #c94922;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Orange */
|
||||
.hljs-number,
|
||||
.hljs-meta,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #c76b29;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #ac9739;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Blue */
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #3d8fd1;
|
||||
}
|
||||
|
||||
/* Atelier-Sulphurpool Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #6679cc;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #f5f7ff;
|
||||
color: #5e6687;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
|
||||
Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background:#b7a68e url(./brown-papersq.png);
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal {
|
||||
color:#005599;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #363c69;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-built_in,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-name {
|
||||
color: #2c009f;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta,
|
||||
.hljs-deletion {
|
||||
color: #802022;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
Before Width: | Height: | Size: 18 KiB |
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
codepen.io Embed Theme
|
||||
Author: Justin Perry <http://github.com/ourmaninamsterdam>
|
||||
Original theme - https://github.com/chriskempson/tomorrow-theme
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #222;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-regexp,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-params,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link,
|
||||
.hljs-deletion {
|
||||
color: #ab875d;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-title,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-type,
|
||||
.hljs-attribute {
|
||||
color: #9b869b;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-addition {
|
||||
color: #8f9c6c;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
|
||||
Colorbrewer theme
|
||||
Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org>
|
||||
Ported by Fabrício Tavares de Oliveira
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-meta,
|
||||
.hljs-symbol,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-addition {
|
||||
color: #756bb1;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #636363;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-literal,
|
||||
.hljs-bullet,
|
||||
.hljs-link {
|
||||
color: #31a354;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-variable {
|
||||
color: #88f;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-built_in,
|
||||
.hljs-doctag,
|
||||
.hljs-type,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-strong {
|
||||
color: #3182bd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-attribute {
|
||||
color: #e6550d;
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
|
||||
Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #444;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-section,
|
||||
.hljs-link {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-name,
|
||||
.hljs-type,
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-built_in,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #d88;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-doctag,
|
||||
.hljs-type,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
/*
|
||||
Deprecated due to a typo in the name and left here for compatibility purpose only.
|
||||
Please use darcula.css instead.
|
||||
*/
|
||||
|
||||
@import url('darcula.css');
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
|
||||
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
|
||||
/* Base color: saturation 0; */
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-attribute,
|
||||
.hljs-selector-tag,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-doctag,
|
||||
.hljs-name {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/* User color: hue: 0 */
|
||||
|
||||
.hljs-type,
|
||||
.hljs-string,
|
||||
.hljs-number,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-quote,
|
||||
.hljs-template-tag,
|
||||
.hljs-deletion {
|
||||
color: #880000;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section {
|
||||
color: #880000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-symbol,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #BC6060;
|
||||
}
|
||||
|
||||
|
||||
/* Language color: hue: 90; */
|
||||
|
||||
.hljs-literal {
|
||||
color: #78A960;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-bullet,
|
||||
.hljs-code,
|
||||
.hljs-addition {
|
||||
color: #397300;
|
||||
}
|
||||
|
||||
|
||||
/* Meta color: hue: 200 */
|
||||
|
||||
.hljs-meta {
|
||||
color: #1f7199;
|
||||
}
|
||||
|
||||
.hljs-meta-string {
|
||||
color: #4d99bf;
|
||||
}
|
||||
|
||||
|
||||
/* Misc effects */
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #000;
|
||||
background: #f8f8ff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #408080;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-subst {
|
||||
color: #954121;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #40a070;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-doctag {
|
||||
color: #219161;
|
||||
}
|
||||
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-section,
|
||||
.hljs-type {
|
||||
color: #19469d;
|
||||
}
|
||||
|
||||
.hljs-params {
|
||||
color: #00f;
|
||||
}
|
||||
|
||||
.hljs-title {
|
||||
color: #458;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-attribute {
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #b68;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #990073;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background: #fdd;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background: #dfd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
|
||||
Dracula Theme v1.2.0
|
||||
|
||||
https://github.com/zenorocha/dracula-theme
|
||||
|
||||
Copyright 2015, All rights reserved
|
||||
|
||||
Code licensed under the MIT license
|
||||
http://zenorocha.mit-license.org
|
||||
|
||||
@author Éverton Ribeiro <nuxlli@gmail.com>
|
||||
@author Zeno Rocha <hi@zenorocha.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #282a36;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-section,
|
||||
.hljs-link {
|
||||
color: #8be9fd;
|
||||
}
|
||||
|
||||
.hljs-function .hljs-keyword {
|
||||
color: #ff79c6;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-name,
|
||||
.hljs-type,
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #f1fa8c;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #6272a4;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-doctag,
|
||||
.hljs-type,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
|
||||
FAR Style (c) MajestiC <majestic2k@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #000080;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #0ff;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable,
|
||||
.hljs-addition {
|
||||
color: #ff0;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-variable {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-doctag,
|
||||
.hljs-deletion {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-literal,
|
||||
.hljs-link {
|
||||
color: #0f0;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*
|
||||
Description: Foundation 4 docs style for highlight.js
|
||||
Author: Dan Allen <dan.j.allen@gmail.com>
|
||||
Website: http://foundation.zurb.com/docs/
|
||||
Version: 1.0
|
||||
Date: 2013-04-02
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #eee; color: black;
|
||||
}
|
||||
|
||||
.hljs-link,
|
||||
.hljs-emphasis,
|
||||
.hljs-attribute,
|
||||
.hljs-addition {
|
||||
color: #070;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong,
|
||||
.hljs-string,
|
||||
.hljs-deletion {
|
||||
color: #d14;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-quote,
|
||||
.hljs-comment {
|
||||
color: #998;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-title {
|
||||
color: #900;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-type {
|
||||
color: #458;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #336699;
|
||||
}
|
||||
|
||||
.hljs-bullet {
|
||||
color: #997700;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #3344bb;
|
||||
}
|
||||
|
||||
.hljs-code,
|
||||
.hljs-number,
|
||||
.hljs-literal,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #099;
|
||||
}
|
||||
|
||||
.hljs-regexp {
|
||||
background-color: #fff0ff;
|
||||
color: #880088;
|
||||
}
|
||||
|
||||
.hljs-symbol {
|
||||
color: #990073;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #007700;
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
/**
|
||||
* GitHub Gist Theme
|
||||
* Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: white;
|
||||
padding: 0.5em;
|
||||
color: #333333;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-meta {
|
||||
color: #969896;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-strong,
|
||||
.hljs-emphasis,
|
||||
.hljs-quote {
|
||||
color: #df5000;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type {
|
||||
color: #a71d5d;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name {
|
||||
color: #63a35c;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-attr,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #795da3;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #55a532;
|
||||
background-color: #eaffea;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #bd2c00;
|
||||
background-color: #ffecec;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
|
||||
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #333;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #998;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-literal,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag .hljs-attr {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-doctag {
|
||||
color: #d14;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-selector-id {
|
||||
color: #900;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-type,
|
||||
.hljs-class .hljs-title {
|
||||
color: #458;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-attribute {
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #009926;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet {
|
||||
color: #990073;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background: #fdd;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background: #dfd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
|
||||
Google Code style (c) Aahan Krish <geekpanth3r@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #800;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-section,
|
||||
.hljs-title,
|
||||
.hljs-name {
|
||||
color: #008;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #660;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-regexp {
|
||||
color: #080;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-meta,
|
||||
.hljs-number,
|
||||
.hljs-link {
|
||||
color: #066;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-doctag,
|
||||
.hljs-type,
|
||||
.hljs-attr,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-params {
|
||||
color: #606;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-subst {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.hljs-formula {
|
||||
background-color: #eee;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #9B703F
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background-color: #baeeba;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background-color: #ffc8bd;
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
|
||||
grayscale style (c) MY Sun <simonmysun@gmail.com>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #333;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #777;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-literal {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-doctag,
|
||||
.hljs-formula {
|
||||
color: #333;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-selector-id {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-type,
|
||||
.hljs-name {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.hljs-regexp {
|
||||
color: #333;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-link {
|
||||
color: #000;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #000;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
color: #fff;
|
||||
background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
color: #000;
|
||||
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
/*
|
||||
|
||||
Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #282828;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #ebdbb2;
|
||||
}
|
||||
|
||||
/* Gruvbox Red */
|
||||
.hljs-deletion,
|
||||
.hljs-formula,
|
||||
.hljs-keyword,
|
||||
.hljs-link,
|
||||
.hljs-selector-tag {
|
||||
color: #fb4934;
|
||||
}
|
||||
|
||||
/* Gruvbox Blue */
|
||||
.hljs-built_in,
|
||||
.hljs-emphasis,
|
||||
.hljs-name,
|
||||
.hljs-quote,
|
||||
.hljs-strong,
|
||||
.hljs-title,
|
||||
.hljs-variable {
|
||||
color: #83a598;
|
||||
}
|
||||
|
||||
/* Gruvbox Yellow */
|
||||
.hljs-attr,
|
||||
.hljs-params,
|
||||
.hljs-template-tag,
|
||||
.hljs-type {
|
||||
color: #fabd2f;
|
||||
}
|
||||
|
||||
/* Gruvbox Purple */
|
||||
.hljs-builtin-name,
|
||||
.hljs-doctag,
|
||||
.hljs-literal,
|
||||
.hljs-number {
|
||||
color: #8f3f71;
|
||||
}
|
||||
|
||||
/* Gruvbox Orange */
|
||||
.hljs-code,
|
||||
.hljs-meta,
|
||||
.hljs-regexp,
|
||||
.hljs-selector-id,
|
||||
.hljs-template-variable {
|
||||
color: #fe8019;
|
||||
}
|
||||
|
||||
/* Gruvbox Green */
|
||||
.hljs-addition,
|
||||
.hljs-meta-string,
|
||||
.hljs-section,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-class,
|
||||
.hljs-string,
|
||||
.hljs-symbol {
|
||||
color: #b8bb26;
|
||||
}
|
||||
|
||||
/* Gruvbox Aqua */
|
||||
.hljs-attribute,
|
||||
.hljs-bullet,
|
||||
.hljs-class,
|
||||
.hljs-function,
|
||||
.hljs-function .hljs-keyword,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-tag {
|
||||
color: #8ec07c;
|
||||
}
|
||||
|
||||
/* Gruvbox Gray */
|
||||
.hljs-comment {
|
||||
color: #928374;
|
||||
}
|
||||
|
||||
/* Gruvbox Purple */
|
||||
.hljs-link_label,
|
||||
.hljs-literal,
|
||||
.hljs-number {
|
||||
color: #d3869b;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-strong,
|
||||
.hljs-tag {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,108 +0,0 @@
|
|||
/*
|
||||
|
||||
Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #fbf1c7;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: #3c3836;
|
||||
}
|
||||
|
||||
/* Gruvbox Red */
|
||||
.hljs-deletion,
|
||||
.hljs-formula,
|
||||
.hljs-keyword,
|
||||
.hljs-link,
|
||||
.hljs-selector-tag {
|
||||
color: #9d0006;
|
||||
}
|
||||
|
||||
/* Gruvbox Blue */
|
||||
.hljs-built_in,
|
||||
.hljs-emphasis,
|
||||
.hljs-name,
|
||||
.hljs-quote,
|
||||
.hljs-strong,
|
||||
.hljs-title,
|
||||
.hljs-variable {
|
||||
color: #076678;
|
||||
}
|
||||
|
||||
/* Gruvbox Yellow */
|
||||
.hljs-attr,
|
||||
.hljs-params,
|
||||
.hljs-template-tag,
|
||||
.hljs-type {
|
||||
color: #b57614;
|
||||
}
|
||||
|
||||
/* Gruvbox Purple */
|
||||
.hljs-builtin-name,
|
||||
.hljs-doctag,
|
||||
.hljs-literal,
|
||||
.hljs-number {
|
||||
color: #8f3f71;
|
||||
}
|
||||
|
||||
/* Gruvbox Orange */
|
||||
.hljs-code,
|
||||
.hljs-meta,
|
||||
.hljs-regexp,
|
||||
.hljs-selector-id,
|
||||
.hljs-template-variable {
|
||||
color: #af3a03;
|
||||
}
|
||||
|
||||
/* Gruvbox Green */
|
||||
.hljs-addition,
|
||||
.hljs-meta-string,
|
||||
.hljs-section,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-class,
|
||||
.hljs-string,
|
||||
.hljs-symbol {
|
||||
color: #79740e;
|
||||
}
|
||||
|
||||
/* Gruvbox Aqua */
|
||||
.hljs-attribute,
|
||||
.hljs-bullet,
|
||||
.hljs-class,
|
||||
.hljs-function,
|
||||
.hljs-function .hljs-keyword,
|
||||
.hljs-meta-keyword,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-tag {
|
||||
color: #427b58;
|
||||
}
|
||||
|
||||
/* Gruvbox Gray */
|
||||
.hljs-comment {
|
||||
color: #928374;
|
||||
}
|
||||
|
||||
/* Gruvbox Purple */
|
||||
.hljs-link_label,
|
||||
.hljs-literal,
|
||||
.hljs-number {
|
||||
color: #8f3f71;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-strong,
|
||||
.hljs-tag {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* Hopscotch
|
||||
* by Jan T. Sott
|
||||
* https://github.com/idleberg/Hopscotch
|
||||
*
|
||||
* This work is licensed under the Creative Commons CC0 1.0 Universal License
|
||||
*/
|
||||
|
||||
/* Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #989498;
|
||||
}
|
||||
|
||||
/* Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-attribute,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-link,
|
||||
.hljs-deletion {
|
||||
color: #dd464c;
|
||||
}
|
||||
|
||||
/* Orange */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params {
|
||||
color: #fd8b19;
|
||||
}
|
||||
|
||||
/* Yellow */
|
||||
.hljs-class .hljs-title {
|
||||
color: #fdcc59;
|
||||
}
|
||||
|
||||
/* Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition {
|
||||
color: #8fc13e;
|
||||
}
|
||||
|
||||
/* Aqua */
|
||||
.hljs-meta {
|
||||
color: #149b93;
|
||||
}
|
||||
|
||||
/* Blue */
|
||||
.hljs-function,
|
||||
.hljs-section,
|
||||
.hljs-title {
|
||||
color: #1290bf;
|
||||
}
|
||||
|
||||
/* Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag {
|
||||
color: #c85e7c;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
background: #322931;
|
||||
color: #b9b5b8;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
/*
|
||||
|
||||
vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
|
||||
|
||||
*/
|
||||
|
||||
/*background color*/
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #1d1f21;
|
||||
}
|
||||
|
||||
/*selection color*/
|
||||
.hljs::selection,
|
||||
.hljs span::selection {
|
||||
background: #373b41;
|
||||
}
|
||||
|
||||
.hljs::-moz-selection,
|
||||
.hljs span::-moz-selection {
|
||||
background: #373b41;
|
||||
}
|
||||
|
||||
/*foreground color*/
|
||||
.hljs {
|
||||
color: #c5c8c6;
|
||||
}
|
||||
|
||||
/*color: fg_yellow*/
|
||||
.hljs-title,
|
||||
.hljs-name {
|
||||
color: #f0c674;
|
||||
}
|
||||
|
||||
/*color: fg_comment*/
|
||||
.hljs-comment,
|
||||
.hljs-meta,
|
||||
.hljs-meta .hljs-keyword {
|
||||
color: #707880;
|
||||
}
|
||||
|
||||
/*color: fg_red*/
|
||||
.hljs-number,
|
||||
.hljs-symbol,
|
||||
.hljs-literal,
|
||||
.hljs-deletion,
|
||||
.hljs-link {
|
||||
color: #cc6666
|
||||
}
|
||||
|
||||
/*color: fg_green*/
|
||||
.hljs-string,
|
||||
.hljs-doctag,
|
||||
.hljs-addition,
|
||||
.hljs-regexp,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo {
|
||||
color: #b5bd68;
|
||||
}
|
||||
|
||||
/*color: fg_purple*/
|
||||
.hljs-attribute,
|
||||
.hljs-code,
|
||||
.hljs-selector-id {
|
||||
color: #b294bb;
|
||||
}
|
||||
|
||||
/*color: fg_blue*/
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-bullet,
|
||||
.hljs-tag {
|
||||
color: #81a2be;
|
||||
}
|
||||
|
||||
/*color: fg_aqua*/
|
||||
.hljs-subst,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #8abeb7;
|
||||
}
|
||||
|
||||
/*color: fg_orange*/
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-quote,
|
||||
.hljs-section,
|
||||
.hljs-selector-class {
|
||||
color: #de935f;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
|
||||
Intellij Idea-like styling (c) Vasily Polovnyov <vast@whiteants.net>
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
color: #000;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.hljs-subst,
|
||||
.hljs-title {
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #808080;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #808000;
|
||||
}
|
||||
|
||||
.hljs-tag {
|
||||
background: #efefef;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-name,
|
||||
.hljs-literal,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-type,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
font-weight: bold;
|
||||
color: #000080;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
font-weight: bold;
|
||||
color: #0000ff;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-string {
|
||||
color: #008000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-formula {
|
||||
color: #000;
|
||||
background: #d0eded;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-doctag {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #660e7a;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background: #baeeba;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background: #ffc8bd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
/*
|
||||
IR_Black style (c) Vasily Mikhailitchenko <vaskas@programica.ru>
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #000;
|
||||
color: #f8f8f8;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-meta {
|
||||
color: #7c7c7c;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-tag,
|
||||
.hljs-name {
|
||||
color: #96cbfe;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-selector-id {
|
||||
color: #ffffb6;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition {
|
||||
color: #a8ff60;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
color: #daefa3;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #e9c062;
|
||||
}
|
||||
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-doctag {
|
||||
color: #ffffb6;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-literal {
|
||||
color: #c6c5fe;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-deletion {
|
||||
color:#ff73fd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
Name: Kimbie (dark)
|
||||
Author: Jan T. Sott
|
||||
License: Creative Commons Attribution-ShareAlike 4.0 Unported License
|
||||
URL: https://github.com/idleberg/Kimbie-highlight.js
|
||||
*/
|
||||
|
||||
/* Kimbie Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #d6baad;
|
||||
}
|
||||
|
||||
/* Kimbie Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-meta {
|
||||
color: #dc3958;
|
||||
}
|
||||
|
||||
/* Kimbie Orange */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params,
|
||||
.hljs-deletion,
|
||||
.hljs-link {
|
||||
color: #f79a32;
|
||||
}
|
||||
|
||||
/* Kimbie Yellow */
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-attribute {
|
||||
color: #f06431;
|
||||
}
|
||||
|
||||
/* Kimbie Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition {
|
||||
color: #889b4a;
|
||||
}
|
||||
|
||||
/* Kimbie Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-function {
|
||||
color: #98676a;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #221a0f;
|
||||
color: #d3af86;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
Name: Kimbie (light)
|
||||
Author: Jan T. Sott
|
||||
License: Creative Commons Attribution-ShareAlike 4.0 Unported License
|
||||
URL: https://github.com/idleberg/Kimbie-highlight.js
|
||||
*/
|
||||
|
||||
/* Kimbie Comment */
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #a57a4c;
|
||||
}
|
||||
|
||||
/* Kimbie Red */
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class,
|
||||
.hljs-regexp,
|
||||
.hljs-meta {
|
||||
color: #dc3958;
|
||||
}
|
||||
|
||||
/* Kimbie Orange */
|
||||
.hljs-number,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-params,
|
||||
.hljs-deletion,
|
||||
.hljs-link {
|
||||
color: #f79a32;
|
||||
}
|
||||
|
||||
/* Kimbie Yellow */
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-attribute {
|
||||
color: #f06431;
|
||||
}
|
||||
|
||||
/* Kimbie Green */
|
||||
.hljs-string,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-addition {
|
||||
color: #889b4a;
|
||||
}
|
||||
|
||||
/* Kimbie Purple */
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-function {
|
||||
color: #98676a;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
background: #fbebd4;
|
||||
color: #84613d;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
Description: Magula style for highligh.js
|
||||
Author: Ruslan Keba <rukeba@gmail.com>
|
||||
Website: http://rukeba.com/
|
||||
Version: 1.0
|
||||
Date: 2009-01-03
|
||||
Music: Aphex Twin / Xtal
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-subst {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-symbol,
|
||||
.hljs-bullet,
|
||||
.hljs-attribute,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #050;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-link {
|
||||
color: #800;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #00e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-built_in,
|
||||
.hljs-tag,
|
||||
.hljs-name {
|
||||
font-weight: bold;
|
||||
color: navy;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
/*
|
||||
Five-color theme from a single blue hue.
|
||||
*/
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #eaeef3;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
color: #00193a;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-doctag,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-comment {
|
||||
color: #738191;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-built_in,
|
||||
.hljs-literal,
|
||||
.hljs-type,
|
||||
.hljs-addition,
|
||||
.hljs-tag,
|
||||
.hljs-quote,
|
||||
.hljs-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-class {
|
||||
color: #0048ab;
|
||||
}
|
||||
|
||||
.hljs-meta,
|
||||
.hljs-subst,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-attribute,
|
||||
.hljs-deletion,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable,
|
||||
.hljs-link,
|
||||
.hljs-bullet {
|
||||
color: #4c81c9;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
|
||||
Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
|
||||
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #23241f;
|
||||
}
|
||||
|
||||
.hljs,
|
||||
.hljs-tag,
|
||||
.hljs-subst {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.hljs-strong,
|
||||
.hljs-emphasis {
|
||||
color: #a8a8a2;
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-quote,
|
||||
.hljs-number,
|
||||
.hljs-regexp,
|
||||
.hljs-literal,
|
||||
.hljs-link {
|
||||
color: #ae81ff;
|
||||
}
|
||||
|
||||
.hljs-code,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-selector-class {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-name,
|
||||
.hljs-attr {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-symbol,
|
||||
.hljs-attribute {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-params,
|
||||
.hljs-class .hljs-title {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-id,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-variable {
|
||||
color: #e6db74;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822; color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/**
|
||||
* Obsidian style
|
||||
* ported by Alexander Marenin (http://github.com/ioncreature)
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #282b2e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-selector-id {
|
||||
color: #93c763;
|
||||
}
|
||||
|
||||
.hljs-number {
|
||||
color: #ffcd22;
|
||||
}
|
||||
|
||||
.hljs {
|
||||
color: #e0e2e4;
|
||||
}
|
||||
|
||||
.hljs-attribute {
|
||||
color: #668bb0;
|
||||
}
|
||||
|
||||
.hljs-code,
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-section {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #d39745;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #557182;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-name,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #8cbbad;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-symbol {
|
||||
color: #ec7600;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion {
|
||||
color: #818e96;
|
||||
}
|
||||
|
||||
.hljs-selector-class {
|
||||
color: #A082BD
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-name,
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|