scholarly journals Towards Constraint-Solving over Higher-Order Unbounded Datatypes using Formal Methods Tools

10.29007/3rvf ◽  
2018 ◽  
Author(s):  
Michael Leuschel

We argue that formal methods such as B can be used to conveniently express a widerange of constraint satisfaction problems. We also show that some problems can be solvedquite eectively by existing formal methods tools such as Alloy or ProB. We illustrate ourclaim on several examples. Our approach is particularly interesting when a high assuranceof correctness is required. Indeed, validation and double checking of solutions is availablefor certain formal methods tools and formal proof can be applied to establish importantproperties or provide unambiguous semantics to problem specications. The experimentsalso provide interesting insights about the eectiveness of existing formal method tools,and highlight interesting avenues for future improvement.1

Author(s):  
Hiroshi Unno ◽  
Tachio Terauchi ◽  
Eric Koskinen

AbstractIn recent years they have been numerous works that aim to automate relational verification. Meanwhile, although Constrained Horn Clauses ($$\mathrm {CHCs}$$ CHCs ) empower a wide range of verification techniques and tools, they lack the ability to express hyperproperties beyond k-safety such as generalized non-interference and co-termination.This paper describes a novel and fully automated constraint-based approach to relational verification. We first introduce a new class of predicate Constraint Satisfaction Problems called $$\mathrm {pfwCSP}$$ pfwCSP where constraints are represented as clauses modulo first-order theories over predicate variables of three kinds: ordinary, well-founded, or functional. This generalization over $$\mathrm {CHCs}$$ CHCs permits arbitrary (i.e., possibly non-Horn) clauses, well-foundedness constraints, functionality constraints, and is capable of expressing these relational verification problems. Our approach enables us to express and automatically verify problem instances that require non-trivial (i.e., non-sequential and non-lock-step) self-composition by automatically inferring appropriate schedulers (or alignment) that dictate when and which program copies move. To solve problems in this new language, we present a constraint solving method for $$\mathrm {pfwCSP}$$ pfwCSP based on stratified CounterExample-Guided Inductive Synthesis (CEGIS) of ordinary, well-founded, and functional predicates.We have implemented the proposed framework and obtained promising results on diverse relational verification problems that are beyond the scope of the previous verification frameworks.


2013 ◽  
Author(s):  
Αναστασία Παπαρρίζου

Ο Προγραμματισμός με Περιορισμούς (Constraint Programming - CP) είναι μια επιτυχημένητεχνολογία για την επίλυση πολλών προβλημάτων από το χώρο των επιχειρήσεων και τηςβιομηχανίας, που απαιτούν την ικανοποίηση μιας σειράς πολύπλοκων περιορισμών.Παραδείγματα τέτοιων προβλημάτων είναι η διαμόρφωση προϊόντος, η κατανομή πόρων, ταπροβλήματα μεταφοράς και χρονοπρογραμματισμού. Επειδή η ταυτόχρονη ικανοποίηση τωνδιαφόρων περιορισμών είναι γενικά δυσεπίλυτη, τα προβλήματα μπορεί να γίνουν ακόμηδυσκολότερα καθώς αυξάνει το μέγεθός τους. Ο Προγραμματισμός με Περιορισμούς έχειαναπτύξει διάφορες τεχνικές για να αντιμετωπίσει αυτό το εγγενές πρόβλημα. Μια από τις πιοσημαντικές τέτοιες τεχνικές είναι η εφαρμογή τοπικής συνέπειας.Οι τοπικές συνέπειες που έχουν ευρέως μελετηθεί και χρησιμοποιηθεί από συστήματαεπίλυσης είναι η συνέπεια ορίων (Bounds Consistency - BC) και η συνέπεια τόξου (ArcConsistency - AC). Παρότι έχουν προταθεί και ισχυρότερες τοπικές συνέπειες, η χρήση τους είναιπεριορισμένη λόγω του απαγορευτικού κόστους τους. Παραδείγματα αποτελούν οι συνέπειες maxRestricted Path Consistency (maxRPC) και max Restricted PairWise Consistency (maxRPWC).Στην παρούσα έρευνα προτείνουμε αποδοτικούς αλγόριθμους ελέγχου συνέπειας για τηνεπιβολή ισχυρών τοπικών συνεπειών. Συγκεκριμένα, προτείνουμε νέους αλγόριθμους για τιςσυνέπειες maxRPC και maxRPWC που βελτιώνουν (θεωρητικά και πρακτικά) τουςπροηγούμενους. Επίσης, προτείνουμε αλγόριθμους που εφαρμόζουν ασθενέστερες συνέπειες μεχαμηλότερο κόστος, έχουμε επεκτείνει τους πρόσφατους από την οικογένεια των STR (SimpleTabular Reduction) αλγορίθμων για την επίτευξη υψηλότερης τάξης (higher-order) τοπικήςσυνέπειας. Πειράματα δείχνουν ότι αυτοί οι αλγόριθμοι μπορούν να ξεπεράσουν state-ot-the-artAC αλγόριθμους με σημαντικές διαφορές, ακόμη και κατά τάξεις μεγέθους, και συνεπώς, μπορούννα αποτελέσουν χρήσιμες προσθήκες στις τεχνικές διάδοσης περιορισμών για τους σύγχρονουςCP επιλυτές. Επιπρόσθετα, εισάγουμε και ορίζουμε μια νέα ισχυρή συνέπεια ορίων, πουονομάζεται PWBC, καθώς και έναν πολυωνυμικό αλγόριθμο ελέγχου συνέπειας που βασίζεται σεαυτήν για την σημαντική κατηγορία των γραμμικών ανισοτήτων. Τα θεωρητικά και πειραματικάαποτελέσματα αναδεικνύουν τις δυνατότητες των ισχυρών συνεπειών που επιβάλλονται στα όρια.Τέλος, δεδομένου ότι οι ισχυρές συνέπειες μπορεί να εξακολουθούν να είναι ακριβές στηνεφαρμογή τους κατά την αναζήτηση σε πολλά προβλήματα, προτείνουμε τρόπους ώστε ναπαρεμβάλλονται μαζί με ασθενέστερες συνέπειες, όπως η συνέπεια τόξου. Προτείνουμε πλήρωςαυτοματοποιημένες ευρετικές μεθόδους, που μπορούν να επιλέξουν δυναμικά τον καταλληλότεροαλγόριθμο φιλτραρίσματος. Οι προτεινόμενοι αλγόριθμοι ενσωματώνονται σε ένα προσαρμοστικόσύστημα διάδοσης περιορισμών για να αντιμετωπίσει περαιτέρω την εγγενή δυσκολίαικανοποίησης περιορισμών, με αποτέλεσμα έναν ισχυρότερο επιλυτή. Συνολικά, η έρευναπροτείνει αλγόριθμους φιλτραρίσματος και προσαρμοστικές τεχνικές που εκμεταλλεύονται τομεγάλο φιλτράρισμα των ισχυρών συνεπειών με αποτελεσματικό τρόπο, προκειμένου να αυξηθείη αποτελεσματικότητα των CP επιλυτών.


