<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>logicalhacking.com: Posts tagged test&proof</title>
    <link href="https://logicalhacking.com/blog/tags/test%26proof/index.xml" rel="self" />
    <link href="https://logicalhacking.com" />
    <id>https://logicalhacking.com/blog/tags/test%26proof/index.xml</id>
    <author>
        <name>Achim D. Brucker</name>
        <email>adbrucker@0x5f.org</email>
    </author>
    <updated>2025-01-25T00:00:00Z</updated>
    <entry>
    <title>PhD Position in Verification of Golang</title>
    <link href="https://logicalhacking.com//blog/2025/01/25/phd-go-verification/" />
    <id>https://logicalhacking.com//blog/2025/01/25/phd-go-verification/</id>
    <published>2025-01-25T00:00:00Z</published>
    <updated>2025-01-25T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2025-01-25" pubdate data-updated="true">25 January 2025</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/uoe/index.html">uoe</a> | <a href="/blog/tags/staff%26positions/index.html">staff&amp;positions</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/formalmethods/index.html">formalmethods</a> | <a href="/blog/tags/programminglanguages/index.html">programminglanguages</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2025/01/25/phd-go-verification/">PhD Position in Verification of Golang</a>
    </h1>
  </header>
  <p>We have an exciting funded opportunity for a PhD on developing “Verification Environment for Distributed Systems Implemented in Go”. The main objectives are to define a formal semantics of Go and its CSP-inspired concurrency model in an interactive theorem prover (e.g., Isabelle/HOL) as well as developing a calculus for program verification. This is a unique opportunity to work in the intersection of theory and application and while doing so, contributing to improving the state of the art in software correctness and security.</p>
<!-- MORE -->
<p>A detailed description of the PhD proposal is available at:</p>
<ul>
<li><a href="https://www.exeter.ac.uk/v8media/recruitmentsites/documents/A_Verification_Environment_for_Distributed_Systems_Implemented_in_Go_EPSRC_DLA_Project_September_2025_Entry.pdf">A Verification Environment for Distributed Systems Implemented in Go</a></li>
</ul>
<p>Information about the funding and application process is available at:</p>
<ul>
<li><a href="https://www.exeter.ac.uk/study/funding/award/?id=5477" class="uri">https://www.exeter.ac.uk/study/funding/award/?id=5477</a></li>
</ul>
<p>Application deadline is the midnight GMT on 10th of February 2025.</p>
<p>Please reach out to me, if you have any questions.</p>
</article>
]]></summary>
</entry>
<entry>
    <title>Parametric Ontologies in Software Engineering</title>
    <link href="https://logicalhacking.com//blog/2024/11/16/parametric-ontologies/" />
    <id>https://logicalhacking.com//blog/2024/11/16/parametric-ontologies/</id>
    <published>2024-11-16T00:00:00Z</published>
    <updated>2024-11-16T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2024-11-16" pubdate data-updated="true">16 November 2024</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/SoftwareEngineering/index.html">SoftwareEngineering</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2024/11/16/parametric-ontologies/">Parametric Ontologies in Software Engineering</a>
    </h1>
  </header>
  <p>The linking of formal and informal information is perhaps the most pervasive
challenge in the digitization of modern society. Extracting knowledge from
reasonably well-structured “raw”-texts is a crucial prerequisite for any form of
advanced search, classification, “semantic” validation and “semantic” merge
technology. This challenge incites numerous research efforts summarized under
the labels “semantic web” or “data mining”. A key role in structuring this
linking is played by ontologies (also called “vocabulary” in semantic web
communities), i.e., a machine-readable form of the structure of documents and
the document discourse.</p>
<!-- MORE -->
<p>Such ontologies can be used for scientific discourse underlying scholarly
articles, the conversion, and integration of semiformal content, for advanced
semantic search in mathematical libraries or documentation in various domains.
In other words, ontologies generate the meta-data necessary to annotate raw
text allowing their “deeper analysis”, in particular inside mathematical
formulas or equivalent formal content such as programs or UML-models.</p>
<p>To support such scenarios, we developed Isabelle/DOF, an ontology framework on
top of Isabelle/HOL. It allows for the formal development of ontologies and
continuous conformity-checking of integrated documents, including the tracing of
typed meta-data of documents. Isabelle/DOF deeply integrates into the
Isabelle/HOL ecosystem, allowing to write documents containing (informal) text,
executable code, (formal and semiformal) definitions, and proofs. Users of
Isabelle/DOF can either use HOL or one of the many formal methods that have been
embedded into Isabelle/HOL to express formal parts of their documents.</p>
<p>In our most recent journal paper <span class="citation" data-cites="brucker.ea:parametric-ontologies:2025">[1]</span>, which
supersedes <span class="citation" data-cites="brucker.ea:deep-ontologies:2023">[2]</span>, we describe in detail, how we
extended Isabelle/DOF to support parametric ontological classes.</p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-brucker.ea:parametric-ontologies:2025" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">A. D. Brucker, I. Ait-Sadoune, N. Méric, and B. Wolff, <span>“Parametric ontologies in formal software engineering,”</span> <em>Science of Computer Programming</em>, 2025, doi: <a href="https://doi.org/10.1016/j.scico.2024.103231">10.1016/j.scico.2024.103231</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-parametric-ontologies-2025/" class="uri">http://logicalhacking.com/publications/brucker.ea-parametric-ontologies-2025/</a></div>
</div>
<div id="ref-brucker.ea:deep-ontologies:2023" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[2] </div><div class="csl-right-inline">A. D. Brucker, I. Ait-Sadoune, N. Méric, and B. Wolff, <span>“<a href="">Using deep ontologies in formal software engineering</a>,”</span> in <em>International conference on rigorous state based methods (ABZ 2023)</em>, U. Glässer and D. Méry, Eds. Heidelberg: Springer-Verlag, 2023. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-deep-ontologies-2023/" class="uri">http://logicalhacking.com/publications/brucker.ea-deep-ontologies-2023/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>PostDoc in Formal Methods for Business Process Logic</title>
    <link href="https://logicalhacking.com//blog/2024/03/20/postdoc-bpl/" />
    <id>https://logicalhacking.com//blog/2024/03/20/postdoc-bpl/</id>
    <published>2024-03-20T00:00:00Z</published>
    <updated>2024-03-20T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2024-03-20" pubdate data-updated="true">20 March 2024</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/uoe/index.html">uoe</a> | <a href="/blog/tags/staff%26positions/index.html">staff&amp;positions</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/security/index.html">security</a> | <a href="/blog/tags/formalmethods/index.html">formalmethods</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2024/03/20/postdoc-bpl/">PostDoc in Formal Methods for Business Process Logic</a>
    </h1>
  </header>
  <p>As part of a US funded project, we have an exciting opportunity for a PostDoc in
