Mercury

Software Screenshot:
Mercury
Software Details:
Version: 13.05.1
Upload Date: 15 Apr 15
Developer: Mercury Developers
Distribution Type: Freeware
Downloads: 11

Rating: 2.0/5 (Total Votes: 1)

Logic programming languages have been around for more than twenty years. Despite the expected advantages of a very high level programming language based upon well developed theories of logic over conventional programming languages (such as C, C++, Pascal and Ada) they have not had significant impact on the computer industry.

Mercury is a new logic/functional programming language, which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features.

Mercury is highly optimized execution algorithm delivers efficiency far in excess of existing logic programming systems, and close to conventional programming systems.

Mercury addresses the problems of large-scale program development, allowing modularity, separate compilation, and numerous optimization/time trade-offs.

What is new in this release:

  • This bugfix release fixes build problems on Solaris and NetBSD and adds support for selecting the C# compiler at configuration time.
  • Various other minor bugs have been fixed.
  • There are also some minor additions to the standard library.

What is new in version 13.05:

  • Generation of 64-bit executables on Windows is now supported.
  • Compilation times for very large programs have been improved.
  • Several new type representation optimizations have been added.
  • The debugger now has better support for handling cliques of mutually recursive calls on the stack.
  • A binding to the GLFW library has been added to the extras distribution.
  • Assemblies generated with the C# backend can now be signed with a strong name.

What is new in version 11.01:

  • We have added two new kinds of scopes to the language.
  • A scope introduced by one of the new keywords require_det, require_semidet, require_multi, require_nondet, require_cc_multi, require_cc_nondet, require_erroneous and require_failure, as the name implies, requires the goal inside the scope to have the given determinism.
  • A scope introduced by the keyword require_complete_switch requires the goal inside the scope, if it is a switch on the variable named by the scope, to be a complete switch, i.e. to have arms for all the function symbols in the type of the switched-on variable.
  • We have added semidet modes for hash_table.fold/4 and version_hash_table.fold/4.
  • We have added new predicates and functions to the assoc_list module. The predicates map_keys_only/3 map_values_only/3 and map_values/3 complement the functions of the same name. The predicates filter/3, negated_filter/3, filter/4, merge/3, which also have function versions, do jobs very similar to the predicates of the same name in the list module, but do the relevant operations on keys instead of entire list elements.
  • We have moved the lazy evaluation module out of the extras distribution and into a new standard library module called `lazy'. It has also been made backend-agnostic.
  • We have made changes to the list module of the standard library:
  • We added a new predicate list.member_index0/3. It is like list.member/2 except that it also takes a parameter representing the zero-based index of the element within the list.
  • We added a new predicate list.map3_foldl/7 which maps over a list producing three lists and one folded value.
  • We added semidet modes with unique accumulators for list.foldl3/8, list.foldl4/10, list.foldl5/12, and list.foldl6/14.
  • We have added the predicates divide/4 and divide_by_set/4 to the tree_bitset module of the standard library.
  • We have added the predicates set_ctree234.member/2 and set_ctree234.non_empty/1. We have add the function set_ctree234.from_list/1.
  • We have added the the predicate set_bbbtree.count/2 and the function set_bbbtree.count/1. These replace the predicate set_bbbtree.size/2 which is now deprecated.
  • We have added the predicate set_ordlist.non_empty/1.
  • We have added the predicate set_tree234.non_empty/1 and the function set_tree234.from_list/1.
  • We have added the predicates set_unordlist.non_empty/1 and set_unordlist.count/2, and the function set_unordlist.count/1.
  • All of the modules in the standard library that implement the set ADT, (set, set_ordlist, set_unordlist, set_bbbtree, set_tree234, and set_ctree234), now support folding over sets with up to six accumulators. Modes that provide unique and mostly-unique accumulators for set fold have also been added.
  • We have made the following changes to the array module of the standard library:
  • We have added the functions unsafe_elem/2 and append/2.
  • We have added the predicates svset/4, unsafe_svset/4, foldl2/4, foldl2/6, foldr/4, foldr2/6, map_foldl/5, map_corresponding_foldl/6, and member/2.
  • We have added the predicates version_array.foldl2/6, version_array.foldr/4, and version_array.foldr2/6 to the standard library.
  • We have added semidet modes with unique and mostly-unique accumulators for the following predicates:
  • bimap.foldl2/6
  • bimap.foldl3/8
  • cord.foldl_pred/4
  • cord.map_foldl/5
  • list.map_corresponding_foldl2/8
  • list.map_corresponding_foldl3/10
  • list.map_corresponding3_foldl/7
  • map.foldl3/8
  • We have added the predicate unsorted_aggregate2/6 to the solutions module of the standard library.
  • We have added several predicates and functions to the require module of the standard library. The predicates sorry/2 and sorry/3 report the absence of a feature, while the predicates unexpected/2 and unexpected/3 report an internal error in the program; all have function versions too. The predicate expect/3 calls unexpected if a condition isn't satisfied. We now have expect/4 as well as expect/3. For expect/4 as well as expect/3, the first and last arguments are the expected condition and the error message respectively, but with expect/4, there are two arguments in the middle to specify the location of the error (normally the name of the module and of the predicate respectively). We also added expect_not/3 and expect_not/4, which are like expect/3 and expect/4 respectively, except they expect the condition to be *false*, not true.

What is new in version 10.04.2:

  • This release is a bug-fix release. A number of problems that caused the compiler to abort have been fixed, some broken RTTI operations in the java grade have been fixed, and we have added a workaround for a problem with GCC version 4.4.

Limitations:

  • The current implementation does not yet completely implement the Mercury language. The main limitations of the current implementation are the following:
  • We do not allow definite aliasing in the mode system. Without this, partially instantiated modes are unusable, and so are nested unique modes.
  • The compiler does not yet use structure reuse or compile-time garbage collection to exploit unique modes.
  • Type and mode inference are a bit imperfect.
  • In addition, design decisions in this implemenation have imposed the following limits:
  • Predicates and functions can have at most about 1000 arguments.
  • Higher-order terms can have at most about 500 arguments.

Similar Software

TinyCOBOL
TinyCOBOL

11 May 15

Qg
Qg

11 May 15

Comments to Mercury

Comments not found
Add Comment
Turn on images!