This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. RNPCALC. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 STACK-POS PIC 9(2) VALUE 1. | |
01 STACK. | |
03 STACK-DATA PIC 9(4) OCCURS 10 VALUE 0. | |
01 EXPR PIC X(20). | |
01 EXPR-POS PIC 9(2). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. FIBONACCI. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 ARGUMENT PIC 9(2). | |
01 RETURN-VALUE PIC 9(25). | |
01 RESULT PIC Z(25). | |
01 DP-TABLE. | |
03 VALS PIC 9(25) OCCURS 99. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. DEATH-MARCH-05. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
77 FB-STR PIC X(153). | |
77 CNT PIC 9(2) VALUE 1. | |
77 QUOT PIC 9(2). | |
77 REM-3 PIC 9(1). | |
77 REM-5 PIC 9(1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Resource Sharing Problem (Example for Deadlock) | |
*/ | |
mtype = { LOCK, UNLOCK }; | |
proctype Client(chan to_res1, to_res2) { | |
if | |
:: to_res1 ! LOCK(_pid); | |
to_res2 ! LOCK(_pid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameter A : Type. | |
Parameter beq_A : A -> A -> bool. | |
Section Uniq. | |
Require Import Arith List. | |
Hypothesis beq_A_true : forall x y : A, | |
beq_A x y = true -> x = y. | |
Hypothesis beq_A_false : forall x y : A, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(******************************************************) | |
(** //// Kliesli Construction of Monads //// *) | |
(******************************************************) | |
Require Import Logic.FunctionalExtensionality. | |
(*////////////////////////////////////////////////////*) | |
(** Preliminaries *) | |
(*////////////////////////////////////////////////////*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(******************************************************) | |
(** //// Modular Lattices //// *) | |
(******************************************************) | |
Section ModularLattice. | |
Require Import Relation_Definitions Setoid Morphisms. | |
(*////////////////////////////////////////////////////*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(******************************************************) | |
(** //// Topology Spaces //// *) | |
(******************************************************) | |
Section Topology. | |
(*////////////////////////////////////////////////////*) | |
(** Axioms *) | |
(*////////////////////////////////////////////////////*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(******************************************************) | |
(** //// Validation of the Quick Sort //// *) | |
(******************************************************) | |
Section QuickSort. | |
Require Import Arith List. | |
Require Import Recdef. | |
Require Import Sorting.Sorted Sorting.Permutation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(*******************************************************) | |
(** //// Validation of the Stack Machine Compiler //// *) | |
(*******************************************************) | |
Require Import List. | |
(* Definition : Identifiers *) | |
Inductive id : Type := | |
| Id : nat -> id. |
OlderNewer