the Security and Trust of Advanced Systems Group at the University of Exeter
(UK) to work applying formal methods to enterprise systems:</p>
<!-- MORE -->
<p>We will use formal methods (e.g., model checking, SMT solving, interactive
theorem proving), to analyze business-process-driven (enterprise) systems (e.g.,
business logic and workflows described a BPMN models). A particular focus will
be the analysis of complex compositions of workflows within one organization as
well as across multiple organizations.</p>
<p>In particular, we will develop novel techniques to detect faults and
vulnerabilities (that can be exploited by both internal and external attackers)
in complex business-process-driven systems, contributing to protecting critical
workflows such as manufacturing or logistics.</p>
<p>In such environments, attackers can exploit such faults and vulnerabilities to
cause all kinds of harm such as direct financial losses or causing the
production of safety or security critical products to stop. Overall, the project
aims to develop automated techniques for assessing the risk of business process
or workflows as well as finding and mitigating such attacks.</p>
<p>This is a unique opportunity for somebody wanting to use/apply formal methods to
the security of large enterprise systems.</p>
<p>More information and application details can be found at:</p>
<ul>
<li><a href="https://jobs.exeter.ac.uk/hrpr_webrecruitment/wrd/run/etrec179gf.open?WVID=171839ediw&amp;LANG=USA&amp;VACANCY_ID=386422ijTy" class="uri">https://jobs.exeter.ac.uk/hrpr_webrecruitment/wrd/run/etrec179gf.open?WVID=171839ediw&amp;LANG=USA&amp;VACANCY_ID=386422ijTy</a></li>
</ul>
<p>Application deadline is the 18th of April 2024. Please contact me for more details.</p>
</article>
]]></summary>
</entry>
<entry>
    <title>Conformance Testing of Formal Semantics using Grammar-based Fuzzing</title>
    <link href="https://logicalhacking.com//blog/2022/07/04/conformance-testing-of-formal-semantics/" />
    <id>https://logicalhacking.com//blog/2022/07/04/conformance-testing-of-formal-semantics/</id>
    <published>2022-07-04T00:00:00Z</published>
    <updated>2022-07-04T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2022-07-04" pubdate data-updated="true"> 4 July 2022</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/semantics/index.html">semantics</a> | <a href="/blog/tags/verification/index.html">verification</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/solidity/index.html">solidity</a> | <a href="/blog/tags/smartcontract/index.html">smartcontract</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2022/07/04/conformance-testing-of-formal-semantics/">Conformance Testing of Formal Semantics using Grammar-based Fuzzing</a>
    </h1>
  </header>
  <p>In our work “<a href="/blog/2021/12/10/sefm-solidity/">A Denotational Semantics of Solidity in
