Connectivity - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Connectivity

 

SMTLIB

URL

YAML

SMTLIB

The SMTLIB package provides support for converting Maple expressions to input in the SMT-LIB language format.

SMT-LIB is an interface language frequently used by programs designed to solve SMT (Satisfiability Modulo Theories) problems.

 

The SMTLIB[ToString] command converts a Maple expression into SMT-LIB input which can then be fed as input into an SMT solver program. By default, the generated SMT-LIB script performs a simple satisfiability query.

Example 1: Generate an SMT-LIB script testing whether a logical formula has a satisfying assignment (that is, an assignment of values making the formula true).

(1.1)

(1.2)

(1.3)

If an explicit satisfying assignment is desired, we can optionally generate a script requesting the SMT solver to produce one (here, a set of values for , ,  for which the formula is true).

(1.4)

In addition to Boolean-valued variables, SMT-LIB variables may also be numeric. The generated SMT-LIB requests a nontrivial solution in positive integers to the equation . (When such a solution exists, the integer  is known as a taxicab number, the smallest of which is 1729.)

(1.5)

URL

The existing URL package has been extended with three new commands: URL[Delete], URL[Head], and URL[Put]. These correspond directly to the HTTP (Hypertext Transfer Protocol) commands DELETE, HEAD, and PUT, respectively.

The inclusion of Delete, Head, and Put in the URL package, along with the existing URL[Get] and URL[Post], enables Maple code to make use of REST (REpresentational State Transfer) web interfaces. These interfaces offer access and manipulation of online resources by use of a uniform set of stateless operations based on HTTP.

Example: The Head command issues an HTTP HEAD request. This requests a response from the server identical to that of a GET request, but without the body of the response. Among many other uses, this command may be used to confirm that a remote server is online and accepting requests.

(2.1)

(2.2)

YAML

The new YAML package allows import and export of files and strings in the YAML format, a lightweight file format for exchanging structured data.
The commands YAML[ParseFile] and YAML[ParseString] parse YAML files and strings, respectively, to Maple expressions. The inverse operation, conversion of Maple structures to YAML, is provided by YAML[ToString].

The general-purpose commands Import and Export have also been extended to support YAML.


Example: Import YAML data encoding the mailing address of Maplesoft headquarters.

(3.1)

(3.2)

(3.3)


Download Help Document