1,908 research outputs found

    Teaching Programming and Design-by-Contract

    Get PDF
    This paper summarizes the experience of teaching an introductory course to programming by using a correctness by construction approach at Innopolis University, Russian Federation. In this paper we claim that division in beginner and advanced groups improves the learning outcomes, present the discussion and the data that support the claim.Comment: 21th International Conference on Interactive Collaborative Learnin

    Tool Support for Design by Contract

    Get PDF

    Game Development using Design-by-Contract.

    Get PDF

    Towards a design-by-contract based approach for realizable connector-centric software architectures

    Get PDF
    Despite being a widely-used language for specifying software systems, UML remains less than ideal for software architectures. Architecture description languages (ADLs) were developed to provide more comprehensive support. However, so far the application of ADLs in practice has been impeded by at least one of the following problems: (i) advanced formal notations, (ii) lack of support for complex connectors, and (iii) potentially unrealizable designs. In this paper we propose a new ADL that is based on Design-by-Contract (DbC) for specifying software architectures. While DbC promotes a formal and precise way of specifying system behaviours, it is more familiar to practising developers, thus allowing for a more comfortable way of specifying architectures than using process algebras. Furthermore, by granting connectors a first-class status, our ADL allows designers to specify not only simple interaction mechanisms as connectors but also complex interaction protocols. Finally, in order to ensure that architectural designs are always realizable we eliminate potentially unrealizable constructs in connector specifications (the connector “glue”)

    Design by Contract Framework for Quantum Software

    Full text link
    To realize reliable quantum software, techniques to automatically ensure the quantum software's correctness have recently been investigated. However, they primarily focus on fixed quantum circuits rather than the procedure of building quantum circuits. Despite being a common approach, the correctness of building circuits using different parameters following the same procedure is not guaranteed. To this end, we propose a design-by-contract framework for quantum software. Our framework provides a python-embedded language to write assertions on the input and output states of all quantum circuits built by certain procedures. Additionally, it provides a method to write assertions about the statistical processing of measurement results to ensure the procedure's correctness for obtaining the final result. These assertions are automatically checked using a quantum computer simulator. For evaluation, we implemented our framework and wrote assertions for some widely used quantum algorithms. Consequently, we found that our framework has sufficient expressive power to verify the whole procedure of quantum software

    Testing software based on design by contract

    Get PDF
    In the last decade, several proposals have been done for construction of aspectoriented system for testing software products. The article presents results from design and development of a new aspect-oriented system for testing software created in Java 5 as an open source project named CodeContract, by using Design by Contract methodology. The system provides means of describing contracts and conditions during the design of software systems that should be satisfied during the system work process. Various conditions used in the contracts are able to be defined by means of preconditions, post-conditions and invariants. In order to describe these conditions in contracts, Java annotations are used. When using the Code- Contract system, contracts should be created during the development of software application. Then runtime checks of contracts are executed during the testing of the software applicatio

    Design-By-Contract for Flexible Multiparty Session Protocols

    Get PDF
    Choreographic models support a correctness-by-construction principle in distributed programming. Also, they enable the automatic generation of correct message-based communication patterns from a global specification of the desired system behaviour. In this paper we extend the theory of choreography automata, a choreographic model based on finite-state automata, with two key features. First, we allow participants to act only in some of the scenarios described by the choreography automaton. While this seems natural, many choreographic approaches in the literature, and choreography automata in particular, forbid this behaviour. Second, we equip communications with assertions constraining the values that can be communicated, enabling a design-by-contract approach. We provide a toolchain allowing to exploit the theory above to generate APIs for TypeScript web programming. Programs communicating via the generated APIs follow, by construction, the prescribed communication pattern and are free from communication errors such as deadlocks

    Analisis dan Implementasi Design by Contract Menggunakan Java Modelling Language

    Get PDF
    ABSTRAKSI: Design by Contract merupakan suatu metodologi untuk membangun software yang bertujuan untuk mengecek kebenaran program/software. Metode ini terdiri dari preconditions, postconditions dan invariant. Java Modelling Language adalah bahasa yang mengspesifikasikan kelas-kelas atau interface-interface secara detail dengan menambahkan keterangan/anotasi ke dalam file java. Java merupakan bahasa pemrograman berorientasi-objek Bahasa ini merupakan bahasa yang dapat berjalan pada lebih dari satu platform, namun bahasa java tidak diciptakan khusus untuk menangani metode DBC.Tugas akhir ini menganalisis tentang pengimplementasian Design by Contract menggunakan Java Modelling Language. Sebagai studi kasus, tugas akhir ini akan menggunaka Aplikasi Toko Bunga. Program dibuat dengan bahasa pemrograman Java dan menggunakan JML 5.6. Penerapan DBC dengan JML pada aplikasi dapat mengspesifikasikan atribut dan behavior dari method. Selain itu, error-error yang mungkin terjadi pada aplikasi dapat ditangani, sehingga correctness dari sebuah program akan terjaga.Kata Kunci : Design by Contract, Java Modelling Language, Java.ABSTRACT: Design by Contract is a method for developing software to check reliability of a program/software. This method includes precondition, postcondition and invariant. Java Modelling Language is a formal behavioral interface specification language for class and interface specifically by adding annotation to java file. Java is multi platform language, but java is not made to handle DBC specially.This final project analyze how to implement Design by Contract using Java Modelling Language. As a case study, this final project use Flower Shop application. This program is made with Java and JML 5.6. Implementation of DBC JML in application can specify field and behavior of method. In addition, errors that can happen in application can handle, hence one can make sure the correctness of the application.Keyword: Design by Contract, Java Modeling Language, Java
    corecore