Isabelle/HOL</a>”
<span class="citation" data-cites="marmsoler.ea:solidity-semantics:2021">[1]</span> we presented a formal semantics for
Solidity, the most common language for implementing smart contracts. Such a
formal semantics one of the corner stones of developing a formal verification
approach that, mathematically, can prove the absence of certain types of bugs
(e.g., such as the Parity Wallet bug that made USD 280mil worth of Ether
inaccessible).</p>
<p>But, of course, any verification can only be as good as the underlying
semantics. So, how do we ensure that our formal semantics actually captures the
behavior of Solidity faithfully? This is the question we answer in our latest
paper <span class="citation" data-cites="marmsoler.ea:conformance:2022">[2]</span> that will be presented at the
<a href="https://easychair.org/smart-program/TAP22/">International Conference on Tests and
Proofs</a>.</p>
<!-- MORE -->
<p>In our approach, we use grammar-based fuzzing, a technique that generates
example programs from a formal grammar. Our goal is to ensure that our post-hoc
developed formal semantics of Solidity complies to the real world system, i.e.,
our formalization should behave identical to the implementation. For ensuring
this, we generate a test oracle from our formal specification, which allows us
to check that executing a test case (generated by the grammar-based fuzzer)
executed on the formal semantics yields the same result as executed on the
Ethereum blockchain. Our main contributions are:</p>
<ol type="1">
<li>An approach extending a parse grammar for Solidity to ensure that a generic
grammar-based fuzzer generates type correct Solidity programs, instead of
generating syntactically correct, but often ill-typed, programs.</li>
<li>An approach for automatically deriving a test-oracle from a formal
specification in Isabelle/HOL that allows to efficiently decide if a test
case passes or fails and that allows to measure the test coverage in terms of
statements and expressions of the target language usually based on an
implicit test specification that informally can be described as “no crashes
occur”.</li>
<li>A framework for testing the compliance of a formal semantics of Solidity in
Isabelle/HOL to their execution on the Ethereum blockchain</li>
</ol>
<p><strong>Update:</strong> The formalization is now also available in the <a href="https://www.isa-afp.org/entries/Solidity.html">Archive of Formal Proofs</a> <span class="citation" data-cites="marmsoler.ea:isabelle-solidity:2022"><strong>marmsoler.ea:isabelle-solidity:2022?</strong></span>.</p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-marmsoler.ea:solidity-semantics:2021" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">D. Marmsoler and A. D. Brucker, <span>“A denotational semantics of <span>Solidity</span> in <span>Isabelle/HOL</span>,”</span> in <em>Software engineering and formal methods (SEFM)</em>, R. Calinescu and C. Pasareanu, Eds. Heidelberg: Springer-Verlag, 2021. Author copy: <a href="http://logicalhacking.com/publications/marmsoler.ea-solidity-semantics-2021/" class="uri">http://logicalhacking.com/publications/marmsoler.ea-solidity-semantics-2021/</a></div>
</div>
<div id="ref-marmsoler.ea:conformance:2022" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[2] </div><div class="csl-right-inline">D. Marmsoler and A. D. Brucker, <span>“Conformance testing of formal semantics using grammar-based fuzzing,”</span> in <em><span>TAP</span> 2022: Tests and proofs</em>, L. Kovacs and K. Meinke, Eds. Heidelberg: Springer-Verlag, 2022. Author copy: <a href="http://logicalhacking.com/publications/marmsoler.ea-conformance-2022/" class="uri">http://logicalhacking.com/publications/marmsoler.ea-conformance-2022/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>Why Formalize Standards?</title>
    <link href="https://logicalhacking.com//blog/2019/01/04/formalizing-standards/" />
    <id>https://logicalhacking.com//blog/2019/01/04/formalizing-standards/</id>
    <published>2019-01-04T00:00:00Z</published>
    <updated>2019-01-04T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2019-01-04" pubdate data-updated="true"> 4 January 2019</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/semantics/index.html">semantics</a> | <a href="/blog/tags/verification/index.html">verification</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/dom/index.html">dom</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2019/01/04/formalizing-standards/">Why Formalize Standards?</a>
    </h1>
  </header>
  <p>Why formalize (e.g., developing a formal semantics) an existing standard (e.g.,
as we did with our <a href="/blog/2018/12/31/formalizing-the-dom/">formalization of the DOM
standard</a>)? Of course, there are obvious
benefits such as identifying glitches or areas of (unwanted)
under-specification, but what are the wider benefits?</p>
<!-- MORE -->
<p>Actually, the most important question that needs to be answered is: what is the
relation between the formalization of a standard, the official standard, and
implementations that claim to conform to the standard. If there is not a strong
link between the formalization between all three artifacts, formal proofs based
on the formal specification are only of limited value. This is true regardless
if the formalization has been developed in a post-hoc reverse-engineering
fashion or is part of the official standard.</p>
<p>Actually, most popular technologies are only specified by standards using a
semi-formal or, worse, an informal notation. Moreover, the tools used for
writing standards only support, if at all, trivial consistency checks. Thus, it
is no surprise that such standards usually contain inconsistencies (e.g.,
different sections of the same standard that contradict each other) or unwanted
under-specifications (e.g., where the authors of the standard omit the
specification of important properties that the defined API should fulfill).</p>
<p>Even if a standard is developed formally, or contains a (often non-normative)
formalization, two important questions arise:</p>
<ol type="1">
<li>to what extent does the formal model comply with the semi-formal
parts of the standard, and</li>
<li>to what extent does an actual implementation comply with the
formal model?</li>
</ol>
<p>If the formal model was used for verifying properties, one also needs
to validate that the real system fulfills the assumptions made during
the verification.</p>
<p>Luckily, for many industrial standards, it is common that the standard includes
a compliance-test suite, which gives a first hint how to improve the situation:
if the formalization is executable, we can execute the test cases on the formal
specification to check that the specification complies to the test suite. But
can we do more?</p>
<p>Yes, we can. The following figure shows how we can use test and proof
(verification) techniques for establishing strong links between formal
standards, compliance test suites, and implementations.</p>
<p><img alt="Using test and proof for establishing strong links between
formal standards, compliance test suites, and implementations."
align="center" class="zoom" style="margin-right:20px;min-width:200px;"
width="80%"
src="/blog/images/linking-standards-and-their-formalization.png"></p>
<p>In more detail, we can</p>
<ul>
<li>use the existing compliance test suite to check that a formalization satisfies
the requirements expressed as tests. As compliance testing is usually the way
how implementation show that they comply to a standard, this should give us
the same guarantees for the formalization.</li>
<li>use the formalization to analyze the consistency of the standard as well as
prove important correctness, safety, or security properties. If our
implementation adheres to the standard and fulfills a comprehensive compliance
test suite, this should give us a strong guarantee that compliant
implementation fulfill these properties as well.</li>
<li>use the formalization to generate test cased (e.g., using specification-based
or model-based test case generation techniques). This will allow us to improve
the coverage of the compliance test suite, e.g., by including tests for
properties that have been identified during the formal verification of the
formal specification.</li>
</ul>
<p>This approach shows that not only go test and verification hand-in-hand, it also
shows that a formalization of a standard can contribute to improving the
informal parts of a standard, such as the compliance test suite.</p>
<p>If you are interested in more detail, please have a look at our TAP paper
<span class="citation" data-cites="brucker.ea:standard-compliance-testing:2018">[1]</span>, where we report on applying some
of these ideas to our formalization of the DOM standard
<span class="citation" data-cites="brucker.ea:core-dom:2018">[2]</span>.</p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-brucker.ea:standard-compliance-testing:2018" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">A. D. Brucker and M. Herzberg, <span>“Formalizing (web) standards: An application of test and proof,”</span> in <em><span>TAP</span> 2018: Tests and proofs</em>, C. Dubois and B. Wolff, Eds. Heidelberg: Springer-Verlag, 2018, pp. 159–166. doi: <a href="https://doi.org/10.1007/978-3-319-92994-1_9">10.1007/978-3-319-92994-1_9</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-standard-compliance-testing-2018/" class="uri">http://logicalhacking.com/publications/brucker.ea-standard-compliance-testing-2018/</a></div>
</div>
<div id="ref-brucker.ea:core-dom:2018" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[2] </div><div class="csl-right-inline">A. D. Brucker and M. Herzberg, <span>“A formal semantics of the <span>Core</span> <span>DOM</span> in <span>Isabelle/HOL</span>,”</span> in <em>The 2018 web conference companion (WWW)</em>, 2018, pp. 741–749. doi: <a href="https://doi.org/10.1145/3184558.3185980">10.1145/3184558.3185980</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-core-dom-2018/" class="uri">http://logicalhacking.com/publications/brucker.ea-core-dom-2018/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>Ontologies in Isabelle/HOL?</title>
    <link href="https://logicalhacking.com//blog/2018/07/26/ontologies-in-isabelle-hol/" />
    <id>https://logicalhacking.com//blog/2018/07/26/ontologies-in-isabelle-hol/</id>
    <published>2018-07-26T00:00:00Z</published>
    <updated>2018-07-26T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2018-07-26" pubdate data-updated="true">26 July 2018</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/isadof/index.html">isadof</a> | <a href="/blog/tags/formaldocument/index.html">formaldocument</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2018/07/26/ontologies-in-isabelle-hol/">Ontologies in Isabelle/HOL?</a>
    </h1>
  </header>
  <p>Mentioning ontologies and <a href="https://isabelle.in.tum.de">Isabelle/HOL</a> in one
