Forlan Manual


The TranSet Module


Synopsis

signature TRAN_SET
structure TranSet :> TRAN_SET

This module provides operations on finite sets of transitions, i.e., values of type Tran.tran Set.set that are standard in the sense that they are compatible with Tran.compare. All values of type Tran.tran Set.set will implicitly be assumed/required to be standard.


Interface

val memb : Tran.tran * Tran.tran Set.set -> bool
val fromList : Tran.tran list -> Tran.tran Set.set
val compare : Tran.tran Set.set Sort.total_ordering
val subset : Tran.tran Set.set * Tran.tran Set.set -> bool
val equal : Tran.tran Set.set * Tran.tran Set.set -> bool
val map : ('a -> Tran.tran) -> 'a Set.set -> Tran.tran Set.set
val mapFromList : ('a -> Tran.tran) -> 'a list -> Tran.tran Set.set
val union : Tran.tran Set.set * Tran.tran Set.set -> Tran.tran Set.set
val genUnion : Tran.tran Set.set list -> Tran.tran Set.set
val inter : Tran.tran Set.set * Tran.tran Set.set -> Tran.tran Set.set
val genInter : Tran.tran Set.set list -> Tran.tran Set.set
val minus : Tran.tran Set.set * Tran.tran Set.set -> Tran.tran Set.set
val inputFromLabToks : (int * Lex.tok) list -> Tran.tran Set.set * (int * Lex.tok) list
val fromString : string -> Tran.tran Set.set
val input : string -> Tran.tran Set.set
val toPP : Tran.tran Set.set -> PP.pp
val toString : Tran.tran Set.set -> string
val output : string * Tran.tran Set.set -> unit

Description

memb(tran, trans)
tests whether tran is a member of trans.

fromList trans
returns the set whose elements are the elements of trans.

compare
is Set.compare Tran.compare.

subset(tran1s, tran2s)
tests whether tran1s is a subset of tran2s.

equal(tran1s, tran2s)
tests whether tran1s is equal to tran2s.

map f xs
If xs is compatible with a value cmp of type 'a Sort.total_ordering, then map returns the set of all transitions f x such that x is a member of xs.

mapFromList f xs
returns the set of all transitions f x such that x is a member of xs.

union(tran1s, tran2s)
returns the union of tran1s and tran2s.

genUnion transs
returns the generalized union of transs.

inter(tran1s, tran2s)
returns the intersection of tran1s and tran2s.

genInter transs
returns the generalized intersection of transs. Issues an error message if transs is empty.

minus(tran1s, tran2s)
returns the difference of tran1s and tran2s.

inputFromLabToks lts
tries to input a set of transitions from lts, consuming as much of lts as possible, and returning the pair of the set of transitions and the rest of lts. Issues an error message if it fails. Will only return the empty set if lts doesn't begin with a symbol. If, after reading a transition, the next element of the labeled token list is "," (Lex.Comma), then inputFromLabToks insists on reading another transition, even if this results in failure.

fromString s
inputs a set of transitions from s.

input fil
inputs a set of transitions from the file fil.

toPP trans
returns a pretty-printing expression for trans.

toString trans
pretty-prints trans to a string.

output(fil, trans)
pretty-prints trans to file fil.


[ Top | Parent | Root | Contents | Index ]

Forlan Version 4.15
Copyright © 2022 Alley Stoughton