Giter Club home page Giter Club logo

veripb's Introduction

VeriPB - Verifier for pseudo-Boolean proofs

VeriPB is a tool for verifying refutations (proofs of unsatisfiability) and more (such as verifying that a valid solution is found) written in python and c++. A quick overview of the proof file format can be found below.

Currently its focus is on linear pseudo-Boolean proofs utilizing cutting planes reasoning. VeriPB has already been used for various applications including proof logging of

  • subgraph isomorphism [GMN2020],
  • clique and maximum common (connected) subgraph [GMMNPT2020],
  • constraint programming with all different constraints [EGMN20],
  • parity reasoning in the context of CDCL SAT solvers [GN21] and
  • dominance and symmetry breaking [BGMN22].

ATTENTION

VeriPB is still in early and active development and to be understood as a rapidly changing proof of concept (for research publications). A stable version is to be expected towards the end of my PhD in 2022. If you want to use VeriPB, e.g. because you need it for your cutting-edge research or to compare it to other tools, I highly encourage you to get in contact with me.

Table of Contents

Installation

Install Requirements

The following tools and libraries are required (with minimal suggested versions):

  • Python 3.6.9 with pip and setuptools installed
  • g++ 7.5.0
  • libgmp
  • git

These can be installed in Ubuntu / Debian via

sudo apt-get update && apt-get install \
        python3 \
        python3-pip \
        python3-dev \
        g++ \
        libgmp-dev \
        git
pip3 install --user \
        setuptools

If the required tools can not be installed on the system (for example because the user has no root privileges), we recommend the use of Anaconda . After installing anaconda as described on the webpage you need activate the environment (source [path_to_anaconda]/bin/activate). Then you can use

conda install -y gxx_linux-64 gmp make

to install the missing dependencies. Note that you will always need to activate the environment before installing or using VeriPB.

Install VeriPB

When these requirenments are met, VeriPB can be installed via

git clone [email protected]:MIAOresearch/VeriPB.git
cd ./VeriPB
pip3 install --user ./

Run veripb --help for help.

Installation on Windows

For Windows we recommend to use `Windows-Subsystem for Linux (WSL) with Ubuntu<https://ubuntu.com/wsl>`_. Once Ubuntu on WSL is installed, the instructions above can be followed.

Update

If installed as described above the tool can be updated form the VeriPB directory with

git pull
pip3 install --user ./

Getting Started

A good way to getting started is probably to have a look at the examples under tests/integration_tests/correct and to run VeriPB with the --trace --useColor option, which will output the derived proof.

For Example:

veripb --trace --useColor tests/integration_tests/correct/miniProof_polishnotation_1.opb tests/integration_tests/correct/miniProof_polishnotation_1.pbp

Formula Format

The formula is provided in OPB format. A short overview can be found here.

The verifier also supports an extension to OPB, which allows to use arbitrary variable names instead of x1, x2, ... Variable names must follow the following properties:

  • start with a letter in A-Z, a-z
  • are at least two characters long
  • may not contain space

The following characters are guaranteed to be supported: a-z, A-Z, 0-9, []{}_^. Support of further characters is implementation specific and produces an error if unsupported characters are used.

Basic Proof Format

TLDR;

pseudo-Boolean proof version 1.1
* load formula
f [nProblemConstraints]
* compute constraint in polish notation
pol [sequence of operations in reverse polish notation]
* introduce constraint that is verified by reverse unit propagation
rup  [OPB style constraint]
* delete constraints
del [constraintId1] [constraintId2] [constraintId3] ...
* verify contradiction
c [which]
* add constraint by redundancy based strengthening
red [OPB style constraint] ; [substitution]
* add constraint by dominance based strengthening
dom [OPB style constraint] ; [substitution]

Introduction

There are multiple rules, which are described in more detail below. Every rule has to be written on one line and no line may contain more than one rule. Each rule can create an arbitrary number of constraints (including none). The verifier keeps a database of constraints and each constraint is assigned an index, called ConstraintId, starting from 1 and increasing by one for every added constraint. Rules can reference other constraints by their ConstraintId.