sentence, might sound weird for man of us. While both are somehow used for
writing formal documents, the degree of formalization is, at least at the first
glance, very much different.</p>
<p>We asked ourselves if it is possible to integrate ontologies into Isabelle, as
the current document preparation system of Isabelle lacks a mechanism for
ensuring the structure of different document types (as, e.g., required in
certification processes) in general and, in particular, mechanism for linking
informal and formal parts of a document.</p>
<!-- MORE -->
<p>The result of this work, is
<a href="https://git.logicalhacking.com/HOL-OCL/Isabelle_DOF">Isabelle/DOF</a>, a Document
Ontology Framework on top of Isabelle. Isabelle/DOF allows for both conventional
typesetting and formal (proof) development.</p>
<p>Isabelle/DOF allows for define ontologies within Isabelle. The ontologies are
deeply integrated into the Isabelle system in general and the document
preparation in particular. Thus, ontological constraints defined in an ontology
are checked (while writing documents) to ensure that also the semi-formal parts
of a document adhere to a certain structure and, e.g., that all links and
references are defined.</p>
<p>More details about the initial details of Isabelle/DOF can be found in our CICM
paper <span class="citation" data-cites="brucker.ea:isabelle-ontologies:2018">[1]</span>. Isabelle/DOF is licensed under a
2-clause BSD license and available in a <a href="https://git.logicalhacking.com/HOL-OCL/Isabelle_DOF">git
repository</a>.</p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-brucker.ea:isabelle-ontologies:2018" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">A. D. Brucker, I. Ait-Sadoune, P. Crisafulli, and B. Wolff, <span>“Using the <span>Isabelle</span> ontology framework: Linking the formal with the informal,”</span> in <em>Conference on intelligent computer mathematics (CICM)</em>, Heidelberg: Springer-Verlag, 2018. doi: <a href="https://doi.org/10.1007/978-3-319-96812-4_3">10.1007/978-3-319-96812-4_3</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-isabelle-ontologies-2018/" class="uri">http://logicalhacking.com/publications/brucker.ea-isabelle-ontologies-2018/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>HOL-TestGen 1.9.1 Released</title>
    <link href="https://logicalhacking.com//blog/2017/08/31/hol-testgen-1.9.1/" />
    <id>https://logicalhacking.com//blog/2017/08/31/hol-testgen-1.9.1/</id>
    <published>2017-08-31T00:00:00Z</published>
    <updated>2017-08-31T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2017-08-31" pubdate data-updated="true">31 August 2017</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/research/index.html">research</a> | <a href="/blog/tags/testing/index.html">testing</a> | <a href="/blog/tags/hol-testgen/index.html">hol-testgen</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/tools/index.html">tools</a> | <a href="/blog/tags/logic/index.html">logic</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2017/08/31/hol-testgen-1.9.1/">HOL-TestGen 1.9.1 Released</a>
    </h1>
  </header>
  <p>We are proud to announce the release of <a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen
1.9.1</a> HOL-TestGen is a formal
specification-based test environment HOL-TestGen that allows to have a seamless
transition from verification to test case generation using symbolic computation
in Isabelle/HOL.</p>
<!-- MORE -->
<p>This release is a maintenance release based on the most recent version of
Isabelle/HOL, i.e., <a href="http://isabelle.in.tum.de/website-Isabelle2016-1/index.html">Isabelle
2016-1</a>.</p>
<h2 class="sectionAnchor" id="supplementary-material">Supplementary Material <a href="#supplementary-material">§</a></h2>
<ul>
<li>HOL-TestGen Website: <a href="https://www.brucker.ch/projects/hol-testgen/" class="uri">https://www.brucker.ch/projects/hol-testgen/</a></li>
</ul>
</article>
]]></summary>
</entry>
<entry>
    <title>HOL-TestGen 1.9 Released</title>
    <link href="https://logicalhacking.com//blog/2017/07/19/hol-testgen-1.9/" />
    <id>https://logicalhacking.com//blog/2017/07/19/hol-testgen-1.9/</id>
    <published>2017-07-19T00:00:00Z</published>
    <updated>2017-07-19T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2017-07-19" pubdate data-updated="true">19 July 2017</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/research/index.html">research</a> | <a href="/blog/tags/testing/index.html">testing</a> | <a href="/blog/tags/hol-testgen/index.html">hol-testgen</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/tools/index.html">tools</a> | <a href="/blog/tags/logic/index.html">logic</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2017/07/19/hol-testgen-1.9/">HOL-TestGen 1.9 Released</a>
    </h1>
  </header>
  <p>We are proud to announce the release of <a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen
1.9.</a> HOL-TestGen is a formal
specification-based test environment HOL-TestGen that allows to have a seamless
transition from verification to test case generation using symbolic computation
in Isabelle/HOL.</p>
<!-- MORE -->
<p>This release is a maintenance release based on <a href="http://isabelle.in.tum.de/website-Isabelle2016/index.html">Isabelle
2016</a>.</p>
<h3 class="sectionAnchor" id="supplementary-material">Supplementary Material <a href="#supplementary-material">§</a></h3>
<ul>
<li>HOL-TestGen Website: <a href="https://www.brucker.ch/projects/hol-testgen/" class="uri">https://www.brucker.ch/projects/hol-testgen/</a></li>
</ul>
</article>
]]></summary>
</entry>
<entry>
    <title>Dijkstra's Aircraft: Testing vs. Verification‽</title>
    <link href="https://logicalhacking.com//blog/2016/12/30/testing-vs-verification/" />
    <id>https://logicalhacking.com//blog/2016/12/30/testing-vs-verification/</id>
    <published>2016-12-30T00:00:00Z</published>
    <updated>2016-12-30T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2016-12-30" pubdate data-updated="true">30 December 2016</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/testing/index.html">testing</a> | <a href="/blog/tags/verification/index.html">verification</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/logic/index.html">logic</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2016/12/30/testing-vs-verification/">Dijkstra's Aircraft: Testing vs. Verification‽</a>
    </h1>
  </header>
  <p>The there is a long and still ongoing battle between the <em>verification
