package lutin

  1. Overview
  2. Docs
Lutin: modeling stochastic reactive systems

Install

Dune Dependency

Authors

Maintainers

Sources

lutin.v2.71.15.tgz
md5=a7da42464f4ad0619bc4e759f2defca3
sha512=2142fe82b22c10f1baaf8591d177f2497c00b93e4f9d92b50e4ff24b34ecbc9d5dc8537efa21c94c09623501a1ef26292cfad36fa12fdde5cbe0add716b9c7cb

doc/lutin/Var/index.html

Module VarSource

Lucky variables.

Sourcetype 'a t

Abstract type encoding lucky variables and containing all informations attached to them.

This variable type is parametrised by the type of expression variables refer to.

Name, mode, and type of a variable.
Sourcetype name = string
Sourcetype mode =
  1. | Input
  2. | Output
  3. | Local
  4. | Pre
Substitutions.
Sourcetype subst = name * Value.t
Sourcetype num_subst = name * Value.num
Building Variables.
Sourceval make : string -> string -> Type.t -> mode -> 'a t

Makes a var with the mandatory fields, i.e., its name, type, and mode.

Sourceval make_pre : 'a t -> 'a t

Makes a pre var of a var.

nb : "make_pre v" will be different from "make_pre v" (in the sense of ocaml compare) although they will have the same value in the end. It migth be useful to tabulate them in the caller.

Sets the non-mandatory fields of a variable.
Sourceval set_min : 'a t -> 'a -> 'a t
Sourceval set_max : 'a t -> 'a -> 'a t
Sourceval set_alias : 'a t -> 'a -> 'a t
Sourceval set_init : 'a t -> 'a -> 'a t
Variable information retrieval.

Respectively retrieves the name, type, mode, min, max, alias, and init values of a variable. Non mandatory fields (of course) return an option type.

Sourceval name : 'a t -> name
Sourceval typ : 'a t -> Type.t
Sourceval mode : 'a t -> mode
Sourceval min : 'a t -> 'a option
Sourceval max : 'a t -> 'a option
Sourceval alias : 'a t -> 'a option
Sourceval init : 'a t -> 'a option
Representing the input, output, and local variables vectors.

We use an hash table to represent it as we will need to retrieve input values very often when evaluating formulas (and also weights). -> Replaced by a map

Sourcetype env_in
Sourcetype env_out
Sourcetype env_loc
Sourcetype env

For those types we use lists because the only operation we will need to perform over them is to add elements.

Sourceval index : 'a t -> int
OCaml

Innovation. Community. Security.