In what follows we will use IDmax to refer to the largest used ID before a rule is executed.

(f)ormula

f [nProblemConstraints]

This rule loads all axioms from the input formula (the path to the formula will be provided separately when calling the proof checker).

The value of nProblemConstraints is the number of constraints counting equalities twice. This is because equalities in the input formula are replaced by two inequalities, where the first inequality is '>=' and the second '<='. Afterwards, the i-th inequality in the input formula gets ID := IDmax + i.

If the constraint count does not match or is missing then the behaviour is implementation specific and verification either fails or the correct value is used (optionally a warning is emitted).

For example the opb file:

* #variable= 3 #constraint= 1
1 x1 2 x2 >= 1 ;
1 x3 1 x4  = 1 ;

with the proof file:

pseudo-Boolean proof version 1.1
f 3

will be translated to:

1: 1 x1 2 x2 >= 1 ;
2: 1 x3 1 x4 >= 1 ;
3: -1 x3 -1 x4 >= -1 ;

(c)ontradiction

c [ConstraintId]

Verify that the constraint [ConstraintId] is contradicting, i.e., it can not be satisfied.

Examples of contradicting constraints:

>= 1 ;
>= 3 ;
3 x1 -2 x2 >= 4 ;

reverse (pol)ish notation

pol [sequence in reverse polish notation]

Add a new constraint with ConstraintId := IDmax + 1. How to derive the constraint is describe by a 0 terminated sequence of arithmetic operations over the constraints. These are written down in reverse polish notation. We will use [constraint] to indicate either a ConstraintId or a subsequence in reverse polish notation. Available operations are:

  • Addition:

    [constraint] [constraint] +
    
  • Scalar Multiplication:

    [constraint] [factor] *
    

The factor is a strictly positive integer and needs to be the second operand.

  • Boolean Division:

    [constraint] [divisor] d
    

The divisor is a strictly positive integer and needs to be the second operand.

  • Boolean Saturation:

    [constraint] s
    
  • Literal Axioms:

    [literal]
    x1
    ~x1
    

Where [literal] is a variable name or its negation (~) and generates the constraint that the literal is greater equal zero. For example for ~x1 this generates the constraint ~x1 >= 0.

  • Weakening:

    [constraint] [variable] w
    

Where [variable] is a variable name and may not contain negation. This step adds literal axioms such that [variable] disapears from the constraint, i.e., its coefficient becomes zero.

Conclusion

This set of instructions allows to write down any treelike refutation with a single rule.

For example:

pol 42 3 * 43 + s 2 d

Creates a new constraint by taking 3 times the constraint with index 42, then adds constraint 43, followed by a saturation step and a division by 2.

reverse unit propagation (RUP)

rup [OPB style constraint]

Use reverse unit propagation to check if the constraint is implied, i.e., it temporarily adds the negation of the constraint and performs unit propagation, including all other (non deleted) constraints in the database. If this unit propagation yields contradiction then we know that the constraint is implied and the check passes.

If the reverse unit propagation check passes then the constraint is added with ConstraintId := IDmax + 1. Otherwise, verification fails.

(del)ete constraint

del id [constraintId1] [constraintId2] [constraintId3] ...
del spec [OPB style constraint]
del range [constraintIdStart] [constraintIdEnd]

Delete constraints with given constrain ids, spacification or in the range from start to end, including start but not end. Note that constraints will be deleted completely including propagations caused.

If an order is loaded and a constarint marked as core is deleted, then additional checks might be required.

Strengthening Rules

Substitution

A substitution [substitution] is a space seperated sequence of multiple mappings from a variable to a constant or a literal.

[variable] -> 0
[variable] -> 1
[variable] -> [literal]

Using -> is optional and can improve readability.

For example::
x1 -> 0 x2 -> ~x3 x1 0 x2 ~x3

Redundancy Based Strengthening

red [OPB style constraint] ; [substitution]

Adding the constraint is successful if it passes the map redundancy check via unit propagation or syntactic checks, i.e., if it can be shown that every assignment satisfying the constraints in the database F but falsifying the to-be-added constraint C can be transformed into an assignment satisfying both by using the assignment (or witness) \omega provided by the list of literals. More formally it is checked that,