community</em> and the <em>testing community</em> about the right approach to showing the
correctness of computer programs. Often, one side brings up the famous quote of
Edsger W. Dijkstra: “Program testing can be used to show the presence of bugs,
but never to show their absence!”</p>
<p>This quote is often used to manifest that verification is the holy grail of
program correctness and testing is necessary evil as a full verification is
often too expensive (even though, there are successful verification of, e.g.,
complete operating system kernels). But is this true?</p>
<p>Let’s do a small gedankenexperiment.</p>
<!-- MORE -->
<h5 class="sectionAnchor" id="which-aircraft-would-you-take-for-your-next-flight"><strong>Which aircraft would you take for your next flight?</strong> <a href="#which-aircraft-would-you-take-for-your-next-flight">§</a></h5>
<p>Let’s assume we have to brand new aircraft that are ready for their first take
of with commercial passengers, including **you*.</p>
<table>
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<thead>
<tr class="header">
<th style="text-align: center;">Aircraft A</th>
<th style="text-align: center;">Aircraft B</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: center;"><img src="/blog/images/aircraft-blue.png" id="id" style="width:40.0%" alt="Blue airplane" /></td>
<td style="text-align: center;"><img src="/blog/images/aircraft-red.png" id="id" style="width:40.0%" alt="Red airplane" /></td>
</tr>
</tbody>
</table>
<ul>
<li><em>Aircraft A</em> is follows Dikstra’s approach, i.e., its correctness is formally
verified, but it never completed a test flight.</li>
<li><em>Aircraft B</em> is thoroughly tested and has completed over 1000 test flights
successfully.</li>
</ul>
<p>Which aircraft would you prefer for your next flight? Which one would Dijkstra?
Looks like <em>thorough</em> testing can, indeed, provide some level of confidence of
the absence of bugs. Does this mean we should give up the idea of a fully
verified system? Of course not.</p>
<h5 class="sectionAnchor" id="testing-and-verification"><strong>Testing and verification</strong> <a href="#testing-and-verification">§</a></h5>
<p>Testing and verification have different properties:<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<ul>
<li><em>Verification</em>, i.e., the mathematical proof that a computer program (or
system) is correct (or secure) can show the absence of certain bugs with
respect to a formal semantics. This is important and recent advances in formal
methods enable us to formally verify large systems.</li>
<li><em>Testing</em>, i.e., the executing a computer program in a real environment (i.e.,
on real hardware, a real operating system, interacting with real
back-end-systems) and validating its behavior allows us gain confidence in the
correctness (or security) of the complete stack.</li>
</ul>
<p>Thus, to show the correctness and security of computer programs, neither only
testing nor only verification is the answer. The correct approach is <strong>testing
and verification</strong>: use verification to show the correctness and security (and,
hence, the absence of certain bugs) of the most critical (high risk) components
and use testing to show that the overall system is correct (and secure).</p>
<p>This two-staged approach is necessary, as verification provides a higher level
of trust into the correctness of a system but usually is based on a formal
specification that makes certain assumptions that the environment (e.g, the real
hardware) needs to fulfill). Testing can validate that those assumptions are
actually met by the implementation (i.e., the real system).</p>
<h5 class="sectionAnchor" id="theorem-prover-based-testing-the-best-of-both-worlds"><strong>Theorem prover-based testing: the best of both worlds</strong> <a href="#theorem-prover-based-testing-the-best-of-both-worlds">§</a></h5>
<p>Combining testing and verification is particular powerful, if the formal
specification serves two purposes: first, it forms the basis for a formal
verification and, second, it forms the basis for generating test cases that then
can be used for testing the real implementation. To realize this vision, we need
a uniform formal verification and test-case generation system, i.e., a system
that allows us to formally proof properties of a formal system model <em>and</em>
generate test cases from the same (or a formally equivalent) specification. If
you want to know more about this approach, you might want to check out our
<strong>theorem prover-based testing</strong> system <a href="/research/HOL-TestGen/">HOL-TestGen</a>,
which combines the formal verification powers of HOL-TestGen with symbolic test
case generation.</p>
<section id="footnotes" class="footnotes footnotes-end-of-document" role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>Of course, if we could test <em>all</em> possible inputs of a computer program,
i.e., executing a complete test, the level of confidence would be equivalent to
a formal proof. Due to the usual large number of possible inputs, such a
thorough test is, usually, not feasible.<a href="#fnref1" class="footnote-back" role="doc-backlink">↩︎</a></p></li>
</ol>
</section>
</article>
]]></summary>
</entry>
<entry>
    <title>Monadic Sequence Testing?!</title>
    <link href="https://logicalhacking.com//blog/2016/07/06/tap-monadic-seq-testing/" />
    <id>https://logicalhacking.com//blog/2016/07/06/tap-monadic-seq-testing/</id>
    <published>2016-07-06T00:00:00Z</published>
    <updated>2016-07-06T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2016-07-06" pubdate data-updated="true"> 6 July 2016</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/logic/index.html">logic</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/hol-testgen/index.html">hol-testgen</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/monads/index.html">monads</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2016/07/06/tap-monadic-seq-testing/">Monadic Sequence Testing?!</a>
    </h1>
  </header>
  <p>Specification-based <em>sequence testing</em> is usually associated with
