term

File term.str
Author unknown
Since unknown

Term input and output.




Statistics


General
Lines of code 286
Stratego
Module number 1 (100% documented)
Constructor number 0
Overlay number 0
Strategy number 34 (64% documented)
Rule number 0
DynamicRule number 0



Strategy summary


debug Prints the current term to stderr without changing it term.str
debug(Strategy msg) Prints the term produced by applying msg followed by the current term to stderr term.str
debug-depth n/a term.str
debug-depth(Strategy depth) n/a term.str
debug-depth(Strategy depth, Strategy s) n/a term.str
echo n/a term.str
echo(Strategy msg) n/a term.str
error Prints a list of terms to stderr using fprintnl term.str
fatal-error Prints a list of terms to stderr using fprintnl and exits with code 1 term.str
fprint Prints the terms to a stream term.str
fprintnl fprint, followed by a newline term.str
giving-up Prints giving-up to stderr and exits with code 1 term.str
obsolete(Strategy msg) Logs an obsolete strategy message with the given message term.str
open(Strategy file) n/a term.str
printstring n/a term.str
read-from-stream Reads an ATerm from a Stream term.str
read-from-string Reads an ATerm from a String term.str
ReadFromFile <ReadFromFile> file reads the term in file term.str
risky(Strategy msg, Strategy s) Tries to apply s and prints msg to stderr if this fails term.str
save(Strategy file) n/a term.str
say(Strategy msg) Prints the term produced by applying msg to stderr term.str
trace(Strategy msg, Strategy s) n/a term.str
write-in-baf-to-stream n/a term.str
write-in-taf-to-stream n/a term.str
write-in-text-to-stream n/a term.str
write-to-binary-string Writes an ATerm to a binary string represented as a list of chars term.str
write-to-shared-string Writes an ATerm to a shared string represented as a list of chars term.str
write-to-stream Writes an ATerm to a Stream term.str
write-to-string Writes an ATerm to a String term.str
WriteToBinaryFile <WriteToBinaryFile> (file, term) writes term to file in BAF format term.str
WriteToFile(Strategy writer) <WriteToFile(s)> (file, term) writes term to file with the writer s term.str
WriteToTextFile <WriteToTextFile> (file, term) writes term to file in textual ATerm format term.str



Strategy details


ATerm debug
File term.str
Author unknown
Since unknown
 

Prints the current term to stderr without changing it.This is a useful strategy for debugging specifications (hence its name).


type a -> a

 
ATerm debug(Strategy msg)
File term.str
Author unknown
Since unknown
 

Prints the term produced by applying msg followed by the current term to stderr.


type a -> a

 
ATerm error
File term.str
Author unknown
Since unknown
 

Prints a list of terms to stderr using fprintnl.


type List(a) -> List(a)

 
ATerm fatal-error
File term.str
Author unknown
Since unknown
 

Prints a list of terms to stderr using fprintnl and exits with code 1.


type List(a) -> List(a)

 
ATerm fprint
File term.str
Author unknown
Since unknown
 

Prints the terms to a stream. If a term is a string it is printed without quotes, otherwise it is printed as a term.


type Stream * [a] -> Stream

 
ATerm fprintnl
File term.str
Author unknown
Since unknown
 

fprint, followed by a newline.


type Stream * [a] -> Stream

 
ATerm giving-up
File term.str
Author unknown
Since unknown
 

Prints giving-up to stderr and exits with code 1.


type _ -> _

 
ATerm obsolete(Strategy msg)
File term.str
Author unknown
Since unknown
 
Parameters
Strategy msg Strategy that produces a string message.

Logs an obsolete strategy message with the given message.


type a -> a

 
ATerm read-from-stream
File term.str
Author unknown
Since unknown
 

Reads an ATerm from a Stream


type Stream -> _

 
ATerm read-from-string
File term.str
Author unknown
Since unknown
 

Reads an ATerm from a String


type String -> _

 
ATerm ReadFromFile
File term.str
Author unknown
Since unknown
 

<ReadFromFile> file reads the term in file. The file needs to be in textual or binary ATerm format.


type File -> a

 
ATerm risky(Strategy msg, Strategy s)
File term.str
Author unknown
Since unknown
 
Parameters
Strategy msg Strategy that produces a string message
Strategy s Strategy to apply

Tries to apply s and prints msg to stderr if this fails.Risky preserves the failure of s: if s fails, then risky willfail as well.


type a -> a

 
ATerm say(Strategy msg)
File term.str
Author unknown
Since unknown
 
Parameters
Strategy msg term to print to stderr

Prints the term produced by applying msg to stderr.


type a -> a

 
ATerm write-to-binary-string
File term.str
Author unknown
Since unknown
 

Writes an ATerm to a binary string represented as a list of chars.


type a -> List(Char)

 
ATerm write-to-shared-string
File term.str
Author unknown
Since unknown
 

Writes an ATerm to a shared string represented as a list of chars.


type a -> List(Char)

 
ATerm write-to-stream
File term.str
Author unknown
Since unknown
 

Writes an ATerm to a Stream.


type Stream * _ -> Stream

 
ATerm write-to-string
File term.str
Author unknown
Since unknown
 

Writes an ATerm to a String


type a -> String

 
ATerm WriteToBinaryFile
File term.str
Author unknown
Since unknown
 

<WriteToBinaryFile> (file, term) writes term to file in BAF format.i


type File * a -> a

 
ATerm WriteToFile(Strategy writer)
File term.str
Author unknown
Since unknown
 

<WriteToFile(s)> (file, term) writes term to file with the writer s.


type (Stream * a -> Stream) * File * a -> a

 
ATerm WriteToTextFile
File term.str
Author unknown
Since unknown
 

<WriteToTextFile> (file, term) writes term to file in textual ATerm format.


type File * a -> a