F \land \neg C \models (F \land C)\upharpoonright\omega .

For details, please refer to [GN21].

If the redundancy rule is used in the context of optimization and / or dominance breaking, additional conditions are checked. For details, please refer to [BGMN22].

Subproofs

For both strengthening rules it is possible to provide an explicit subproof. A suproof starts by ending the strengthening step with ; begin and is concluded by end. Within a subproof it is possible to specify proof goals using proofgoal [goalId], which are in turn terminated by end. Each proofgoal needs to derive contradiction using the provided constraints.

Example

red 1 x1 >= 1 ; x1 -> 1 ; begin
    proofgoal #1
        pol -1 -2 +
        c -1
    end

    proofgoal 1
        rup >= 1 ;
        c -1
    end
end

The [goalId] are as follows: If a goal originates from a constraint in the database the [goalId] is identical to the constraintId of the constraint in the database. Otherwise the goalId starts with a # folowed by a number which is increased for each goal in the following order (if applicable): the constraint to be derived (only redundancy), one goal per constraint in the order, one goal for the negated order (only dominance), objective condition (only for optimization problems). Tip: Use --trace option to display required goals.

Dominance Based Strengthening

For details, please refer to [BGMN22]. For syntax have a look at the example under tests/integration_tests/correct/dominance/example.pbp .

Template:

pre_order simple
    * specify variables
    vars
        left u1
        right v1
    end

    * define the order
    def
        -1 u1 1 v1 >= 0 ;
    end

    * proof goal: transitivity
    transitivity
        vars
            fresh_right w1
        end
        proof
            proofgoal #1
                p 1 2 + 3 +
                c -1
            qed
        qed
    qed
end

load_order simple x1
dom 1 ~x1 >= 1 ; x1 0

Moving constraints to core

core id [constraintId1] [constraintId2] ...
core spec [opb style constraint]
core range [constraintIdStart] [constraintIdEnd]

Convenience Rules and Rules for Sanity Checks

TLDR;

* check equality
e [ConstraintId] [OPB style constraint]
* check implication
i [ConstraintId] [OPB style constraint]
* add constraint if implied
j [ConstraintId] [OPB style constraint]
* set level (for easier deletion)
# [level]
* wipe out level (for easier deletion)
w [level]

(e)quals

e [C: ConstraintId] [D: OPB style constraint]

Verify that C is the same constraint as D, i.e. has the same degree and contains the same terms (order of terms does not matter).

(i)mplies

i [C: ConstraintId] [D: OPB style constraint]

Verify that C syntactically implies D, i.e. it is possible to derive D from C by adding literal axioms.

(j) implies and add

Identical to (i)mplies but also adds the constraint that is implied to the database with ConstraintId := IDmax + 1.