various kinds of automaton models. While it is intuitive to model
sequential systems (or communicating systems) as automatons, there is
an interesting alternative: <em>monads.</em> Monads have been proven to be very
successful in functional programming (e.g., Haskell) for
representing step-wise computations. Thus, why not use them for
sequence testing?</p>
<!-- MORE -->
<p>In fact, we developed a <em>Monadic Sequence Testing Framework (MST)</em>
that is formalized in Isabelle/HOL (actually, our specification-based
testing tool
<a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen</a>) and has
been used in several case-studies. MST combines</p>
<ol type="1">
<li>generalized forms of non-deterministic automata with input and
output,</li>
<li>generalizes the concept of Mealy-Machines,</li>
<li>generalizes the concept of extended finite state machines, and</li>
<li>generalizes some special form of IO Automata, IO LTS’s, etc.</li>
</ol>
<p>But how does this work in practice? Let’s take a look on a small toy
example: a toy bank that allows for checking the account
balance as well as for depositing and withdrawing money. The state of the
bank system is modeled as a map from client and account information
to the account balance:
<span class="math display">\[\newcommand{\cmd}[1]{\operatorname{\color{blue}{#1}}}
\newcommand{\fw}[1]{\operatorname{#1}}
\begin{align}
\cmd{type\_synonym} &amp;&amp;\fw{client}       &amp;=  \fw{string}\\
\cmd{type\_synonym} &amp;&amp;\fw{account\_no}  &amp;=  \fw{int}\\
\cmd{type\_synonym} &amp;&amp;\fw{data\_base}   &amp;=  (\fw{client} \times \fw{account\_no}) \rightharpoonup  \fw{int}
\end{align}\]</span>
Our Bank example provides only three input actions for checking the
<em>balance</em>, <em>deposit</em>, and <em>withdraw</em> money:
<span class="math display">\[\begin{align}
\cmd{datatype} \fw{in\_c} &amp;= \fw{deposit}  \fw{client} \fw{account\_no} \fw{nat}\\
                          &amp;~| \fw{withdraw} \fw{client} \fw{account\_no} \fw{nat}\\
                          &amp;~| \fw{balance}  \fw{client} \fw{account\_no}
\end{align}\]</span>
The output symbols are:
<span class="math display">\[\begin{align}
\cmd{datatype} \fw{out\_c} &amp;= \fw{deposit\_ok} | \fw{withdraw\_ok} | \fw{balance\_ok} \fw{nat}
\end{align}\]</span></p>
<p>The traditional way to specify a sequence test scenario in HOL-TestGen looks like
this:
<span class="math display">\[\begin{align}
\cmd{test\_spec} &amp;~~\fw{test\_balance}:\\
~~\cmd{assumes} &amp;~~\fw{account\_def}: (c_0,no) \in \fw{dom} \sigma_0\\
~~\cmd{and}     &amp;~~\fw{accounts\_pos}: \fw{init}~ \sigma_0\\
~~\cmd{and}  &amp;~~\fw{test\_purpose}: \fw{test\_purpose}~ c_0~no~S\\
~~\cmd{and}     &amp;~~\fw{sym\_exec\_spec}: \sigma_0 \vDash (s \leftarrow \fw{mbind_{FailStop}}~S~SYS; \fw{return} (s = x))\\
\cmd{shows}
  &amp;~~\sigma_0  \vDash (s \leftarrow \fw{mbind_{FailStop}}~S~PUT; \fw{return} (s = x))
\end{align}\]</span>
where the assumptions of this scenario (also called <em>test
purposes</em>) are:</p>
<ul>
<li><span class="math inline">\(\fw{account\_def}\)</span> that the initial system state
<span class="math inline">\(\sigma_0\)</span> is a map that contains at least a
client <span class="math inline">\(c_O\)</span> with an account <span class="math inline">\(no\)</span>,</li>
<li>the constraint <span class="math inline">\(\fw{init}~\sigma_O\)</span> constrains the
tests to those <span class="math inline">\(\sigma_O\)</span> where all accounts have a
positive balance, and</li>
<li><span class="math inline">\(\fw{test\_purpose}\)</span> constrains the set of possible input
sequences <span class="math inline">\(S\)</span> to those that contain only operations of
client <span class="math inline">\(c_0\)</span> and two of his accounts.</li>
</ul>
<p>We skip the formal definitions of <span class="math inline">\(\fw{init}\)</span> and
<span class="math inline">\(\fw{test\_purpose}\)</span> due to space reasons.</p>
<p>An example test case, picked from the list of the automatically
generated abstract test cases, looks as follows:</p>
<p><span class="math display">\[\begin{align}
\forall x \in \fw{dom} \sigma_0. 0 \le \fw{the}(\sigma_0 x)
&amp;\longrightarrow \sigma_0 (c_0, no) = \fw{Some} y\\
&amp;\longrightarrow \fw{int} n&#39; \le y + \fw{int} n\\
&amp;\longrightarrow \sigma_0 \vDash  os \leftarrow \fw{mbind_{FailStop}}
[\fw{deposit} c_0~no~n, \\
&amp;\fw{withdraw} c_0~no~n&#39;, \fw{balance} c_0~no]~PUT;\\
&amp;\fw{unit_{SE}}(os=[\fw{deposit\_ok}, \fw{withdraw\_ok}, \\
&amp;\fw{balance\_ok}(\fw{nat}(y+ \fw{int} n - \fw{int} n&#39;))])
\end{align}\]</span></p>
<p>This abstract test case says: for any <span class="math inline">\(\sigma_0\)</span> which has only
positive values, and a <span class="math inline">\(y\)</span> with the balance of the account of client
<span class="math inline">\(c_0\)</span> on his account <span class="math inline">\(no\)</span>, and sufficient money on the account such
that the deposit and withdraw operations can both be effectuated (mind
the precondition of withdraw that the balance must be sufficiently
large for the withdraw), a test-sequence deposit-withdraw-balance must
lead to the observable result that all three operations succeed and
produce the result value <span class="math inline">\(\fw{nat}(y + \fw{int} n - \fw{int} n&#39;))\)</span>, where
<span class="math inline">\(\fw{nat}\)</span> and <span class="math inline">\(\fw{int}\)</span> are HOL-library coersions
between nats and integers. They are a result of our operations in the
model that requires at some points natural numbers and at integers on
others; this kind of complication is very common in constraints
generated from programs or models.</p>
<p>For more information, please have a look on our TAP 2017 paper
<span class="citation" data-cites="brucker.ea:monadic-sequence-testing:2016">[1]</span>. Our framework is
implemented in
<a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen</a>.</p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-brucker.ea:monadic-sequence-testing:2016" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">A. D. Brucker and B. Wolff, <span>“Monadic sequence testing and explicit test-refinements,”</span> in <em><span>TAP</span> 2016: Tests and proofs</em>, B. K. Aichernig and C. A. Furia, Eds. Heidelberg: Springer-Verlag, 2016. doi: <a href="https://doi.org/10.1007/978-3-319-41135-4_2">10.1007/978-3-319-41135-4_2</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-monadic-sequence-testing-2016/" class="uri">http://logicalhacking.com/publications/brucker.ea-monadic-sequence-testing-2016/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>HOL-TestGen 1.8 Released</title>
    <link href="https://logicalhacking.com//blog/2016/04/23/hol-testgen-1.8/" />
    <id>https://logicalhacking.com//blog/2016/04/23/hol-testgen-1.8/</id>
    <published>2016-04-23T00:00:00Z</published>
    <updated>2016-04-23T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2016-04-23" pubdate data-updated="true">23 April 2016</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/research/index.html">research</a> | <a href="/blog/tags/testing/index.html">testing</a> | <a href="/blog/tags/hol-testgen/index.html">hol-testgen</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/tools/index.html">tools</a> | <a href="/blog/tags/logic/index.html">logic</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2016/04/23/hol-testgen-1.8/">HOL-TestGen 1.8 Released</a>
    </h1>
  </header>
  <p>We are proud to announce the release of
<a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen 1.8.</a>
HOL-TestGen is a formal specification-based test environment
HOL-TestGen that allows to have a seamless transition from
verification to test case generation using symbolic computation in
Isabelle/HOL.</p>
<!-- MORE -->
<p>On the one hand, this release is a maintenance release based on
<a href="http://isabelle.in.tum.de/website-Isabelle2013-2/index.html">Isabelle 2013-2</a>. On
the other hand, it marks an important milestone on our way to support
a more recent version of Isabelle, i.e., Isabelle 2016. Thus, the next
release will be based on Isabelle 2016 (or later).</p>
<h3 class="sectionAnchor" id="supplementary-material">Supplementary Material <a href="#supplementary-material">§</a></h3>
<ul>
<li>HOL-TestGen Website: <a href="https://www.brucker.ch/projects/hol-testgen/" class="uri">https://www.brucker.ch/projects/hol-testgen/</a></li>
<li><a href="https://www.brucker.ch/bibliography/download/2016/brucker.ea-hol-testgen-2016.pdf">HOL-TestGen 1.8 User Guide</a></li>
</ul>
</article>
]]></summary>
</entry>
<entry>
    <title>A Survey of Security Testing Techniques</title>
    <link href="https://logicalhacking.com//blog/2016/01/15/security-testing-survey/" />
    <id>https://logicalhacking.com//blog/2016/01/15/security-testing-survey/</id>
    <published>2016-01-15T00:00:00Z</published>
    <updated>2016-01-15T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2016-01-15" pubdate data-updated="true">15 January 2016</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/security/index.html">security</a> | <a href="/blog/tags/securitytesting/index.html">securitytesting</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a> | <a href="/blog/tags/appsec/index.html">appsec</a> | <a href="/blog/tags/securityengineering/index.html">securityengineering</a> | <a href="/blog/tags/sast/index.html">sast</a> | <a href="/blog/tags/dast/index.html">dast</a> | <a href="/blog/tags/iast/index.html">iast</a> | <a href="/blog/tags/mbst/index.html">mbst</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2016/01/15/security-testing-survey/">A Survey of Security Testing Techniques</a>
    </h1>
  </header>
  <p>Got lost in overwhelmingly large amount <em>security testing research</em>?
Do not worry, there is help.</p>
<p>We are happy to announce that our
<a href="https://www.brucker.ch/bibliography/abstract/felderer.ea-security-testing-2016"><em>survey on security testing</em></a>
has been published. We do not only provide an overview of the currents state
of the art in security testing research, we also explain the role of
security testing a secure software development process and discuss the
various security testing approaches in the context of a multi-tiered
web application.</p>
<!-- MORE -->
<p>In particular, we discuss the following security testing techniques:</p>
<ul>
<li>Model-based security testing (including risk-based security testing)</li>
<li>Code-based security testing (including static source code analysis)</li>
<li>Penetration testing and dynamic (runtime) analysis</li>
<li>Security Regression testing</li>
</ul>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-felderer.ea:security-testing:2016" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">M. Felderer, M. Büchler, M. Johns, A. D. Brucker, R. Breu, and A. Pretschner, <span>“Security testing: A survey,”</span> <em>Advances in Computers</em>, vol. 101, pp. 1–51, Mar. 2016, doi: <a href="https://doi.org/10.1016/bs.adcom.2015.11.003">10.1016/bs.adcom.2015.11.003</a>. Author copy: <a href="http://logicalhacking.com/publications/felderer.ea-security-testing-2016/" class="uri">http://logicalhacking.com/publications/felderer.ea-security-testing-2016/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>
<entry>
    <title>Formal Firewall Conformance Testing</title>
    <link href="https://logicalhacking.com//blog/2015/12/15/testing-firewalls/" />
    <id>https://logicalhacking.com//blog/2015/12/15/testing-firewalls/</id>
    <published>2015-12-15T00:00:00Z</published>
    <updated>2015-12-15T00:00:00Z</updated>
    <summary type="html"><![CDATA[<article>
  <header>
    <div class="meta">
      Posted on 
      <time datetime="2015-12-15" pubdate data-updated="true">15 December 2015</time>
       by  <a href="https://www.brucker.ch/">Achim D. Brucker</a>, 
      licensed under <a href="https://creativecommons.org/licenses/by-nd/4.0/">CC BY-ND 4.0</a>.
      <div class="tags"><a href="/blog/tags/research/index.html">research</a> | <a href="/blog/tags/securitytesting/index.html">securitytesting</a> | <a href="/blog/tags/security/index.html">security</a> | <a href="/blog/tags/hol-testgen/index.html">hol-testgen</a> | <a href="/blog/tags/isabelle/hol/index.html">isabelle/hol</a> | <a href="/blog/tags/test%26proof/index.html">test&amp;proof</a></div>
      <meta name="fediverse:creator" content="@adbrucker@fediscience.org">
    </div>
    <h1 class="entry-title">
      <a href="/blog/2015/12/15/testing-firewalls/">Formal Firewall Conformance Testing</a>
    </h1>
  </header>
  <p>If you ever tried to enforce a network policy in a large data center,
i.e., needed to configure the different firewalls and routers, you
will agree that this is a tedious and error-prone task. This is even
more true, if you need to maintain and change those policies over a
long period of time. Understanding, the actual policy
enforced in a non-trivial network setup (e.g., a data center with
multiple fall-back connections) is even harder.</p>
<p>One way of ensuring that important security (access control)
properties of a network are true and are not changed during
reconfiguration is testing. We developed a specification-based
(model-based) testing approach for network policies that allows to
represent network policies in a high-level language, to optimize the
policies, and to generate test cases that can directly be executed in
a real-world network.</p>
<!-- MORE -->
<p>Our approach supports complex policies that require network
translation (NAT) or port forwarding as well as stateful and
stateless protocols (thus, we capture the concept of widely used
network filters such as iptables). For the following example,
let’s limit ourselves to simple packet filters and a very simple
network policy that is illustrated by the following table:</p>
<table>
<thead>
<tr class="header">
<th>source</th>
<th>destination</th>
<th>protocol</th>
<th>port</th>
<th>action</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>internet</td>
<td>dmz</td>
<td>udp</td>
<td>25</td>
<td>allow</td>
</tr>
<tr class="even">
<td>internet</td>
<td>dmz</td>
<td>tcp</td>
<td>80</td>
<td>allow</td>
</tr>
<tr class="odd">
<td>dmz</td>
<td>intranet</td>
<td>tcp</td>
<td>25</td>
<td>allow</td>
</tr>
<tr class="even">
<td>intranet</td>
<td>dmz</td>
<td>tcp</td>
<td>993</td>
<td>allow</td>
</tr>
<tr class="odd">
<td>intranet</td>
<td>internet</td>
<td>udp</td>
<td>80</td>
<td>allow</td>
</tr>
<tr class="even">
<td>any</td>
<td>any</td>
<td>any</td>
<td>any</td>
<td>deny</td>
</tr>
</tbody>
</table>
<p>In our example, we have three sub-nets (internet, intranet, and dmz)
and the intranet (i.e., the internal network) should be protected from
the outside network (i.e., the internet). This representation is
rather similar to the usual textbook representation of network
policies. In our formalism (or DSL), we can express this policy as
follows:
<span class="math display">\[
\newcommand{\cmd}[1]{\operatorname{\color{blue}{#1}}}
\newcommand{\fw}[1]{\operatorname{#1}}
\begin{align}
\cmd{definition}~\mathrm{TestPolicy} \cmd{where}\\
 TestPolicy   &amp;=      \fw{allow\_port} \fw{udp}  25 \fw{internet} \fw{dmz}      \\
              &amp;\oplus \fw{allow\_port} \fw{tcp}  80 \fw{internet} \fw{dmz}      \\
              &amp;\oplus \fw{allow\_port} \fw{tcp}  25 \fw{dmz}      \fw{intranet} \\
              &amp;\oplus \fw{allow\_port} \fw{tcp} 993 \fw{intranet} \fw{dmz}      \\
              &amp;\oplus \fw{allow\_port} \fw{udp}  80 \fw{intranet} \fw{internet} \\
              &amp;\oplus D_U
\end{align}
\]</span>
where <span class="math inline">\(D_U\)</span> is the policy that denies all traffic.</p>
<p>Using this policy definition, we can state our <em>test specification</em> as
follows:
<span class="math display">\[
\begin{align}
\cmd{test\_spec} \fw{test:}~~ &amp; P~x \Longrightarrow FUT~x = \mathrm{TestPolicy}~x
\end{align}
\]</span>
In general, this specifies that the firewall implementation under test
(<span class="math inline">\(FUT\)</span>) should behave for all packages satisfying the predicate <span class="math inline">\(P\)</span>
should behave as the specification. Thus, the <span class="math inline">\(P\)</span> allows us to specify additional test
constraints such as to not to generated test cases that test traffic
within one sub-net (which, most likely, cannot be monitored easily).</p>
<p>Using our automated test case generation approach that is implemented
on top of <a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen</a>
we obtain test cases that both check that packages that should be
accepted (i.e., pass through the network) are actually accepted and
that all others are denied. A (simplified) test case for a denied
package looks as follows:
<span class="math display">\[
FUT(1,((8,13,12,10),6,\fw{tcp}),((172,168,2,1),80,\fw{tcp}),data)= \lfloor(\fw{deny}()\rfloor
\]</span></p>
<p>This approach is described in all details in our journal paper
<span class="citation" data-cites="brucker.ea:formal-fw-testing:2014">[1]</span> in detail in our
<a href="http://www.brucker.ch/bibliography/abstract/brucker.ea-formal-fw-testing-2014">journal paper</a>
and the implementation is available as part of the
<a href="https://www.brucker.ch/projects/hol-testgen/">HOL-TestGen distribution</a>. Our
approach has inspired the colleagues at Microsoft Research to a
similar approach using Z3 that is now used for testing the
configuration of the Azure data centers.</p>
<p><span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&amp;rft.jtitle=Software+Testing%2C+Verification+and+Reliability&amp;rft_id=info%3Adoi%2F10.1002%2Fstvr.1544&amp;rfr_id=info%3Asid%2Fresearchblogging.org&amp;rft.atitle=Formal+firewall+conformance+testing%3A+an+application+of+test+and+proof+techniques&amp;rft.issn=09600833&amp;rft.date=2015&amp;rft.volume=25&amp;rft.issue=1&amp;rft.spage=34&amp;rft.epage=71&amp;rft.artnum=http%3A%2F%2Fdoi.wiley.com%2F10.1002%2Fstvr.1544&amp;rft.au=Brucker%2C+A.D.&amp;rft.au=Br%C3%BCgger%2C+L.&amp;rft.au=Wolff%2C+B.&amp;rfe_dat=bpr3.included=1;bpr3.tags=Computer+Science+%2F+Engineering%2CSecurity%2C+Logic%2C+Testing%2C+Verification%2C+Software+Engineering%2C+Theorem+Proving%2C+Formal+Methods">
Brucker, A.D., Brügger, L., &amp; Wolff, B. (2015). Formal firewall conformance testing: an application of test and proof techniques
<span style="font-style: italic;">Software Testing, Verification and Reliability, 25</span> (1), 34-71 DOI:
<a rev="review" href="http://dx.doi.org/10.1002/stvr.1544">10.1002/stvr.1544</a>
</span></p>
<h3 class="sectionAnchor unnumbered" id="references">References <a href="#references">§</a></h3>
<div id="refs" class="references csl-bib-body" role="doc-bibliography">
<div id="ref-brucker.ea:formal-fw-testing:2014" class="csl-entry" role="doc-biblioentry">
<div class="csl-left-margin">[1] </div><div class="csl-right-inline">A. D. Brucker, L. Brügger, and B. Wolff, <span>“Formal firewall conformance testing: An application of test and proof techniques,”</span> <em>Software Testing, Verification &amp; Reliability (STVR)</em>, vol. 25, no. 1, pp. 34–71, 2015, doi: <a href="https://doi.org/10.1002/stvr.1544">10.1002/stvr.1544</a>. Author copy: <a href="http://logicalhacking.com/publications/brucker.ea-formal-fw-testing-2014/" class="uri">http://logicalhacking.com/publications/brucker.ea-formal-fw-testing-2014/</a></div>
</div>
</div>
</article>
]]></summary>
</entry>

</feed>
