Česky
Kamil Dudka

Fast SAT Solver (C++, GAlib)

File detail

Name:DownloadFormula_8h-source.html [Download]
Location: fss > doc > api > html
Size:9.0 KB
Last modification:2022-09-09 13:06

Source code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Fast SAT Solver: Formula.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.4 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="annotated.html"><span>Classes</span></a></li>
    <li class="current"><a href="files.html"><span>Files</span></a></li>
  </ul>
</div>
<h1>Formula.h</h1><a href="Formula_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2008 Kamil Dudka &lt;xdudka00@stud.fit.vutbr.cz&gt;</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * This file is part of fss (Fast SAT Solver).</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * fss is free software: you can redistribute it and/or modify</span>
<a name="l00007"></a>00007 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00008"></a>00008 <span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span>
<a name="l00009"></a>00009 <span class="comment"> * any later version.</span>
<a name="l00010"></a>00010 <span class="comment"> *</span>
<a name="l00011"></a>00011 <span class="comment"> * fss is distributed in the hope that it will be useful,</span>
<a name="l00012"></a>00012 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00013"></a>00013 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00014"></a>00014 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00015"></a>00015 <span class="comment"> *</span>
<a name="l00016"></a>00016 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00017"></a>00017 <span class="comment"> * along with fss.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00018"></a>00018 <span class="comment"> */</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef FOROMULA_H</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define FOROMULA_H</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="SatProblem_8h.html" title="SAT Problem representation.">SatProblem.h</a>"</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="keyword">namespace </span>FastSatSolver {
<a name="l00035"></a>00035 
<a name="l00041"></a><a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html">00041</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html" title="Interpreted formula&amp;#39;s interface for parser which can read it.">IFormulaBuilder</a>
<a name="l00042"></a>00042   {
<a name="l00043"></a>00043     <span class="keyword">public</span>:
<a name="l00044"></a><a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html#e13a8da4acf38997719e4a6fade8db5e">00044</a>       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html#e13a8da4acf38997719e4a6fade8db5e">~IFormulaBuilder</a>() { }
<a name="l00045"></a>00045 
<a name="l00052"></a>00052       <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html#8fd13f2fe9bea59f0d3c40f02ebc5dd9" title="Parse given token.">parse</a> (<a class="code" href="structFastSatSolver_1_1Token.html" title="Syntax unit representation - also called token.">Token</a> token ) = 0;
<a name="l00053"></a>00053 
<a name="l00058"></a>00058       <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html#2fc82837864087e3b50ebb62fab91d14" title="Return true if formula is valid.">isValid</a> ( ) = 0;
<a name="l00059"></a>00059   };
<a name="l00060"></a>00060 
<a name="l00069"></a><a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html">00069</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html" title="Evaluable formula&amp;#39;s interface.">IFormulaEvaluator</a>
<a name="l00070"></a>00070   {
<a name="l00071"></a>00071     <span class="keyword">public</span>:
<a name="l00072"></a><a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html#ce241ca607d3b34aa8190482043287c9">00072</a>       <span class="keyword">virtual</span> <a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html#ce241ca607d3b34aa8190482043287c9">~IFormulaEvaluator</a>() { }
<a name="l00073"></a>00073 
<a name="l00079"></a>00079       <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html#fb7ef8f1f92d2c0f51e326e05b7b70f4" title="Return true if formula is satisfied for given data.">eval</a> (<a class="code" href="classFastSatSolver_1_1ISatItem.html" title="Abstraction of solution candidate.">ISatItem</a> *data ) = 0;
<a name="l00080"></a>00080   };
<a name="l00081"></a>00081 
<a name="l00088"></a><a class="code" href="classFastSatSolver_1_1InterpretedFormula.html">00088</a>   <span class="keyword">class </span><a class="code" href="classFastSatSolver_1_1InterpretedFormula.html" title="Interpreted formula implementation.">InterpretedFormula</a>:
<a name="l00089"></a>00089       <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IFormulaBuilder.html" title="Interpreted formula&amp;#39;s interface for parser which can read it.">IFormulaBuilder</a>,
<a name="l00090"></a>00090       <span class="keyword">public</span> <a class="code" href="classFastSatSolver_1_1IFormulaEvaluator.html" title="Evaluable formula&amp;#39;s interface.">IFormulaEvaluator</a>
<a name="l00091"></a>00091   {
<a name="l00092"></a>00092     <span class="keyword">public</span>:
<a name="l00093"></a>00093       <a class="code" href="classFastSatSolver_1_1InterpretedFormula.html#70391c3b7bda85402f81df606bc00ca4">InterpretedFormula</a>();
<a name="l00094"></a>00094       <a class="code" href="classFastSatSolver_1_1InterpretedFormula.html#51cbf88d9b86742b97ce8988039cd458">~InterpretedFormula</a>();
<a name="l00095"></a>00095 
<a name="l00099"></a>00099       <span class="keywordtype">int</span> <a class="code" href="classFastSatSolver_1_1InterpretedFormula.html#3f098aa4027d962d5b9c58d6ea8b2a9b" title="Parse given token. Token to parse Returns zero, if no fatal error occurs. Parase...">parse</a> (<a class="code" href="structFastSatSolver_1_1Token.html" title="Syntax unit representation - also called token.">Token</a> token );
<a name="l00100"></a>00100 
<a name="l00104"></a>00104       <span class="keywordtype">bool</span> <a class="code" href="classFastSatSolver_1_1InterpretedFormula.html#fe93e17ac89cd97917811068ba2af214" title="Return true if formula is valid. Invalid formulas should be never evaluated. ">isValid</a> ( );
<a name="l00105"></a>00105       
<a name="l00109"></a>00109       <span class="keywordtype">bool</span> <a class="code" href="classFastSatSolver_1_1InterpretedFormula.html#5a0dfaf3d1d0ec78d17c0796e9fe6e62" title="Return true if formula is satisfied for given data. Evaluation data to use for evaluation...">eval</a> (<a class="code" href="classFastSatSolver_1_1ISatItem.html" title="Abstraction of solution candidate.">ISatItem</a> *data );
<a name="l00110"></a>00110 
<a name="l00111"></a>00111     <span class="keyword">private</span>:
<a name="l00112"></a>00112       <span class="keyword">struct </span><a class="code" href="structFastSatSolver_1_1InterpretedFormula_1_1Private.html">Private</a>;
<a name="l00113"></a>00113       <a class="code" href="structFastSatSolver_1_1InterpretedFormula_1_1Private.html">Private</a> *<span class="keyword">const</span> d;
<a name="l00114"></a>00114   };
<a name="l00115"></a>00115 
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 } <span class="comment">// namespace FastSatSolver</span>
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 <span class="preprocessor">#endif // FOROMULA_H</span>
</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 5 22:30:21 2008 for Fast SAT Solver by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.4 </small></address>
</body>
</html>