(#) set level

# [level]

This rule does mark all following constraints, up to the next invocation of this rule, with [level]. [level] is a non-negative integer. Constraints which are generated before the first occurrence of this rule are not marked with any level.

(w)ipeout level

w [level]

Delete all constraints (see deletion command) that are marked with [level] or a greater number. Constraints that are not marked with a level can not be removed with this command.

Example

pseudo-Boolean proof version 1.0
f 10 0              # IDs 1-10 now contain the formula constraints
p 1 x1 3 * + 42 d 0 # Take the first constraint from the formula,
                      weaken with 3 x_1 >= 0 and then divide by 42

Beyond Refutations

TLDR;

* new solution
v [literal] [literal] ...
* new optimal value
o [literal] [literal] ...

(v) solution

v [literal] [literal] ...
v x1 ~x2

Given a partial assignment in form of a list of [literal], i.e. variable names with ~ as prefix to indicate negation, check that:

  • after unit propagation we are left with a full assignment to the current database, i.e. an assignment that assigns all variables that are mentioned in a constraint in the formula or the proof
  • the full assignment does not violate any constraint in the current database

If the check is successful then the clause consisting of the negation of all literals is added with ConstraintId := IDmax + 1. If the check is not successful then verification fails.

(ov) original solution

ov [literal] [literal] ...
ov x1 ~x2

Given an assignment in form of a list of [literal], i.e. variable names with ~ as prefix to indicate negation, check that:

  • each constraint in the original formula is satisfied

If the check is not successful then verification fails.

(o) optimal value

o [literal] [literal] ...
o x1 ~x2

This rule can only be used if the OPB file specifies an objective function f(x), i.e., it contains a line of the form:

min: [coefficient] [literal] [coefficient] [literal] ...

Given a partial assignment \rho in form of a list of [literal], i.e. variable names with ~ as prefix to indicate negation, check that:

  • every variable that occurs in the objective function is set
  • after unit propagation we are left with a full assignment, i.e. an assignment that assigns all variables that are mentioned in a constraint in the formula or the proof
  • the full assignment does not violate any constraint

If the check is successful then the constraint f(x) \leq f(\rho) - 1 is added with ConstraintId := IDmax + 1. If the check is not successful then verification fails.

Debugging and for Development Only

TLDR;

* add constraint as unchecked assumption
a [OPB style constraint]

(a) unchecked assumption

* add constraint as unchecked assumption
a [OPB style constraint]

Adds the given constraint without any checks. The constraint gets ConstraintId := IDmax + 1. Proofs that contain this rule are not valid, because it allows adding any constraint. For example one could simply add contradiction directly.

This rule is intended to be used during solver development, when not all aspects of the solver have implemented proof logging, yet. For example, imagine that the solver knows by some fancy algorithm that it is OK to add a constraint C, however proof logging for the derivation of C is not implemented yet. Using this rule we can simply add C without providing a derivation and check with VeriPB that all other derivations that are already implemented are correct.

Acknowledgements

VeriPB was developed by Stephan Gocht. The underlying proof system was designed jointly by Bart Bogaerts, Stephan Gocht, Ciaran McCreesh, and Jakob Nordström, while investigating and implementing proof logging for different applications. We are also grateful to Jo Devriendt and Jan Elffers for many valuable discussions that have helped to improve the performance of VeriPB.

This work was done in part while the author Stephan Gocht

  • was supported by the Swedish Research Council grant 2016-00782
  • was participating in a program at the Simons Institute for the Theory of Computing.

References

[GMN22] Stephan Gocht, Jakob Nordström Ruben Martins and Andy Oertel. Certified CNF Translations for Pseudo-Boolean Solving. In Proceedings of the 25nd International Conference on Theory and Applications of Satisfiability Testing (SAT '22), 2022 (to appear).

[BGMN22] Certified Symmetry and Dominance Breaking for Combinatorial Optimisation, Bart Bogaerts, Stephan Gocht, Ciaran McCreesh, Jakob Nordström, Proceedings of the AAAI Conference on Artificial Intelligence, 2022 (to appear).

[GN21] Certifying Parity Reasoning Efficiently Using Pseudo-Boolean Proofs, Stephan Gocht, Jakob Nordström, Proceedings of the AAAI Conference on Artificial Intelligence, 2021, 35, 3768-3777.

[GMN21] Stephan Gocht, Ciaran McCreesh and Jakob Nordström. VeriPB: The Easy Way to Make Your Combinatorial Search Algorithm Trustworthy. From Constraint Programming to Trustworthy AI, workshop at the 26th International Conference on Principles and Practice of Constraint Programming (CP '20), September 2020. [PDF] [VIDEO]

[GMMNPT2020] Stephan Gocht, Ross McBride, Ciaran McCreesh, Jakob Nordström, Patrick Prosser, and James Trimble. Certifying Solvers for Clique and Maximum Common (Connected) Subgraph Problems. In Proceedings of the 26th International Conference on Principles and Practice of Constraint Programming (CP '20), Lecture Notes in Computer Science, volume 12333, pages 338-357, September 2020.

[GMN2020] Stephan Gocht, Ciaran McCreesh, and Jakob Nordström. Subgraph Isomorphism Meets Cutting Planes: Solving with Certified Solutions. In Proceedings of the 29th International Joint Conference on Artificial Intelligence (IJCAI '20), pages 1134-1140, July 2020.

[EGMN20] Jan Elffers, Stephan Gocht, Ciaran McCreesh, and Jakob Nordström. Justifying All Differences Using Pseudo-Boolean Reasoning. In Proceedings of the 34th AAAI Conference on Artificial Intelligence (AAAI '20), pages 1486-1494, February 2020.

veripb's People

Contributors

stephangocht avatar jod avatar dietvdsvub avatar aoertel avatar ciaranm avatar

Stargazers

Govind Mohan avatar Ruichen Luo avatar Subhomoy Haldar avatar Valentin Mayer-Eichberger avatar  avatar Minal S Patil  avatar Felipe R. Monteiro avatar Jip J. Dekker avatar  avatar  avatar  avatar James Trimble avatar

Watchers

 avatar Massimo Lauria avatar James Cloos avatar  avatar James Trimble avatar  avatar  avatar

Forkers

ciaranm

veripb's Issues

Proof lines do not correspond to lines in proof log

The counter for which proof line we are operating on does not count comment lines. Therefore it is not possible to simply check the proof file at the right line number. Probably it would be nicer to have the rule number be equal to the line number.

Printing sorted constraints

Sort the constraints before printing based on their variable name to help the user compare constraints.

A simple stringcompare would even be useful, but a comparison on variable indices would be even better. E.g., check if the last characters of a variable name form a number. Order the variable names on their string without this number, break ties on number.

Inconsistent behaviour of deletion

Currently, deletion by find decreases the number of occurrences of a constraint by one.
However, the check whether this reaches zero is only done in del find, not in del id.

Minimal example to see this fail:

CNF formula:

p cnf 1 1 
1 0

PROOF:

pseudo-Boolean proof version 1.0
f 1
red 1 x2 >= 1 ; x2 -> 1 ; 
* "1 x2 >= 1" is now ONE time in the database (id 2)
u 1 x2 >= 1;
* "1 x2 >= 1" is now TWO times in the database (id 2, 3)
* first deleting with find (one occ), then with id means it is not deleted: 
del find 1 x2 >= 1 ;
* "1 x2 >= 1" is now STILL TWO times in the database (despite delete) 
del id 2 
* "1 x2 >= 1" is now ONE times in the database (despite two deletes) 
u 1 x2 >= 1;
* "1 x2 >= 1" is now TWO times in the database (id3,4). This derivation USES the fact that the constraint 3 was still in the database
del find 1 x2 >= 1 ;
* A single delete has deleted the TWO occurrences.

Feature request: preprocessing

"Find-and-replace" until fixpoint the following substrings in the proof:
_s_s -> _s
_1_d -> _
_1_* -> _
(underscores represent whitespace).

Especially the latter one can make my proofs a couple of percentage smaller.

Feature request: progress measure

When running VeriPB, it's not clear how long it will take. Some progress bar or other measure showing the number of lines processed vs the total amount of lines in the proof file would give a reasonable indication of how much time is needed to verify the rest of the proof.

Dummy Constraint

Currently constraint 0 can be accessed as dummy constraint 0 >= 0, this is undocumented and probably should not be standard. Goal: remove and provide explicit convenience constraint 0>=0.

Best Practice Section

Maybe we want a best practice section including, e.g., p - j - d sequence to avoid writing down lots of literals during weakening and removing the unweakened constraint that is potentially hard to propagate.

Interleaved trace output

When outputting the trace it might be useful to also print the applied rule (and maybe comments). For example:

* b!=1 (x3), no active decisions
p 0 5 + 7 + 15 + 17 + 37 + 41 + 1 d 0
* ===> 45 (rule 3): +1~x3 >= 1

Return code 127 when running low or out of memory.

During high memory usage with active memory limit (ulimit) it can happen that VeriPB terminates with return code 127, which is usually used for command not found.

If this happens we get the following error message:

cannot allocate memory for thread-local data: ABORT

Improve Documentation

Documentation is still quite poor and needs improvement.

Especially:

  • what is Boolean Division
  • what is Boolean Saturation

Performance improvements for occurrence list.

Building (and cleaning) the occurrence list might be on reason for attaching / detaching taking too much time. This could be done lazily as this is only required for redundancy checks.

Support Equalities

We might want to support qualities as proof lines, or maybe not, but then we should document properly why and what to do instead.

Multiple objectives

I would like to start a discussion around multi-objective pseudo boolean optimization. The result of a pseudo boolean optimization is (a subset of) a pareto front. Due to the nature of PBO this pareto front will contain finitely many points.
I envision three modes of verification.

  • check that all solutions given are a subset of the pareto front
  • check that the image of the solutions under the objectives is the entire pareto front
  • check that the solutions given are the entire preimage of the pareto front under the objectives

A subset of the pareto front might be generated by a positive linear combination of objectives, repeated optimization of one free objective or by a solver interacting with the user to explore the pareto front under his guidance or by trying to find the closest point to a given infeasible one. Even if the pareto front is not fully explored it can be useful to still be able to verify that those guided solves are on the pareto front.

A complete pareto front might be generated by a core driven search, a multi objective linear/binary search or a local exploration along the pareto front by relaxing one objective to increase others. The difference between point 2 and 3 is that multiple assignments might have the same objective values and the 2nd doesn't care that is got all assignments that that map to certain point on the pareto front.

This would require changes in format as objectives would need to be able to identified and preferably named.
In addition it would require additional reasoning about the completeness of the pareto front, such as:

  • that certain parts of the objective space are dominated by an existing solution,
  • that nothing can dominate a solution optimizing only objective A in objective A
  • maybe also something like "there are no intermediate solution" between pareto front members due to the discreteness of the search space.

Let me give an example that demonstrates this reasoning:

o1 -2 x1 -2 x2 -1 x3
o2 -3 x1 -2 ~x2

Lets find upper bound for o2
min -3 x1 -2 ~x2
We find assignment x1 ~x2 ~x3
This mean for all points of the pareto front: o2 <= -5, however this assignment (giving o1=-2) is not necessarily on the pareto front, so we need to check:
min -2 x2 -1 x3, -3 x1 -2 ~x2 = -5
We find assignment x1 ~x2 x3 with (-3,-5)
(-3,-5) can't be dominated since -5 is the minimum for o2 and o1 can't be any better subject to o2 = -5
Lets find upper bound for o1
min o1 -2 x1 -2 x2 -1 x3
we find assignment x1 x2 x3 
This mean for all points of the pareto front: o1 <= -5, however this assignment (giving o1=-3) is not necessarily on the pareto front, so we need to check:
min -3 x1 -2 ~x2, -2 x2 -1 x3  = -5
We find assignment x1 x2 x3 with (-5,-3)
(-5,-3) can't be dominated since -5 is the minimum for o1 and o2 can't be any better subject to o1 = -5
Since (-5,-3) is pareto optimal there can't be any (x,y) with x<-5 or (-5=x and y<=-3) or (x>=-5 and y>-3) or (x>-5 and y>=-3) that's also part of the pareto set and differs in objective
Since (-3,-5) is pareto optimal there can't be any (x,y) with y<-5 or (-5=y and x<=-3) or (y>=-5 and x>-3) or (y>-5 and x>=-3) that's also part of the pareto set and differs in objective
This only leaves a solution with (-4,-4) as possible candidate for the pareto set.
sat -2 x2 -1 x3 = -4, -3 x1 -2 ~x2 = 4
Such a solution however does not exist.
(-3,-5) with assignment x1 ~x2 x3
(-5,-3) with assignment  x1 x2 x3 
cover the entire pareto-set however we didn't check that they are all the assignments that could result in those objective values

I think this reasoning can be expressed entirely with the help of PB problems which can also be elaborated in the same proof format however the proof checker would need to be aware that sometimes we are not making statements about the variable space of a particular instance but reasoning about solution space in which the pareto front lies instead. Are limited form of this reasoning already exist to justify the search in PBO.

I am aware that one could use the existing format and just make a folder of named proofs about particular PBO/PB problems that occurred during solving and refer those in a proof at objective space level. However it might be bothersome to re-derive information or always check that all depended proofs were included.

I didn't find any reference to multi-objective optimization in that repository, so i started an issue.
Would you be open to consider proof logging for multi-objective pseudo boolean optimization?

Improving implication check

We might want to saturate constraints first before doing a syntactic implication check to get a slightly better check. Would it make sense to replace it by negation and rational feasibility check instead?

__int128 support

RoundingSat with LP solving computes Farkas constraints using __int128 precision. These Farkas constraints are divided down to fit 32 bit before storing them in the learned constraint database, but the computations to obtain them require 128 bit precision.

I tried for a short while to get VeriPB to use 128 bit computation, see https://github.com/StephanGocht/VeriPB/tree/bigint .

However, I got the following runtime error:

Sorry, there was an internal error. Because you are running in debug mode I will give you the exception.
Traceback (most recent call last):
  File "/home/jodv/.local/bin/veripb", line 11, in <module>
    load_entry_point('veripb', 'console_scripts', 'veripb')()
  File "/home/jodv/workspace/_systems/VeriPB/veripb/utils.py", line 156, in run_cmd_main
    return runUI(args.formula, args.derivation, verifyerSettings, arbitraryPrecision = args.arbitraryPrecision)
  File "/home/jodv/workspace/_systems/VeriPB/veripb/utils.py", line 116, in runUI
    raise e
  File "/home/jodv/workspace/_systems/VeriPB/veripb/utils.py", line 84, in runUI
    result = run(*args, **kwargs)
  File "/home/jodv/workspace/_systems/VeriPB/veripb/utils.py", line 48, in run
    formula = OPBParser(context.ineqFactory).parse(formulaFile)
  File "/home/jodv/workspace/_systems/VeriPB/veripb/timed_function.py", line 22, in wrapper
    res = function(*args, **kwargs)
  File "/home/jodv/workspace/_systems/VeriPB/veripb/parser.py", line 188, in parse
    constraints.extend(self.parseLine(line.rstrip()))
  File "/home/jodv/workspace/_systems/VeriPB/veripb/parser.py", line 233, in parseLine
    result = self.parseOPB(words)
  File "/home/jodv/workspace/_systems/VeriPB/veripb/parser.py", line 287, in parseOPB
    result = [self.ineqFactory.fromTerms(terms, degree)]
  File "constraints.pyx", line 404, in veripb.constraints.CppIneqFactory.fromTerms
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. veripb.optimized.constraints.CppInequality(arg0: List[__int128], arg1: List[int], arg2: __int128)

Invoked with: [], [], 0

Maybe the issue resides with the fact that the C interface should only provide long long CoefTypes, which currently seems to be the full __int128 type.

In any case, @StephanGocht, I'd be grateful if could you have a look, as it would be great if I could keep the proof checking for VeriPB working with LP integration.

I can provide some formula and proof files in which 128bit calculations are used if these would be of use.

Resolve maybe, update documentation

This is a minor point, but the semantics of ResolveMaybe is currently undefined in the documentation. If neither constraint contains the variable to be resolved over, then we should define what the result is. The easiest solution would be to simply return the first operand.

Alternatively disable rule.

Deletion semantic

Current semantic for deletion is that it may remove constraints. Desired semantic would be that deletion is enforced (especially for DRAT).

Inconsistency between solution and delete

Currently it is possible to log the same solution multiple times by adding the solution and then deleting the according constraint. Or to log non solutions by deleting clauses from the original formula. If we just want to verify that all solutions are found, then this is not an issue. If we want to verify a specific solution count then this needs to be forbidden.

Improve / Fix Hints

The hints if verification fails is pretty terrible and need to be improved. Currently the constraints are printed with the internal representation instead of the original names, which can lead to a lot of confusion.

Color code rules in trace.

It would be nice to have colored output also for the reprinting of lines in the proof file. Especially, having different colors for integers and constraint ids in reverse polish notation would be useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.