2021 ◽  
Vol 30 (4) ◽  
pp. 1-29
Author(s):  
Philipp Paulweber ◽  
Georg Simhandl ◽  
Uwe Zdun

Abstract State Machine (ASM) theory is a well-known state-based formal method. As in other state-based formal methods, the proposed specification languages for ASMs still lack easy-to-comprehend abstractions to express structural and behavioral aspects of specifications. Our goal is to investigate object-oriented abstractions such as interfaces and traits for ASM-based specification languages. We report on a controlled experiment with 98 participants to study the specification efficiency and effectiveness in which participants needed to comprehend an informal specification as problem (stimulus) in form of a textual description and express a corresponding solution in form of a textual ASM specification using either interface or trait syntax extensions. The study was carried out with a completely randomized design and one alternative (interface or trait) per experimental group. The results indicate that specification effectiveness of the traits experiment group shows a better performance compared to the interfaces experiment group, but specification efficiency shows no statistically significant differences. To the best of our knowledge, this is the first empirical study studying the specification effectiveness and efficiency of object-oriented abstractions in the context of formal methods.


2013 ◽  
Vol 44 (2) ◽  
pp. 131-156 ◽  
Author(s):  
Laura Climent ◽  
Richard J. Wallace ◽  
Miguel A. Salido ◽  
Federico Barber

Author(s):  
Marlene Arangú ◽  
Miguel Salido

A fine-grained arc-consistency algorithm for non-normalized constraint satisfaction problems Constraint programming is a powerful software technology for solving numerous real-life problems. Many of these problems can be modeled as Constraint Satisfaction Problems (CSPs) and solved using constraint programming techniques. However, solving a CSP is NP-complete so filtering techniques to reduce the search space are still necessary. Arc-consistency algorithms are widely used to prune the search space. The concept of arc-consistency is bidirectional, i.e., it must be ensured in both directions of the constraint (direct and inverse constraints). Two of the most well-known and frequently used arc-consistency algorithms for filtering CSPs are AC3 and AC4. These algorithms repeatedly carry out revisions and require support checks for identifying and deleting all unsupported values from the domains. Nevertheless, many revisions are ineffective, i.e., they cannot delete any value and consume a lot of checks and time. In this paper, we present AC4-OP, an optimized version of AC4 that manages the binary and non-normalized constraints in only one direction, storing the inverse founded supports for their later evaluation. Thus, it reduces the propagation phase avoiding unnecessary or ineffective checking. The use of AC4-OP reduces the number of constraint checks by 50% while pruning the same search space as AC4. The evaluation section shows the improvement of AC4-OP over AC4, AC6 and AC7 in random and non-normalized instances.


2001 ◽  
Vol 1 (6) ◽  
pp. 713-750 ◽  
Author(s):  
KRZYSZTOF R. APT ◽  
ERIC MONFROY

We study here a natural situation when constraint programming can be entirely reduced to rule-based programming. To this end we explain first how one can compute on constraint satisfaction problems using rules represented by simple first-order formulas. Then we consider constraint satisfaction problems that are based on predefined, explicitly given constraints. To solve them we first derive rules from these explicitly given constraints and limit the computation process to a repeated application of these rules, combined with labeling. We consider two types of rule here. The first type, that we call equality rules, leads to a new notion of local consistency, called rule consistency that turns out to be weaker than arc consistency for constraints of arbitrary arity (called hyper-arc consistency in Marriott & Stuckey (1998)). For Boolean constraints rule consistency coincides with the closure under the well-known propagation rules for Boolean constraints. The second type of rules, that we call membership rules, yields a rule-based characterization of arc consistency. To show feasibility of this rule-based approach to constraint programming, we show how both types of rules can be automatically generated, as CHR rules of Frühwirth (1995). This yields an implementation of this approach to programming by means of constraint logic programming. We illustrate the usefulness of this approach to constraint programming by discussing various examples, including Boolean constraints, two typical examples of many valued logics, constraints dealing with Waltz's language for describing polyhedral scenes, and Allen's qualitative approach to temporal logic.


Sign in / Sign up

Export Citation Format

Share Document