亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? zchaff_base.h

?? 這是一種非常有用的SAT解析器
?? H
字號:
// /*********************************************************************//  Copyright 2000-2004, Princeton University.  All rights reserved.//  By using this software the USER indicates that he or she has read,//  understood and will comply with the following:////  --- Princeton University hereby grants USER nonexclusive permission//  to use, copy and/or modify this software for internal, noncommercial,//  research purposes only. Any distribution, including commercial sale//  or license, of this software, copies of the software, its associated//  documentation and/or modifications of either is strictly prohibited//  without the prior consent of Princeton University.  Title to copyright//  to this software and its associated documentation shall at all times//  remain with Princeton University.  Appropriate copyright notice shall//  be placed on all software copies, and a complete copy of this notice//  shall be included in all copies of the associated documentation.//  No right is  granted to use in advertising, publicity or otherwise//  any trademark, service mark, or the name of Princeton University.//////  --- This software and any associated documentation is provided "as is"////  PRINCETON UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS//  OR IMPLIED, INCLUDING THOSE OF MERCHANTABILITY OR FITNESS FOR A//  PARTICULAR PURPOSE, OR THAT  USE OF THE SOFTWARE, MODIFICATIONS, OR//  ASSOCIATED DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS,//  TRADEMARKS OR OTHER INTELLECTUAL PROPERTY RIGHTS OF A THIRD PARTY.////  Princeton University shall not be liable under any circumstances for//  any direct, indirect, special, incidental, or consequential damages//  with respect to any claim by USER or any third party on account of//  or arising from the use, or inability to use, this software or its//  associated documentation, even if Princeton University has been advised//  of the possibility of those damages.// *********************************************************************/#ifndef __BASIC_CLASSES__#define __BASIC_CLASSES__#include <assert.h>#include "zchaff_header.h"#define UNKNOWN           2#define NULL_CLAUSE          -1#define VOLATILE_GID   -1#define        PERMANENT_GID         0// #define KEEP_LIT_CLAUSEStypedef int ClauseIdx;  // Used to refer a clause. Because of dynamic                        // allocation of vector storage, no pointer is allowered#ifndef _CLS_STATUS_#define _CLS_STATUS_enum CLAUSE_STATUS {  ORIGINAL_CL,  CONFLICT_CL,  DELETED_CL,};#endif// /**Class********************************************************************////   Synopsis    [Definition of a literal]////   Description [A literal is a variable with phase. Two things specify a//                literal: its "sign", and its variable index.////                Each clause that has more than 1 literal contains two special//                literals. They are being "watched". A literal is marked with//                2 bits: 00->not watched; 11->watched, direction = 1;//                01->watched, dir = -1; 10 is not valid. These two bits occupy//                the least significant bits of the literal.////                Each literal is represented by a 32 bit signed integer. The//                higher 29 bits represent the variable index. At most 2**28//                varialbes are allowed. If the sign of this integer is//                negative, it means that it is not a valid literal. It could//                be a clause index or a deleted literal pool element. The 3rd//                least significant bit is used to mark its sign.//                0->positive, 1->negative.////                The literals are collected in a storage space called literal//                pool. An element in a literal pool can be a literal or a//                special spacing element to indicate the termination of a//                clause. The spacing elements has negative value of the clause//                index.]////                Right Hand spacing element has the clause id, so why is it//                not less than 0?////   SeeAlso     [CDatabase, CClause]//// ****************************************************************************class CLitPoolElement {  protected:    int32 _val;  public:    // constructors & destructors    CLitPoolElement(void):_val(0)        {}    ~CLitPoolElement()                         {}    // member access function    int & val(void) {      return _val;    }    // stands for signed variable, i.e. 2*var_idx + sign    int s_var(void) {      return _val >> 2;    }    unsigned var_index(void) {      return _val >> 3;    }    unsigned var_sign(void) {      return ((_val >> 2) & 0x1);    }    void set(int s_var) {      _val = (s_var << 2);    }    void set(int vid, int sign) {      _val = (((vid << 1) + sign) << 2);    }    // followings are for manipulate watched literals    int direction(void) {      return ((_val & 0x3) - 2);    }    bool is_watched(void) {      return ((_val & 0x3) != 0);    }    void unwatch(void) {      _val = _val & (~0x3);    }    void set_watch(int dir) {      _val = _val + dir + 2;    }    // following are used for spacing (e.g. indicate clause's end)    bool is_literal(void) {      return _val > 0;    }    void set_clause_index(int cl_idx) {      _val = - cl_idx;    }    ClauseIdx get_clause_index(void) {      assert(_val <= 0);      return -_val;    }    // misc functions    unsigned find_clause_index(void) {      CLitPoolElement * ptr;      for (ptr = this; ptr->is_literal(); ++ptr);      return ptr->get_clause_index();    }    // every class should have a dump function and a self check function    void dump(ostream & os= cout);    friend ostream & operator << (ostream & os, CLitPoolElement & l) {      l.dump(os);      return os;    }};// /**Class********************************************************************////   Synopsis    [Definition of a clause]////   Description [A clause is consisted of a certain number of literals.//                All literals are collected in a single large vector, called//                literal pool. Each clause has a pointer to the beginning//                position of it's literals in the pool.////                Zchaff support incremental SAT. Clauses can be added or//                deleted from the database during search. To accomodate this//                feature, some modifications are needed.////                Clauses can be generated during search by conflict driven//                analysis. Conflict clauses are generated by a resolution//                process. Therefore, if after one search, some clauses got//                deleted, then some of the learned conflict clause may be//                invalidated. To maintain the integrity of the clause//                database, it is necessary to keep track of the clauses that//                are involved in the resolution process for a certain conflict//                clause so that when those clauses are deleted, the conflict//                clause should also be deleted.////                The scheme we implement is similar to the scheme described in//                : Ofer Strichman, Pruning techniques for the SAT-based//                Bounded Model Checking Problems, in Proc. 11th Advanced//                Research Working Conference on Correct Hardware Design and//                Verification Methods (CHARME'01)//                ]////   SeeAlso     [CDatabase]//// ****************************************************************************class CClause {  protected:    CLitPoolElement *   _first_lit;     // pointer to the first literal    unsigned            _num_lits ;    CLAUSE_STATUS       _status : 3;    unsigned            _id     : 29;   // the unique ID of a clause    unsigned            _gflag;         // the clause group id flag,                                        // maximum allow WORD_WIDTH groups    int                 _activity;    int                 _sat_lit_idx;  public:    // constructors & destructors    CClause(void) {      _sat_lit_idx = 0;    }    ~CClause() {}    // initialization & clear up    void init(CLitPoolElement * head, unsigned num_lits, unsigned gflag) {      _first_lit = head;      _num_lits = num_lits;      _gflag = gflag;    }    // member access function    inline int & activity(void) {      return _activity;    }    inline int & sat_lit_idx(void) {      return _sat_lit_idx;    }    inline CLitPoolElement * literals(void) {      // literals()[i] is it's the i-th literal      return _first_lit;    }    // return the idx-th literal    inline CLitPoolElement & literal(int idx) {     return *(_first_lit + idx);    }    // use it only if you want to modify _first_lit    inline CLitPoolElement * & first_lit(void) {      return _first_lit;    }    inline unsigned & num_lits(void) {      return _num_lits;    }    inline unsigned id(void) {      return _id;    }    inline void set_id(int id) {      _id = id;    }    inline CLAUSE_STATUS status(void) {      return _status;    }    inline void set_status(CLAUSE_STATUS st) {      _status = st;    }    // manipulate the group flag    inline unsigned & gflag(void) {      return _gflag;    }    inline bool gid(int i) {      assert(i >= 1 && i <= WORD_WIDTH);      return ((_gflag & (1 << (i - 1))) != 0);    }    inline void set_gid(int i) {      assert(i >= 1 && i <= WORD_WIDTH);      _gflag |= (1 << (i - 1));    }    inline void clear_gid(int i) {      assert(i >= 1 && i <= WORD_WIDTH);      _gflag &= ~(1 << (i - 1));    }    // misc function    bool self_check(void);    void dump(ostream & os = cout);    friend ostream & operator << (ostream & os, CClause & cl) {        cl.dump(os);        return os;    }};// /**Class********************************************************************//// Synopsis    [Definition of a variable]//// Description [CVariable contains the necessary information for a variable.]//// SeeAlso     [CDatabase]//// ****************************************************************************class CVariable {  protected:    unsigned _value             : 2;  // it can take 3 values, 0, 1 and UNKNOWN    bool _marked                : 1;  // used in conflict analysis.    unsigned _new_cl_phase      : 2;  // it can take 3 value    // 0: pos phase, 1: neg phase, UNKNOWN : not in new clause;    // It is used to keep track of literals appearing    // in newly added clause so that    // a. each variable can only appearing in one phase    // b. same literal won't appear more than once.    bool _enable_branch         : 1;  // if this variable is enabled in branch                                      // selection    int _implied_sign           : 1;  // when a var is implied, here is the                                      // sign (1->negative, 0->positive)    ClauseIdx _antecedent;    // used in conflict analysis.    int _dlevel;              // decision level this variable being assigned    int _assgn_stack_pos;     // the position where it is in the assignment                              // stack    int _lits_count[2];       // how many literals are there with this                              // variable. (two phases)    int _2_lits_count[2];     // how many literals in 2 literal clauses are                              // there with this variable. (two phases)    vector<CLitPoolElement *> _watched[2];  // watched literals of this                                            // var. 0: pos phase, 1: neg phase#ifdef KEEP_LIT_CLAUSES    vector<ClauseIdx> _lit_clauses[2];  // this will keep track of ALL the                                        // appearance of the variable in                                        // clauses                                        // note this will increase the database                                        // size by upto a factor of 2#endif    int _scores[2];                     // the score used for decision making    int _var_score_pos;                 // keep track of this variable's                                        // position in the sorted score array  public:    // constructors & destructors    CVariable(void) {        init();        _lits_count[0] = _lits_count[1] = 0;        _2_lits_count[0] = _2_lits_count[1] = 0;    }    ~CVariable() {}    void init(void) {      _value = UNKNOWN;      _antecedent = NULL_CLAUSE;      _marked = false;      _dlevel = -1;      _assgn_stack_pos = -1;      _new_cl_phase = UNKNOWN;      _scores[0] = _scores[1] = 0;      _enable_branch = true;    }    // member access function    inline int & score(int i) {      return _scores[i];    }    inline int & two_lits_count(int i) {      return _2_lits_count[i];    }    inline int score(void) {      // return 1; this will make a fixed order branch heuristic      int result = score(0) > score(1) ? score(0) : score(1);      if (_dlevel == 0)        result =-1;      return result;    }    inline int & var_score_pos(void) {      return _var_score_pos;    }    inline void set_var_score_pos(int pos) {      _var_score_pos = pos;    }    inline unsigned value(void) {      return _value;    }    inline void set_value(unsigned v) {      _value = v;    }    inline int & dlevel(void) {      return _dlevel;    }    inline int get_dlevel(void) {      return _dlevel;    }    inline void set_dlevel(int dl) {      _dlevel = dl;    }    inline int & assgn_stack_pos(void) {      return _assgn_stack_pos;    }    inline int & lits_count(int i) {      return _lits_count[i];    }    inline bool is_marked(void) {      return _marked;    }    inline int get_implied_sign(void) {      return _implied_sign;    }    inline void set_implied_sign(int sign) {      _implied_sign = sign;    }    inline unsigned new_cl_phase(void) {      return _new_cl_phase;    }    inline void set_new_cl_phase(unsigned phase) {      _new_cl_phase = phase;    }    inline void set_marked(void) {      _marked = true;    }    inline void clear_marked(void) {      _marked = false;    }    inline ClauseIdx & antecedent(void) {      return _antecedent;    }    inline ClauseIdx get_antecedent(void) {      return _antecedent;    }    inline void set_antecedent(ClauseIdx cl) {      _antecedent = cl;    }    inline vector<CLitPoolElement *> & watched(int i) {      return _watched[i];    }    inline void enable_branch(void) {      _enable_branch = true;    }    inline void disable_branch(void) {      _enable_branch = false;    }    inline bool is_branchable(void) {      return _enable_branch;    }#ifdef KEEP_LIT_CLAUSES    inline vector<ClauseIdx> & lit_clause(int i) {      return _lit_clauses[i];    }#endif    // misc function    bool self_check(void);    void dump(ostream & os = cout);    friend ostream & operator << (ostream & os, CVariable & v) {      v.dump(os);      return os;    }};#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人a级免费电影| 欧美一卡在线观看| 欧美性视频一区二区三区| 欧美精品日韩一区| 国产精品美女久久久久久久久| 一个色在线综合| 国产精品综合av一区二区国产馆| 91久久精品网| 欧美激情综合五月色丁香小说| 亚洲国产日韩精品| 成人免费视频caoporn| 6080国产精品一区二区| 中文字幕在线一区免费| 久久aⅴ国产欧美74aaa| 日本韩国一区二区三区视频| 久久九九99视频| 免费在线看成人av| 在线观看一区二区视频| 国产精品不卡在线| 国产成人在线免费| 欧美一卡二卡三卡| 亚洲成人777| 91在线高清观看| 国产精品美女久久久久久久久 | 免费成人性网站| 色狠狠一区二区三区香蕉| 欧美国产日本韩| 国产一本一道久久香蕉| 在线不卡免费av| 亚洲成av人影院| 91久久精品一区二区三| 亚洲免费在线观看视频| 不卡欧美aaaaa| 国产精品午夜在线观看| 国产精品99久| 欧美激情艳妇裸体舞| 国产一区二区三区视频在线播放| 日韩一区二区三| 另类综合日韩欧美亚洲| 欧美一区二区三区在线观看| 日韩av一级电影| 欧美一区二区三区免费大片| 日韩经典一区二区| 欧美美女一区二区| 日本大胆欧美人术艺术动态| 这里只有精品电影| 日韩高清不卡在线| 欧美成人一区二区三区片免费| 日韩精品1区2区3区| 欧美成人三级在线| 东方欧美亚洲色图在线| 亚洲欧洲成人精品av97| 色综合久久综合网97色综合| 亚洲一本大道在线| 91精品国产综合久久蜜臀| 久久国产精品一区二区| 国产日产精品一区| 一本一道波多野结衣一区二区| 一区二区国产盗摄色噜噜| 911国产精品| 国产美女精品在线| 亚洲人成精品久久久久久| 欧美日韩二区三区| 韩国欧美国产一区| 中文字幕一区二区不卡| 欧美日韩中文国产| 精久久久久久久久久久| 中文字幕va一区二区三区| 色狠狠色狠狠综合| 日韩和欧美一区二区三区| 久久综合九色欧美综合狠狠| 91在线免费视频观看| 一级做a爱片久久| 337p日本欧洲亚洲大胆色噜噜| 成人黄色片在线观看| 亚洲一二三四在线观看| 精品国精品国产| 一本色道综合亚洲| 青青草原综合久久大伊人精品| 久久婷婷综合激情| 欧美性猛交一区二区三区精品| 久久99精品久久久久久| 亚洲男女毛片无遮挡| 精品国产一区二区三区久久影院| 99精品在线免费| 久久66热偷产精品| 亚洲自拍偷拍综合| 国产三级一区二区三区| 欧美猛男gaygay网站| 东方欧美亚洲色图在线| 六月丁香婷婷色狠狠久久| 亚洲欧美色一区| 久久综合五月天婷婷伊人| 91高清在线观看| 成人精品国产免费网站| 久久99久久精品| 亚洲高清一区二区三区| 综合色天天鬼久久鬼色| 久久久久久久综合狠狠综合| 91麻豆精品国产91| 91福利国产精品| 成人免费看的视频| 国产精品一区二区在线看| 青青国产91久久久久久| 性欧美大战久久久久久久久| 亚洲丝袜自拍清纯另类| 国产午夜精品久久久久久免费视| 日韩欧美一区中文| 91.成人天堂一区| 欧美日韩黄色一区二区| 色综合天天综合网国产成人综合天| 国产伦精品一区二区三区视频青涩| 日本美女一区二区三区视频| 婷婷激情综合网| 五月婷婷色综合| 亚洲一区二区不卡免费| 亚洲资源在线观看| 夜夜精品浪潮av一区二区三区| 国产精品久久久久久久久晋中 | 热久久国产精品| 视频一区欧美日韩| 午夜婷婷国产麻豆精品| 午夜不卡在线视频| 免费成人美女在线观看.| 日本不卡一区二区三区高清视频| 亚洲成a人v欧美综合天堂| 午夜欧美2019年伦理| 天天综合色天天综合| 肉肉av福利一精品导航| 免费在线观看日韩欧美| 精品一区二区精品| 国产高清一区日本| 成人av电影在线网| 一本大道久久a久久综合婷婷 | 日本高清不卡视频| 欧洲一区在线电影| 欧美一区三区四区| 2023国产精品视频| 中文字幕在线观看一区| 一区二区三区精品| 青青国产91久久久久久| 国产激情一区二区三区桃花岛亚洲| 国产成人一区在线| 欧美在线短视频| 91精品国产色综合久久不卡电影 | 国产精品一区二区久久不卡| 国产69精品久久777的优势| 成人精品视频一区二区三区| 91在线视频观看| 91麻豆精品国产| 国产精品视频九色porn| 一区二区免费在线| 黑人巨大精品欧美黑白配亚洲| 国产v综合v亚洲欧| 欧美日韩一级视频| 久久人人爽人人爽| 一区二区三区免费在线观看| 蜜臀久久99精品久久久久久9| 国产精品一区二区在线观看网站| 一本到三区不卡视频| 日韩午夜在线观看视频| 国产精品国产馆在线真实露脸| 亚洲高清视频在线| 国产成人精品一区二区三区网站观看| 91免费版在线看| 精品国产一区二区三区四区四| 亚洲欧洲制服丝袜| 捆绑调教美女网站视频一区| 色一情一乱一乱一91av| 精品久久久影院| 亚洲尤物视频在线| 懂色av中文一区二区三区| 日韩一二在线观看| 亚洲在线视频一区| 波多野结衣一区二区三区| 日韩美女视频一区二区在线观看| 亚洲手机成人高清视频| 国内精品在线播放| 91精品婷婷国产综合久久性色| 日韩一区日韩二区| 国产成人综合网站| 日韩一级黄色片| 亚洲二区在线观看| 色综合久久久久久久| 国产欧美日本一区视频| 激情久久五月天| 91精品久久久久久久99蜜桃| 亚洲狼人国产精品| 91原创在线视频| 国产精品视频第一区| 国产精品66部| 欧美精品一区二区三区视频 | 欧美色图免费看| 亚洲色图.com| av一区二区不卡| 欧美极品另类videosde| 国产成人综合自拍| 久久欧美中文字幕| 国产精品性做久久久久久| 精品国产亚洲一区二区三区在线观看|